Wiki Markup |
---|
{scrollbar} |
This tutorial will take you through the steps that are most commonly involved in porting a Web Service from JAX-RPC to JAX-WS. This tutorial does not go into details on why these changes are required and the concepts behind it, it is rather a quick note that helps you to deal with migrating your application from the older web service stack to new stack.
Even though JAX-RPC is still supported by Sun, it lacks many advanced features that JAX-WS has like Annotations, JAXB Binding, SOAP 1.2, RESTful Services etc. So It is strongly recommended that you use JAX-WS instead of JAX-RPC for implementing Web Services in Java.
Table of Contents |
---|
JAXB Migration
The most notable change in JAX-WS 2.0 is the use of JAXB 2.0 for data-binding between Java and XML. JAX-RPC 1.0 specified a limited mapping between XML and Java.
This effectively eliminates the need of using jaxrpcmapping.xml where we define the mapping between Java and WSDL. But also imposes a condition that the return and request values can be able to bind to JAXB. Again, considering the wide variety of data types supported by JAXB it shouldn't be a problem.
Info | ||
---|---|---|
| ||
JAX-RPC didn't used JAXB because the first version of JAX-RPC is completed much before JAXB. So, instead of waiting for JAXB to complete JAX-RPC writers developed their own custom mapping. |