Version 1

    JBossWS implements both the JAX-WS and JAX-RPC specifications, however it does put a clear focus on JAX-WS. This page compares the two specifications and explains why JAX-WS is to be considered an improvement over JAX-RPC.

     

    Introduction

    The change of name from JAX-RPC to JAX-WS is meant to stress the idea that Web Services shouldn't be thought for fine-grained remote procedure calls. They were designed for interoperable coarse-grained message correspondence. For this reason, one of JAX-WS' main goals is providing better support for document-oriented Web Services.

     

    Moreover JAX-WS grants compliance with recent standard specifications; it also provides new interesting features and simplifies endpoint development and invocation.

     

    Standards support
    • Both JAX-RPC and JAX-WS support SOAP-1.1. JAX-WS also supports SOAP 1.2. This should change almost nothing to the Java programmer. However it grants more interoperability with non-java implementations using the more recent SOAP 1.2.
    • JAX-WS supports SAAJ 1.3 while JAX-RPC supports SAAJ 1.2.
    • JAX-WS grants compliance with WS-I's BP-1.1 - Basic Profile, while JAX-RPC supports WS-I's BP-1.0 - Basic Profileonly.

    New features and ease of development
    • JAX-WS makes use of new Java 5.0 features: annotations, generics and executors.
    • JAX-WS features a collection of annotations to be used to define Web Service endpoints and Web Service clients (JSR 181 - Web Services Metadata for the Java Platform). This simplifies development a lot, since the developer adds annotations to the implementation classes instead of writing a lot of descriptors.
    • JAX-WS provides support for asynchronous services invocations.
    • JAX-WS supports MTOM and XOP; this means enhancements in efficienty of message serialization and increase of interoperability since many implementors (including Microsoft) currently support MTOM.
    • JAX-RPC came with its own data mapping model, while JAX-WS does not concern itself with Java/XML data mapping. JAX-WS leverages JAXB data mapping model and this should allow mapping for almost any XML Schema.
    • Both specifications are designed to hide the details of converting between Java method invocations and the corresponding SOAP messages. However in some cases operating at the XML message level is desirable. This is allowed by JAX-WS only through the Dispatch and Provider interfaces.