Web services (J2EE 1.3 to J2EE 1.4)
The J2EE 1.4 specification has added support for Web services through the new JAX-RPC 1.0 API.
The JAX-RPC API supports service endpoints through:
- servlets with JAXR-RPC
- servlets with direct SOAP
- stateless session beans
The J2EE 1.4 specification supports the Web services for J2EE specification (JSR 109). JSR 109 defines the deployment requirements for Web services and utilizes the JAX-RPC programming model.
The following Web services artifacts are migrated using the J2EE Migration Wizard:
- Web services descriptor
- Web services client descriptor
- JAX-RPC mapping descriptor
Migrating Web service deployment descriptors
Any Web service deployment descriptors contained in J2EE 1.3 projects that are migrated to the J2EE 1.4 specification level will be migrated from JSR-109 V1.0 (for J2EE 1.3) to J2EE 1.4.Web service deployment descriptors, as defined by JSR-109 V1.0, consist of the files webservices.xml, webservicesclient.xml, and all JAX-RPC mapping deployment descriptors that are referenced by the webservices.xml and webservicesclient.xml files. As with other J2EE deployment descriptors, migration will modify the structure of the information contained in the descriptors in order to make them comply with the J2EE 1.4 specification. One structural change which is particular to the Web service deployment descriptors is the change to the way in which qualified names are represented. In JSR-109 V1.0, qualified names are represented using a sequence of two elements, <namespaceURI> and <localpart>, which contain the namespace URI and the local part of the name respectively. Qualified names in J2EE 1.4 are based on the XMLSchema QName type, which uses XML namespaces.
Further details on the migration of each of the Web service deployment descriptors is provided below.
- Web services descriptor (webservices.xml)
The webservices.xml deployment descriptor is present in Web projects and EJB projects that contain J2EE Web services. Both the <wsdl-port> element and the <soap-header> element contain qualified names and their contents will be migrated to the J2EE 1.4 format.
The webservices.xml deployment descriptor is present in Web projects that contain J2EE Web services. Both the <wsdl-port> element and the <soap-header> element contain qualified names and their contents will be migrated to the J2EE 1.4 format.
For example, if <wsdl-port> is represented as follows before migration,
<wsdl-port> <namespaceURI>http://addressbook.webservice</namespaceURI> <localpart>AddressBook</localpart> </wsdl-port>after migration <wsdl-port> will be represented as:
<wsdl-port xmlns:pfx="http://addressbook.webservice">pfx:AddressBook</wsdl-port>The prefix "pfx" is used as the namespace prefix for all qualified names that are migrated.
- Web services client descriptor (webservicesclient.xml)
The webservicesclient.xml deployment descriptor is present in J2EE 1.3 Web projects, and application client projects that contain J2EE Web service clients. During migration from J2EE 1.3 to 1.4, the contents of webservicesclient.xml are migrated and moved to the deployment descriptor for the project. The process that occurs is as follows:
- For Web projects, all <service-ref> elements in webserivcesclient.xml are moved under the <web-app> element in web.xml.
- For application client projects, all <service-ref> elements in webservicesclient.xml are moved under the <application-client> element in application-client.xml.
- Webservicesclient.xml is deleted.
Both the <service-qname> element and the <soap-header> element contain qualified names and their contents will be migrated to the J2EE 1.4 format. For example, if <service-qname> is represented as follows before migration,
<service-qname> <namespaceURI>http://addressbook.webservice</namespaceURI> <localpart>AddressBookService</localpart> </service-qname>after migration <service-qname> will be represented as:
<service-qname xmlns:pfx="http://addressbook.webservice">pfx:AddressBookService</service-qname>The prefix "pfx" is used as the namespace prefix for all qualified names that are migrated.
- JAX-RPC mapping descriptor
Both the webservices.xml and webservicesclient.xml deployment descriptors can reference one or more JAX-RPC mapping deployment descriptors.
In the webservices.xml file, these references are contained in the <jaxrpc-mapping-file> element under each <webservice-description> element. In the webservicesclient.xml file, these references are contained in the <jaxrpc-mapping-file> element under each <service-ref> element.
During migration from J2EE 1.3 to 1.4, all the JAX-RPC mapping deployment descriptors referenced in webservices.xml and webservicesclient.xml are migrated. Migration includes migrating all qualified names to the J2EE 1.4 format (see the sections above on webservices.xml and webservicesclient.xml for examples of qualified names following migration).
Parent topic
J2EE 1.3 to 1.4 specification level migration
Related tasks
Migrating secure Web services
Related reference
Web projects (Servlet level 2.3 to Servlet level 2.4)
Connector projects (JCA 1.0 to JCA 1.5)
J2EE 1.3 to 1.4 specification level migration