File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes problem with Tcpmon: javax/xml/soap/SOAPException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "problem with Tcpmon: javax/xml/soap/SOAPException" Watch "problem with Tcpmon: javax/xml/soap/SOAPException" New topic

problem with Tcpmon: javax/xml/soap/SOAPException

Jim Smithian

Joined: Sep 21, 2004
Posts: 18
Hi All,

I am new to web services. I have tried accessing some web services from using Python. They work fine. My problem is in monitoring the SOAP messages using AXIS TCPMon tool. Here is what I did:
1-In Tcpmon I set listen port=7777, target poart=80 and target host=domain name of the remote server
2-I downloaded and saved a copy of WDSL in my local machine and modified the location url to localhost:7777
3-I changed my Python code to refer to the local copy of the WSDL file.

Is there any thing wrong with those settings?

When I run my Python script to the remote server, I don't see any in or out SOAP message and Tcpmon gives the following error message in the command line window where Tcpmon has been run from:

java.lang.NoClassDefFoundError: javax/xml/soap/SOAPException
at org.apache.axis.utils.tcpmon$

Could you please let me know how can I fix the problem. Is there a classpath problem?

Thanks for your help.

Rr Kumaran
Ranch Hand

Joined: Sep 17, 2001
Posts: 548
I also had no luck in monitoring remote web services using tcpmon. may be you can try ethereal ...

RR Kumaran
SCJP 1.4
milan doshi
Ranch Hand

Joined: Nov 03, 2000
Posts: 43

Let us say that the Orignal WSDL is pointing to:

You can modify it to:

and run the TCPMon as follows:

java -cp D:\externaljars\axis.jar org.apache.axis.utils.tcpmon 8109 80

Ensure that the ports are not already in use (bind).

Hope this helps.
[ April 21, 2005: Message edited by: milan doshi ]
Rr Kumaran
Ranch Hand

Joined: Sep 17, 2001
Posts: 548
Hi Milan,

Did you ever try it by yourself (from behind a firewall) since in my case TCPMon just hangs and says 'Waiting for connection' ...
milan doshi
Ranch Hand

Joined: Nov 03, 2000
Posts: 43
Hi Kumaran,

Yes I am currently having multiple TCPMons open(listening at different ports) as in my current development I am connecting to many Middletier Services.

The probable reason for this error (if at all if this is an error) is that the request is NOT reaching TCPMon at all!!!

I do not think the TCPMon is hung or something, its quite likely that TCPMon has not received any request to entertain...

Balaji Loganathan
author and deputy

Joined: Jul 13, 2001
Posts: 3150
Can you post the full error message. Also make sure you are using the latest version of axis packages.
Siddhartha Azad

Joined: Jan 03, 2003
Posts: 9
Here's what I did to run tcpmon:

Using tcpmon:

This is how I started it:

c:\j2sdk1.4.2_06\bin\java.exe -classpath c:\axis.jar org.apache.axis.utils.tcpmon

The listener port is any port tcpmon can listen at.
The target port is where tcpmon forwards requests, in case of JBoss running
on 8080, it will be 8080 and the target machine will be

For web services clients taking the wsdl from localhost:8080, we can make them
take the wsdl from the file system and change the address in the wsdl:

...<soap:address location="http://NY731-4W-324a:10000/sidcomtest-ejb/SidStringPort"/></port></service></definitions>

This will make the client send requests to port 10000 (or whatever port tcpmon
is listening to)

Note that tcpmon for throwing an NPE with jdk 1.5.0_02.
Hope this helps...
I agree. Here's the link:
subject: problem with Tcpmon: javax/xml/soap/SOAPException
It's not a secret anymore!