The Apache SOAP Deployment Descriptor

Apache SOAP utilizes XML documents called "deployment descriptors" to provide information to the SOAP runtime about the services that should be made available to clients. They can provide a wide array of information such as:

The exact contents of the deployment descriptor depend upon the type of artifact which is being exposed via SOAP. Below you will find details about the different types of deployment descriptors which may be used in this release.

Standard Java Class Deployment Descriptor

A deployment descriptor which exposes a service which is implemented via a standard Java class (including a normal Java Bean) looks like the following example:

<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
             id="urn:service-urn" [type="message"]>
             <isd:provider type="java" 
             scope="Request | Session | Application"
             methods="exposed-methods">
             <isd:java class="implementing-class" [static="true|false"]/>
             </isd:provider>
<isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener> </isd:service>

where:

On the <service> element, there is an optional attribute called type which may be set to the value "message" if the service is document-oriented instead of being an RPC invoked service.

On the <java> element, there is an optional attribute called static, which may be set to either "true" or "false", depending upon whether or not the methods which are being exposed are static or not.

The <provider> element also takes a scope attribute which indicates the lifetime of the instantiation of the implementing class.

EJB Deployment Descriptor

A deployment descriptor which exposes a service which is implemented via an Enterprise Java Bean looks like the following example:

<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
             id="urn:service-urn">
             <isd:provider type="provider-class"
             scope="Application"
             methods="exposed-methods">
             <isd:java class="jndi-name"/>
             <isd:option key="FullHomeInterfaceName" value="home-name" />
             </isd:provider>
<isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener> </isd:service>

where:

BSF Script Deployment Descriptor

A deployment descriptor which exposes a service which is implemented via a BSF Script looks like the following example:

<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
             id="urn:service-urn">
             <isd:provider type="script"
             scope="Request | Session | Application"
             methods="exposed-methods">
             <isd:script language="language-name" [source="source-filename"]>[script-body]
             </isd:script>
             </isd:provider>
             <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
             </isd:service>

where:

The deployment descriptor must also have either a source attribute on the <script> element, or contain a script-body, which has the actual script which will be used to provide the service. If the deployment descriptor has the source attribute, then source-filename refers to the file which contains the service implementation.

DB2 Stored Procedure Deployment Descriptor

A deployment descriptor which exposes one or more DB2 stored procedures as a services looks like the following example:

<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
            id="urn:service-urn">
            <isd:provider type="com.ibm.soap.providers.WASDB2SPProvider"
            scope="Application"
            methods="* | exposed-methods">
            <isd:option key="userID" value="db-userid"/>
            <isd:option key="password" value="db-password"/>
            [<isd:option key="fullContextFactoryName" value="context-factory"/>
            <isd:option key="datasourceJNDI" value="jndi-name"/>] 
            [<isd:option key="dbDriver" value="db-driver"/>
            <isd:option key="dbURL" value="db-url"/>]
            </isd:provider>
            <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
            </isd:service>

where:

The methods attribute on the <provider> element may either contain a list of space separated procedure names to expose, or an "*" if all available stored procedures should be exposed.

For example, either the option with a key of "fullContextFactoryName" and the option with a key of "datasourceJNDI" must be provided, or the option with a key of "dbDriver" and the option with a key of "dbURL" must be specified.