This is the servlet:

@Path("/conf")
public class JaxRsServlet {

@POST
@Path("/create")
@Consumes("*/*") // to accept all input types
public String createFile(byte[] data) {
//business logic
}
}

This is the call to the servlet:

public byte[] doPOST2(byte[] data) {
Resource resource = restClient.resource(this.url);
ClientResponse response = resource.contentType(MediaType.APPLICATION_OCTET_STREAM).accept("*/*").post(data);
return null;
}

The byte array represents a list of XML strings which i serialized using apache SerializationUtils.
When i invoke this post API, the binding fails with following exception:
"com.sun.jdi.InvalidTypeException occurred invoking method."