« Host Based Access on Postgres and DSPACE ... pg_hba.conf | Main | Upload to soap »

Getting basic axis soap client (CalcClient) to work.

For the axis 1.4 soap client (samples.userguide.example2.CalcClient) to work I had to do the following:

No Problem with server

I copied Calculate.java tomcat/webapps/axis/Calculate.jws and it worked just fine.

The following URLs give the right answer:
http://localhost:8080/axis/Calculator.jws
http://localhost:8080/axis/Calculator.jws?method=add&i1=1&i2=2

Issues with the client

1) Change the build.xml file so that it did not exclude CalcClient.

2) Download two additional jars:
/jaf-1.1.1/activation.jar
javamail-1.4.1/mail.jar
From:
activation.jar
mail.jar


This eliminated the message:
Exception in thread "main" java.lang.NoClassDefFoundError: samples/userguide/example2/CalcClient

3) Changed the names of some of the jars that are in the $AXISCLASSPATH. The correct names are:
/usr/local/axis-1_4/lib/axis-ant.jar
/usr/local/axis-1_4/lib/axis.jar
/usr/local/axis-1_4/lib/commons-discovery-0.2.jar
/usr/local/axis-1_4/lib/commons-logging-1.0.4.jar
/usr/local/axis-1_4/lib/jaxrpc.jar
/usr/local/axis-1_4/lib/log4j-1.2.8.jar
/usr/local/axis-1_4/lib/saaj.jar
/usr/local/axis-1_4/lib/wsdl4j-1.5.1.jar

Some of the names on the AXIS install page are wrong. For instance $AXIS_LIB/commons-discovery.jar is listed while it really should be: $AXIS_LIB/commons-discovery-0.2.jar
4) Moved activation.jar and mail.jar to my $AXIS_LIB (/usr/local/axis-1_4/lib). And made a new $AXISCLASSPATH: yielding the nice result


AXISCLASSPATH=/usr/local/axis-1_4/lib/axis-ant.jar:\
/usr/local/axis-1_4/lib/axis.jar:\
/usr/local/axis-1_4/lib/commons-discovery-0.2.jar:\
/usr/local/axis-1_4/lib/commons-logging-1.0.4.jar:\
/usr/local/axis-1_4/lib/jaxrpc.jar:\
/usr/local/axis-1_4/lib/log4j-1.2.8.jar:\
/usr/local/axis-1_4/lib/saaj.jar:\
/usr/local/axis-1_4/lib/wsdl4j-1.5.1.jar:\
/usr/local/axis-1_4/lib/activation.jar:/usr/local/axis-1_4/lib/mail.jar

java -cp .:$AXISCLASSPATH samples.userguide.example2.CalcClient add 8 34
Got result : 42

Useful Links

Creating Web Services with Apache Axis

TrackBack

TrackBack URL for this entry:
http://blog.lib.umn.edu/cgi-bin/mt-tb.cgi/80910

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)