MessageType
- the message type of the message context on which to operatepublic class HTTPSOAP11Encoder<MessageType extends org.opensaml.core.xml.XMLObject>
extends org.opensaml.messaging.encoder.servlet.BaseHttpServletResponseXMLMessageEncoder<MessageType>
Modifier and Type | Field and Description |
---|---|
private SOAPObjectBuilder<Body> |
bodyBuilder
SOAP Body builder.
|
private SOAPObjectBuilder<Envelope> |
envBuilder
SOAP Envelope builder.
|
private org.slf4j.Logger |
log
Class logger.
|
Constructor and Description |
---|
HTTPSOAP11Encoder()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
buildAndStoreSOAPMessage(org.opensaml.core.xml.XMLObject payload)
Builds the SOAP message to be encoded.
|
protected void |
doEncode() |
protected int |
getHTTPResponseStatusCode()
Get the HTTP response status code to return.
|
protected org.opensaml.core.xml.XMLObject |
getMessageToLog() |
protected String |
getSOAPAction()
Determine the value of the SOAPAction HTTP header to send.
|
protected Envelope |
getSOAPEnvelope()
Retrieve the previously stored SOAP envelope from the message context.
|
void |
prepareContext() |
protected void |
prepareHttpServletResponse()
This implementation performs the following actions on the context's
HttpServletResponse :
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() , if
that returns non-null.
|
protected void |
storeSOAPEnvelope(Envelope envelope)
Store the constructed SOAP envelope in the message context for later encoding.
|
encode, logEncodedMessage, marshallMessage
doDestroy, doInitialize, getHttpServletResponse, setHttpServletResponse
getMessageContext, setMessageContext
destroy, initialize, isDestroyed, isInitialized
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initialize, isInitialized
destroy, isDestroyed
private final org.slf4j.Logger log
private SOAPObjectBuilder<Envelope> envBuilder
private SOAPObjectBuilder<Body> bodyBuilder
public void prepareContext() throws org.opensaml.messaging.encoder.MessageEncodingException
prepareContext
in interface org.opensaml.messaging.encoder.MessageEncoder<MessageType extends org.opensaml.core.xml.XMLObject>
prepareContext
in class org.opensaml.messaging.encoder.AbstractMessageEncoder<MessageType extends org.opensaml.core.xml.XMLObject>
org.opensaml.messaging.encoder.MessageEncodingException
protected void doEncode() throws org.opensaml.messaging.encoder.MessageEncodingException
doEncode
in class org.opensaml.messaging.encoder.AbstractMessageEncoder<MessageType extends org.opensaml.core.xml.XMLObject>
org.opensaml.messaging.encoder.MessageEncodingException
protected void storeSOAPEnvelope(Envelope envelope)
envelope
- the SOAP envelopeprotected Envelope getSOAPEnvelope()
protected void buildAndStoreSOAPMessage(@Nonnull org.opensaml.core.xml.XMLObject payload)
payload
- body of the SOAP messageprotected void prepareHttpServletResponse() throws org.opensaml.messaging.encoder.MessageEncodingException
This implementation performs the following actions on the context's HttpServletResponse
:
getSOAPAction()
, if
that returns non-null.
Subclasses should NOT set the SOAPAction HTTP header in this method. Instead, they should override
the method getSOAPAction()
.
org.opensaml.messaging.encoder.MessageEncodingException
- thrown if there is a problem preprocessing the transportprotected String getSOAPAction()
The default behavior is to return the value of the SOAP Envelope's WS-Addressing Action header, if present.
protected int getHTTPResponseStatusCode()
protected org.opensaml.core.xml.XMLObject getMessageToLog()
getMessageToLog
in class org.opensaml.messaging.encoder.servlet.BaseHttpServletResponseXMLMessageEncoder<MessageType extends org.opensaml.core.xml.XMLObject>
Copyright © 1999–2018 Shibboleth Consortium. All rights reserved.