Package org.apache.axis2.jaxws.message
Interface Message
- All Superinterfaces:
XMLPart
- All Known Implementing Classes:
MessageImpl
Message
A Message represents the XML + Attachments
Most of the methods available on a message are only applicable to the XML part of the Message.
See the XMLPart interface for an explantation of these methods.
- See Also:
-
XMLPartAttachment
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddDataHandler(jakarta.activation.DataHandler dh, String id) Add Attachmentjakarta.xml.soap.SOAPMessagegetAsSOAPMessage Get the xml part as a read/write SOAPEnvelopegetAttachmentID(int index) Get the indicated (non-soap part) attachment idgetAttachmentID(String partName) Get the indicated (non-soap part) attachment idGet the list of attachment content ids for the messagejakarta.activation.DataHandlergetDataHandler(String cid) Get the attachment identified by the contentIDGet the protocol for this Message (soap11, soap12, etc.)getValue(Object context, BlockFactory blockFactory) booleanbooleanA message is MTOM enabled if the associated dispatch/client/impl/provider has a binding type that enables MTOM.booleanjakarta.activation.DataHandlerremoveDataHandler(String cid) Get the attachment and remove it from the MessagevoidsetDoingSWA(boolean value) Indicate that an SWA DataHandler was added to the message.voidsetMessageContext(MessageContext messageContext) JAX-WS Message Context that owns the MessagevoidsetMimeHeaders(Map map) Set the transport headersvoidsetMTOMEnabled(boolean b) A message is MTOM enabled if the associated dispatch/client/impl/provider has a binding type that enables MTOM.voidIndicate that this message is passed the pivot point.Methods inherited from interface org.apache.axis2.jaxws.message.XMLPart
appendHeaderBlock, close, getAsOMElement, getAsSOAPEnvelope, getBodyBlock, getBodyBlock, getBodyBlockQNames, getHeaderBlock, getHeaderBlocks, getHeaderQNames, getIndirection, getNumBodyBlocks, getNumHeaderBlocks, getOperationElement, getParent, getStyle, getXMLFault, getXMLPartContentType, getXMLStreamReader, isConsumed, isFault, outputTo, removeBodyBlock, removeHeaderBlock, setBodyBlock, setBodyBlock, setHeaderBlock, setIndirection, setOperationElement, setParent, setStyle, setXMLFault, traceString
-
Method Details
-
getProtocol
Protocol getProtocol()Get the protocol for this Message (soap11, soap12, etc.)- Specified by:
getProtocolin interfaceXMLPart- Returns:
- Protocl
-
getAsSOAPMessage
jakarta.xml.soap.SOAPMessage getAsSOAPMessage() throws jakarta.xml.ws.WebServiceExceptiongetAsSOAPMessage Get the xml part as a read/write SOAPEnvelope- Returns:
- SOAPEnvelope
- Throws:
jakarta.xml.ws.WebServiceException
-
addDataHandler
Add Attachment- Parameters:
dh- DataHandler (type of Attachment is inferred from dh.getContentType)id- String which is the Attachment content id- See Also:
-
addAttachment(Attachment)
-
getAttachmentIDs
Get the list of attachment content ids for the message- Returns:
- List
-
getAttachmentID
Get the indicated (non-soap part) attachment id- Parameters:
index-- Returns:
- CID or null if not present
-
getAttachmentID
Get the indicated (non-soap part) attachment id- Parameters:
partName- (WS-I indicates that SWA attachments have a partName prefix)- Returns:
- CID or null if not present
-
getDataHandler
Get the attachment identified by the contentID- Parameters:
cid-- Returns:
-
setDoingSWA
void setDoingSWA(boolean value) Indicate that an SWA DataHandler was added to the message. This information will be used to trigger SWA serialization.- Parameters:
value-
-
isDoingSWA
boolean isDoingSWA()- Returns:
- true if SWA DataHandler is present
-
removeDataHandler
Get the attachment and remove it from the Message- Parameters:
cid-
-
isMTOMEnabled
boolean isMTOMEnabled()A message is MTOM enabled if the associated dispatch/client/impl/provider has a binding type that enables MTOM.- Returns:
- if this is an MTOM message
-
setMTOMEnabled
void setMTOMEnabled(boolean b) A message is MTOM enabled if the associated dispatch/client/impl/provider has a binding type that enables MTOM. Indicate whether this is an MTOM message- Parameters:
b-
-
getMimeHeaders
Map getMimeHeaders()- Returns:
- get the transport headers map.
-
setMimeHeaders
Set the transport headers- Parameters:
map- Map
-
setPostPivot
void setPostPivot()Indicate that this message is passed the pivot point. For example, this is set in the JAX-WS Dispatcher to indicate -
isPostPivot
boolean isPostPivot()- Returns:
- true if post pivot
-
setMessageContext
JAX-WS Message Context that owns the Message- Parameters:
messageContext-
-
getMessageContext
MessageContext getMessageContext()- Returns:
- JAX-WS MessageContext
-
getValue
Object getValue(Object context, BlockFactory blockFactory) throws jakarta.xml.ws.WebServiceException - Throws:
jakarta.xml.ws.WebServiceException
-