The web.xml file is the standard deployment descriptor for the Web application that the Web Service is a part of. It declares the filters and servlets used by the service.

On the Oracle ATG Web Commerce platform, the servlet that listens for the SOAP request is com.sun.xml.rpc.server.http.JAXRPCServlet. This servlet is part of the JAX-RPC reference implementation, and is responsible for receiving the incoming SOAP request and determining how to dispatch the call. For example, if you create a Web Service called getOrderStatus, the entry for it in the web.xml file looks something like this:

<servlet>
 <servlet-name>getOrderStatus</servlet-name>
 <display-name>getOrderStatus</display-name>
 <servlet-class>com.sun.xml.rpc.server.http.JAXRPCServlet</servlet-class>
 <init-param>
 <param-name>configuration.file</param-name>
 <param-value>WEB-INF/wsconfig/getOrderStatus_Config.properties</param-value>
 </init-param>
</servlet>
...
<servlet-mapping>
 <servlet-name>getOrderStatus</servlet-name>
 <url-pattern>/getOrderStatus/*</url-pattern>
</servlet-mapping>

When a call to the getOrderStatus Web Service is sent to the Oracle ATG Web Commerce platform, the JAXRPCServlet receives the request and dispatches it based on the information in the file that the configuration.file parameter points to. This configuration file is included in the WAR file, and looks similar to this:

port0.wsdl.serviceName=GetOrderStatusSEIService
port0.tie=webservices.GetOrderStatusSEI_Tie
wsdl.transform=true
port0.name=getOrderStatus
portcount=1
wsdl.location=WEB-INF/getOrderStatus.wsdl
port0.servant=webservices.GetOrderStatusSEIImpl
port0.wsdl.targetNamespace=http\://www.atg.com/webservices
port0.wsdl.portName=GetOrderStatusSEIPort

Note that the port0.servant property is set to the name of the service implementation class. This property designates the class that JAXRPCServlet dispatches the SOAP request to.

Handling Imported WSDL Documents

As discussed in the WSDL Document section, there are two resources that assist in handling WSDL requests. These resources are declared in the web.xml file:

For example:

<filter>
 <filter-name>WSDLImportFilter</filter-name>
 <filter-class>atg.webservice.WSDLImportFilter</filter-class>
</filter>
...
<filter-mapping>
 <filter-name>WSDLImportFilter</filter-name>
 <url-pattern>/getOrderStatus/*</url-pattern>
</filter-mapping>
...
<servlet>
 <servlet-name>WSDLFinder</servlet-name>
 <display-name>WSDLFinder</display-name>
 <description>Used to lookup imported wsdl files.</description>
 <servlet-class>atg.webservice.WSDLFinderServlet</servlet-class>
</servlet>
...
<servlet-mapping>
 <servlet-name>WSDLFinder</servlet-name>
 <url-pattern>atg.commerce.order.status.wsdl</url-pattern>
</servlet-mapping>
<servlet-mapping>
 <servlet-name>WSDLFinder</servlet-name>
 <url-pattern>atg.security.wsdl</url-pattern>
</servlet-mapping>
<servlet-mapping>
 <servlet-name>WSDLFinder</servlet-name>
 <url-pattern>atg.commerce.wsdl</url-pattern>
</servlet-mapping>
Web Service Registrar

To register Web Services with the Web Services Registry, the web.xml file declares the WebServiceRegistrar servlet, and sets it to load on startup:

<servlet>
 <servlet-name>WebServiceRegistrar</servlet-name>
 <display-name>WebServiceRegistrar</display-name>
 <description>ATG WebServiceRegistrar for registering servlet
 web-services.</description>
 <servlet-class>atg.webservice.WebServiceRegistrar</servlet-class>
 <load-on-startup>1</load-on-startup>
</servlet>

For more information about the Web Services Registry, see Managing Web Services.

Other Elements of web.xml

The web.xml file may declare certain additional elements: