10.10. Set the Web Service URL
We want to use a meaningful URL that matches our Web Services namespacejbossatwork-ws. So we modify jboss.xml in Example 10-6 (the JBoss-specific EJB deployment descriptor) as follows.
Example 10-6. jboss.xml
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd"> <jboss> <enterprise-beans> ... <session> <ejb-name>InventoryFacade</ejb-name> <port-component> <port-component-name>Inventory</port-component-name> <port-component-uri>jbossatwork-ws/InventoryService</port-component-uri> </port-component> ... </session> ... </enterprise-beans> ... </jboss>
The <port-component>element and its sub-elements tell JBoss to deploy our WSDL to the jbossatwork-ws namespace at the following URL:
Although modifying the jboss.xml file to set the URL is helpful, it is purely optional. You could successfully deploy a Web Service without changing jboss.xml.
At this point we've shown all the Web Services -related deployment descriptors. We now have to upgrade InventoryFacadeBean to expose its findAvailableCars( ) method as a Web Service.