10.7. webservices.xmlThe J2EE-standard webservices.xml file defines and registers the InventoryService Web Service, and ties the Service Endpoint Interface class (com.jbossatwork.ws.InventoryEndpoint) to the InventoryFacadeBean EJB. The webservices.xml file in Example 10-3 also tells JBoss where to find the WSDL and JAX-RPC Mapping files in the EJB JAR file. Example 10-3. webservices.xml<?xml version="1.0" encoding="UTF-8"?> <webservices xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd" version="1.1"> <webservice-description> <webservice-description-name>InventoryService</webservice-description-name> <wsdl-file>META-INF/wsdl/InventoryService.wsdl</wsdl-file> <jaxrpc-mapping-file>META-INF/inventory-mapping.xml</jaxrpc-mapping-file> <port-component> <port-component-name>Inventory</port-component-name> <wsdl-port>InventoryEndpointPort</wsdl-port> <service-endpoint-interface> com.jbossatwork.ws.InventoryEndpoint </service-endpoint-interface> <service-impl-bean> <ejb-link>InventoryFacade</ejb-link> </service-impl-bean> </port-component> </webservice-description> </webservices> We've registered the Web Service endpoint and told the server about the JAX-RPC mapping and WSDL files, and now we need to create these extra descriptors. |