![]() ![]() ![]() ![]() ![]() ![]() |
This section provides tips for migrating JAX-RPC Web Services and clients to JAX-WS. The following table summarizes the topics that are covered.
Note: | In some cases, a JAX-RPC feature may not be supported currently by JAX-WS, such as WebLogic Reliable Messaging, conversational or buffered Web Services, and so on. In this case, the application cannot be migrated unless it is re-architected. |
You can set the final context root of a WebLogic Web Service using a variety of methods, as described in “How to Determine the Final Context Root of a WebLogic Web Service” in WebLogic Web Services Reference.
As described in this section, when defining a JAX-RPC Web Service, you can use the @WLXXXTransport
JWS annotations to specify the context root. For JAX-WS Web Services, the @WLXXXTransport
JWS annotations are not valid. If used in the JAX-RPC Web Service, the JWS file needs to be updated to remove the annotations in favor of one of the other methods.
JAX-WS supports the following WebLogic-specific annotations:
All other WebLogic-specific annotations must be removed from your JAX-RPC applications when migrating to JAX-WS. For more information, see “WebLogic-specific Annotations” in WebLogic Web Services Reference.
When you run the jwsc
file on a JAX-RPC Web Service, a WSDL file is generated in the specified output directory. For JAX-WS Web Services, the WSDL file is generated when the service endpoint is deployed. In order to generate a WSDL file in the output directory, you must specify the wsdlOnly
attribute of the <jws>
child element of the jwsc
Ant task. For more information, see
“jwsc” in the WebLogic Web Services Reference.
JAX-WS uses Java Architecture for XML Binding (JAXB) to manage all of the data binding tasks. If your application supports custom types using XMLBeans or Tylar, you will need to modify them to use JAXB. For more information about using JAXB, see Using JAXB Data Binding.
JAX-WS supports EJB 3.0. JAX-RPC supports EJB 2.1 only.
EJB 3.0 introduced metadata annotations that enable you to automatically generate, rather than manually create, the EJB Remote and Home interface classes and deployment descriptor files needed when implementing an EJB.
For more information about EJB 3.0 bean class requirements and changes from 2.x, see “Programming the Bean File: Requirements and Changes from 2.X” in Enterprise JavaBeans (EJB) 3.0.
Use of the SOAPBinding.Style.RPC
style, although supported, is not recommended with JAX-WS. It is recommended that you change the style to SOAPBinding.Style.DOCUMENT
.
Although the SOAP APIs are similar, JAX-RPC SOAP handlers will need to be modified to run with JAX-WS. For more information, see “Creating and Using SOAP Message Handlers” in Programming Advanced Features of WebLogic Web Services Using JAX-WS.
JAX-RPC clients will need to be re-written as the JAX-RPC and JAX-WS client APIs are completely different. For more information about writing JAX-WS clients, see “Invoking Web Services” in Getting Started With WebLogic Web Services Using JAX-WS.
![]() ![]() ![]() |