Class VerifiedStreamMessage

java.lang.Object
com.sun.xml.ws.api.message.Message
com.sun.xml.ws.message.AbstractMessageImpl
com.sun.xml.ws.security.opt.impl.incoming.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 Details

    • 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 Details

    • 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(jakarta.xml.bind.Unmarshaller unmarshaller)
      Overrides:
      readPayloadAsJAXB in class com.sun.xml.ws.message.AbstractMessageImpl
    • readPayloadAsJAXB

      public <T> T readPayloadAsJAXB(com.sun.xml.ws.spi.db.XMLBridge<T> bridge) throws jakarta.xml.bind.JAXBException
      Overrides:
      readPayloadAsJAXB in class com.sun.xml.ws.message.AbstractMessageImpl
      Throws:
      jakarta.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(XMLStreamWriter writer) throws XMLStreamException
      Specified by:
      writePayloadTo in class com.sun.xml.ws.api.message.Message
      Throws:
      XMLStreamException
    • writeTo

      public void writeTo(XMLStreamWriter sw) throws XMLStreamException
      Overrides:
      writeTo in class com.sun.xml.ws.message.AbstractMessageImpl
      Throws:
      XMLStreamException
    • 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 jakarta.xml.soap.SOAPMessage readAsSOAPMessage() throws jakarta.xml.soap.SOAPException
      Overrides:
      readAsSOAPMessage in class com.sun.xml.ws.message.AbstractMessageImpl
      Throws:
      jakarta.xml.soap.SOAPException
    • writeTo

      public void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler) throws SAXException
      Overrides:
      writeTo in class com.sun.xml.ws.message.AbstractMessageImpl
      Throws:
      SAXException