Class VerifiedStreamMessage


  • public final class VerifiedStreamMessage
    extends com.sun.xml.ws.message.AbstractMessageImpl
    Message implementation backed by XMLStreamReader. TODO: we need another message class that keeps XMLStreamReader that points at the start of the envelope element.
    • Constructor Detail

      • VerifiedStreamMessage

        public VerifiedStreamMessage​(@Nullable
                                     com.sun.xml.ws.api.message.MessageHeaders headers,
                                     @NotNull
                                     com.sun.xml.ws.api.message.AttachmentSet attachmentSet,
                                     @NotNull
                                     XMLStreamReader reader,
                                     @NotNull
                                     com.sun.xml.ws.api.SOAPVersion soapVersion,
                                     Map<String,​String> bodyEnvNs)
        Creates a StreamMessage from a XMLStreamReader that points at the start element of the payload, and headers.

        This method creaets a Message from a payload.

        Parameters:
        headers - if null, it means no headers. if non-null, it will be owned by this message.
        reader - points at the start element/document of the payload (or the end element of the <s:Body> if there's no payload)
      • VerifiedStreamMessage

        public VerifiedStreamMessage​(@NotNull
                                     com.sun.xml.ws.encoding.TagInfoset envelopeTag,
                                     @Nullable
                                     com.sun.xml.ws.encoding.TagInfoset headerTag,
                                     @NotNull
                                     com.sun.xml.ws.api.message.AttachmentSet attachmentSet,
                                     @Nullable
                                     com.sun.xml.ws.api.message.MessageHeaders headers,
                                     @NotNull
                                     com.sun.xml.ws.encoding.TagInfoset bodyTag,
                                     @NotNull
                                     XMLStreamReader reader,
                                     @NotNull
                                     com.sun.xml.ws.api.SOAPVersion soapVersion,
                                     Map<String,​String> bodyEnvNs)
        Creates a StreamMessage from a XMLStreamReader and the complete infoset of the SOAP envelope.

        See #StreamMessage(MessageHeaders, AttachmentSet, XMLStreamReader, SOAPVersion) for the description of the basic parameters.

        Parameters:
        headerTag - Null if the message didn't have a header tag.
    • Method Detail

      • hasHeaders

        public boolean hasHeaders()
        Specified by:
        hasHeaders in class com.sun.xml.ws.api.message.Message
      • getHeaders

        public com.sun.xml.ws.api.message.HeaderList getHeaders()
        Specified by:
        getHeaders in class com.sun.xml.ws.api.message.Message
      • getAttachments

        @NotNull
        public com.sun.xml.ws.api.message.AttachmentSet getAttachments()
        Overrides:
        getAttachments in class com.sun.xml.ws.api.message.Message
      • getPayloadLocalPart

        public String getPayloadLocalPart()
        Specified by:
        getPayloadLocalPart in class com.sun.xml.ws.api.message.Message
      • getPayloadNamespaceURI

        public String getPayloadNamespaceURI()
        Specified by:
        getPayloadNamespaceURI in class com.sun.xml.ws.api.message.Message
      • hasPayload

        public boolean hasPayload()
        Specified by:
        hasPayload in class com.sun.xml.ws.api.message.Message
      • readPayloadAsSource

        public Source readPayloadAsSource()
        Specified by:
        readPayloadAsSource in class com.sun.xml.ws.api.message.Message
      • readPayloadAsJAXB

        public <T> T readPayloadAsJAXB​(javax.xml.bind.Unmarshaller unmarshaller)
                                throws javax.xml.bind.JAXBException
        Overrides:
        readPayloadAsJAXB in class com.sun.xml.ws.message.AbstractMessageImpl
        Throws:
        javax.xml.bind.JAXBException
      • readPayloadAsJAXB

        public <T> T readPayloadAsJAXB​(com.sun.xml.bind.api.Bridge<T> bridge)
                                throws javax.xml.bind.JAXBException
        Overrides:
        readPayloadAsJAXB in class com.sun.xml.ws.message.AbstractMessageImpl
        Throws:
        javax.xml.bind.JAXBException
      • consume

        public void consume()
        Overrides:
        consume in class com.sun.xml.ws.api.message.Message
      • readPayload

        public XMLStreamReader readPayload()
        Specified by:
        readPayload in class com.sun.xml.ws.api.message.Message
      • writePayloadTo

        public void writePayloadTo​(ContentHandler contentHandler,
                                   ErrorHandler errorHandler,
                                   boolean fragment)
                            throws SAXException
        Specified by:
        writePayloadTo in class com.sun.xml.ws.message.AbstractMessageImpl
        Throws:
        SAXException
      • copy

        public com.sun.xml.ws.api.message.Message copy()
        Specified by:
        copy in class com.sun.xml.ws.api.message.Message
      • readAsSOAPMessage

        public javax.xml.soap.SOAPMessage readAsSOAPMessage()
                                                     throws javax.xml.soap.SOAPException
        Overrides:
        readAsSOAPMessage in class com.sun.xml.ws.message.AbstractMessageImpl
        Throws:
        javax.xml.soap.SOAPException