This is the servlet:

public class JaxRsServlet {

@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."