What’s Next?
JAX-WS has two distinct but related APIs for SOAP-based web services. One API, with annotations such
as @WebService and @WebMethod, focuses on what might be called the application level. On the
service side, annotations are used to create web services and to specify their operations. Additional
annotations such as @WebParam are available for fine-tuning and documenting
different aspects of a service and its operations. On the client side, the application API enables
clients to draw upon wsimport-generated classes to access a SOAP-based service and to invoke its
operations. A central feature of the application level is the WSDL contract, which captures in XML the
service and its operations, including essential details such as the invocation syntax for the service
operations, the encoding/decoding scheme for data types, the transport used for messages, and the service endpoint.
Frameworks such as JAX-WS and DotNet come with utilities that put the WSDL to practical use.
A major appeal of the application level in JAX-WS is that the SOAP itself—the XML—remains hidden on the service and the client sides. The underlying SOAP libraries serialize from Java into XML and deserialize from XML into Java, thereby allowing both service and service client to work in Java data structures and in familiar Java programming idioms. JAX-B and related utilities allow REST-style services in Java to work around the XML or JSON payloads typical of REST-style services, but JAX-WS, which uses JAX-B ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access