The context root mapping rules that are described in this appendix apply
to all of the web services test areas, including jaxrpc, jaxws,
jws, webservices, webservices12, and webservices13.
This appendix covers the following topics:
F.1 Servlet-Based Web Service Endpoint Context Root Mapping
This section describes the context root mapping for servlet-based web
services endpoints and clients. Since most of the application runtime
and Web runtime deployment descriptor files have been removed in Java EE
8, the context root mapping for web archives in the Java EE 8 RI becomes
the base name of the Web archive file without the file extension. For
example, the context root for the archive web-client.war defaults to
web-client.
This covers the mapping for all servlet-based web services endpoints and
clients under theJava EE 8 CTS test trees [jaxrpc, jaxws, jws,
webservices, webservices12, webservices13].
For example, for the jaxws test directory, the context root mapping is
as shown in the following table.
Table F-1 Context Root Mapping for jaxws Test Directory
| Endpoint |
Context Root Mapping |
WSW2JDLHttpTest_web.war
|
WSW2JDLHttpTest_web
|
WSW2JDLHttpTest_wsservlet_vehicle_web.war
|
WSW2JDLHttpTest_wsservlet_vehicle_web
|
The directory listing is as follows:
% 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
Similarly, for the jaxrpc test directory, the context root mapping is
as shown in the following table.
Table F-2 Context Root Mapping for jaxrpc Test Directory
| Endpoint |
Context Root Mapping |
W2JREMarshallTest_web.war
|
W2JREMarshallTest_web
|
W2JREMarshallTest_jsp_vehicle_web.war
|
W2JREMarshallTest_jsp_vehicle_web
|
W2JREMarshallTest_servlet_vehicle_web.war
|
W2JREMarshallTest_servlet_vehicle_web
|
The directory listing is as follows:
% 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
For Web archives, the context root mapping becomes the base name of the
Web archive file minus the extension.
F.2 EJB-Based Web Service Endpoint Context Root Mapping
This section describes 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 8 RI.
The following algorithm describes the context root mapping rules that
are used by the Java EE 8 Reference Implementation.
if sun-ejb-jar.xml deployment descriptor exists
if <endpoint-address-uri> tag exists
context root = value of <endpoint-address-uri>
else
if WebService.name annotation is specified on implementation bean
context root = WSDL Service Name + / + WebService.name
else
context root = WSDL Service Name + / + Simple Bean Class Name
endif
endif
else
if WebService.name annotation is specified on implementation bean
context root = WSDL Service Name + / + WebService.name
else
context root = WSDL Service Name + / + Simple Bean Class Name
endif
endif
For example, the following table shows the context root mappings for the
webservices12/ejb/annotations directory.
Table F-3 Context Root Mappings
| Test Directory |
Context Root (<endpoint-address-uri>) |
WSEjbMultipleClientInjectionTest1
|
"WSEjbMultipleClientInjectionTest1/ejb"
|
WSEjbMultipleClientInjectionTest2
|
"WSEjbMultipleClientInjectionTest2/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"
|
-------------- -------------------------------------
Test Directory Context Root = <endpoint-address-uri>
-------------- -------------------------------------
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 table shows the two test directories under the
webservices12/ejb/annotations that do not specify the
<endpoint-address-uri> deployment tag or do not contain a EJB JAR
runtime deployment descriptor file. Because of this, the context root is
calculated using the previously described formula. In both cases, the
context root is calculated as a concatenation of the WSDL Service Name,
a slash (/), and the Simple Bean Class Name.
Table F-4 Context Root Mapping for Directories Without Endpoint Address
URIs
| Test Directory |
Context Root (WSDL Service Name/Simple Bean Class Name) |
WSEjbWebServiceRefTest1
|
"WSEjbWebServiceRefTest1HelloService/HelloBean"
|
WSEjbWebServiceRefWithNoDDsTest
|
"WSEjbWSRefWithNoDDsTestHelloEJBService/WSEjbWSRefWithNoDDsTestHelloEJB"
|
-------------- --------------------------------------------------------
Test Directory Context Root = <WSDL Service Name/Simple Bean Class Name>
-------------- --------------------------------------------------------
WSEjbWebServiceRefTest1 "WSEjbWebServiceRefTest1HelloService/HelloBean"
WSEjbWebServiceRefWithNoDDsTest "WSEjbWSRefWithNoDDsTestHelloEJBService/WSEjbWSRefWithNoDDsTestHelloEJB"
The context root mappings for some, but not all, tests also exist in the
DAT files under the $TS_HOME/bin directory. These include the
jaxrpc-url-props.dat, jaxws-url-props.dat, jws-url-props.dat, and
webservices12-url-props.dat files.
Licensees can use the previously described information in their porting
implementation layer for web services.