Package org.opensaml.soap.util
Class SOAPSupport
- java.lang.Object
-
- org.opensaml.soap.util.SOAPSupport
-
public final class SOAPSupport extends Object
Helper methods for working with SOAP.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateSOAPSupport()Private constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddSOAP11ActorAttribute(org.opensaml.core.xml.XMLObject soapObject, String actorURI)Adds asoap11:actorattribute to the given SOAP object.static voidaddSOAP11EncodingStyle(org.opensaml.core.xml.XMLObject soapObject, String encodingStyle)Adds a single encoding style to the given SOAP object.static voidaddSOAP11EncodingStyles(org.opensaml.core.xml.XMLObject soapObject, List<String> encodingStyles)Adds asoap11:encodingStyleattribute to the given SOAP object.static voidaddSOAP11MustUnderstandAttribute(org.opensaml.core.xml.XMLObject soapObject, boolean mustUnderstand)Adds asoap11:mustUnderstandattribute to the given SOAP object.static voidaddSOAP12EncodingStyleAttribute(org.opensaml.core.xml.XMLObject soapObject, String style)Adds thesoap12:encodingStyleattribute to the given soap object.static voidaddSOAP12MustUnderstandAttribute(org.opensaml.core.xml.XMLObject soapObject, boolean mustUnderstand)Adds asoap12:mustUnderstandattribute to the given SOAP object.static voidaddSOAP12RelayAttribute(org.opensaml.core.xml.XMLObject soapObject, boolean relay)Adds asoap12:relayattribute to the given SOAP object.static voidaddSOAP12RoleAttribute(org.opensaml.core.xml.XMLObject soapObject, String role)Adds thesoap12:roleattribute to the given soap object.static FaultbuildSOAP11Fault(QName faultCode, String faultString, String faultActor, List<org.opensaml.core.xml.XMLObject> detailChildren, Map<QName,String> detailAttributes)Build a SOAP 1.1.static StringgetSOAP11ActorAttribute(org.opensaml.core.xml.XMLObject soapObject)Gets thesoap11:actorattribute from a given SOAP object.static List<String>getSOAP11EncodingStyles(org.opensaml.core.xml.XMLObject soapObject)Gets the list value of thesoap11:encodingStyleattribute from the given SOAP object.static booleangetSOAP11MustUnderstandAttribute(org.opensaml.core.xml.XMLObject soapObject)Get thesoap11:mustUnderstandattribute from a given SOAP object.static StringgetSOAP12EncodingStyleAttribute(org.opensaml.core.xml.XMLObject soapObject)Gets thesoap12:encodingStyle.static booleangetSOAP12MustUnderstandAttribute(org.opensaml.core.xml.XMLObject soapObject)Get thesoap12:mustUnderstandattribute from a given SOAP object.static booleangetSOAP12RelayAttribute(org.opensaml.core.xml.XMLObject soapObject)Get thesoap12:relayattribute from a given SOAP object.static StringgetSOAP12RoleAttribute(org.opensaml.core.xml.XMLObject soapObject)Gets thesoap12:role.
-
-
-
Method Detail
-
addSOAP11MustUnderstandAttribute
public static void addSOAP11MustUnderstandAttribute(@Nonnull org.opensaml.core.xml.XMLObject soapObject, boolean mustUnderstand)Adds asoap11:mustUnderstandattribute to the given SOAP object.- Parameters:
soapObject- the SOAP object to add the attribute tomustUnderstand- whether mustUnderstand is true or false
-
getSOAP11MustUnderstandAttribute
public static boolean getSOAP11MustUnderstandAttribute(@Nonnull org.opensaml.core.xml.XMLObject soapObject)Get thesoap11:mustUnderstandattribute from a given SOAP object.- Parameters:
soapObject- the SOAP object to add the attribute to- Returns:
- value of the mustUnderstand attribute, or false if not present
-
addSOAP11ActorAttribute
public static void addSOAP11ActorAttribute(@Nonnull org.opensaml.core.xml.XMLObject soapObject, @Nonnull String actorURI)Adds asoap11:actorattribute to the given SOAP object.- Parameters:
soapObject- the SOAP object to add the attribute toactorURI- the URI of the actor
-
getSOAP11ActorAttribute
@Nullable public static String getSOAP11ActorAttribute(@Nonnull org.opensaml.core.xml.XMLObject soapObject)
Gets thesoap11:actorattribute from a given SOAP object.- Parameters:
soapObject- the SOAP object to add the attribute to- Returns:
- the value of the actor attribute, or null if not present
-
addSOAP11EncodingStyle
public static void addSOAP11EncodingStyle(@Nonnull org.opensaml.core.xml.XMLObject soapObject, @Nonnull String encodingStyle)Adds a single encoding style to the given SOAP object. If an existingsoap11:encodingStyleattribute is present, the given style will be added to the existing list.- Parameters:
soapObject- the SOAP object to add the attribute toencodingStyle- the encoding style to add
-
addSOAP11EncodingStyles
public static void addSOAP11EncodingStyles(@Nonnull org.opensaml.core.xml.XMLObject soapObject, @Nonnull List<String> encodingStyles)Adds asoap11:encodingStyleattribute to the given SOAP object.- Parameters:
soapObject- the SOAP object to add the attribute toencodingStyles- the list of encoding styles to add
-
getSOAP11EncodingStyles
@Nullable public static List<String> getSOAP11EncodingStyles(@Nonnull org.opensaml.core.xml.XMLObject soapObject)
Gets the list value of thesoap11:encodingStyleattribute from the given SOAP object.- Parameters:
soapObject- the SOAP object to add the attribute to- Returns:
- the list of encoding styles, or null if not present
-
addSOAP12EncodingStyleAttribute
public static void addSOAP12EncodingStyleAttribute(@Nonnull org.opensaml.core.xml.XMLObject soapObject, @Nonnull String style)Adds thesoap12:encodingStyleattribute to the given soap object.- Parameters:
soapObject- object to which the encoding style attribute should be addedstyle- the encoding style
-
getSOAP12EncodingStyleAttribute
@Nullable public static String getSOAP12EncodingStyleAttribute(@Nonnull org.opensaml.core.xml.XMLObject soapObject)
Gets thesoap12:encodingStyle.- Parameters:
soapObject- the SOAP object which may contain the encoding style- Returns:
- the encoding style or null if it is not set on the object
-
addSOAP12MustUnderstandAttribute
public static void addSOAP12MustUnderstandAttribute(@Nonnull org.opensaml.core.xml.XMLObject soapObject, boolean mustUnderstand)Adds asoap12:mustUnderstandattribute to the given SOAP object.- Parameters:
soapObject- the SOAP object to add the attribute tomustUnderstand- whether mustUnderstand is true or false
-
getSOAP12MustUnderstandAttribute
public static boolean getSOAP12MustUnderstandAttribute(@Nonnull org.opensaml.core.xml.XMLObject soapObject)Get thesoap12:mustUnderstandattribute from a given SOAP object.- Parameters:
soapObject- the SOAP object to add the attribute to- Returns:
- value of the mustUnderstand attribute, or false if not present
-
addSOAP12RelayAttribute
public static void addSOAP12RelayAttribute(@Nonnull org.opensaml.core.xml.XMLObject soapObject, boolean relay)Adds asoap12:relayattribute to the given SOAP object.- Parameters:
soapObject- the SOAP object to add the attribute torelay- whether relay is true or false
-
getSOAP12RelayAttribute
public static boolean getSOAP12RelayAttribute(@Nonnull org.opensaml.core.xml.XMLObject soapObject)Get thesoap12:relayattribute from a given SOAP object.- Parameters:
soapObject- the SOAP object to add the attribute to- Returns:
- value of the relay attribute, or false if not present
-
addSOAP12RoleAttribute
public static void addSOAP12RoleAttribute(@Nonnull org.opensaml.core.xml.XMLObject soapObject, @Nonnull String role)Adds thesoap12:roleattribute to the given soap object.- Parameters:
soapObject- object to which the rol attribute should be addedrole- the role
-
getSOAP12RoleAttribute
@Nullable public static String getSOAP12RoleAttribute(@Nonnull org.opensaml.core.xml.XMLObject soapObject)
Gets thesoap12:role.- Parameters:
soapObject- the SOAP object which may contain the role- Returns:
- the role or null if it is not set on the object
-
buildSOAP11Fault
public static Fault buildSOAP11Fault(@Nonnull QName faultCode, @Nonnull String faultString, @Nullable String faultActor, @Nullable @NonnullElements List<org.opensaml.core.xml.XMLObject> detailChildren, @Nullable Map<QName,String> detailAttributes)
Build a SOAP 1.1. Fault element.- Parameters:
faultCode- the 'faultcode' QName (required)faultString- the 'faultstring' value (required)faultActor- the 'faultactor' value (may be null)detailChildren- the 'detail' child elementsdetailAttributes- the 'detail' element attributes- Returns:
- the new Fault element object
-
-