tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clive Jordan <>
Subject Apache SOAP Messaging Error (org.apache.soap.Envelope)
Date Tue, 09 Dec 2003 17:17:32 GMT

I am having a lot of difficulty getting apache SOAP messaging to work 
properly. It does not seem to be  able to find  org.soap.apache.Envelope 
for some reason.

Sorry for  the  large amount of spam but I thought I'd  put down as much 
info as possible.

My environment is:
Windows 2000
jsdk 1.4.1_01
Tomcat 4.1.29
SOAP 2.3.1
Xerces 1.4.4

I have been through the archives and seen there are problems with 
classloaders in the past and I have tried the following:

Clean install of Tomcat 4.1.29
put soap.war in webapps and restart.
the .war file is unpacked ok.

I have looked through these

and tried the following:
- removed xerces2 files from distribution and put Xerces 1.4.4 
xerces.jar in $CATALINA_HOME/common/lib
- remove soap.war from webapps
- removed org directory from webapps/soap/WEB-INF/classes
- put soap.jar into $CATALINA_HOME/common/lib

My command-line classpath (for client use):

As you can see, all the appropriate classes are in the tomcat tree.

Here is my processing class,
import org.apache.soap.*;
import org.apache.soap.rpc.SOAPContext;
import javax.mail.MessagingException;

public class TstSoap
    public void tstMethod (Envelope env, SOAPContext reqCtx, SOAPContext 
                            throws MessagingException, IOException
        resCtx.setRootPart("OK it works.", "text/xml");

Here is the Deployment Descriptor, DeploymentDescriptor.xml:
<isd:service xmlns:isd=""
             id="urn:soaptest" type="message">
  <isd:provider type="java"
    <isd:java class="TstSoap" static="false"/>


And finally, here is the SOAP message that is sent:
        <tstMethod xmlns="urn:soaptest" >

All  three of the above are in the directory 
c:/bin/cygwin/home/clive/src/woko on my computer.

-Within, I have added this to the classpath of the server:

Then I start the server:

Next I register the DeploymentDescriptor from the woko directory:
java org.apache.soap.server.ServiceManagerClient 
http://localhost:8080/soap/servlet/rpcrouter deploy 

This seems to work ok as I can then see if it is registered with tomcat:
java org.apache.soap.server.ServiceManagerClient 
http://localhost:8080/soap/servlet/rpcrouter list

Deployed Services:

Now I send the xml message to the messagerouter (where msg1.xml is the 
aml message above):
java SOAPClient4XG http://localhost:8080/soap/servlet/messagerouter msg1.xml

And (finally), this is what I get back: Server returned HTTP response code: 500 for URL: 
        at Source)
        at SOAPClient4XG.main(
Exception in thread "main"

Not that useful :-(
If instead I start the apache TunnelGui on port 4040, and try again, 
this is what I get. (Note the line I have changed to bold)
HTTP/1.1 500 Internal Server Error
Set-Cookie: JSESSIONID=84720BCEC2C28DD4AEDF25B02B4B3207; Path=/soap
Content-Type: text/xml;charset=utf-8
Content-Length: 4066
Date: Tue, 09 Dec 2003 17:05:15 GMT
Server: Apache-Coyote/1.1
Connection: close

<?xml version='1.0' encoding='UTF-8'?>
<faultstring>Exception while handling service request: 
<stackTrace>java.lang.NoClassDefFoundError: org/apache/soap/Envelope
    at java.lang.Class.getDeclaredMethods0(Native Method)
.... lots of java errors......

So why can't the system find this:
java.lang.NoClassDefFoundError: org/apache/soap/Envelope

Poking into the soap.jar library in common/lib and it is there ok. 
*Please*, does anyone know what I am doing wrong here, I really am 
rather stumped :-(

If I explicitly put soap.jar on the server classpath, I cannot deploy 
servlets and get web pages returned rather than XML and the parser does 
not like that (I won't put this in the email as I'm sure I've used 
enough space already).

So, does anyone know if (1) I am being stupid or (2) is there a fault or 
issue/workaround I should know about.

Would really appreciate some help with this.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message