I have a request which works fine when i hit the service using POSTMAN and POSTER plugins but when i try to hit load-balancing url i received ERROR.

ERROR in POSTER ( plugin ):

enter image description here

ERROR in POSTMAN ( plugin ):

enter image description here

Part of code:

@Path( "/" )
public class Check {
     public ResultSet rs;

     @POST
     @Produces( MediaType.TEXT_PLAIN )
     @Consumes( "application/xml" )
     public String validate( String xmlContent ) throws Exception {
          String value = "no";
          String result = null;
          Boolean inputCheck;

          Contents unmarshalledValues = unmarshalingContent( xmlContent );

MIME Type Details:

Well, MIME type of xml

http://annevankesteren.nl/2004/08/mime-types

Example for consuming XML

http://docs.oracle.com/javaee/6/tutorial/doc/gkknj.html

2

There are 2 best solutions below

0
On BEST ANSWER

Well, I have JAXRS to un-marshaller xml, so i removed

@Consumes 

it worked :)

0
On

Hi @MadD can you try so like this,

@Path("/upload")
public class Check {

     @POST
     @Consumes(MediaType.APPLICATION_OCTET_STREAM)
     public Response validate(InputStream input) {
           ...
           return Response.ok().build();
     }
     ...
}

Hope these helps.