org.opensaml.ws.soap.soap11.encoder.http
Class HTTPSOAP11Encoder

java.lang.Object
  extended by org.opensaml.ws.message.encoder.BaseMessageEncoder
      extended by org.opensaml.ws.message.handler.BaseHandlerChainAwareMessageEncoder
          extended by org.opensaml.ws.soap.soap11.encoder.SOAP11Encoder
              extended by org.opensaml.ws.soap.soap11.encoder.http.HTTPSOAP11Encoder
All Implemented Interfaces:
MessageEncoder, HandlerChainAware

public class HTTPSOAP11Encoder
extends SOAP11Encoder

Basic SOAP 1.1 encoder for HTTP transport.


Constructor Summary
HTTPSOAP11Encoder()
          Constructor.
 
Method Summary
protected  void doEncode(MessageContext messageContext)
          Encodes the outbound message onto the outbound transport.
protected  String getSOAPAction(MessageContext messageContext)
          Determine the value of the SOAPAction HTTP header to send.
protected  void preprocessTransport(MessageContext messageContext)
           This implementation performs the following actions on the context's HTTPOutTransport: Adds the HTTP header: "Cache-control: no-cache, no-store" Adds the HTTP header: "Pragma: no-cache" Sets the character encoding to: "UTF-8" Sets the content type to: "text/xml" Sets the SOAPAction HTTP header the value returned by getSOAPAction(MessageContext), if that returns non-null.
 
Methods inherited from class org.opensaml.ws.soap.soap11.encoder.SOAP11Encoder
buildSOAPEnvelope, encodeToTransport, prepareMessageContext, providesMessageConfidentiality, providesMessageIntegrity
 
Methods inherited from class org.opensaml.ws.message.handler.BaseHandlerChainAwareMessageEncoder
invokeHandlerChain, processOutboundHandlerChain
 
Methods inherited from class org.opensaml.ws.message.encoder.BaseMessageEncoder
encode, logEncodedMessage, marshallMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPSOAP11Encoder

public HTTPSOAP11Encoder()
Constructor.

Method Detail

doEncode

protected void doEncode(MessageContext messageContext)
                 throws MessageEncodingException
Encodes the outbound message onto the outbound transport.

Overrides:
doEncode in class BaseHandlerChainAwareMessageEncoder
Parameters:
messageContext - current message context
Throws:
MessageEncodingException - thrown if there is a problem encoding the message

preprocessTransport

protected void preprocessTransport(MessageContext messageContext)
                            throws MessageEncodingException

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

  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(MessageContext), if that returns non-null.

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

Overrides:
preprocessTransport in class SOAP11Encoder
Parameters:
messageContext - the current message context being processed
Throws:
MessageEncodingException - thrown if there is a problem preprocessing the transport

getSOAPAction

protected String getSOAPAction(MessageContext messageContext)
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.

Parameters:
messageContext - the current message context being processed
Returns:
a SOAPAction HTTP header URI value


Copyright © 2006-2013 Internet2. All Rights Reserved.