Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to capture SOAP messages from a Tomcat Java app to an external server?

I have a web application, which runs inside Tomcat6 and sends SOAP messages to some external system via HTTPS.

I want to intercept these messages.

In order to do this I enabled HTTPS capture in the Tools -> Fiddler options dialog box.

Fiddler options

After I restarted Fiddler, I can see HTTPS requests to several hosts (like Google, Evernote) but not to the external system my Java app talks to.

Then, I added the JVM options -Dhtttps.proxyHost=ipv4.fiddler -Dhttps.proxyPort=80 to my launch configuration and restarted the application. Again, no SOAP requests were captured by Fiddler.

Idea configuration

What can I do in order to view the SOAP messages (using Fiddler or some other tool) ?

Update 1 (22.10.2013 12:35 MSK): When I change the JVM parameters to -Dhttps.proxyHost=ipv4.fiddler -Dhttps.proxyPort=80 -DproxySet=true -DproxyHost=ipv4.fiddler -DproxyPort=80 I get the exception com.sun.xml.internal.ws.client.ClientTransportException: HTTP transport error: java.net.UnknownHostException: ipv4.fiddler when the request is sent.

like image 779
Dmitrii Pisarenko Avatar asked Oct 22 '13 08:10

Dmitrii Pisarenko


People also ask

How do I create a SOAP request in Java?

To make SOAP requests to the SOAP API endpoint, use the "Content-Type: application/soap+xml" request header, which tells the server that the request body contains a SOAP envelope. The server informs the client that it has returned a SOAP envelope with a "Content-Type: application/soap+xml" response header.


1 Answers

The correct JVM parameters were: -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=8888 -DproxySet=true -DproxyHost=127.0.0.1 -DproxyPort=8888.

like image 149
Dmitrii Pisarenko Avatar answered Sep 23 '22 13:09

Dmitrii Pisarenko