In this Spring REST tutorial, we will learn how to perform CRUD Operations (Create, Read, Update, Delete) using Spring RESTful Web Services with the support of Hibernate JPA. In REST, manipulation of the resources is performed based on the common set of HTTP verbs. POST - To Create a resource GET - To Retrieve a resource PUT - To Update a resource DELETE - To … [Read more...]
Springfox Swagger 2 for Spring RESTful Web Services
In this tutorial, we will look at Swagger 2 for Spring RESTful web services. Swagger is a specification for documenting REST API.It provides tools to generate documentation from our REST code. Swagger scans the code and exposes the documentation of the URLs, any clients which consume our REST Web services knows which HTTP method call on which URL, which input send, what will be … [Read more...]
Spring RESTful Web Services Hello World XML Example
In this Spring RESTful Web Services example, we will learn how to create a RESTful Web Services directly through Spring Framework rather than creating it through REST implementation such as Jersey. In this article, we will create a REST service which returns XML representation of the Object. … [Read more...]
Jersey RESTful Web Services Client – Getting List of Object (GenericType)
Jersey RESTful Web Services Client can consume XML , JSON and many other MediaType responses from a RESTful web service. There is a drawback in this approach, suppose if you have a RESTful service which returns a list of all employees in XML format. Let's take a look into the below example … [Read more...]
Jersey Jackson JSON Tutorial
In this Jersey REST tutorial we will learn how to integrate Jersey REST Client and Jackson to build a RESTful Web service which produces and consumes JSON Type. We use Jackson for Marshalling Java Object to JSON and vice-versa(Unmarshalling JSON back to Java Object) in a JAX-RS Web Service. … [Read more...]
Spring REST Hello World Example – JSON and XML responses
As we already know Spring Core, Spring MVC and REST Web service. Now its our turn to learn Spring with REST Web services as a single entity. In this Spring REST Example we will be learning how to produce JSON and XML response by creating a simple REST service using Spring 4. … [Read more...]
RESTful Java client with RESTEasy client
Previously we have learnt how to create a RESTful Web Service using RESTEasy api. In this RESTEasy client tutorial we will learn how to Consume REST Web Service using RESTEasy client. … [Read more...]
RESTEasy Hello World Example with Apache Tomcat
RESTEasy is one of the implementation of JAX-RS specification provided by JBOSS for building RESTful Web Services. In this tutorial we will create a simple hello world web service with the JAX-RS reference implementation RESTEasy. … [Read more...]
RESTful Java Client With Jersey Client
Till now we have learnt on how to create a RESTful web service and we have tested it using "Postman Client".In this tutorial we will create a simple Jersey client to connect to our REST web service. We will be using JAX-RS Client API for creating the REST client. … [Read more...]
JAX-RS REST @Consumes both XML and JSON Example
Previously we have learnt how to use @Produces annotation, Consuming JSON or Consuming XML separately. We have consumed either xml or json request but not both xml and json in a single method. In this example we will learn how to consume multiple media type which the client is giving as input, lets see how we can achieve it. … [Read more...]
JAX-RS REST @Produces both XML and JSON Example
In my previous article we have learnt how to use @Produces annotation. We have produced either xml or json response but not able to produce both xml and json in a single method. In this example we will learn how to produce multiple media type response depending upon the clients request we will produce response, lets see how we can achieve it. … [Read more...]
JAX-RS REST @Consumes Example
Previously we have learnt about how to produce different types of responses using @Produces annotation, In this article we will learn how to consume different types of request from the user using @Consumes annotation. @Consumes annotation is used to specify the MIME media types that a resource can consume. @Consumes can be applied at both class level and method level, If … [Read more...]