views:

291

answers:

2

I have a situation where I have to write a client in Java against a very picky external web service (over https) and I can talk to the web service through the Web Services Explorer in Eclipse JEE.

Unfortunately I cannot get the client to ask properly so I'd really like to see the SOAP messages going back and forth. Being new to web services this is a bit of a jungle. I am very familiar with Eclipse, and have spent some time with Netbeans and IntelliJ.

I'd really, really prefer using the Metro stack as it allows this to run on a stock Java 6, and deployment size matters. Is there a simple way to make Metro log what it does, or make it talk through the TCP/IP monitors in Eclipse and Netbeans? The Metro documentation seems to be primarily targeted at the web service author and not the client, so I might easily have missed it.

Any suggestions for a setup saying "Here is the WSDL - generate me a client where I can see the traffic"?

+1  A: 

Just put a proxy or a tcp monitor "in the middle" and you will see the message.

I've been using tcpmon for a similar task.

Bozho
Thanks. Will that also work with https connections?
Thorbjørn Ravn Andersen
oops, missed the "over https" part. It won't work on https. but for development purposes can't you switch to http? Well, since you are one of the sides of the communication, you can decrypt the https message, but that might be too much headache.
Bozho
No. I do not have control over the remote web service :(
Thorbjørn Ravn Andersen
A: 

It was helpful to turn on logging with

-Dcom.sun.xml.ws.assembler.client=true

in the Eclipse launch configuration.

Thorbjørn Ravn Andersen