| java.lang.Object org.apache.axis2.jaxws.message.impl.XMLPartBase
All known Subclasses: org.apache.axis2.jaxws.message.impl.XMLPartImpl,
XMLPartBase | abstract public class XMLPartBase implements XMLPart(Code) | | XMLPartBase class for an XMLPart An XMLPart is an abstraction of the xml portion of the message.
The actual representation can be in one of three different forms: * An OM tree * A SAAJ
SOAPEnvelope * An XMLSpine (an optimized representation of the message) The representation is
stored in the private variable (content)
The representation changes as the Message flows through the JAX-WS framework. For example, here
is a typical flow on the inbound case: a) Message is built from OM
(representation: OM) b) Message flows into SOAP Handler chain (representation:
OM->SOAPEnvelope) c) Message flows out of the SOAP Handler chain d) Message flows into the
logical dispatch processing (representation: SOAPEnvelope->XMLSpine)
The key to performance is the implementation of the transformations between OM, SAAJ SOAPEnvelope
and XMLSpine. This base class defines all of the methods that are required on an XMLPart, the
actual transformations are provided by the derived class. This division of work allows the
derived class to concentrate on the optimization of the transformations. For example, the
derived class may implement XMLSpine -> OM using OMObjectWrapperElement constructs...thus avoid
expensive parsing.
Here are the methods that the derived XMLPart should implement. OMElement
_convertSE2OM(SOAPEnvelope se) OMElement _convertSpine2OM(XMLSpine spine) SOAPEnvelope
_convertOM2SE(OMElement om) SOAPEnvelope _convertSpine2SE(XMLSpine spine) XMLSpine
_convertOM2Spine(OMElement om) XMLSpine _convertSE2Spine(SOAPEnvelope se) XMLSpine
_createSpine(Protocol protocol)
NOTE: For XML/HTTP (REST), a SOAP 1.1. Envelope is built and the rest payload is placed in the
body. This purposely mimics the Axis2 implementation.
See Also: org.apache.axis2.jaxws.message.XMLPart See Also: XMLPartImpl |
Method Summary | |
abstract protected SOAPEnvelope | _convertOM2SE(OMElement om) | abstract protected XMLSpine | _convertOM2Spine(OMElement om) | abstract protected OMElement | _convertSE2OM(SOAPEnvelope se) | abstract protected XMLSpine | _convertSE2Spine(SOAPEnvelope se) | abstract protected OMElement | _convertSpine2OM(XMLSpine spine) | abstract protected SOAPEnvelope | _convertSpine2SE(XMLSpine spine) | protected static XMLSpine | _createSpine(Protocol protocol, Style style, int indirection, OMElement payload) | public OMElement | getAsOMElement() | public SOAPEnvelope | getAsSOAPEnvelope() | public Block | getBodyBlock(int index, Object context, BlockFactory blockFactory) | public Block | getBodyBlock(Object context, BlockFactory blockFactory) | public Block | getHeaderBlock(String namespace, String localPart, Object context, BlockFactory blockFactory) | public int | getIndirection() | public int | getNumBodyBlocks() | public int | getNumHeaderBlocks() | public QName | getOperationElement() | public Message | getParent() | public Protocol | getProtocol() | public Style | getStyle() | public XMLFault | getXMLFault() | public String | getXMLPartContentType() | public XMLStreamReader | getXMLStreamReader(boolean consume) | public boolean | isConsumed() | public boolean | isFault() | public void | outputTo(XMLStreamWriter writer, boolean consume) | public void | removeBodyBlock(int index) | public void | removeHeaderBlock(String namespace, String localPart) | public void | setBodyBlock(int index, Block block) | public void | setBodyBlock(Block block) | public void | setHeaderBlock(String namespace, String localPart, Block block) | public void | setIndirection(int indirection) | public void | setOperationElement(QName operationQName) | public void | setParent(Message p) | public void | setStyle(Style style) | public void | setXMLFault(XMLFault xmlFault) | public String | traceString(String indent) |
SOAPENVELOPE | final static int SOAPENVELOPE(Code) | | |
SPINE | final static int SPINE(Code) | | |
UNKNOWN | final static int UNKNOWN(Code) | | |
consumed | boolean consumed(Code) | | |
contentType | int contentType(Code) | | |
indirection | int indirection(Code) | | |
XMLPartBase | XMLPartBase(OMElement root, Protocol protocol) throws WebServiceException(Code) | | XMLPart should be constructed via the XMLPartFactory. This constructor creates an XMLPart from
the specified root.
Parameters: root - Parameters: protocol - (if null, the soap protocol is inferred from the namespace) throws: WebServiceException - |
getIndirection | public int getIndirection()(Code) | | |
getStyle | public Style getStyle()(Code) | | |
getXMLPartContentType | public String getXMLPartContentType()(Code) | | |
isConsumed | public boolean isConsumed()(Code) | | |
setIndirection | public void setIndirection(int indirection)(Code) | | |
|
|