Class LibertyHTTPSOAP11Encoder

    • Constructor Detail

      • LibertyHTTPSOAP11Encoder

        public LibertyHTTPSOAP11Encoder()
        Constructor.
    • Method Detail

      • storeSOAPEnvelope

        protected void storeSOAPEnvelope​(Envelope envelope)
        Store the constructed SOAP envelope in the message context for later encoding.
        Parameters:
        envelope - the SOAP envelope
      • getSOAPEnvelope

        protected Envelope getSOAPEnvelope()
        Retrieve the previously stored SOAP envelope from the message context.
        Returns:
        the previously stored SOAP envelope
      • buildAndStoreSOAPMessage

        protected void buildAndStoreSOAPMessage​(@Nonnull
                                                XMLObject payload)
        Builds the SOAP message to be encoded.
        Parameters:
        payload - body of the SOAP message
      • prepareHttpServletResponse

        protected void prepareHttpServletResponse()
                                           throws MessageEncodingException

        This implementation performs the following actions on the context's HttpServletResponse:

        1. Adds the HTTP header: "Cache-control: no-cache, no-store"
        2. Adds the HTTP header: "Pragma: no-cache"
        3. Sets the character encoding to: "UTF-8"
        4. Sets the content type to: "text/xml"
        5. Sets the SOAPAction HTTP header the value returned by getSOAPAction(), if that returns non-null.

        Subclasses should NOT set the SOAPAction HTTP header in this method. Instead, they should override the method getSOAPAction().

        Throws:
        MessageEncodingException - thrown if there is a problem preprocessing the transport
      • getSOAPAction

        protected String getSOAPAction()
        Determine the value of the SOAPAction HTTP header to send.

        The default behavior is to return the value of the SOAP Envelope's WS-Addressing Action header, if present.

        Returns:
        a SOAPAction HTTP header URI value
      • getHTTPResponseStatusCode

        protected int getHTTPResponseStatusCode()
        Get the HTTP response status code to return.
        Returns:
        the HTTP response status code