To broaden the discussion, let me describe what I do relative to this.

By default, Apache SOAP stores information about deployed services to a file called, 
if memory serves me, DeployedServices.ds.  This file is created by using Java 
serizialization on the Vector/Hashtable/array (or whatever) of services maintained by 
the server.

However, Apache SOAP also supports pluggable configuration managers.  To use the XML 
configuration manager, I put the following file, named soap.xml in the root of my soap 
webapp, e.g. in $CATALINA_HOME/webapps/soap.

<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Apache SOAP Server Configuration File -->
<soapServer>
 <serviceManager>
  <option name="SOAPInterfaceEnabled" value="true" />
 </serviceManager>
 <configManager value="org.apache.soap.server.XMLConfigManager" >
  <option name="filename" value="services.xml"/>
 </configManager>
</soapServer>

Note that it is possible to have this file with another name in another location by 
adding a parameter in web.xml.

The configuration manager is given an option which specifies the filename for the 
service configuration.  The services.xml, in this case, is just a series of deployment 
descriptors wrapped in a root element named <deployedServices>.  Here's an example 
with two services.

<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Apache SOAP deployed services -->
<deployedServices>
<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment";
             id="urn:AddressFetcher">
  <isd:provider type="java"
                scope="Application"
                methods="getAddressFromName addEntry getAllListings putListings">
    <isd:java class="samples.addressbook.AddressBook" static="false"/>
  </isd:provider>

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

  <isd:mappings>
    <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
             xmlns:x="urn:xml-soap-address-demo" qname="x:address"
             javaType="samples.addressbook.Address"
             java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer"
             xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/>
    <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
             xmlns:x="urn:xml-soap-address-demo" qname="x:phone"
             javaType="samples.addressbook.PhoneNumber"
             java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer"
             xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/>
  </isd:mappings>    
</isd:service>
<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment";
             id="urn:xmltoday-delayed-quotes">
  <isd:provider type="java"
                scope="Application"
                methods="getQuote">
    <isd:java class="samples.stockquote.StockQuoteService"/>
  </isd:provider>
  <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
</isd:service>
</deployedServices>

Rather than manually deploying your services individually with separate deployment 
descriptors, you could do something similar to what I do.

FYI, the user guide has additional information about configuring Apache SOAP.

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message ----- 
From: "Scott Nichol" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 27, 2003 12:08 PM
Subject: Re: Multiple Deployment problems


They must be deployed as 2 separate operations.

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message ----- 
From: "Gill, John" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 27, 2003 11:33 AM
Subject: RE: Multiple Deployment problems


> Ok, can these two descriptors reside within the same xml document? Or must
> they be deployed as two separate operations?
> 
> John
> 
> -----Original Message-----
> From: Scott Nichol [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, August 26, 2003 8:44 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Multiple Deployment problems
> 
> John,
> 
> Each class containing service methods must have a unique namespace (the id
> attribute of isd:service).  This means you must deploy your 2 separate
> classes as separate namespaces within the webapp, e.g. you should use 2
> deployment descriptors, such as
> 
> <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment";
>              id="urn:WSServer">
>   <isd:provider type="java" scope="Request" methods="SubmitWS">
>     <isd:java class="org.one.ws.server" static="true"/>
>   </isd:provider>  
> </isd:service>
> 
> <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment";
>              id="urn:WS2Server">
>   <isd:provider type="java" scope="Request" methods="SubmitWS_2.0">
>     <isd:java class="org.one.ws2.server" static="true"/>
>   </isd:provider>
> </isd:service>
> 
> 
> Scott Nichol
> 
> Do not send e-mail directly to this e-mail address,
> because it is filtered to accept only mail from
> specific mail lists.
> ----- Original Message ----- 
> From: "Gill, John" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, August 26, 2003 4:48 PM
> Subject: Multiple Deployment problems
> 
> 
> > I know I'm doing this wrong, but I can't seem to find a good description
> of
> > how to do it right.
> > 
> > What I'm trying to do is deploy two different soap services within the
> same
> > web app, where the two different services are in different classes.  Am I
> > out of luck? Or just not trying correctly?  
> > 
> > <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment";
> >              id="urn:WSServer">
> >   <isd:provider type="java" scope="Request" methods="SubmitWS">
> >     <isd:java class="org.one.ws.server" static="true"/>
> >   </isd:provider>  
> >   <isd:provider type="java" scope="Request" methods="SubmitWS_2.0">
> >     <isd:java class="org.one.ws2.server" static="true"/>
> >   </isd:provider>
> > 
> > </isd:service>
> > 
> > 
> 

Reply via email to