• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

need help tracing soap messages

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, I'm having a hard time figuring out how to trace soap messages. I can use tcpmon but would really like to use Metro's jaxws-rt.jar version since with the Metro version I don't have to alter my code.

Here's how to do it accoring to the book Java Web Services Up and Running:

In the book Java Web Services Up and Running using the Metro tracer sounds so easy:
"The metro release has utility classes for tracking HTTP and SOAP traffic. This approach does not require any change to the client or to the sercie code; however, an additional package must be put on the classpath and a system property must be set either at command line or in code. The requierd package is in teh file jaxws_ri/jaxws-rt.jar. Assumming that the environment variable metro_home points to the jaxws-ri directory, here is the command that tracks HTTP and SOAP traffic between the timeclient, which connects to the service on port 9876, and the timeserver service.
%java -cp ".":$metro_home/lib/jaxws-rt.jar \
-Dcom.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true \
ch01.ts.TimeClient.

The resulting dump shows all of hte soap traffic but not all of the http headers. Message trackign also can be done on teh service side.



Here's what I'm doing:
I'm not using any sort of development tool such as Net Beans.
1. I start my publisher service to make my wsdl available:
import javax.xml.ws.Endpoint;
class RabbitCounterPublisher{
public static void main(String[] args) {
int port = 8888;
String url = "http://localhost:"; + port + "/rabbitCounter";
System.out.println("publishing rabbit counter on port: " + port);
Endpoint.publish(url, new RabbitCounter());
}
}
2. From Windows xp command line I execute my client as follows:
C:\JavaProjects\RabbitCounter\source>java -Dcom.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true FibClient

RESULT:
My client runs successfully and is able to make calls on my Web Service.

QUESTION:
I thought that setting the property "-Dcom.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true " would make my soap messages dump out to a file however I'm not sure where this file is. Also, I do have an environment variable METRO_HOME set and I have jaxws-rt.jar in my classpath. Basically, I'm just confused as to how to get this thing to work. If anyone has experience with this I would really appreciate the help. Thanks!
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not familiar with the approach you're describing, but with tcpmon you don't need to alter your code - just the URL, which generally can be configured outside of the code. (If it can't, I'd advise to make the client at least that configurable.)

SOAPUI is a much more powerful tool for monitoring SOAP connections, although most of the time I find tcpmon quite sufficient.
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
Take a look at WSMonitor: https://wsmonitor.dev.java.net/
It sounds like it may be useful to you.
Best wishes!
 
Carly Davis
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks so much for the replies. I got sick of trying to figure it out and instead went back to tcpmon - Thanks for the wsmonitor suggestion, I've never heard of it I'll have to check it out.
 
"How many licks ..." - I think all of this dog's research starts with these words. Tasty tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic