Click to See Complete Forum and Search --> : HTTPS Request Dump


Pankaj Kumar
08-10-2009, 10:18 AM
Hi,

I am trying to call a webservice using java client. A SOAP request is sent to server to consume the webservice. I need to dump the https request. Can anyone provide me with java code which dumps the Https request.

Thanks
PKumar

starheartbeam
08-10-2009, 03:21 PM
You can try taking a look at this website and see if it helps you any.

http://www.velocityreviews.com/forums/t130340-filter-that-dump-all-the-https-request-response.html
it give code for dump all the https request /response

Good Luck!

Pankaj Kumar
08-11-2009, 12:29 AM
The suggeted URL did not worked. I was not able to open the suggested page.

starheartbeam
08-11-2009, 08:33 AM
Try This (http://www.velocityreviews.com/forums/t130340-filter-that-dump-all-the-https-request-response.html)

Pankaj Kumar
08-14-2009, 02:29 AM
Thanks a lot !!!..
But this did not helped me. However I solved the problem by overridding the logToSystemOut method in SOAPLoggingHandler.java. Here is the method.

private void logToSystemOut(SOAPMessageContext smc) {
Boolean outboundProperty = (Boolean)
smc.get (MessageContext.MESSAGE_OUTBOUND_PROPERTY);
SOAPMessage message = smc.getMessage();
if (outboundProperty.booleanValue()) {
out.println("\nOutbound message:");
} else {
out.println("\nInbound message:");
}


try {
message.writeTo(out);
out.println(""); // just to add a newline
} catch (Exception e) {
out.println("Exception in handler: " + e);
}
}