/* * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /** *
This document describes the architecture of client side * JAX-WS 2.0.1 runtime. * *
JAX-WS creates SAAJ SOAPMessage from the HttpServletRequest. * At present, JAX-WS reads all the bytes from the request stream and * then creates SOAPMessage along with the HTTP headers.
*MessageFactory(binding).createMessage(MimeHeaders, InputStream)
*SOAPMessage parses the content from the stream including MIME * data
*com.sun.xml.internal.ws.server.SOAPMessageDispatcher::checkHeadersPeekBody()
*SOAPMessage.getSOAPHeader() is used for mustUnderstand processing * of headers. It further uses * SOAPHeader.examineMustUnderstandHeaderElements(role)
*SOAPMessage.getSOAPBody().getFistChild() is used for guessing the * MEP of the request
*com.sun.xml.internal.ws.handler.HandlerChainCaller:insertFaultMessage()
*SOAPMessage.getSOAPPart().getEnvelope() and some other SAAJ calls * are made to create a fault in the SOAPMessage
*com.sun.xml.internal.ws.handler.LogicalMessageImpl::getPayload() * interacts with SAAJ to get body from SOAPMessage
*com.sun.xml.internal.ws.encoding.soap.SOAPEncoder.toSOAPMessage(com.sun.xml.internal.ws.encoding.soap.internal.InternalMessage, * SOAPMessage). There is a scenario where there is SOAPMessage and a * logical handler sets payload as Source. To write to the stream, * SOAPMessage.writeTo() is used but before that the body needs to be * updated with logical handler' Source. Need to verify if this * scenario is still happening since Handler.close() is changed to take * MessageContext.
*com.sun.xml.internal.ws.handlerSOAPMessageContextImpl.getHeaders() * uses SAAJ API to get headers.
*SOAPMessage.writeTo() is used to write response. At present, * it writes into byte[] and this byte[] is written to * HttpServletResponse.
*JAX-WS RI uses the JAXB API to marshall/unmarshall user created * JAXB objects with user created {@link javax.xml.bind.JAXBContext JAXBContext}. * Handler, Dispatch in JAX-WS API provide ways for the user to specify his/her own * JAXBContext. {@link com.sun.xml.internal.ws.encoding.jaxb.JAXBTypeSerializer JAXBTypeSerializer} class uses all these methods.
*{@link javax.xml.bind.Marshaller#marshal(Object,XMLStreamWriter) Marshaller.marshal(Object,XMLStreamWriter)}
*{@link javax.xml.bind.Marshaller#marshal(Object,Result) Marshaller.marshal(Object, DomResult)}
*{@link javax.xml.bind.Unmarshaller#unmarshal(XMLStreamReader) Object Unmarshaller.unmarshal(XMLStreamReader)}
*{@link javax.xml.bind.Unmarshaller#unmarshal(Source) Object Unmarshaller.unmarshal(Source)}
*{@link javax.xml.bind.attachment.AttachmentMarshaller AttachmentMarshaller}
*{@link javax.xml.bind.attachment.AttachmentUnmarshaller AttachmentUnmarshaller}
*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.
*{@link com.sun.xml.internal.bind.api.Bridge#marshal(BridgeContext, Object, XMLStreamWriter) Bridge.marshal(BridgeContext, Object, XMLStreamWriter)}
*{@link com.sun.xml.internal.bind.api.Bridge#marshal(BridgeContext, Object, Node) Bridge.marshal(BridgeContext, Object, Node)}
*{@link com.sun.xml.internal.bind.api.Bridge#unmarshal(BridgeContext, XMLStreamReader) Object Bridge.unmarshal(BridgeContext, XMLStreamReader)}
*