4.2.1 Running the JAX-RPC TCK on a Vendor’s Implementation
The JAX-RPC 1.1 specification does not
specify any normative model for packaging and deployment of service
endpoints on a servlet container-based JAX-RPC runtime
system. A JAX-RPC 1.1 implementation is
allowed to have a vendorspecific deployment and packaging model for
servlet-based service endpoints. For this reason, the
JAX-RPC TCK provides two distribution directories, /dist
and /dist-vi, for the web service endpoint tests.
The /dist directory contains all the WAR files for the
JAX-RPC TCK service endpoint tests that have been
compiled and packaged for deployment on a Servlet-compliant web
container using the standard Web Archive (WAR) format. These WAR files
are tailored for use with the JAX-RPC 1.1
Reference Implementation. The web.xml file contains the deployment
information that the web container needs to link JAX-RPC
service endpoints to its associated servlet class. One generic servlet
class, com.sun.xml.rpc.server.http.JAXRPCServlet , is used for all
JAX-RPC service endpoints. These WAR files enable you to
run, without any additional setup or modification, the
JAX-RPC TCK tests and to test the various features and
functionality of the JAX-RPC 1.1
Reference Implementation.
The /dist-vi directory contains generic JAR files for all the TCK
service endpoint tests that you must use to package and deploy on your
JAX-RPC 1.1 implementation in a
vendor-specific way. For each of these web applications, you must use
your deployment tool to perform the appropriate Java-to-WSDL or
WSDL-to-Java mapping, based on whether the service endpoint is defined
by a Java Service Endpoint Interface or a WSDL service document. Next,
you must package all the generated artifacts needed along with the
service implementation classes for the service endpoints and deploy
them on your container-based implementation.
The following README files and TABLE show test breakdown and provide
information that should help you with this process
These README files contain the manual instructions that you need to
perform to implementation. The files also specify the mapping
(Java-to-WSDL or WSDL-to- deploy and package the service endpoint tests
on your JAX-RPC 1.1 Java) that each test
must perform. + For a brief example of how the JAX-RPC
1.1 Reference Implementation does this, look at the
J2WMT.war web application in the the /dist directory. This test
marshalls/unmarshalls all the JAX-RPC-supported Java data
types as outlined in the JAX-RPC 1.1
Specification using the Java-to-WSDL mapping. The web.xml file that is
packaged in this web application is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" 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://
java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>J2WMarshallTestApp</display-name>
<listener>
<listenerclass>
com.sun.ts.tests.jaxrpc.common.JAXRPCContextListener</
listener-class>
</listener>
<servlet>
<servlet-name>XmlServletName</servlet-name>
<servlet-class>com.sun.ts.tests.jaxrpc.common.JAXRPCServlet</
servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>XmlServletName</servlet-name>
<url-pattern>/jaxrpc/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>54</session-timeout>
</session-config>
</web-app>
As you can see, the JAX-RPC service endpoint is linked to
a generic servlet in the JAX-RPC RI
(com.sun.xml.rpc.server.http.JAXRPCServlet). This servlet is abstracted
out in JAX-RPC TCK under common servlet
(com.sun.ts.tests.jaxrpc.common.JAXRPCServlet) which simply extends it.
This common servlet is used for processing, handling and dispatching to
all JAX-RPC service endpoints. The JAX-RPC TCK Service
Endpoint WAR files use a consistent naming convention for accessing all
Service Endpoint URLs and WSDL URLs: as follows.
The example that follows is one of the JAX-RPC TCK tests that shows this
mapping.
The following implementation-specific runtime configuration file,
jaxrpc-riruntime. xml , is supplied as a web archive initialization
file to this servlet. This runtime configuration file is automatically
generated by the wsdeploy deployment tool, which gives information on
all service endpoints containing their interface, implementation and
tie classes, their service, port and WSDL document and their URL
pattern for accessing the endpoint.
<?xml version="1.0" encoding="UTF-8"?>
<endpoints xmlns=’http://java.sun.com/xml/ns/jax-rpc/ri/runtime’ version=’1.0’>
<endpoint
name=’MarshallTest’
interface=’com.sun.ts.tests.jaxrpc.ee.j2w.marshalltest.Marshall Test’
implementation=’com.sun.ts.tests.jaxrpc.ee.j2w.marshalltest.MarshallTestImpl’
tie=’com.sun.ts.tests.jaxrpc.ee.j2w.marshalltest.MarshallTest_Tie’
wsdl=’/WEB-INF/MarshallTestService.wsdl’
service=’{http://marshalltestservice.org/wsdl}MarshallTestService’
port=’{http://marshalltestservice.org/wsdl}MarshallTestPort’
urlpattern=’/jaxrpc/MarshallTest’/>
</endpoints>
where MarshallTest is the service port to access.