Tag Archives: Jersey

Working of Filters & Interceptors in RESTFul web service (Jersey /example)

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 »

RESTFul web service serialize non null & date field (jersey /objectmapper /contextresolver)

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 for RESTFul web service (java/ jersey/example)

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 for RESTFul web service (java/ example /httpclient)

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 ExceptionMapper (standard exceptions) in RESTful web Service (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.