Webservice feature – Language independent

This tutorial will show you an example on how to test one of the features of webservice called language independence. Webservice is a technology by which two or more remote web applications interact with each other over network/internet. It can be implemented using Java, .net, PHP etc. Please go through the REST webservice created using Codeigniter framework Working with RESTful services in Codeigniter – GET example So we will call the above REST webservice created in PHP Codeigniter framework using Java language. So basically the Java language will works as a…

Continue

REST Webservice Authentication

In this tutorial I am going to show you how we can authenticate the REST webservice using sending credential information in Cookie. The most important concept in REST is resources, which are identified by global IDs — typically using URIs. Client applications use HTTP methods (GET/ POST/ PUT/ DELETE) to manipulate the resource or collection of resources. A RESTful Web service is implemented using HTTP and the principles of REST. Typically, a RESTful Web service should define the following aspects: The base/root URI for the Web service such as http://<host>/<appcontext/contextpath>/<url…

Continue

Convert List, Map to JSON in REST Response using Jersey

Introduction In this post we will see how to convert List, Map to JSON in REST Response using Jersey API. We will create three separate REST methods to convert List to JSOn, Map to JSON and List of Map to JSON string. We will annotate the REST resource class with @Path for having the base URI of the REST resources. We will use @Produces annotations to indicate what type of data the REST resource methods will produce in the response. We also use @GET annotation for http GET verb. The…

Continue

REST Service with MultivaluedMap using Jersey

Introduction Here I am going to give an example on how MultivaluedMap in REST web service works. A MultivaluedMap<K, V> is a map of key-values pairs. Each key can have zero or more values, where K – the type of keys maintained by this map and V – the type of mapped values. The most important concept in REST is resources, which are identified by global IDs — typically using URIs. Client applications use HTTP methods (GET/ POST/ PUT/ DELETE) to manipulate the resource or collection of resources.

Continue

Asynchronous REST Service using Jersey – Connection Callback

Introduction Here I am going to give an example on how Asynchronous REST webservice with Connection Callback. The most important concept in REST is resources, which are identified by global IDs — typically using URIs. Client applications use HTTP methods (GET/ POST/ PUT/ DELETE) to manipulate the resource or collection of resources. A RESTful Web service is implemented using HTTP and the principles of REST. Typically, a RESTful Web service should define the following aspects: The base/root URI for the Web service such as http://<host>/<appcontext/contextpath>/<url pattern>/<resources>. The MIME type of…

Continue

Asynchronous REST Service using Jersey – Completion Callback

Introduction Here I am going to give an example on how Asynchronous REST webservice with Completion Callback. The most important concept in REST is resources, which are identified by global IDs — typically using URIs. Client applications use HTTP methods (GET/ POST/ PUT/ DELETE) to manipulate the resource or collection of resources. A RESTful Web service is implemented using HTTP and the principles of REST. Typically, a RESTful Web service should define the following aspects: The base/root URI for the Web service such as http://<host>/<appcontext/contextpath>/<url pattern>/<resources>. The MIME type of…

Continue

Asynchronous REST Service with Timeout using Jersey

Introduction Here I am going to give an example Asynchronous REST service with Timeout using Jersey API. The most important concept in REST is resources, which are identified by global IDs — typically using URIs. Client applications use HTTP methods (GET/ POST/ PUT/ DELETE) to manipulate the resource or collection of resources. A RESTful Web service is implemented using HTTP and the principles of REST. Typically, a RESTful Web service should define the following aspects: The base/root URI for the Web service such as http://<host>/<appcontext/contextpath>/<url pattern>/<resources>. The MIME type of…

Continue

Simple Asynchronous REST Service using Jersey

Introduction Here I am going to give an example on how Asynchronous REST webservice works. This is a simple asynchronous REST service using Jersey API. The most important concept in REST is resources, which are identified by global IDs — typically using URIs. Client applications use HTTP methods (GET/ POST/ PUT/ DELETE) to manipulate the resource or collection of resources. A RESTful Web service is implemented using HTTP and the principles of REST. Typically, a RESTful Web service should define the following aspects: The base/root URI for the Web service…

Continue

Spring 3, REST using Jersey 2.6 and Grizzly integration example

In this tutorial I will show you how to integrate REST using Jersey 2.6, Spring 3 and Grizzly web server. So I will use here Grizzly web server so we don’t need to use any other external webserver. I had been googling for many times but I did not get any satisfactory example on REST using Jersey 2.6 with Spring and Grizzly web server. You will get many search results if you search for a REST example using Jersey but you will get most of them are using 1.8. You…

Continue