Hi,

 >Tomcat 4.0 (Catalina)
I am also using Apache SOAP on Tomcat 4.0. Not much problem with me. A 
better documented
tomcat compare to tomcat 3.x. I am using SOAP 2.2.

 >SOAPContext as the first argument
No problem with me...I can access all the 4 javax.servlet.http.HttpServlet, 
HttpSession,
HttpServletRequest, HttpServletResponse using the first argument, in Win2K.
Should have little difference in other OS.

Here is how I done it.
1)set CATALINA_HOME=C:\Tomcat4 in the environment variable.
2)Copy all the needed SOAP 2.2 & supporting binary into %CATALINA_HOME%\lib.
3)change and add the following lines to catalina.bat in %CATALINA_HOME%\bin :
rem ----- Set Up The Runtime Classpath ----------------------------------------
set CP=%CATALINA_HOME%\bin\bootstrap.jar;%JAVA_HOME%\lib\tools.jar
set CP=%CP%;%CATALINA_HOME%\lib\apache.soap.xerces.jar
set CP=%CP%;%CATALINA_HOME%\lib\apache.soap.activation.jar
set CP=%CP%;%CATALINA_HOME%\lib\apache.soap.bsf.jar
set CP=%CP%;%CATALINA_HOME%\lib\apache.soap.imap.jar
set CP=%CP%;%CATALINA_HOME%\lib\apache.soap.jar
set CP=%CP%;%CATALINA_HOME%\lib\apache.soap.mail.jar
set CP=%CP%;%CATALINA_HOME%\lib\apache.soap.mailapi.jar
set CP=%CP%;%CATALINA_HOME%\lib\apache.soap.pop3.jar
set CP=%CP%;%CATALINA_HOME%\lib\apache.soap.rhino-js.jar
set CP=%CP%;%CATALINA_HOME%\lib\apache.soap.smtp.jar
set CP=%CP%;%CATALINA_HOME%\lib\apache.soap.xmisoap.jar
set CP=%CP%;%CATALINA_HOME%\classes

4)Copy the example "soap.war" file into webapps.

5)define another service in server.xml in %CATALINA_HOME%\conf,
   (With some extra JNDI config example):

   <!-- Define the SOAP-Example Stand-Alone Service use port 9000 as base 
port-->
   <Service name="SOAP-Example-Standalone">
     <Connector className="org.apache.catalina.connector.http.HttpConnector"
                port="9080" minProcessors="5" maxProcessors="512"
                enableLookups="false" redirectPort="9443"
                acceptCount="50" debug="0" connectionTimeout="60000"/>

     <Engine name="SOAP_Example_Standalone" defaultHost="localhost" debug="0">

       <Logger className="org.apache.catalina.logger.FileLogger" 
prefix="soap_eg_log." suffix=".txt" timestamp="true"/>

       <Realm className="org.apache.catalina.realm.MemoryRealm" />

       <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true">

           <Valve className="org.apache.catalina.valves.AccessLogValve"
         directory="logs"  prefix="soap_eg_access_log." suffix=".txt" 
pattern="common"/>

           <Logger className="org.apache.catalina.logger.FileLogger"
         directory="logs"  prefix="soap_eg_log." suffix=".txt" 
timestamp="true"/>

           <!-- ProjectXYZ SOAP Context -->
           <Context path="/soap" docBase="soap" debug="1" reloadable="true">
                 <Logger className="org.apache.catalina.logger.FileLogger"
                 prefix="ProjectXYZ_soap_log." suffix=".txt" timestamp="true"/>

                 <Resource name="jdbc/xyzDB1" auth="Container" 
type="javax.sql.DataSource"/>
                 <ResourceParams name="jdbc/xyzDB1">
                         <parameter><name>user</name><value>sa</value></parameter>
                         <parameter><name>password</name><value></value></parameter>
                         
<parameter><name>driverClassName</name><value>ids.sql.IDSDriver</value></parameter>
                         
<parameter><name>driverName</name><value>jdbc:ids://127.0.0.1:12/conn?dsn='xyzDB1'</value></parameter>
                 </ResourceParams>

                 <Resource name="jdbc/xyzDB2" auth="Container" 
type="javax.sql.DataSource"/>
                 <ResourceParams name="jdbc/xyzDB2">
                         <parameter><name>user</name><value>sa</value></parameter>
                         <parameter><name>password</name><value></value></parameter>
                         
<parameter><name>driverClassName</name><value>ids.sql.IDSDriver</value></parameter>
                         
<parameter><name>driverName</name><value>jdbc:ids://127.0.0.1:12/conn?dsn='xyzDB2'</value></parameter>
                 </ResourceParams>
         </Context>
       </Host>
     </Engine>
   </Service>

6) add this into the %CATALINA_HOME%\webapps\soap\WEB-INF\web.xml,
(For a complete JNDI Example):

   <resource-ref>
   <description>Resource reference to a factory for 
java.sql.Connection</description>
   <res-ref-name>jdbc/xyzDB1</res-ref-name>
   <res-type>javax.sql.DataSource</res-type>
   <res-auth>Container</res-auth>
   </resource-ref>

   <resource-ref>
   <description>Resource reference to a factory for 
java.sql.Connection</description>
   <res-ref-name>jdbc/xyzDB2</res-ref-name>
   <res-type>javax.sql.DataSource</res-type>
   <res-auth>Container</res-auth>
   </resource-ref>

7)All you SOAP Services class file must be placed inside
%CATALINA_HOME%\webapps\soap\WEB-INF\classes.

8)Register them using similiar deployment.xml using batch file like 
soapsvrman.bat:

<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"; 
id="urn:jsoap-Sess-HelloSOAP">

   <isd:provider type="java" scope="Session" methods="getID square cube">
     <isd:java class="test.soap.server.HelloSOAP" static="false"/>
   </isd:provider>

   <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>

</isd:service>

9)Content of soapsvrman.bat:
set SOAP_LIB=%CATALINA_HOME%\lib
@echo "SOAP_LIB=%SOAP_LIB%"
java -cp 
"%SOAP_LIB%\apache.soap.jar;%SOAP_LIB%\apache.soap.xmisoap.jar;%SOAP_LIB%\apache.soap.activation.jar;%SOAP_LIB%\apache.soap.mail.jar;%SOAP_LIB%\apache.soap.xerces.jar;%SOAP_LIB%\javax.xml.jaxp"
 
org.apache.soap.server.ServiceManagerClient 
"http://127.0.0.1:9080/soap/servlet/rpcrouter"; %1 %2 %3 %4 %5


Hope this work for you as it did for me. If it didn't ask for the those 
soap binary from me just to make sure our version are the same.
I am not sending it now b'coz they are big.

Cheers,
Boon  Pang
[EMAIL PROTECTED]
At 07:05 PM 10/1/2001 +0100, you wrote:

>Hi:
>
>I tried upgrading my web service implementation currently running on Tomcat
>3.2.1 to Tomcat 4.0 (Catalina) to see if i could find any performance
>enhancements. The installation went fine and i got my web service running.
>Except for the fact that my methods that receive a SOAPContext as the first
>argument don't get called anymore, resulting in a 'NoSuchMethod'
>exception...
>
>Any one had this problem before?
>
>Regards,
>
>Ivo Silva
>Ivo Conde e Silva
>Movensis
>Technical Department
>Taguspark - Edif. Inova��o IV, n� 721
>Porto Salvo
>2780-920 Oeiras - Portugal
>E-mail: [EMAIL PROTECTED]
>Tel.: (+351) 214 220 660
>Fax: (+351) 214 220 669
>Tlm: (+351) 91 8742703
>
>

Reply via email to