tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clive Jordan <clive.jor...@openwave.com>
Subject Re: Apache SOAP Messaging Error (org.apache.soap.Envelope)
Date Tue, 09 Dec 2003 18:10:36 GMT
I have changed to use xerces 2.6.0. Same error :-(

Clive Jordan wrote:

> Hello,
>
> 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
>
> Backgroud:
> 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 
> http://nagoya.apache.org/eyebrowse/ReadMsg?listName=tomcat-dev@jakarta.apache.org&msgNo=32379

>
>
> 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):
> c:\bin\Tomcat4.1\common\lib\xerces.jar;c:\bin\j2sdk1.4.1_01;c:\bin\Tomcat4.1\common\lib\servlet.jar;c:\bin\Tomcat4.1\common\lib\soap.jar;c:\bin\Tomcat4.1\common\lib\mail.jar;c:\bin\Tomcat4.1\common\lib\activation.jar;.

>
>
> As you can see, all the appropriate classes are in the tomcat tree.
>
> Here is my processing class, TstSoap.java:
> import java.io.*;
> 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 resCtx)
>                            throws MessagingException, IOException
>    {
>        resCtx.setRootPart("OK it works.", "text/xml");
>    }
> }
>
> Here is the Deployment Descriptor, DeploymentDescriptor.xml:
> <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
>             id="urn:soaptest" type="message">
>  <isd:provider type="java"
>                scope="Application"
>                methods="tstMethod">
>    <isd:java class="TstSoap" static="false"/>
>  </isd:provider>
>
> <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>

>
> </isd:service>
>
> And finally, here is the SOAP message that is sent:
> <SOAP-ENV:Envelope 
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>    SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>    <SOAP-ENV:Body>
>        <tstMethod xmlns="urn:soaptest" >
>        </tstMethod>
>    </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> All  three of the above are in the directory 
> c:/bin/cygwin/home/clive/src/woko on my computer.
>
> -Within catalina.sh, I have added this to the classpath of the server:
> CLASSPATH="$CLASSPATH":"$CATALINA_HOME"../../cygwin/home/clive/src/woko
>
> Then I start the server:
> startup.sh
>
> Next I register the DeploymentDescriptor from the woko directory:
> java org.apache.soap.server.ServiceManagerClient 
> http://localhost:8080/soap/servlet/rpcrouter deploy 
> DeploymentDescriptor.xml
>
> 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
>
> gives:
> Deployed Services:
>        urn:soaptest
>
> 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:
> java.io.IOException: Server returned HTTP response code: 500 for URL: 
> http://localhost:8080/soap/servlet/messagerouter
>        at 
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown 
> Source)
>        at SOAPClient4XG.main(SOAPClient4XG.java:72)
> 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'?>
> <SOAP-ENV:Envelope 
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <SOAP-ENV:Body>
> <SOAP-ENV:Fault>
> <faultcode>SOAP-ENV:Server</faultcode>
> <faultstring>Exception while handling service request: 
> org/apache/soap/Envelope</faultstring>
> <faultactor>/soap/servlet/messagerouter</faultactor>
> <detail>
> <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.
>
> Thanks,
> Clive
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message