Intercepting SOAP request & responses

H

hapyfishrmn

Hello,
I have a a wsdl file that I have used converted to Java using
WSDL2Java. I have successfully talked to the server and my
communication work perfectly. What I want to do is see the raw data
that gets sent to the server and the response that it gives me.

The WSDL2Java creates four files: BindingStub, Service, ServiceLocator,
& Port. I do not want to modify these files becuase if the wsdl file
changes my code will be broken.

So, how do I look at the data without modifying these files?

I have read that using Handlers I can get my own functions to get
called, but to implement a handler I have do something like:

_call.setCurrentHandler(MyRequestHandler,MyResponseHandler);

Is there someway I can add something to the WSDL file that would
already have a handler setup. Maybe there is an easier way and I just
don't know.
Appreaciate any help or direction.
 
I

Ian Wilson

Hello,
I have a a wsdl file that I have used converted to Java using
WSDL2Java. I have successfully talked to the server and my
communication work perfectly. What I want to do is see the raw data
that gets sent to the server and the response that it gives me.

I use Ethereal's "follow TCP stream" option in its "Analyze" menu.
http://www.ethereal.com

Obviously, this doesn't work for https endpoints as the contents are
encrypted. I use an http endpoint for testing if possible.
 
T

Thomas Kellerer

Hello,
I have a a wsdl file that I have used converted to Java using
WSDL2Java. I have successfully talked to the server and my
communication work perfectly. What I want to do is see the raw data
that gets sent to the server and the response that it gives me.
The Axis 1.3 distribution (from apache.org) contains a Proxy that can be used
for that. The only thing you need to do, is to point your program to talk to the
proxy instead of the real server.

Thomas
 
H

hapyfishrmn

Ian & Thomas,
I am currently using ethereal and I am trying to see the displayt
within my client application. Maybe I don't understand your response
exactly, but how would pointing my program to talk to proxy get back
the SOAP request & responses.

I am using the code generated by the WSDL2Java and creating a client
interface. I want to show the SOAP data that is being used to
communicate.
 
J

Josef Pfleger

Thomas said:
The Axis 1.3 distribution (from apache.org) contains a Proxy that can be
used for that. The only thing you need to do, is to point your program
to talk to the proxy instead of the real server.

Thomas
if you use windows, the fiddler tool (http://www.fiddlertool.com/) is an
easy to use debugging proxy with a gui.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top