YOU ARE HERE: Home > Tech > Web Services > Article

Axis TCP Monitor For SOAP Messages
By John Henry Xu This article was not rated yet.
 
Printer Version Printer Friendly | Add As Favorite | Link to Article

About the Author

Dr. John Xu is a seasoned system architect and manager. He was chief architect for large distributed portals. He also developed search engine and Java forums. He can be reached by email xixu@yahoo.com.

I have demonstrated how to write Java web services and client application, including writing JSP pages that can be accessed via Internet connections.

Now, we want to know exact format of messages send to and from Java web services, how do I do it?

The answer to this question is extremely simple.

We can use a utility class tcpmon, also called the Axis TCP Monitor, to find the messages.

Run the following command line

java org.apache.axis.utils.tcpmon [listenPort targetHost targetPort]

We use

java org.apache.axis.utils.tcpmon 28686 localhost 8080

Note: 28686 is the port TCP monitor that listens incoming and outgoing messages. You may choose any port that is not used by other applications.

The TCP monitor screen is shown


To demonstrate this process, I use the Math example that we developed in article "Programming Java Web Services (III)" published in http://www.usanalyst.com

In MathOperationServiceLocator.java file, change a line on simplemath_address value:

private java.lang.String simplemath_address = "http://localhost:28686/axis/services/simplemath";

And compile it, like before, using ant

ant ??buildfile compile.xml

It regenerates MathOperationServiceLocator.class file.

Now we run command line

Java TestMath

The TCP monistor picks up SOAP messages that are send between service and client.

For the explanation of the Math operation web service, please see article "Programming Java Web Services (III)" published in http://www.usanalyst.com.

You may use TCP monitor to monitoring network traffic between any services and clients.

For example, it can also be used to see the requests and responses when you see a web page.

Close the existing TCP monitor, and type in command line

java org.apache.axis.utils.tcpmon 28686 www.microsoft.com 80

You should see a TCP monitor swing user interface as before. The difference is that TCP Monitor now connecting to website: www.usanalyst.com at port 80

Now open up a web browser and type

http://localhost:28686/

You should see the request and response messages in TCP monitor.


Was this article helpful to you?yesno

Related Publications
 
Axis Samples Step by Step Tutorials -- Echo
Axis TCP Monitor For SOAP Messages
Programming Java Web Services (III)
Programming Java Web Services (II)
Programming Java Web Services
Programming Web Services with .Net (Part II)
Programming Web Services with .Net (Part I)

(Registered users can post questions/comments)

 
 TLINKS SEARCH
Advanced Search
Help
 Recommended Links
Red Cross
Responding to hurricane katrina relieve. Donate today. It's a Great Feeling to Help.
http://www.redcross.org
Getusjobs.com
Getusjobs.com is the job site focused on American jobs. See the results that put us on top.
http://www.getusjobs.com
Database Tool
TLinkSoft® tools empowers developers, integrators and DBAs to be more productive.
http://www.cppunit.org/download.jsp
USAnalyst.com
USAnalyst.com provide a community for database analysts, business analysts, developer analysts and managers.
http://www.cppunit.org/article

Powered by Tlinks Systems