Class SAAJMessage.SAAJAttachment

    • Constructor Detail

      • SAAJAttachment

        public SAAJAttachment​(javax.xml.soap.AttachmentPart part)
    • Method Detail

      • getContentId

        public String getContentId()
        Content ID of the attachment. Uniquely identifies an attachment.
        Specified by:
        getContentId in interface Attachment
        Returns:
        The content ID like "foo-bar-zot@abc.com", without surrounding '<' and '>' used as the transfer syntax.
      • getContentType

        public String getContentType()
        Gets the MIME content-type of this attachment.
        Specified by:
        getContentType in interface Attachment
      • asByteArray

        public byte[] asByteArray()
        Gets the attachment as an exact-length byte array.
        Specified by:
        asByteArray in interface Attachment
      • asDataHandler

        public javax.activation.DataHandler asDataHandler()
        Gets the attachment as a DataHandler.
        Specified by:
        asDataHandler in interface Attachment
      • asSource

        public Source asSource()
        Gets the attachment as a Source. Note that there's no guarantee that the attachment is actually an XML.
        Specified by:
        asSource in interface Attachment
      • writeTo

        public void writeTo​(javax.xml.soap.SOAPMessage saaj)
        Writes this attachment to the given SOAPMessage.
        Specified by:
        writeTo in interface Attachment