Apache SOAP utilizes eXtensible Markup Language (XML) documents called deployment descriptors to provide the SOAP run-time with information on client services.
Deployment descriptors provide a variety of information including:
There are four types of deployment descriptors that you can be use in WebSphere Application Server.
Standard Java class deployment descriptor
A deployment descriptor that exposes a service implemented with a standard Java class, including a normal Java bean. An example of the standard Java class deployment descriptor follows:
<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:
EJB deployment descriptor
A deployment descriptor that exposes a service implemented with an Enterprise Java Bean. An example of an EJB deployment descriptor is as follows:
<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:option key="JNDIName" value="jndi-name"/> <isd:option key="FullHomeInterfaceName" value="home-name" /> </isd:provider> <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener> </isd:service>
where:
com.ibm.soap.providers.WASStatelessEJBProvider
The default values for the iiop URL and context provider keys are:
<isd:option key="ContextProviderURL" value="iiop://localhost:2809" /> <isd:option key="FullContextFactoryName" value="com.ibm.websphere.naming.WsnInitialContextFactory" />To use your own values, you must specify:
<isd:option key="ContextProviderURL" value="<URL to the JNDI provider>" /> <isd:option key="FullContextFactoryName" value="<Context factory full class name>" />
Bean Scripting Framework (BSF) script deployment descriptor
A deployment descriptor that exposes a service implemented with a BSF script. An example follows:
<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:
DB2 stored procedure deployment descriptor
A deployment descriptor that exposes one or more DB2 stored procedures as a service. An example follows:
<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 db-userid and db-password entries are optional. These entries can be set in the datasource. In WebSphere Application Server, the preferred way for administering the db-userid and db-password entries is with a datasource. Changing the user ID and password is easier when the information is located in a datasource rather than in a separate deployment descriptor file.
A db-driver is not required if a data source JNDI name is specified.
The methods attribute on the <provider> element can contain a list of space-separated procedure names to expose, or an * (asterisk). An asterisk indicates all available stored procedures should be exposed.