ws-soap-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven McDowall" <>
Subject Soap 1.2 finally working under Linux/Tomcat 3.1 !!
Date Wed, 12 Jul 2000 20:39:18 GMT


After 2 days of trying to get anything working under Soap for Linux/Tomcat
I FINALLY got it going and it appears nifty (at least, the stockquote demo
and my
own little demo from "gamelan" works :-)

So, here is what I had to do.. and it's not pretty .. ;-(

1) The current "release" of "IBM-Soap-1.2" just won't work.. don't even try.

2) You MUST get and build the latest CVS source tree from
the stuff is THE place to go now for Soap (at least IBM
Here is how you do that...

2a) Find a nice place to put a working directory (going to be XML-soap)
	$ cd place/to/put/directory

2b) Issue these CVS commands to get the soap-soap stuff
	$ cvs -d login

	NOTE: when asked for a password, enter "anoncvs"

	$ cvs -d checkout soap-soap

	You should now see a bunch of output as cvs creates the soap-soap tree
	If you have any detailed questions, see :

3) If you don't have Jakarta "Ant" ..You need that to build soap-soap.. It
can be found at:

	make sure the 'ant.jar' file is somewhere in your CLASSPATH before

4) This latest soap now requires xerces 1.1.2! Yes, after all the messages
about using
1.0.3, soap-soap now requires xerces 1.1.2, and NO, 1.1.1 won't work
So, grab that version from

And install the xerces.jar file ..

NOTE NOTE NOTE: Just as before, you must make sure xerces.jar is before
anything else
"xml"ish in the CLASSPATH for both the client program and for TOMCAT !! So,
you still
need to modify the file to make sure xerces.jar comes first.. as
as the xmisoap.jar if your using XMI for marshalling..

5) build the soap-soap by
	$ cd xml-soap   (should have been created by the cvs commands above)
	$ cd java
	$ java compile

	This should start compiling the java code and build a nice "build/lib"

	If you see any compile errors, it is most likely because you don't have
your CLASSPATH set to include the 1.1.2 xerces.jar first in the list.. :-)
This is especially true if you see a "import xx.x.x.Base64" missing error!

6) You need to now install the "soap.jar" file to a appropriate location and
make sure and clients CLASSPATH have it in it.

7) Also, the new xml-soap release has a modified layout for the Admin and
webapp stuff.. You need to "fix" this up too :-)

7a) The new stuff is located under the "webapps" directory within
xml-soap/java ...
It is broken into 2 parts.. "admin" and "rpcrouter" .. I simply copied these
dirs and
contents to where I had my "soap" context under Tomcat already defined..
For me... I had  /usr/local/tomcat/webapps/soap  as the "doc-root" .. so
then I went there
	$ cd /usr/local/tomcat/webapps/soap
	$ cp -R {wherever the path was}/xml-soap/java/webapps/admin .
	$ cp -R {wherever the path was}/xml-soap/java/webapps/rpcrouter .

Note: This means that to bring up the admin page you need to do a
	http://localhost:8080/soap/admin   (in my example)

And now the URL for the soap RPC dispatcher is

These are the major steps needed I think to get it to work.. Remember to
everything from to org.apache.blah in the client programs, etc.


Just for completeness, here is my server.xml file that relates to soap :

	  <!-- SOAP Context Location -->
        <Context path="/soap" docBase="webapps/soap" debug="1"
reloadable="true" >

This looks for the soap stuff in $TOMCAT_HOME/webapps/soap :-)

Also, here is my modiciations to They are a little more
involved, but I think
more useful that those suggested by the ReleaseNotes file..

With this setup I depend on putting all "relevant" jars in my $JAVA_HOME/lib
(that is where soap.jar, xerces.jar, etc. live) ... Also, what I did was to
make a
special directory called $TOMCAT_HOME/soap-classes to contain any/all
classes and
jar files (for soap servers) and to have them automatically be included when
tomcat startups. Thus, I put the sample (not called demo's anymore) programs
here (or, to be precise, under

I hope all this helps others!



# We must place the new Xerces XML parser before the default tomcat
# one for SOAP to work correctly..
if [ -f ${JAVA_HOME}/lib/xerces.jar ] ; then

#Don't need IBM's old xml4j anymore with 1.1.2 xerces
#if [ -f ${JAVA_HOME}/lib/xml4j.jar ] ; then

# Now add all the other Tomcat jar's..
for i in ${TOMCAT_HOME}/lib/* ; do

if [ -f ${JAVA_HOME}/lib/tools.jar ] ; then
   # We are probably in a JDK1.2 environment

# Add the soap jar's
if [ -f ${JAVA_HOME}/lib/soap.jar ] ; then


# Automatically add ${TOMCAT_HOME}/soap-classes and any jar
# files it may hold..
if [ -d ${TOMCAT_HOME}/soap-classes ]; then
	for i in ${TOMCAT_HOME}/soap-classes/*.jar ; do

Steven J. McDowall                 phone: +1 763 780-8814
ApTest                               fax: +1 763 786-8180

View raw message