OutputStream out2 = httpConn.getOutputStream();
out2.write( b );
// Read the response and write it to standard out.
InputStreamReader isr =new InputStreamReader(httpConn.getInputStream());
When it reaches the above line httpConn.getInputStream() it throws the error
java.io.IOException: Server returned HTTP response code: 500 for URL:
Due to this,response is not generated and webservice methods are not called.What could be wrong?Please help.
The problem can be the SOAP action or the message you are sending.
You can try checking the response code before reading the actual connection input stream (connection.getResponseCode()) and if the response code is not 200 (OK) then instead of the input stream read the connection error stream for more details (connection.getErrorStream()).
If you settle for what they are giving you, you deserve what you get. Fight for this tiny ad!
Free, earth friendly heat - from the CodeRanch trailboss