Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

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 in Java EE 5, it lacks many advanced features that JAX-WS has like Annotations, JAXB Binding, SOAP 1.2, RESTful Services and so on. So, it is strongly recommended that you use JAX-WS instead of JAX-RPC for implementing Web Services in Java.

...

...

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 JAX-RPC mapping file 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.

...

JAX-RPC didn't used JAXB because the first version of JAX-RPC was completed much before JAXB. So, instead of waiting for JAXB to complete JAX-RPC writers developed their own custom mapping.

...

As per JAX-RPC a Service Endpoint Interface must extend Remote. JAX-WS removes this condition and you can pretty much make a POJO class Web Service by just adding the @WebService annotation at the top of the class.

...

...

The main differences that you can find here are:

...

The following code samples demonstrate the difference between JAX-RPC and JAX-WS in client port lookup.

...

...

The main differences we can observe here are

...