public final class SOAPMessagingSupport extends Object
| Modifier | Constructor and Description |
|---|---|
private |
SOAPMessagingSupport()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
addHeaderBlock(MessageContext messageContext,
org.opensaml.core.xml.XMLObject headerBlock)
Add a header block to the SOAP envelope contained within the specified message context's
SOAP subcontext.
|
static void |
addMustUnderstand(MessageContext messageContext,
org.opensaml.core.xml.XMLObject headerBlock,
boolean mustUnderstand)
Add whether the specified header block is indicated as mustUnderstand.
|
static void |
addSOAP11HeaderBlock(Envelope envelope,
org.opensaml.core.xml.XMLObject headerBlock)
Add a header to the SOAP 1.1 Envelope.
|
static void |
addTargetNode(MessageContext messageContext,
org.opensaml.core.xml.XMLObject headerBlock,
String targetNode)
Add the target node info to the header block, either
soap11:actor,
or soap12:role. |
static boolean |
checkUnderstoodHeader(MessageContext<? extends org.opensaml.core.xml.XMLObject> msgContext,
org.opensaml.core.xml.XMLObject header)
Check whether a header was understood.
|
static void |
clearFault(MessageContext messageContext)
Clear the currently registered SOAP fault, if any.
|
static List<org.opensaml.core.xml.XMLObject> |
getHeaderBlock(MessageContext messageContext,
QName headerName,
Set<String> targetNodes,
boolean isFinalDestination)
Get a header block from the SOAP envelope contained within the specified message context's
SOAP subcontext.
|
static List<org.opensaml.core.xml.XMLObject> |
getInboundHeaderBlock(MessageContext<? extends org.opensaml.core.xml.XMLObject> messageContext,
QName headerName)
Get a header block from the SOAP envelope contained within the specified message context's
SOAP subcontext.
|
static InboundSOAPContext |
getInboundSOAPContext(MessageContext messageContext)
Get the current
InboundSOAPContext for the given MessageContext. |
static List<org.opensaml.core.xml.XMLObject> |
getOutboundHeaderBlock(MessageContext<? extends org.opensaml.core.xml.XMLObject> messageContext,
QName headerName)
Get a header block from the SOAP envelope contained within the specified message context's
SOAP subcontext.
|
static SOAP11Context |
getSOAP11Context(MessageContext messageContext,
boolean autoCreate)
Get the current
SOAP11Context for the given MessageContext. |
static Fault |
getSOAP11Fault(MessageContext messageContext)
Get the registered SOAP 1.1 fault, if any.
|
static List<org.opensaml.core.xml.XMLObject> |
getSOAP11HeaderBlock(Envelope envelope,
QName headerName,
Set<String> targetNodes,
boolean isFinalDestination)
Get a header block from the SOAP 1.1 envelope.
|
static SOAPVersion |
getSOAPVersion(MessageContext<? extends org.opensaml.core.xml.XMLObject> messageContext)
Determine the SOAP version of the message represented by the message context.
|
static boolean |
isMustUnderstand(MessageContext messageContext,
org.opensaml.core.xml.XMLObject headerBlock)
Check whether the specified header block is indicated as mustUnderstand == true.
|
static boolean |
isSOAP11HeaderTargetedToNode(org.opensaml.core.xml.XMLObject header,
Set<String> nodeActors,
boolean isFinalDestination)
Evaluate whether the specified header block is targeted to a SOAP 1.1 node given the specified
parameters.
|
static boolean |
isSOAP11Message(MessageContext<? extends org.opensaml.core.xml.XMLObject> messageContext)
Determine whether the message represented by the message context
contains a SOAP 1.1.
|
static boolean |
isSOAPMessage(MessageContext<? extends org.opensaml.core.xml.XMLObject> messageContext)
Determine whether the message represented by the message context
contains a SOAP Envelope.
|
static void |
registerSOAP11Fault(MessageContext messageContext,
Fault fault)
Register a SOAP 1.1 fault.
|
static void |
registerSOAP11Fault(MessageContext messageContext,
QName faultCode,
String faultString,
String faultActor,
List<org.opensaml.core.xml.XMLObject> detailChildren,
Map<QName,String> detailAttributes)
Register a SOAP 1.1.
|
static void |
registerUnderstoodHeader(MessageContext<? extends org.opensaml.core.xml.XMLObject> msgContext,
org.opensaml.core.xml.XMLObject header)
Register a header as understood.
|
@Nonnull public static InboundSOAPContext getInboundSOAPContext(@Nonnull MessageContext messageContext)
InboundSOAPContext for the given MessageContext.messageContext - the current message context@Nullable public static SOAP11Context getSOAP11Context(@Nonnull MessageContext messageContext, boolean autoCreate)
SOAP11Context for the given MessageContext.messageContext - the current message contextautoCreate - whether to auto-create the context if it does not existpublic static void registerUnderstoodHeader(@Nonnull MessageContext<? extends org.opensaml.core.xml.XMLObject> msgContext, @Nonnull org.opensaml.core.xml.XMLObject header)
msgContext - the current message contextheader - the header that was understoodpublic static boolean checkUnderstoodHeader(@Nonnull MessageContext<? extends org.opensaml.core.xml.XMLObject> msgContext, @Nonnull org.opensaml.core.xml.XMLObject header)
msgContext - the current message contextheader - the header that is to be checked for understandingpublic static boolean isSOAPMessage(@Nonnull MessageContext<? extends org.opensaml.core.xml.XMLObject> messageContext)
messageContext - the current message contextpublic static boolean isSOAP11Message(@Nonnull MessageContext<? extends org.opensaml.core.xml.XMLObject> messageContext)
messageContext - the current message context@Nullable public static SOAPVersion getSOAPVersion(@Nonnull MessageContext<? extends org.opensaml.core.xml.XMLObject> messageContext)
messageContext - the current message contextpublic static boolean isMustUnderstand(@Nonnull MessageContext messageContext, @Nonnull org.opensaml.core.xml.XMLObject headerBlock)
messageContext - the message context being processedheaderBlock - the header block to checkpublic static void addMustUnderstand(@Nonnull MessageContext messageContext, @Nonnull org.opensaml.core.xml.XMLObject headerBlock, boolean mustUnderstand)
messageContext - the message context being processedheaderBlock - the header block to checkmustUnderstand - true if header must be understood, false if notpublic static void addTargetNode(@Nonnull MessageContext messageContext, @Nonnull org.opensaml.core.xml.XMLObject headerBlock, @Nullable String targetNode)
soap11:actor,
or soap12:role.messageContext - the message context being processedheaderBlock - the header block to checktargetNode - the node to add@Nonnull public static List<org.opensaml.core.xml.XMLObject> getInboundHeaderBlock(@Nonnull MessageContext<? extends org.opensaml.core.xml.XMLObject> messageContext, @Nonnull QName headerName)
messageContext - the message context being processedheaderName - the name of the header block to return@Nonnull public static List<org.opensaml.core.xml.XMLObject> getOutboundHeaderBlock(@Nonnull MessageContext<? extends org.opensaml.core.xml.XMLObject> messageContext, @Nonnull QName headerName)
messageContext - the message context being processedheaderName - the name of the header block to return@Nonnull public static List<org.opensaml.core.xml.XMLObject> getHeaderBlock(@Nonnull MessageContext messageContext, @Nonnull QName headerName, @Nullable Set<String> targetNodes, boolean isFinalDestination)
messageContext - the message context being processedheaderName - the name of the header block to returntargetNodes - the explicitly specified SOAP node actors (1.1) or roles (1.2) for which the header is desiredisFinalDestination - true specifies that headers targeted for message final destination should be returned,
false means they should not be returned@Nonnull public static List<org.opensaml.core.xml.XMLObject> getSOAP11HeaderBlock(@Nonnull Envelope envelope, @Nonnull QName headerName, @Nullable Set<String> targetNodes, boolean isFinalDestination)
envelope - the SOAP 1.1 envelope to processheaderName - the name of the header block to returntargetNodes - the explicitly specified SOAP node actors for which the header is desiredisFinalDestination - true specifies that headers targeted for message final destination should be returned,
false specifies they should not be returnedpublic static boolean isSOAP11HeaderTargetedToNode(@Nonnull org.opensaml.core.xml.XMLObject header, @Nullable Set<String> nodeActors, boolean isFinalDestination)
header - the header to evaluatenodeActors - the explicitly specified node actors for which the header is desiredisFinalDestination - true specifies that headers targeted for message final destination should be returned,
false specifies they should not be returnedpublic static void addHeaderBlock(@Nonnull MessageContext messageContext, @Nonnull org.opensaml.core.xml.XMLObject headerBlock)
messageContext - the message context being processedheaderBlock - the header block to addpublic static void addSOAP11HeaderBlock(@Nonnull Envelope envelope, @Nonnull org.opensaml.core.xml.XMLObject headerBlock)
envelope - the SOAP 1.1 envelope to processheaderBlock - the header to addpublic static void registerSOAP11Fault(@Nonnull MessageContext messageContext, @Nonnull QName faultCode, @Nonnull String faultString, @Nullable String faultActor, @Nullable List<org.opensaml.core.xml.XMLObject> detailChildren, @Nullable Map<QName,String> detailAttributes)
messageContext - the current message contextfaultCode - the fault code QName (required)faultString - the fault message string value (required)faultActor - the fault actor value (may be null)detailChildren - the detail child elementsdetailAttributes - the detail element attributespublic static void registerSOAP11Fault(@Nonnull MessageContext messageContext, @Nullable Fault fault)
messageContext - the current message contextfault - the fault to registerpublic static Fault getSOAP11Fault(@Nonnull MessageContext messageContext)
messageContext - the current message contextpublic static void clearFault(@Nonnull MessageContext messageContext)
messageContext - the current message contextCopyright © 1999–2016 Shibboleth Consortium. All rights reserved.