no

Building a rest service that returns a byte array image

This tutorial will not delve into angular nor will we discuss what a directive is. We will not try to explain what a rest web service is. In...

How to download a file in SOAP API

First we define the interface like this: @WebMethod ActionStatus downloadFile(@WebParam(name = "file") String file); Implement...

How to download a file using REST api

Normally I create an interface when defining a REST api, this is useful when testing using Arquillian. To define a download file api we must...

How to upload a file in REST API

This is how I define the method: @POST @Path("/upload") @Consumes(MediaType.MULTIPART_FORM_DATA) ActionStatus uploadFile(@Multi...

How to zipped a file or directory in java

There are times when we have to zipped a file or directory recursively in Java. This is how we do it: public static void zipFile(File file...

How to access HttpServletRequest and HttpServletResponse in REST and SOAP

There are times when we need either HttpServletRequest or HttpServletResponse in our REST or SOAP api. These objects are readily available i...

How to generate jax-rs documentation using maven

To generate the jax-rs documentation automatically using maven, we need to add some plugins in the build section of the project's pom fi...

How to return soapFault in a jax ws web service in JavaEE

The code below is an example of how you can throw a soapFault exception when an error is encountered in your web service  call. There are ...

How to call a JavaEE REST web service with BASIC Authentication using jquery ajax

I don't really remember when I coded it, nor where I got it but I'm writing it here for future use :-) Below is the code I use to t...

How to get the client's ip address in jax rs and ws

In this tutorial I'll not teach how to create jax-rs nor jax-ws web service but rather will show how we can get the client's or the ...

How to call java rest web service in soapUI

The following code is an explanation of how you can call a rest web service in java. Below you can find the actual java code and soapUI con...

Getting started with jax-rs security

This tutorial will summarize how the author was able to call a secured rest webservice using resteasy. We will not go into detail on how we ...

How to create a custom json string deserializer in java

On normal cases we really have a lot of ways in doing so, we can use jaxb, jackson and more. But in some cases we really need to improvise...

index