This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "problem with Tcpmon: javax/xml/soap/SOAPException" Watch "problem with Tcpmon: javax/xml/soap/SOAPException" New topic
Author

problem with Tcpmon: javax/xml/soap/SOAPException

Jim Smithian
Greenhorn

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

I am new to web services. I have tried accessing some web services from xmethods.net 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$SocketRR.run(tcpmon.java:773)

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

Thanks for your help.

Jim
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
Hi,

Let us say that the Orignal WSDL is pointing to:
http://abcdev.milan.com:80/somethingmore/services/accounts/


You can modify it to:
http://localhost:8109/somethingmore/services/accounts/

and run the TCPMon as follows:

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

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

Hope this helps.
Thanks,
MD
[ 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...

Thanks,
MD
Balaji Loganathan
author and deputy
Bartender

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
Greenhorn

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 127.0.0.1.

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...
Sid.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with Tcpmon: javax/xml/soap/SOAPException
 
Similar Threads
Webservices and Websphere 5.1
"org.xml.sax.SAXParseException: Premature end of file" Problem
Server.userException: Exception while executing Client
Error While deploying Web Service
valid SOAP content-type?