Link to home
Start Free TrialLog in
Avatar of tbarrawi
tbarrawi

asked on

trying to use Axis TCP Monitor to monitor SOAP traffic to and from my web service

I have Axis installed under Tomcat. I have created one simple web service using the JWS deployment method. Now I want to monitor the requests/replies to my web service. I know Axis comes with a TCP Monitor utility.

when I do:

java org.apache.axis.utils.tcpmon

I get the GUI interface, but all text boxes and option boxes are disabled!

Also, what should be the listen Port#? Tomcat running on localhost:8080 so I believe the target host should be 127.0.0.1 and port 8080 correct?

Avatar of aozarov
aozarov

You probably want to run it:
% java org.apache.axis.utils.tcpmon xxx localhost 8080
And configure your client Call to use localhost:xxx instead of localhost:8080 (replace xxx with a real port number).
Avatar of tbarrawi

ASKER

I have tried it too and i get an error.

First when I do only:

java org.apache.axis.utils.tcpmon the GUI appears as I mentioned but is disabled and I get the following warning:

=====================================
libgcj-java-placeholder.sh

This script is a placeholder for the /usr/bin/java
master link required by jpackage.org conventions.  libgcj's
rmiregistry, rmic and jar tools are now slave symlinks to these
masters, and are managed by the alternatives(8) system.

This change was necessary because the rmiregistry, rmic and jar tools
installed by previous versions of libgcj conflicted with symlinks
installed by jpackage.org JVM packages.
Michael: BasicTextUI.RootView.paint
Michael: BasicTextUI.RootView.paint
Michael: BasicTextUI.RootView.paint

========================================

when I do java org.apache.axis.utils.tcpmon 8081 localhost 8080 the GUI doesn't even appear and I get the following error:

======================================
libgcj-java-placeholder.sh

This script is a placeholder for the /usr/bin/java
master link required by jpackage.org conventions.  libgcj's
rmiregistry, rmic and jar tools are now slave symlinks to these
masters, and are managed by the alternatives(8) system.

This change was necessary because the rmiregistry, rmic and jar tools
installed by previous versions of libgcj conflicted with symlinks
installed by jpackage.org JVM packages.
java.lang.NoSuchMethodError: method javax.swing.plaf.basic.BasicButtonListener.<init> was not found.
   at _Jv_ResolvePoolEntry(java.lang.Class, int) (/usr/lib/libgcj.so.5.0.0)
   at org.apache.axis.utils.tcpmon$6.tcpmon$6(org.apache.axis.utils.tcpmon$Listener, javax.swing.AbstractButton) (Unknown Source)
   at org.apache.axis.utils.tcpmon$Listener.tcpmon$Listener(org.apache.axis.utils.tcpmon, javax.swing.JTabbedPane, java.lang.String, int, java.lang.String, int, boolean, org.apache.axis.utils.tcpmon$SlowLinkSimulator) (Unknown Source)
   at org.apache.axis.utils.tcpmon.tcpmon(int, java.lang.String, int, boolean) (Unknown Source)
   at org.apache.axis.utils.tcpmon.tcpmon(int, java.lang.String, int) (Unknown Source)
   at org.apache.axis.utils.tcpmon.main(java.lang.String[]) (Unknown Source)
 
==================================

Any idea why?
Avatar of Mick Barry
looks like there may be a problem with your java installation.
I don't think this is a problem with Axis tcpmon but rather with your JVM settings.
Do you have the Sun JVM (instead of libgcj)?
I thought I am using Sun JVM. I dowloaded and installed the NetBeans4.0 bundle and the JDK1.4 from Sun. How can I verify and change my JVM settings?
java -version
or
which java
SOLUTION
Avatar of aozarov
aozarov

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
> but rather with your JVM settings.

What VM settings are you referring to, none are being specified are they?
> export JAVA_HOME=/usr/java/j2se1.4
> export PATH=$JAVA_HOME/bin:$PATH

If you need to change those sort of things then there *is* a problem with the installation :)

>> What VM settings are you referring to, none are being specified are they?
I was refering to the glocal settings he has for its JVM (like the /usr/java link)

>> If you need to change those sort of things then there *is* a problem with the installation :)
Most java installation on Unix do not set themself as part of the PATH nor they define JAVA_HOME
That is something the can be done based on needs (per sesseion (as above) per user or globably)
glocal -> global
Here is the default profile for the root user [using Fedora core 3 linux]


JAVA_HOME=/opt/j2sdk1.4.2_04
CATALINA_HOME=/opt/jakarta-tomcat-5.5.4
BASEDIR=/opt/jakarta-tomcat-5.5.4
AXIS_HOME=$CATALINA_HOME/webapps/axis
AXIS_LIB=$AXIS_HOME/WEB-INF/lib
AXIS_CLASSPATH=$AXIS_LIB/axis.jar:$AXIS_LIB/commons-discovery.jar:$AXIS_LIB/commons-logging.jar:$AXIS_LIB/jaxrpc.jar:$AXIS_LIB/saaj.jar:$AXIS_LIB/log4j-1.2.8.jar:$AXIS_LIB/wsdl4j.jar

CLASSPATH=/opt/j2sdk1.4.2_04/lib/tools.jar:/opt/j2sdk1.4.2_04/jre/lib/rt.jar:/home/slidell/SKDemo2:/opt/j2sdk1.4.2_04/jre/lib/ext/mysql-connector-java-3.0.16-ga-bin.jar:$JAVA_HOME/lib:$JAVA_HOME/lib/activation.jar:$AXIS_CLASSPATH

PATH=$PATH:$HOME/bin:$CATALINA_HOME/bin:$JAVA_HOME/bin

export PATH JAVA_HOME CATALINA_HOME BASEDIR AXIS_HOME AXIS_LIB AXIS_CLASSPATH CLASSPATH
 
> Most java installation on Unix do not set themself as part of the PATH nor they define JAVA_HOME

And you're saying above that they need to be set, so that would imply the installation is not working correctly :)
what do you get when you do:
java -veresion
which java
from the same terminal you are using to run the tcpmon command
>> And you're saying above that they need to be set, so that would imply the installation is not working correctly :)
There is obviously a problem here. Call it whatever you want.
which java    returns:

/usr/bin/java


java -version returns:

ibgcj-java-placeholder.sh

This script is a placeholder for the /usr/bin/java
master link required by jpackage.org conventions.  libgcj's
rmiregistry, rmic and jar tools are now slave symlinks to these
masters, and are managed by the alternatives(8) system.

This change was necessary because the rmiregistry, rmic and jar tools
installed by previous versions of libgcj conflicted with symlinks
installed by jpackage.org JVM packages.
gij (GNU libgcj) version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)
So, I assume this terminal session is not using the root profile.
Call your root profile (bash_profile) from you terminal sesssion (via the source command)
And to make it permanent copy this profile part to the user profile you are currently using.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You want to have the root profile Java settings (in .bashrc or .bash_profile) because you
want not only the set the right Java path but also to have your classpath set correctly so it can find the Axis classes
I will do the changes and test and tell you what happen. aozarov, I am logged in as root and the .bash_profile is where I have my paths. It seems its a Fedora Core 3 default settings issue I have to fix based on object's link. I will let you know. Thanks alot for the prompt replies guys.

 
>> Here is the default profile for the root user [using Fedora core 3 linux] ...
Do whatever you wish but the settings you showed above should be fine *if they are applied* (inside .bash_profile or .bashrc).
As I said, it is not only the JVM link you want to fix but you want to add the Axis classes to your classpath.
It is working now! I deleted the 3 links under /usr/bin  java, javac and jar and this fixed the problem.