Skip navigation links

Package com.sun.xml.ws.server

JAX-WS 2.0.1 Server Runtime

See: Description

Package com.sun.xml.ws.server Description

JAX-WS 2.0.1 Server Runtime

This document describes the architecture of server side JAX-WS 2.0.1 runtime.

JAX-WS 2.0.1 Server Runtime Sequence Diagram

Message Flow

A Web Service invocation starts with either the WSServletDelegate or the ServerConnectionImpl. Both of these classes find the appropriate RuntimeEndpointInfo and invokes the Tie.handle method. This method first creates a MessageInfo used to gather inforrmation about the message to be received. A RuntimeContext is then created with the MessageInfo and the RuntimeModel retrieved from the RuntimeEndpointInfo. The RuntimeContext is then stored in the MessageInfo. The EPTFactory is retrieved from the EPTFactoryFactoryBase and also placed in the MessagInfo. A MessageDispatcher is then created and the receive method is invoked. There will be two types of MessageDispatchers for JAX-WS 2.0.1, SOAPMessageDispatcher (one for client and one for the server) and an XMLMessageDispatcher (one for the client and one for the server).

The MessageDispatcher.receive method orchestrates the receiving of a Message. The SOAPMessageDispatcher first converts the MessageInfo to a SOAPMessage. The SOAPMessageDispatcher then does mustUnderstand processing followed by an invocation of any handlers. The SOAPMessage is then converted to an InternalMessage and stored in the MessageInfo. The converting of the SOAPMessage to an InternalMessage is done using the decoder retrieved from the EPTFactory that is contained in the MessageInfo. Once the SOAPMessage has been converted to an InternalMessage the endpoint implementation is invoked via reflection from the Method stored in the MessageInfo. The return value of the method call is then stored in the InternalMessage. An internalMessage is then created from the MessageInfo. The SOAPEncoder is retrieved from the EPTFactory stored in the MessageInfo. The SOAPEncoder.toSOAPMessage is then invoked to create a SOAPMessage from the InternalMessage. A WSConnection is then retrieved from the MessageInfo and the SOAPMessage is returned over that WSConnection.


External Interactions

SAAJ API

javax.xml.soap.MessageFactory(binding).createMessage(MimeHeaders, InputStream)

JAXB API

JAX-WS RI uses the JAXB API to marshall/unmarshall user created JAXB objects with user created JAXBContext. Handler, Dispatch in JAX-WS API provide ways for the user to specify his/her own JAXBContext. JAXBTypeSerializer class uses all these methods.

The following two JAXB classes are implemented by JAX-WS to enable/implement MTOM and XOP

JAXB Runtime-API (private contract)

JAX-WS RI uses these private API for serialization/deserialization purposes. This private API is used to serialize/deserialize method parameters at the time of JAXBTypeSerializer class uses all these methods.

Skip navigation links

Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.