org.opensaml.common.binding.encoding.impl
Class AbstractSOAPHTTPEncoder

java.lang.Object
  extended by org.opensaml.common.binding.encoding.impl.AbstractMessageEncoder<javax.servlet.http.HttpServletResponse>
      extended by org.opensaml.common.binding.encoding.impl.AbstractHTTPMessageEncoder
          extended by org.opensaml.common.binding.encoding.impl.AbstractSOAPHTTPEncoder
All Implemented Interfaces:
HTTPMessageEncoder, MessageEncoder<javax.servlet.http.HttpServletResponse>, SOAPEncoder<javax.servlet.http.HttpServletResponse>, SOAPHTTPEncoder
Direct Known Subclasses:
HTTPSOAP11Encoder, HTTPSOAP11Encoder

public abstract class AbstractSOAPHTTPEncoder
extends AbstractHTTPMessageEncoder
implements SOAPHTTPEncoder

Base class for SOAP over HTTP message encoders.


Constructor Summary
AbstractSOAPHTTPEncoder()
           
 
Method Summary
protected  Envelope buildSOAPMessage()
          Builds the SOAP message to be encoded.
 void encode()
          Encode the SAML message in the binding specific manner.
 java.util.List<XMLObject> getSOAPHeaders()
          Gets a mutable list of SOAP headers to add to the message.
 Envelope getSOAPMessage()
          Gets the SOAP message built by the encoder.
 java.lang.String getSOAPVersion()
          Gets the SOAP version to use.
protected  void setSOAPMessage(Envelope message)
          Sets the SOAP message built by this encoder.
 void setSOAPVersion(java.lang.String version)
          Sets the SOAP version to use.
 
Methods inherited from class org.opensaml.common.binding.encoding.impl.AbstractHTTPMessageEncoder
getBase64EncodedMessage, getEncodeRelayState, getRelayState, initializeResponse, setRelayState
 
Methods inherited from class org.opensaml.common.binding.encoding.impl.AbstractMessageEncoder
getIssuer, getMetadataProvider, getRelyingParty, getRelyingPartyEndpoint, getRelyingPartyRole, getResponse, getSamlMessage, getSigningCredential, marshallMessage, setIssuer, setMetadataProvider, setRelyingParty, setRelyingPartyEndpoint, setRelyingPartyRole, setResponse, setSamlMessage, setSigningCredential
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opensaml.common.binding.encoding.MessageEncoder
getBindingURI, getIssuer, getMetadataProvider, getRelyingParty, getRelyingPartyEndpoint, getRelyingPartyRole, getResponse, getSamlMessage, getSigningCredential, setIssuer, setMetadataProvider, setRelyingParty, setRelyingPartyEndpoint, setRelyingPartyRole, setResponse, setSamlMessage, setSigningCredential
 
Methods inherited from interface org.opensaml.common.binding.encoding.HTTPMessageEncoder
getRelayState, setRelayState
 
Methods inherited from interface org.opensaml.common.binding.encoding.MessageEncoder
getBindingURI, getIssuer, getMetadataProvider, getRelyingParty, getRelyingPartyEndpoint, getRelyingPartyRole, getResponse, getSamlMessage, getSigningCredential, setIssuer, setMetadataProvider, setRelyingParty, setRelyingPartyEndpoint, setRelyingPartyRole, setResponse, setSamlMessage, setSigningCredential
 

Constructor Detail

AbstractSOAPHTTPEncoder

public AbstractSOAPHTTPEncoder()
Method Detail

getSOAPMessage

public Envelope getSOAPMessage()
Gets the SOAP message built by the encoder.

Specified by:
getSOAPMessage in interface SOAPEncoder<javax.servlet.http.HttpServletResponse>
Returns:
SOAP message built by the encoder

setSOAPMessage

protected void setSOAPMessage(Envelope message)
Sets the SOAP message built by this encoder.

Parameters:
message - SOAP message built by this encoder

getSOAPHeaders

public java.util.List<XMLObject> getSOAPHeaders()
Gets a mutable list of SOAP headers to add to the message.

Specified by:
getSOAPHeaders in interface SOAPEncoder<javax.servlet.http.HttpServletResponse>
Returns:
SOAP headers to add to the message

getSOAPVersion

public java.lang.String getSOAPVersion()
Gets the SOAP version to use.

Specified by:
getSOAPVersion in interface SOAPEncoder<javax.servlet.http.HttpServletResponse>
Returns:
the SOAP version to use

setSOAPVersion

public void setSOAPVersion(java.lang.String version)
Sets the SOAP version to use. If not explicity set version 1.1 is assumed.

Specified by:
setSOAPVersion in interface SOAPEncoder<javax.servlet.http.HttpServletResponse>
Parameters:
version - the SOAP version, may not be null

encode

public void encode()
            throws BindingException
Encode the SAML message in the binding specific manner.

Specified by:
encode in interface MessageEncoder<javax.servlet.http.HttpServletResponse>
Throws:
BindingException - thrown if the problem can not be encoded

buildSOAPMessage

protected Envelope buildSOAPMessage()
                             throws BindingException
Builds the SOAP message to be encoded. The the headers and SAML message set on the encoder will be populated in the returned SOAP message.

Returns:
the SOAP message
Throws:
BindingException - thrown if no SAML message has been set on the encoder