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 Detail

      • getProtocol

        Protocol getProtocol()
        Get the protocol for this Message (soap11, soap12, etc.)
        Specified by:
        getProtocol in interface XMLPart
        Returns:
        Protocl
      • 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