Java Reference
In-Depth Information
ledge about Apache CXF's native features, you can refer to the official documenta-
tion that is available at http://cxf.apache.org/ .
A brief look at the JAX WS architecture
When a SOAP message sent by the client enters the web service runtime environ-
ment, it is captured by a component named Server endpoint listener that, in turn,
uses the Dispatcher module to deliver the SOAP message to that Service.
At this point, the HTTP request is converted internally into a SOAP Message. The
message content is extracted from the transport protocol and is processed through
the handler chain configured for the web service.
SOAP message handlers are used to intercept SOAP messages as they make their
way from the client to the endpoint service and vice versa. These handlers intercept
SOAP messages for both the request and response of the web service.
The next step is unmarshalling the SOAP message into Java objects. This process is
governed by WSDL to Java Mapping and XML to Java Mapping. The former is per-
formed by the JAX-WS engine, and it determines which endpoint to invoke from the
SOAP message. The latter, performed by the JAXB libraries, deserializes the SOAP
message so that it is ready to invoke the endpoint method.
Finally, the deserialized SOAP message reaches the actual web service implement-
ation and the method is invoked.
Once the call is completed, the process is reversed. The return value from the web
service method is marshalled into a SOAP response message using JAX-WS WSDL
to Java mapping and JAXB 2.0 XML to Java mapping.
Note
The Java Architecture for XML Binding ( JAXB ) provides a fast and convenient
way to bind XML schemas and Java representations, making it easy for Java
developers to incorporate XML data and process functions in Java applications.
As part of this process, JAXB provides methods for unmarshalling XML instance
documents into Java content trees, and then marshalling Java content trees
Search WWH ::




Custom Search