aspose file tools*
The moose likes Web Services and the fly likes seeting soap response/request Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "seeting soap response/request" Watch "seeting soap response/request" New topic
Author

seeting soap response/request

dale con
Ranch Hand

Joined: Apr 15, 2005
Posts: 93
hi all

is there a tool that will show the soap request/reponse?

I have a client to a remote web service using the call object and i'd like to see the soap being passed back and forth

IS there anyway i can do this

thanks for any help
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42292
    
  64
If you had control of the server where the service runs, and the engine was Axis, you could use the Axis monitoring applet (called SOAPMonitor, I believe).
If you don't have access to the server, there's always something like Ethereal, a very capable network sniffer. It doesn't know SOAP per se, but it does know HTTP, and has very flexible filtering which would allow you to just display the SOAP traffic.


Ping & DNS - my free Android networking tools app
dale con
Ranch Hand

Joined: Apr 15, 2005
Posts: 93
OK thanks

I think the Axis monitor is called TCPMonitor

How would i set this up

I know the location of the wsdl and its endpoint. What do i need to do in my client

e.g. if the wsdl is here
http://wsdl.domain.com/services/RemoterService?wsdl

and the endpoint is here

http://wsdl.domain.com/services/RemoterService

How do i set up tcpmonitor?
Do i need to do anything in my client?

Thanks for any help
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42292
    
  64
Like I said, it only works if your web service is provided by Axis. In that case, the index.jsp in the Axis directory has a link to the applet. There's nothing further to be done on the client. If this is a service provided by someone else, they have most likely disabled access to the applet to outsiders.
D L
Greenhorn

Joined: Aug 12, 2005
Posts: 13
Try
Microsoft Fiddler HTTP Debugging Proxy .. click on the HTTP Session .. and go to Session Inspector to view Request and Response .. in Text View or XML View.

Or try other tracing tools .. YATT at PocketSoap.com
dale con
Ranch Hand

Joined: Apr 15, 2005
Posts: 93
Thanks for your help but fiddler doens't show any output.

I'm using Eclipse and testing the remote web service with JUnit.

The remote web service is https:\\ don't know whether it's because it's https: i cant see anything

When i use apaches axis tcpmonitor i fill in the boxes and change my junit test so the url endpoint is http://localhost:8080/services/remoteservice but i get the error

<p>Your browser sent a request that this server could not understand.<br />
Reason: You're speaking plain HTTP to an SSL-enabled server port.<br />
Instead use the HTTPS scheme to access this URL, please.<br />
<blockquote>
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42292
    
  64

The remote web service is https:\\ don't know whether it's because it's https: i cant see anything

When i use apaches axis tcpmonitor i fill in the boxes and change my junit test so the url endpoint is http://localhost:8080/services/remoteservice but i get the error


If the service is running on localhost, you should be able to configure it to use HTTP until everything works, and then switch to HTTPS, no?

If it's actually HTTPS you want to get to work, have you installed the necessary certificate on your localhost server, that is to say, does HTTPS work in general?
D L
Greenhorn

Joined: Aug 12, 2005
Posts: 13
but fiddler doens't show any output.


I have been troubleshooting some web services which I could not get to work ... and Microsoft Fiddler certainly did help.

You should certainly see the SOAP Request message (encoded) in TextView.

If you see no SOAP Response message at all in Session Inspector in TextView .. then look at Hex to see the raw hex response (which normally goes into your server log).

A few more tools I have gathered ..

SOAPscope Viewer which analyses your WSDL and allows you to invoke web services.

You can analyse WSDL's with https:// .. secure connection.

Try first invoking your web service directly in SOAPscope Viewer.

  • Go to WSDL tab
  • Add your target WSDL so that it shows in lefthand window
  • View your WSDL (View Tab)
  • Invoke your web service (Invoke Tab) and fill in the fields in the GUI.
  • Send your Request (Send button)
  • Analyse response.



  • This bypasses any problems which may be introduced by your SOAP client, since your web service is invoked via SOAPscope Viewer.


    You get a few days free trial of SOAPscope after which it reverts to a lighter version (invoke and WS-I test is disabled).
    But it should help still in troubleshooting.

    You can get an extension of free trial.

    Another tool is SOA Editor (free) which analyses WSDL files.
    [ August 15, 2005: Message edited by: D L ]
    dale con
    Ranch Hand

    Joined: Apr 15, 2005
    Posts: 93
    Thanks for the replies

    Could it be fiddler does not work because i'm not using a broswer to test the remote service. I'm using a junit test in eclipse using the call method

    e.g.
    URL endpoint = new URL("https://wsdl.domain.com/webservices/services/remoteservice")
    Service service= new Service();
    Call call = (Call)service.createCall();
    call.setTargetEndpointAddress(endpoint);
    call.setOperationName("method");
    ......
    dale con
    Ranch Hand

    Joined: Apr 15, 2005
    Posts: 93
    if i configure my local tomcat so it uses https can i unconfigure it to be normal http again when have finihsed my testing?

    Do you have a good link with instructions of how to install the certificate and test to see whther https works

    Many thanks
    William Barnes
    Ranch Hand

    Joined: Mar 16, 2001
    Posts: 986

    > if i configure my local tomcat so it uses https can i unconfigure it to be normal http again when have finihsed my testing?

    There isn't really anything to unconfigure. You set up https on a different port. So you would have one port for http and another for https. The port you send the request to determines if you want SSL or not.


    Please ignore post, I have no idea what I am talking about.
    dale con
    Ranch Hand

    Joined: Apr 15, 2005
    Posts: 93
    OK thanks

    do you know any url with good instructions on how i do this ?

    Many thanks
    William Barnes
    Ranch Hand

    Joined: Mar 16, 2001
    Posts: 986

    Here is a presentation, from hereselect "My Tutorial" and than "Download presentation".

    I didn't follow the entire thread, so I don't know why you want to do ssl. This is not an easy thing to do, so if you don't have a requirement find another way.
    Krzysztof Otrebski
    Greenhorn

    Joined: Jun 06, 2012
    Posts: 4
    I'm using OtrosLogViewer to trace SOAP messages. My application logs all SOAP request/response to log file and SocketHubAppender
    Check this Youtuebe wideo
     
     
    subject: seeting soap response/request