If the CalcService.java has the line

    package onjava;

then you have put the .class file in the right place (you don't need the
.java file there) and specified the right class in the deployment
descriptor.  I believe you will have to restart Tomcat to get it to
recognize that the new class file is there.  You then deploy the service
with the command (all on one line)

    java org.apache.soap.server.ServiceManagerClient
http://localhost:8080/soap/servlet/rpcrouter deploy dd.xml

If Tomcat is not at localhost:8080, adjust the URL, and substitute the
file name of your deployment descriptor for dd.xml.

You need to reach the client .class file from the JVM classpath when you
invoke it.  I presume it also is in the onjava package.  In that case,
create a directory named onjava and place the class file in it.  From
the parent directory of onjava, run

    java -classpath .;%CLASSPATH% onjava.CalcClient
http://localhost:8080/soap/servlet/rpcrouter ...

The "." in the classpath will allow the JVM to find the .class file in
the onjava subdirectory.  You must substitute the correct name of the
class, the correct URL and any parameters required by the client.

Scott Nichol

----- Original Message -----
From: "Emma Johansson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 10, 2002 10:50 AM
Subject: soap, tomcat & directories


> Hi!
>
> I have created a SOAP Service and compiled it, but am not sure of in
> which directory to place it.
> Right now both the .java and .class files are placed in
> /jakarta-tomcat-4.1.12/webapps/soap/WEB-INF/classes/onjava/
>
>
> I'm also wondering about the deployment descriptor. Mine looks like
> this:
> <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment";
> id="urn:onjavaserver">
>     <isd:provider type="java" scope="Application" methods="add
> subtract">
>         <isd:java class="onjava.CalcService"/>
>     </isd:provider>
>
>
<isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultLis
tener>
>
> </isd:service>
>
> As what should I save it and in which directory?
> Do I have to compile this code? If so, how?
>
> The same problem appears with the client, where should I save it?
>
> regards,
> Emma
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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

Reply via email to