ws-soap-user mailing list archives

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

Ok..

After 2 days of trying to get anything working under Soap for Linux/Tomcat
3.1
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 xml.apache.org...
the xml.apache.org stuff is THE place to go now for Soap (at least IBM
Soap)..
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 :pserver:anoncvs@xml.apache.org:/home/cvspublic login

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

	$ cvs -d :pserver:anoncvs@xml.apache.org:/home/cvspublic 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 :
		http://xml.apache.org/cvs.html

3) If you don't have Jakarta "Ant" ..You need that to build soap-soap.. It
can be found at:
	http://jakarta.apache.org/builds/tomcat/release/v3.1/bin/

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

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
either..
So, grab that version from
	http://xml.apache.org/dist/xerces-j/

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 tomcat.sh file to make sure xerces.jar comes first.. as
well
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 org.apache.tools.ant.Main compile

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

	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
again,
make sure tomcat.sh and clients CLASSPATH have it in it.

7) Also, the new xml-soap release has a modified layout for the Admin and
rpcrouter.jsp
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
	http://localhost:8080/soap/rpcrouter/rpcrouter.jsp

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


ADDITIONAL INFOMATION

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" >
        </Context>

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

Also, here is my modiciations to tomcat.sh.. 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
directory
(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
$TOMCAT_HOME/soap-classes/samples/stockquotes/etc.

I hope all this helps others!


--- tomcat.sh
...
...

oldCP=$CLASSPATH
CLASSPATH=

#
# 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
   CLASSPATH=${CLASSPATH}:${JAVA_HOME}/lib/xerces.jar
fi

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

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

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

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

CLASSPATH=${CLASSPATH}:.

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

---
Steven J. McDowall                 phone: +1 763 780-8814
ApTest                               fax: +1 763 786-8180
                                  e-mail: sjm@aptest.com


Mime
View raw message