Package org.opensaml.soap.soap11.decoder.http.impl

# Class HTTPSOAP11Decoder

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.messaging.decoder.AbstractMessageDecoder
org.opensaml.messaging.decoder.servlet.AbstractHttpServletRequestMessageDecoder
org.opensaml.messaging.decoder.servlet.BaseHttpServletRequestXMLMessageDecoder
org.opensaml.soap.soap11.decoder.http.impl.HTTPSOAP11Decoder

All Implemented Interfaces:
  `Component`, `DestructableComponent`, `InitializableComponent`, `UnmodifiableComponent`, `MessageDecoder`, `HttpServletRequestMessageDecoder`

Direct Known Subclasses:
  `HTTPSOAP11Decoder`, `HTTPSOAP11Decoder`

public class HTTPSOAP11Decoder extends BaseHttpServletRequestXMLMessageDecoder
Basic SOAP 1.1 decoder for HTTP transport.

This decoder takes a mandatory `MessageHandler` instance which is used to determine populate the message that is returned as the `MessageContext.getMessage()`.

A SOAP message oriented message exchange style might just populate the Envelope as the message. An application-specific payload-oriented message exchange would handle a specific type of payload structure.

## Field Summary

Fields
Modifier and Type
Field
Description
`private MessageHandler`
`bodyHandler`
Message handler to use in processing the message body.
`private final org.slf4j.Logger`
`log`
Class logger.
`private static final Set<MediaType>`
`SUPPORTED_MEDIA_TYPES`
Valid Content-Type media types.

### Fields inherited from class org.opensaml.messaging.decoder.AbstractMessageDecoder

`BASE_PROTOCOL_MESSAGE_LOGGER_CATEGORY`

## Constructor Summary

Constructors
Constructor
Description
`HTTPSOAP11Decoder()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doDecode()`
Performs the decoding logic.
`protected void`
`doInitialize()`
`MessageHandler`
`getBodyHandler()`
Get the configured body handler MessageHandler.
`protected XMLObject`
`getMessageToLog()`
Get the XMLObject which will be logged as the protocol message.
`void`
`setBodyHandler(MessageHandler newBodyHandler)`
Set the configured body handler MessageHandler.
`protected void`
`validateHttpRequest(HttpServletRequest request)`
Perform optional validation of the inbound `HttpServletRequest`.

### Methods inherited from class org.opensaml.messaging.decoder.servlet.BaseHttpServletRequestXMLMessageDecoder

`decode, getParserPool, serializeMessageForLogging, setParserPool, unmarshallMessage`

### Methods inherited from class org.opensaml.messaging.decoder.servlet.AbstractHttpServletRequestMessageDecoder

`getHttpServletRequest, getHttpServletRequestSupplier, isCheckDuringInit, setCheckDuringInit, setHttpServletRequestSupplier`

### Methods inherited from class org.opensaml.messaging.decoder.AbstractMessageDecoder

`getMessageContext, getProtocolMessageLogger, getProtocolMessageLoggerSubCategory, logDecodedMessage, setMessageContext, setProtocolMessageLoggerSubCategory`

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface net.shibboleth.shared.component.DestructableComponent

`destroy, isDestroyed`

### Methods inherited from interface net.shibboleth.shared.component.InitializableComponent

`initialize, isInitialized`

### Methods inherited from interface org.opensaml.messaging.decoder.MessageDecoder

`getMessageContext`

## Field Details

### SUPPORTED_MEDIA_TYPES

@Nonnull private static final Set<MediaType> SUPPORTED_MEDIA_TYPES
Valid Content-Type media types.

### log

@Nonnull private final org.slf4j.Logger log
Class logger.

### bodyHandler

@NonnullAfterInit private MessageHandler bodyHandler
Message handler to use in processing the message body.

## Constructor Details

### HTTPSOAP11Decoder

public HTTPSOAP11Decoder()
Constructor.

## Method Details

### getBodyHandler

@NonnullAfterInit public MessageHandler getBodyHandler()
Get the configured body handler MessageHandler.

Returns:
  Returns the bodyHandler.

### setBodyHandler

public void setBodyHandler(@Nonnull MessageHandler newBodyHandler)
Set the configured body handler MessageHandler.

Parameters:
  `newBodyHandler` - The bodyHandler to set.

### doDecode

protected void doDecode() throws MessageDecodingException
Performs the decoding logic. By the time this is called, this decoder has already been initialized and checked to ensure that it has not been destroyed.

Specified by:
  `doDecode` in class `AbstractMessageDecoder`
Throws:
  `MessageDecodingException` - thrown if there is a problem decoding the message

### doInitialize

protected void doInitialize() throws ComponentInitializationException

Overrides:
  `doInitialize` in class `BaseHttpServletRequestXMLMessageDecoder`
Throws:
  `ComponentInitializationException`

### getMessageToLog

@Nullable protected XMLObject getMessageToLog()
Get the XMLObject which will be logged as the protocol message.

Overrides:
  `getMessageToLog` in class `AbstractMessageDecoder`
Returns:
  the XMLObject message considered to be the protocol message for logging purposes

### validateHttpRequest

protected void validateHttpRequest(@Nonnull HttpServletRequest request) throws MessageDecodingException
Perform optional validation of the inbound `HttpServletRequest`.

This method is called before the main `MessageDecoder.decode()` logic}.

The default behavior is a no-op. Subclasses may override with specific constraints.

Overrides:
  `validateHttpRequest` in class `BaseHttpServletRequestXMLMessageDecoder`
Parameters:
  `request` - the HTTP request being validate
Throws:
  `MessageDecodingException` - if request is not considered valid