Java Reference
In-Depth Information
easily implement JDMWS. The following steps describe how to
build a JDMWS.
Step 1: Convert JDM WSDL and JDM Schema to Java Objects
Typically, JAX-RPC runtime provides the WSDL-to-Java tool; one
can use this tool to convert the JDM WSDL to JDM objects. As JDM
WSDL imports the JDM Schema, the WSDL-to-Java tool converts
all the JDM Schema elements to the associated JAX-RPC compati-
ble objects. Figure 11-11 illustrates the typical Java files generated
by a WSDL-to-Java tool. Because JDM uses different namespaces
for schema and Web services, generated files will have associated
packages. For example, all JDM Schema-related Java classes will
be generated under the jdmws.schema package and all Web
services-related Java classes will be generated under the jdmws.
webservices package.
Step 2: Implement the PortType Interface
The next step to building the JDMWS is to implement the Java
remote interface generated by the WSDL-to-Java tool. This interface
can use either a wrapper on the JDM API (to be portable across JDM
standard-compatible DMEs) or a DME-specific implementation.
Because the JDM API maps to the Web services objects, JDMWS is
easier to implement using the JDM API. For example, Listing 11-2
JDM WSDL
JAX-RPC Compatible Java Files
Serializable Java classes for all the types
and elements defined in the JDM Schema
and WSDL type
JDM Schema and
WSDL Types
Serializable Java classes for message types
Message Types
Port Type and
Operations
Java Remote Interface with all the
operations defined in the port type
Java class that extends
javax.xml.rpc.Service
Service
Figure 11-11
WSDL-to-Java mapping.
 
Search WWH ::




Custom Search