Request response flow in client server (REST Web service) We have shown the request response mechanism of service and client in Fig 1. Request initiated from Client Request data written to transport layer (written to network) Request reaches the Service Request data read from transport channel Service resource process the requests and generate the response Response… Read More »
Given a user defined object or POJO having null fields (i.e. some fields are null). When we are serializing object the null values gets serialized. Moreover, suppose object contains the date field also, then date field will be serialized as timestamp value. We will use ObjectMapper (jackson feature) to customize the serialization process. In this post we will… Read More »
Multipart file upload client is capable of uploading different kind of files to RESTFul web service using Jersey framework. 1. What is objective of Multipart file Upload client using jersey ? File upload client using “multipart/mixed” mime type. We have upload the following file formats to be RESTFul web service JPG JSON PDF zip We have discussed… Read More »
Multipart file upload client: File upload client is capable of uploading different kind of files using apache httpclient. File upload client will upload files to RESTFul web service, exposing multipart resource. What is objective of File Upload client? File upload client will use “multipart/mixed” mime type. We have demonstrated the following file formats to be uploaded… Read More »
Jersey framework REST Service to catch user defined exception using ExceptionMapper to catch application exceptions in java (example)
In this post we are going to discuss about the exception mapper implementation using jersey framework. Exception handling is need for our applications. The jersey ExceptionMapper provide cross cutting concern, where in we can able to catch all application exception at one place. we do not need to handle the exceptions in each and every function. In this post, we will throw and catch following exceptions.
In this post we are going to discuss about the validation of REST parameter. We will develop our web service using Jersey framework. We have already discussed about the Validation of REST parameter using Jersey Framework (Validating Request parameters) Part I.