Package org.apache.axis2.jaxws.message
Interface Message
-
- All Superinterfaces:
XMLPart
- All Known Implementing Classes:
MessageImpl
public interface Message extends XMLPart
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:
XMLPart
,Attachment
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addDataHandler(DataHandler dh, String id)
Add AttachmentSOAPMessage
getAsSOAPMessage()
getAsSOAPMessage Get the xml part as a read/write SOAPEnvelopeString
getAttachmentID(int index)
Get the indicated (non-soap part) attachment idString
getAttachmentID(String partName)
Get the indicated (non-soap part) attachment idList<String>
getAttachmentIDs()
Get the list of attachment content ids for the messageDataHandler
getDataHandler(String cid)
Get the attachment identified by the contentIDMessageContext
getMessageContext()
Map
getMimeHeaders()
Protocol
getProtocol()
Get the protocol for this Message (soap11, soap12, etc.)Object
getValue(Object context, BlockFactory blockFactory)
boolean
isDoingSWA()
boolean
isMTOMEnabled()
A message is MTOM enabled if the associated dispatch/client/impl/provider has a binding type that enables MTOM.boolean
isPostPivot()
DataHandler
removeDataHandler(String cid)
Get the attachment and remove it from the Messagevoid
setDoingSWA(boolean value)
Indicate that an SWA DataHandler was added to the message.void
setMessageContext(MessageContext messageContext)
JAX-WS Message Context that owns the Messagevoid
setMimeHeaders(Map map)
Set the transport headersvoid
setMTOMEnabled(boolean b)
A message is MTOM enabled if the associated dispatch/client/impl/provider has a binding type that enables MTOM.void
setPostPivot()
Indicate 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 Detail
-
getProtocol
Protocol getProtocol()
Get the protocol for this Message (soap11, soap12, etc.)- Specified by:
getProtocol
in interfaceXMLPart
- Returns:
- Protocl
-
getAsSOAPMessage
SOAPMessage getAsSOAPMessage() throws WebServiceException
getAsSOAPMessage Get the xml part as a read/write SOAPEnvelope- Returns:
- SOAPEnvelope
- Throws:
WebServiceException
-
addDataHandler
void addDataHandler(DataHandler dh, String id)
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
List<String> getAttachmentIDs()
Get the list of attachment content ids for the message- Returns:
- List
-
getAttachmentID
String getAttachmentID(int index)
Get the indicated (non-soap part) attachment id- Parameters:
index
-- Returns:
- CID or null if not present
-
getAttachmentID
String getAttachmentID(String partName)
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
DataHandler getDataHandler(String cid)
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
DataHandler removeDataHandler(String cid)
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
void setMimeHeaders(Map map)
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
void setMessageContext(MessageContext messageContext)
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 WebServiceException
- Throws:
WebServiceException
-
-