-------------------------------------------------------------------------------------- Context Root mapping rules for all of webservices (jaxrpc, jaxws, jws, webservices, webservices12, webservices13) -------------------------------------------------------------------------------------- (1) Servlet Based Web Service Endpoint Context Root Mapping The context root mapping for servlet based web services endpoints and clients. Since most of the sun application runtime and sun web runtime DD files have been removed in CTS6 the context root mapping for web archives in the (Java EE 6 Reference Implementation) becomes the base name of the web archive file minus the extension. So for the archive web-client.war the context root would default to web-client. This covers the mapping for all servlet based web services endpoints and clients under the CTS6 test trees [jaxrpc, jaxws, jws, webservices, webservices12, webservices13]. For example the given jaxws test directory below the context root mapping will be: WSW2JDLHttpTest_web.war ---> context root: WSW2JDLHttpTest_web WSW2JDLHttpTest_wsservlet_vehicle_web.war ---> context root: WSW2JDLHttpTest_wsservlet_vehicle_web % cd $TS_HOME/src/com/sun/ts/tests/jaxws/ee/w2j/document/literal/httptest % ant ld [echo] WSW2JDLHttpTest.ear [echo] WSW2JDLHttpTest_web.war [echo] WSW2JDLHttpTest_web.war.sun-web.xml [echo] WSW2JDLHttpTest_wsappclient_vehicle.ear [echo] WSW2JDLHttpTest_wsappclient_vehicle_client.jar [echo] WSW2JDLHttpTest_wsappclient_vehicle_client.jar.sun-application-client.xml [echo] WSW2JDLHttpTest_wsejb_vehicle.ear [echo] WSW2JDLHttpTest_wsejb_vehicle_client.jar [echo] WSW2JDLHttpTest_wsejb_vehicle_client.jar.sun-application-client.xml [echo] WSW2JDLHttpTest_wsejb_vehicle_ejb.jar [echo] WSW2JDLHttpTest_wsejb_vehicle_ejb.jar.sun-ejb-jar.xml [echo] WSW2JDLHttpTest_wsservlet_vehicle.ear [echo] WSW2JDLHttpTest_wsservlet_vehicle_web.war [echo] WSW2JDLHttpTest_wsservlet_vehicle_web.war.sun-web.xml For example the given jaxrpc test directory below the context root mapping will be: W2JREMarshallTest_web.war ---> context root: W2JREMarshallTest_web W2JREMarshallTest_jsp_vehicle_web.war ---> context root: W2JREMarshallTest_jsp_vehicle_web W2JREMarshallTest_servlet_vehicle_web.war ---> context root: W2JREMarshallTest_servlet_vehicle_web % cd $TS_HOME/src/com/sun/ts/tests/jaxrpc/ee/w2j/rpc/encoded/marshalltest % ant ld [echo] W2JREMarshallTest.ear [echo] W2JREMarshallTest_appclient_vehicle.ear [echo] W2JREMarshallTest_appclient_vehicle_client.jar [echo] W2JREMarshallTest_appclient_vehicle_client.jar.sun-application-client.xml [echo] W2JREMarshallTest_ejb_vehicle.ear [echo] W2JREMarshallTest_ejb_vehicle_client.jar [echo] W2JREMarshallTest_ejb_vehicle_client.jar.sun-application-client.xml [echo] W2JREMarshallTest_ejb_vehicle_ejb.jar [echo] W2JREMarshallTest_ejb_vehicle_ejb.jar.sun-ejb-jar.xml [echo] W2JREMarshallTest_jsp_vehicle.ear [echo] W2JREMarshallTest_jsp_vehicle_web.war [echo] W2JREMarshallTest_jsp_vehicle_web.war.sun-web.xml [echo] W2JREMarshallTest_servlet_vehicle.ear [echo] W2JREMarshallTest_servlet_vehicle_web.war [echo] W2JREMarshallTest_servlet_vehicle_web.war.sun-web.xml [echo] W2JREMarshallTest_web.war [echo] W2JREMarshallTest_web.war.sun-web.xml So for web archives the context root mapping is trivial it becomes the base name of the web archive file minus the extension. (2) EJB Based Web Service Endpoint Context Root Mapping The context root mapping for ejb based web services endpoints and clients. The context root mapping for ejb based web services and clients is based on the following mapping rules that are used for the (Java EE 6 Reference Implemantation). context root mapping rules that are used by (Java EE 6 Reference Implemantation) if sun-ejb-jar.xml exists if exists context root = value of else if WebService.name annotation specified context root = WSDL Service Name + / + WebService.name else context root = WSDL Service Name + / + Simple Bean Class Name endif endif else if WebService.name annotation specified context root = WSDL Service Name + / + WebService.name else context root = WSDL Service Name + / + Simple Bean Class Name endif endif For example here is the context root mappings for webservices12/ejb/annotations directory: -------------- ------------------------------------- Test Directory Context Root = -------------- ------------------------------------- WSEjbMultipleClientInjectionTest1 "WSEjbMultipleClientInjectionTest1/ejb" WSEjbMultipleClientInjectionTest2 "WSEjbMultipleClientInjectionTest2/ejb" WSEjbNoWebServiceRefInClientTest "WSEjbNoWebServiceRefInClientTest/ejb" WSEjbNoWebServiceRefInClientTest "WSEjbNoWebServiceRefInClientTest/ejb" WSEjbPortFieldInjectionTest "WSEjbPortFieldInjectionTest/ejb" WSEjbPortMethodInjectionTest "WSEjbPortMethodInjectionTest/ejb" WSEjbSOAPHandlersTest "WSEjbSOAPHandlersTest/ejb" WSEjbSOAPHandlersTest2 "WSEjbSOAPHandlersTest2"/ejb" WSEjbWebServiceProviderTest "WSEjbWebServiceProviderTest/ejb" WSEjbWebServiceRefTest2 "WSEjbWebServiceRefTest2/ejb" WSEjbAsyncTest "WSEjbAsyncTest/ejb" The following two test directories under webservices12/ejb/annotations do not specify the deployment tag or do not contain a sun ejb jar runtime DD file. So the context root is calculated by the formula above. In these cases the context root is calculated as (WSDL Service Name + / + Simple Bean Class Name). -------------- --------------------------------------------------------- Test Directory Context Root = -------------- --------------------------------------------------------- WSEjbWebServiceRefTest1 "WSEjbWebServiceRefTest1HelloService/HelloBean" WSEjbWebServiceRefWithNoDDsTest "WSEjbWSRefWithNoDDsTestHelloEJBService/WSEjbWSRefWithNoDDsTestHelloEJB"