Package org.opensaml.soap.util
Class SOAPSupport
java.lang.Object
org.opensaml.soap.util.SOAPSupport
Helper methods for working with SOAP.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddSOAP11ActorAttribute(XMLObject soapObject, String actorURI) Adds asoap11:actorattribute to the given SOAP object.static voidaddSOAP11EncodingStyle(XMLObject soapObject, String encodingStyle) Adds a single encoding style to the given SOAP object.static voidaddSOAP11EncodingStyles(XMLObject soapObject, List<String> encodingStyles) Adds asoap11:encodingStyleattribute to the given SOAP object.static voidaddSOAP11MustUnderstandAttribute(XMLObject soapObject, boolean mustUnderstand) Adds asoap11:mustUnderstandattribute to the given SOAP object.static voidaddSOAP12EncodingStyleAttribute(XMLObject soapObject, String style) Adds thesoap12:encodingStyleattribute to the given soap object.static voidaddSOAP12MustUnderstandAttribute(XMLObject soapObject, boolean mustUnderstand) Adds asoap12:mustUnderstandattribute to the given SOAP object.static voidaddSOAP12RelayAttribute(XMLObject soapObject, boolean relay) Adds asoap12:relayattribute to the given SOAP object.static voidaddSOAP12RoleAttribute(XMLObject soapObject, String role) Adds thesoap12:roleattribute to the given soap object.static FaultbuildSOAP11Fault(QName faultCode, String faultString, String faultActor, List<XMLObject> detailChildren, Map<QName, String> detailAttributes) Build a SOAP 1.1.static StringgetSOAP11ActorAttribute(XMLObject soapObject) Gets thesoap11:actorattribute from a given SOAP object.getSOAP11EncodingStyles(XMLObject soapObject) Gets the list value of thesoap11:encodingStyleattribute from the given SOAP object.static booleangetSOAP11MustUnderstandAttribute(XMLObject soapObject) Get thesoap11:mustUnderstandattribute from a given SOAP object.static StringgetSOAP12EncodingStyleAttribute(XMLObject soapObject) Gets thesoap12:encodingStyle.static booleangetSOAP12MustUnderstandAttribute(XMLObject soapObject) Get thesoap12:mustUnderstandattribute from a given SOAP object.static booleangetSOAP12RelayAttribute(XMLObject soapObject) Get thesoap12:relayattribute from a given SOAP object.static StringgetSOAP12RoleAttribute(XMLObject soapObject) Gets thesoap12:role.
-
Constructor Details
-
SOAPSupport
private SOAPSupport()Private constructor.
-
-
Method Details
-
addSOAP11MustUnderstandAttribute
public static void addSOAP11MustUnderstandAttribute(@Nonnull 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
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
Adds asoap11:actorattribute to the given SOAP object.- Parameters:
soapObject- the SOAP object to add the attribute toactorURI- the URI of the actor
-
getSOAP11ActorAttribute
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 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 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
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 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
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 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
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
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
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
Adds thesoap12:roleattribute to the given soap object.- Parameters:
soapObject- object to which the rol attribute should be addedrole- the role
-
getSOAP12RoleAttribute
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 List<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
-