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!