1) Clearly, for any service method that is executed, the byte code 
must be loadable, which means it must be somewhere that a Tomcat 
class loader can access it.  If the code cannot be found, Apache SOAP 
would return a SOAP Fault to the client.

Almost always, the classes implementing services should be in the 
Apache SOAP webapp.  Depending on what dependencies the service 
classes have, they may also work from $CATALINA_HOME/lib or 
$CATALINA_HOME/classes.

2) Your Apache SOAP webapp can access classes in another webapp only 
through the sleeziest hack which may leave Tomcat unstable.  In 
particular, the webapps classes directory and/or jars from lib would 
need to be in the Tomcat system class loader path set in catalina.sh 
or catalina.bat.

If you have classes that must be shared between webapps and have no 
dependencies on the other classes in either webapp, you can put the 
classes in $CATALINA_HOME/lib or $CATALINA_HOME/classes.  Normally, I 
would recommend you simply have separate copies of the classes in 
each webapp.

For details on Tomcat's class loaders, see 
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-
howto.html.

On 17 Jan 2003 at 17:42, Vuko Brigljevic wrote:

> Hello,
> 
> Just trying my first steps in SOAP land... I am
> using it with tomcat 4.1.12.
> 
> Two probably related questions about the classpath
> of SOAP applications:
> 
> 1) I am deploying a SOAP method from some directory ~/XX/ :
> 
> ~/XX >  java org.apache.soap.server.ServiceManagerClient \   
>     http://localhost:8080/soap/servlet/rpcrouter deploy deploy.xml
> 
>   It exposes the method HelloSoapServer.getMessage(...).
>   The source code HelloSoapServer.java is in that directory.
> 
>   Where does tomcat get the byte code from when it responds
>   to a SOAP message for that method? I don't see the byte
>   code for the HelloSoapServer class anywhere in the tomcat
>   directory tree? Actually, I don't even need to have the 
>   class compiled anywhere and it still works.
> 
> 2) In the class whose method I want to expose to SOAP,
>    I want to use a reference to a class located in a 
>    different tomcat webapp directory. How do I set up
>    things so SOAP finds that class, i.e how do I set up
>    the classpath SOAP is using to find this class
>    (located, say, in 
>   $CATALINA_HOME/webapps/<myotherapp/WEB-INF/classes/)
> 
> Thanks,
> 
> Vuko
>    
> 
> ===========================================================|
>  Vuko Brigljevic,    EP Research Fellow                    |
>  CERN - European Laboratory for Particle Physics           |
> ===========================================================|
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 


Scott Nichol


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to