Class SOAPSupport

java.lang.Object
org.opensaml.soap.util.SOAPSupport

public final class SOAPSupport extends Object
Helper methods for working with SOAP.
  • Constructor Details

    • SOAPSupport

      private SOAPSupport()
      Private constructor.
  • Method Details

    • addSOAP11MustUnderstandAttribute

      public static void addSOAP11MustUnderstandAttribute(@Nonnull XMLObject soapObject, boolean mustUnderstand)
      Adds a soap11:mustUnderstand attribute to the given SOAP object.
      Parameters:
      soapObject - the SOAP object to add the attribute to
      mustUnderstand - whether mustUnderstand is true or false
    • getSOAP11MustUnderstandAttribute

      public static boolean getSOAP11MustUnderstandAttribute(@Nonnull XMLObject soapObject)
      Get the soap11:mustUnderstand attribute 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 XMLObject soapObject, @Nonnull String actorURI)
      Adds a soap11:actor attribute to the given SOAP object.
      Parameters:
      soapObject - the SOAP object to add the attribute to
      actorURI - the URI of the actor
    • getSOAP11ActorAttribute

      @Nullable public static String getSOAP11ActorAttribute(@Nonnull XMLObject soapObject)
      Gets the soap11:actor attribute 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 existing soap11:encodingStyle attribute is present, the given style will be added to the existing list.
      Parameters:
      soapObject - the SOAP object to add the attribute to
      encodingStyle - the encoding style to add
    • addSOAP11EncodingStyles

      public static void addSOAP11EncodingStyles(@Nonnull XMLObject soapObject, @Nonnull List<String> encodingStyles)
      Adds a soap11:encodingStyle attribute to the given SOAP object.
      Parameters:
      soapObject - the SOAP object to add the attribute to
      encodingStyles - the list of encoding styles to add
    • getSOAP11EncodingStyles

      @Nullable public static List<String> getSOAP11EncodingStyles(@Nonnull XMLObject soapObject)
      Gets the list value of the soap11:encodingStyle attribute 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 the soap12:encodingStyle attribute to the given soap object.
      Parameters:
      soapObject - object to which the encoding style attribute should be added
      style - the encoding style
    • getSOAP12EncodingStyleAttribute

      @Nullable public static String getSOAP12EncodingStyleAttribute(@Nonnull XMLObject soapObject)
      Gets the soap12: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 a soap12:mustUnderstand attribute to the given SOAP object.
      Parameters:
      soapObject - the SOAP object to add the attribute to
      mustUnderstand - whether mustUnderstand is true or false
    • getSOAP12MustUnderstandAttribute

      public static boolean getSOAP12MustUnderstandAttribute(@Nonnull XMLObject soapObject)
      Get the soap12:mustUnderstand attribute 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 XMLObject soapObject, boolean relay)
      Adds a soap12:relay attribute to the given SOAP object.
      Parameters:
      soapObject - the SOAP object to add the attribute to
      relay - whether relay is true or false
    • getSOAP12RelayAttribute

      public static boolean getSOAP12RelayAttribute(@Nonnull XMLObject soapObject)
      Get the soap12:relay attribute 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 XMLObject soapObject, @Nonnull String role)
      Adds the soap12:role attribute to the given soap object.
      Parameters:
      soapObject - object to which the rol attribute should be added
      role - the role
    • getSOAP12RoleAttribute

      @Nullable public static String getSOAP12RoleAttribute(@Nonnull XMLObject soapObject)
      Gets the soap12: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<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 elements
      detailAttributes - the 'detail' element attributes
      Returns:
      the new Fault element object