Axis TCPMON tool usage
Axis1.x has all the reason for its acceptance by the industry as a soap-stack competent to other commercial soap-stacks. Its open source and free in the first place, has tremendous functionality bundled and shipped with just those three jars (axis.jar, jaxrpc.jar and saaj.jar). But more than all these what strikes me fond of this product is that it has this nice debugging tool "TCPMON" (org.apache.axis.utils.tcpmon) that comes bundled in axis.jar which actually allows the developer to debug 80% of his problems. I'd rate this tool as one among the high utility tools, for its useful not just for axis developers but for anybody wishing to listen on to what goes/comes on wire from/to his client code. There are 'n' number of wire sniffing toolkits but this is my favourite for its jiffy time setting up. In this post I felt like writing a few lines about the tool usage so that it might help someone out there in need of it.
Using axis's tcpmon tool is simple...
Basically you bring up the tcpmon tool to listen on some port in local machine and then redirect the listened packet as is to the actual destination server.
(i) Have axis.jar in classpath and fire the command
C:\...\> java org.apache.axis.utils.tcpmon <localport> <remoteHost> <port on which remote server is up>
where <localport> is the port number where you want tcpmon to listen.
(ii) Make sure now the TargetEndpointAddress of your client program should have in its url string the server name as localhost:
(iii) Fire your client application. You should be able to see in the tcpmon what request is being sent out to the server and what response is being returned from the server.
While debugging, one could just check from the outgoing packet whats wrong with his/her soap request and rectify it.
Using axis's tcpmon tool is simple...
Basically you bring up the tcpmon tool to listen on some port in local machine and then redirect the listened packet as is to the actual destination server.
(i) Have axis.jar in classpath and fire the command
C:\...\> java org.apache.axis.utils.tcpmon <localport> <remoteHost> <port on which remote server is up>
where <localport> is the port number where you want tcpmon to listen.
(ii) Make sure now the TargetEndpointAddress of your client program should have in its url string the server name as localhost:
(iii) Fire your client application. You should be able to see in the tcpmon what request is being sent out to the server and what response is being returned from the server.
While debugging, one could just check from the outgoing packet whats wrong with his/her soap request and rectify it.
9 Comments:
U havent tried ethereal or commview , u l be amused by amount of functionality they can offer ..
U havent tried ethereal or commview , u l be amused by amount of functionality they can offer ..
U havent tried ethereal or commview , u l be amused by amount of functionality they can offer ..
U havent tried ethereal or commview , u l be amused by amount of functionality they can offer ..
Hi anonymous,
(I wish I knew your name to address better).
Not personally, but I did see it in action on a friends' desktop. I was impressed, but still TCPMON has its adv of own jiffy time setup and teardown feature. And most importantly I'm afraid ethereal is level deep to inform me of the bytes and bits and not exactly of the SOAP packet, and thats the crucial thing in the WS world
Hi Jayachandra!
I find it pretty good to use tcpmon while debugging a web service on my localhost, but how do you do it when the service is hosted by a third party? I mean, what changes do you make in the client and how do you set the ports while running tcpmon?
Thanks!
Neha.
Use TCPMon to act as a tunnel (listner).
supposing the host abc.com:80
bring up your tcpmon say on localhost:8080 and let it act as a 'listener' to abc.com and port 80. Then when you type in browser http://localhost:8080 essentially u would see in the tcpmon window content going to abc.com:80 and content received from abc.com:80
Hello
I found the information here very useful - especially the last comment.
:)
Great post!
Yea, TCPMon is really nice. I have made it available as an eclipse plug-in as well (http://svn.apache.org/viewvc/webservices/commons/trunk/modules/tcpmon/modules/tcpmon-eclipse-plugin/)
Post a Comment
<< Home