Search code examples
web-servicesrestpostrestful-urlposter

No response was received. Either the request could not be opened or the request timed out ( for POST request )


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


Solution

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

    @Consumes 
    

    it worked :)