Class ProtocolFactory


  • @SupportedAll
    public class ProtocolFactory
    extends Object
    This is the factory class to obtain object instances for concrete elements in the protocol schema. This factory class provides 3 methods for each element. createElementName(), createElementName(String value), createElementName(org.w3c.dom.Element value).
    • Method Detail

      • getInstance

        public static ProtocolFactory getInstance()
        Returns an instance of the ProtocolFactory Object.
        Returns:
        an instance of the ProtocolFactory object.
      • createAssertionIDRequest

        public AssertionIDRequest createAssertionIDRequest()
                                                    throws SAML2Exception
        Returns the AssertionIDRequest Object.
        Returns:
        the AssertionIDRequest object.
        Throws:
        SAML2Exception - if AssertionIDRequest cannot be created.
      • createAssertionIDRequest

        public AssertionIDRequest createAssertionIDRequest​(Element value)
                                                    throws SAML2Exception
        Returns the AssertionIDRequest Object.
        Parameters:
        value - the Document Element of AssertionIDRequest object.
        Returns:
        the AssertionIDRequest object.
        Throws:
        SAML2Exception - if AssertionIDRequest cannot be created.
      • createAssertionIDRequest

        public AssertionIDRequest createAssertionIDRequest​(String value)
                                                    throws SAML2Exception
        Returns the AssertionIDRequest Object.
        Parameters:
        value - AssertionIDRequest XML String.
        Returns:
        the AssertionIDRequest object.
        Throws:
        SAML2Exception - if AssertionIDRequest cannot be created.
      • createAttributeQuery

        public AttributeQuery createAttributeQuery()
                                            throws SAML2Exception
        Returns the AttributeQuery Object.
        Returns:
        the AttributeQuery object.
        Throws:
        SAML2Exception - if AttributeQuery cannot be created.
      • createAttributeQuery

        public AttributeQuery createAttributeQuery​(Element value)
                                            throws SAML2Exception
        Returns the AttributeQuery Object.
        Parameters:
        value - the Document Element of AttributeQuery object.
        Returns:
        the AttributeQuery object.
        Throws:
        SAML2Exception - if AttributeQuery cannot be created.
      • createAttributeQuery

        public AttributeQuery createAttributeQuery​(String value)
                                            throws SAML2Exception
        Returns the AttributeQuery Object.
        Parameters:
        value - AttributeQuery XML String.
        Returns:
        the AttributeQuery object.
        Throws:
        SAML2Exception - if AttributeQuery cannot be created.
      • createAuthnQuery

        public AuthnQuery createAuthnQuery()
                                    throws SAML2Exception
        Returns the AuthnQuery Object.
        Returns:
        the AuthnQuery object.
        Throws:
        SAML2Exception - if AuthnQuery cannot be created.
      • createAuthnQuery

        public AuthnQuery createAuthnQuery​(Element value)
                                    throws SAML2Exception
        Returns the AuthnQuery Object.
        Parameters:
        value - the Document Element of AuthnQuery object.
        Returns:
        the AuthnQuery object.
        Throws:
        SAML2Exception - if AuthnQuery cannot be created.
      • createAuthnQuery

        public AuthnQuery createAuthnQuery​(String value)
                                    throws SAML2Exception
        Returns the AuthnQuery Object.
        Parameters:
        value - AuthnQuery XML String.
        Returns:
        the AuthnQuery object.
        Throws:
        SAML2Exception - if AuthnQuery cannot be created.
      • createAuthnRequest

        public AuthnRequest createAuthnRequest()
                                        throws SAML2Exception
        Returns the AuthnRequest Object.
        Returns:
        the AuthnRequest object.
        Throws:
        SAML2Exception - if AuthnRequest cannot be created.
      • createAuthnRequest

        public AuthnRequest createAuthnRequest​(Element value)
                                        throws SAML2Exception
        Returns the AuthnRequest Object.
        Parameters:
        value - the Document Element of AuthnRequest object.
        Returns:
        the AuthnRequest object.
        Throws:
        SAML2Exception - if AuthnRequest cannot be created.
      • createAuthnRequest

        public AuthnRequest createAuthnRequest​(String value)
                                        throws SAML2Exception
        Returns the AuthnRequest Object.
        Parameters:
        value - AuthnRequest XML String.
        Returns:
        the AuthnRequest object.
        Throws:
        SAML2Exception - if AuthnRequest cannot be created.
      • createExtensions

        public Extensions createExtensions()
                                    throws SAML2Exception
        Returns the Extensions Object.
        Returns:
        the Extensions object.
        Throws:
        SAML2Exception - if Extensions cannot be created.
      • createExtensions

        public Extensions createExtensions​(Element value)
                                    throws SAML2Exception
        Returns the Extensions Object.
        Parameters:
        value - the Document Element of Extensions object.
        Returns:
        instance of Extensions object.
        Throws:
        SAML2Exception - if Extensions cannot be created.
      • createExtensions

        public Extensions createExtensions​(String value)
                                    throws SAML2Exception
        Returns the Extensions Object.
        Parameters:
        value - XML String Representation of Extensions object.
        Returns:
        instance of Extensions object.
        Throws:
        SAML2Exception - if Extensions cannot be created.
      • createGetComplete

        public GetComplete createGetComplete()
                                      throws SAML2Exception
        Returns the GetComplete Object.
        Returns:
        instance of GetComplete object.
        Throws:
        SAML2Exception - if GetComplete cannot be created.
      • createGetComplete

        public GetComplete createGetComplete​(Element value)
                                      throws SAML2Exception
        Returns the GetComplete Object.
        Parameters:
        value - Document Element of GetComplete object.
        Returns:
        instance of GetComplete Object.
        Throws:
        SAML2Exception - if GetComplete cannot be created.
      • createGetComplete

        public GetComplete createGetComplete​(String value)
                                      throws SAML2Exception
        Returns the GetComplete Object.
        Parameters:
        value - XML String representation of GetComplete object.
        Returns:
        instance of GetComplete Object.
        Throws:
        SAML2Exception - if GetComplete cannot be created.
      • createIDPEntry

        public IDPEntry createIDPEntry()
                                throws SAML2Exception
        Returns the IDPEntry Object.
        Returns:
        instance of IDPEntry object.
        Throws:
        SAML2Exception - if IDPEntry cannot be created.
      • createIDPEntry

        public IDPEntry createIDPEntry​(Element value)
                                throws SAML2Exception
        Returns the IDPEntry Object.
        Parameters:
        value - Document Element of IDPEntry object.
        Returns:
        instance of IDPEntry object.
        Throws:
        SAML2Exception - if IDPEntry cannot be created.
      • createIDPEntry

        public IDPEntry createIDPEntry​(String value)
                                throws SAML2Exception
        Returns the IDPEntry Object.
        Parameters:
        value - XML Representation of the IDPEntry object.
        Returns:
        instance of IDPEntry Object.
        Throws:
        SAML2Exception - if IDPEntry cannot be created.
      • createIDPList

        public IDPList createIDPList()
                              throws SAML2Exception
        Returns the IDPList Object.
        Returns:
        instance of IDPList Object.
        Throws:
        SAML2Exception - if IDPList cannot be created.
      • createIDPList

        public IDPList createIDPList​(Element value)
                              throws SAML2Exception
        Returns the IDPList Object.
        Parameters:
        value - Document Element of IDPList Object.
        Returns:
        instance of IDPList Object.
        Throws:
        SAML2Exception - if IDPList cannot be created.
      • createIDPList

        public IDPList createIDPList​(String value)
                              throws SAML2Exception
        Returns the IDPList Object.
        Parameters:
        value - XML String Representation of IDPList Object.
        Returns:
        instance of IDPList Object.
        Throws:
        SAML2Exception - if IDPList cannot be created.
      • createNameIDPolicy

        public NameIDPolicy createNameIDPolicy()
                                        throws SAML2Exception
        Returns the NameIDPolicy Object.
        Returns:
        instance of NameIDPolicy Object.
        Throws:
        SAML2Exception - if NameIDPolicy cannot be created.
      • createNameIDPolicy

        public NameIDPolicy createNameIDPolicy​(Element value)
                                        throws SAML2Exception
        Returns the NameIDPolicy Object.
        Parameters:
        value - Document Element of NameIDPolicy Object.
        Returns:
        instance of NameIDPolicy Object.
        Throws:
        SAML2Exception - if NameIDPolicy cannot be created.
      • createNameIDPolicy

        public NameIDPolicy createNameIDPolicy​(String value)
                                        throws SAML2Exception
        Returns the NameIDPolicy Object.
        Parameters:
        value - XML String Representation of NameIDPolicy object.
        Returns:
        instance of NameIDPolicy object.
        Throws:
        SAML2Exception - if NameIDPolicy cannot be created.
      • createRequesterID

        public RequesterID createRequesterID()
                                      throws SAML2Exception
        Returns the RequesterID Object.
        Returns:
        instance of RequesterID Object.
        Throws:
        SAML2Exception - if RequesterID cannot be created.
      • createRequesterID

        public RequesterID createRequesterID​(Element value)
                                      throws SAML2Exception
        Returns the RequesterID Object.
        Parameters:
        value - Document Element of RequesterID Object.
        Returns:
        instance of RequesterID Object.
        Throws:
        SAML2Exception - if RequesterID cannot be created.
      • createRequesterID

        public RequesterID createRequesterID​(String value)
                                      throws SAML2Exception
        Returns the RequesterID Object.
        Parameters:
        value - XML String Representation of RequesterID object.
        Returns:
        instance of RequesterID Object.
        Throws:
        SAML2Exception - if RequesterID cannot be created.
      • createScoping

        public Scoping createScoping()
                              throws SAML2Exception
        Returns the Scoping Object.
        Returns:
        instance of Scoping Object.
        Throws:
        SAML2Exception - if Scoping cannot be created.
      • createScoping

        public Scoping createScoping​(Element value)
                              throws SAML2Exception
        Returns the Scoping Object.
        Parameters:
        value - Document Element of Scoping Object.
        Returns:
        instance of Scoping Object.
        Throws:
        SAML2Exception - if Scoping cannot be created.
      • createScoping

        public Scoping createScoping​(String value)
                              throws SAML2Exception
        Returns the Scoping Object.
        Parameters:
        value - XML String Representation of Scoping Object.
        Returns:
        instance of Scoping Object.
        Throws:
        SAML2Exception - if Scoping cannot be created.
      • createRequestedAuthnContext

        public RequestedAuthnContext createRequestedAuthnContext()
                                                          throws SAML2Exception
        Returns a mutable requested authentication context object.
        Returns:
        the RequestedAuthnContext object.
        Throws:
        SAML2Exception - if it failed to instantiate the object.
      • createRequestedAuthnContext

        public RequestedAuthnContext createRequestedAuthnContext​(Element value)
                                                          throws SAML2Exception
        Returns an immutable requested authentication context object.
        Parameters:
        value - DOM element representing requested authentication context object.
        Returns:
        an immutable requested authentication context object.
        Throws:
        SAML2Exception - if it failed to instantiate the object.
      • createRequestedAuthnContext

        public RequestedAuthnContext createRequestedAuthnContext​(String value)
                                                          throws SAML2Exception
        Returns an immutable requested authentication context object.
        Parameters:
        value - XML string representing requested authentication context object.
        Returns:
        an immutable requested authentication context object.
        Throws:
        SAML2Exception - if it failed to instantiate the object.
      • createManageNameIDRequest

        public ManageNameIDRequest createManageNameIDRequest()
        Returns a mutable manage name identifier request object.
        Returns:
        the ManageNameIDRequest object.
      • createManageNameIDRequest

        public ManageNameIDRequest createManageNameIDRequest​(Element value)
                                                      throws SAML2Exception
        Returns an immutable manage name identifier request object.
        Parameters:
        value - DOM element representing ManageNameIDRequest object.
        Returns:
        an immutable requested authentication context object.
        Throws:
        SAML2Exception - if it failed to instantiate the object.
      • createManageNameIDRequest

        public ManageNameIDRequest createManageNameIDRequest​(String value)
                                                      throws SAML2Exception
        Returns an immutable manage name identifier request object.
        Parameters:
        value - XML string representing ManageNameIDRequest object.
        Returns:
        an immutable requested authentication context object.
        Throws:
        SAML2Exception - if it failed to instantiate the object.
      • createManageNameIDResponse

        public ManageNameIDResponse createManageNameIDResponse()
        Returns a mutable manage name identifier response object.
        Returns:
        the ManageNameIDResponse object.
      • createManageNameIDResponse

        public ManageNameIDResponse createManageNameIDResponse​(Element value)
                                                        throws SAML2Exception
        Returns an immutable manage name identifier response object.
        Parameters:
        value - DOM element representing ManageNameIDResponse object.
        Returns:
        an immutable requested authentication context object.
        Throws:
        SAML2Exception - if it failed to instantiate the object.
      • createManageNameIDResponse

        public ManageNameIDResponse createManageNameIDResponse​(String value)
                                                        throws SAML2Exception
        Returns an immutable manage name identifier response object.
        Parameters:
        value - XML String representing ManageNameIDResponse object.
        Returns:
        an immutable requested authentication context object.
        Throws:
        SAML2Exception - if it failed to instantiate the object.
      • createNewID

        public NewID createNewID​(Element value)
                          throws SAML2Exception
        Returns an new identifier object.
        Parameters:
        value - DOM element representing NewID object.
        Returns:
        an immutable requested authentication context object.
        Throws:
        SAML2Exception - if it failed to instantiate the object.
      • createNewID

        public NewID createNewID​(String value)
                          throws SAML2Exception
        Returns an new identifier object.
        Parameters:
        value - of the NewID.
        Returns:
        an immutable requested authentication context object.
        Throws:
        SAML2Exception - if it failed to instantiate the object.
      • createNewEncryptedID

        public NewEncryptedID createNewEncryptedID​(Element value)
                                            throws SAML2Exception
        Returns an immutable new encrypted identifier object.
        Parameters:
        value - DOM element representing NewEncryptedID object.
        Returns:
        an immutable requested authentication context object.
        Throws:
        SAML2Exception - if it failed to instantiate the object.
      • createNewEncryptedID

        public NewEncryptedID createNewEncryptedID​(String value)
                                            throws SAML2Exception
        Returns an immutable new encrypted identifier object.
        Parameters:
        value - XML String representing NewEncryptedID object.
        Returns:
        an immutable requested authentication context object.
        Throws:
        SAML2Exception - if it failed to instantiate the object.
      • createLogoutRequest

        public LogoutRequest createLogoutRequest()
        Returns the LogoutRequest Object.
        Returns:
        the LogoutRequest object.
      • createLogoutRequest

        public LogoutRequest createLogoutRequest​(Element value)
                                          throws SAML2Exception
        Returns the LogoutRequest Object. This object will be immutable.
        Parameters:
        value - the org.w3c.dom.Element object representing the LogoutRequest object.
        Returns:
        the LogoutRequest object.
        Throws:
        SAML2Exception - if it fails to instantiate the object.
      • createLogoutRequest

        public LogoutRequest createLogoutRequest​(String value)
                                          throws SAML2Exception
        Returns the LogoutRequest Object. This object will be immutable.
        Parameters:
        value - the String representing the LogoutRequest object.
        Returns:
        the LogoutRequest object.
        Throws:
        SAML2Exception - if it fails to instantiate the object.
      • createLogoutResponse

        public LogoutResponse createLogoutResponse()
        Returns the LogoutResponse Object.
        Returns:
        the LogoutResponse object.
      • createLogoutResponse

        public LogoutResponse createLogoutResponse​(Element value)
                                            throws SAML2Exception
        Returns the LogoutResponse Object. This object will be immutable.
        Parameters:
        value - the org.w3c.dom.Element representing the LogoutResponse object.
        Returns:
        the LogoutResponse object.
        Throws:
        SAML2Exception - if it fails to instantiate the object.
      • createLogoutResponse

        public LogoutResponse createLogoutResponse​(String value)
                                            throws SAML2Exception
        Returns the LogoutResponse Object. This object will be immutable.
        Parameters:
        value - the String representing the LogoutResponse object.
        Returns:
        the LogoutResponse object.
        Throws:
        SAML2Exception - if it fails to instantiate the object.
      • createStatus

        public Status createStatus()
                            throws SAML2Exception
        Returns the Status Object.
        Returns:
        the Status object.
        Throws:
        SAML2Exception - if it fails to instantiate the object.
      • createStatus

        public Status createStatus​(Element value)
                            throws SAML2Exception
        Returns the Status Object. This object will be immutable.
        Parameters:
        value - the org.w3c.dom.Element representing the Status object.
        Returns:
        the Status object.
        Throws:
        SAML2Exception - if it fails to instantiate the object.
      • createStatus

        public Status createStatus​(String value)
                            throws SAML2Exception
        Returns the Status Object. This object will be immutable.
        Parameters:
        value - the String representing the Status object.
        Returns:
        the Status object.
        Throws:
        SAML2Exception - if it fails to instantiate the object.
      • createStatusCode

        public StatusCode createStatusCode()
                                    throws SAML2Exception
        Returns the StatusCode Object.
        Returns:
        the StatusCode object.
        Throws:
        SAML2Exception - if it fails to instantiate the object.
      • createStatusCode

        public StatusCode createStatusCode​(Element value)
                                    throws SAML2Exception
        Returns the StatusCode Object. This object will be immutable.
        Parameters:
        value - the org.w3c.dom.Element representing the StatusCode object.
        Returns:
        the StatusCode object.
        Throws:
        SAML2Exception - if it fails to instantiate the object.
      • createStatusCode

        public StatusCode createStatusCode​(String value)
                                    throws SAML2Exception
        Returns the StatusCode Object. This object will be immutable.
        Parameters:
        value - the String representing the StatusCode object.
        Returns:
        the StatusCode object.
        Throws:
        SAML2Exception - if it fails to instantiate the object.
      • createStatusDetail

        public StatusDetail createStatusDetail()
                                        throws SAML2Exception
        Returns the StatusDetail Object.
        Returns:
        the StatusDetail object.
        Throws:
        SAML2Exception - if it fails to instantiate the object.
      • createStatusDetail

        public StatusDetail createStatusDetail​(Element value)
                                        throws SAML2Exception
        Returns the StatusDetail Object. This object will be immutable.
        Parameters:
        value - the org.w3c.dom.Element representing the StatusDetail object.
        Returns:
        the StatusDetail object.
        Throws:
        SAML2Exception - if it fails to instantiate the object.
      • createStatusDetail

        public StatusDetail createStatusDetail​(String value)
                                        throws SAML2Exception
        Returns the StatusDetail Object. This object will be immutable.
        Parameters:
        value - the String representing the StatusDetail object.
        Returns:
        the StatusDetail object.
        Throws:
        SAML2Exception - if it fails to instantiate the object.
      • createStatusMessage

        public StatusMessage createStatusMessage​(String value)
        Returns the StatusMessage Object.
        Parameters:
        value - A String StatusMessage value
        Returns:
        the StatusMessage object.
      • createSessionIndex

        public SessionIndex createSessionIndex​(String value)
        Returns the SessionIndex Object.
        Parameters:
        value - A String SessionIndex value
        Returns:
        the SessionIndex object.
      • createArtifact

        public Artifact createArtifact​(byte[] typecode,
                                       int endpointIndex,
                                       String sourceID,
                                       String messageHandle)
                                throws SAML2Exception
        Returns a new instance of Artifact.
        Parameters:
        typecode - two byte sequence representing TypeCode.
        endpointIndex - integer value representing EndpointIndex.
        sourceID - String format of 20-byte sequence. Usually obtained from taking the SHA-1 hash of the identification URL (called provider ID).
        messageHandle - String format of 20-byte sequence identifying a message. This value is constructed from a cryptographically strong random or pseudorandom number sequence.
        Returns:
        a new instance of Artifact.
        Throws:
        SAML2Exception - if it fails to instantiate the object.
      • createArtifact

        public Artifact createArtifact​(Element elem)
                                throws SAML2Exception
        Returns a new instance of Artifact. The return object is immutable.
        Parameters:
        elem - an Element representation of Artifact.
        Returns:
        a new instance of Artifact.
        Throws:
        SAML2Exception - if error occurs while processing the Element.
      • createArtifact

        public Artifact createArtifact​(String encodedArtifactValue)
                                throws SAML2Exception
        Returns a new instance of Artifact. The return object is immutable.
        Parameters:
        encodedArtifactValue - Artifact Base64 encoded String.
        Returns:
        a new instance of Artifact.
        Throws:
        SAML2Exception - if error occurs while processing the XML string.
      • createArtifactResolve

        public ArtifactResolve createArtifactResolve()
        Returns a new instance of ArtifactResolve. Caller may need to call setters of the class to populate the object.
        Returns:
        a new instance of ArtifactResolve.
      • createArtifactResolve

        public ArtifactResolve createArtifactResolve​(Element elem)
                                              throws SAML2Exception
        Returns a new instance of ArtifactResolve. The return object is immutable.
        Parameters:
        elem - an Element representation of ArtifactResolve.
        Returns:
        a new instance of ArtifactResolve.
        Throws:
        SAML2Exception - if error occurs while processing the Element.
      • createArtifactResolve

        public ArtifactResolve createArtifactResolve​(String xml)
                                              throws SAML2Exception
        Returns a new instance of ArtifactResolve. The return object is immutable.
        Parameters:
        xml - a XML String representation of ArtifactResolve.
        Returns:
        a new instance of ArtifactResolve.
        Throws:
        SAML2Exception - if error occurs while processing the XML string.
      • createArtifactResponse

        public ArtifactResponse createArtifactResponse()
        Returns a new instance of ArtifactResponse. Caller may need to call setters of the class to populate the object.
        Returns:
        a new instance of ArtifactResponse.
      • createArtifactResponse

        public ArtifactResponse createArtifactResponse​(Element elem)
                                                throws SAML2Exception
        Returns a new instance of ArtifactResponse. The return object is immutable.
        Parameters:
        elem - an Element representing ArtifactResponse.
        Returns:
        a new instance of ArtifactResponse.
        Throws:
        SAML2Exception - if error occurs while processing the Element.
      • createArtifactResponse

        public ArtifactResponse createArtifactResponse​(String xml)
                                                throws SAML2Exception
        Returns a new instance of ArtifactResponse. The return object is immutable.
        Parameters:
        xml - a XML String representation of ArtifactResponse.
        Returns:
        a new instance of ArtifactResponse.
        Throws:
        SAML2Exception - if error occurs while processing the XML string.
      • createResponse

        public Response createResponse()
        Returns a new instance of Response. Caller may need to call setters of the class to populate the object.
        Returns:
        a new instance of Response.
      • createResponse

        public Response createResponse​(Element elem)
                                throws SAML2Exception
        Returns a new instance of Response. The return object is immutable.
        Parameters:
        elem - an Element representation of Response.
        Returns:
        a new instance of Response.
        Throws:
        SAML2Exception - if error occurs while processing the Element.
      • createResponse

        public Response createResponse​(String xml)
                                throws SAML2Exception
        Returns a new instance of Response. The return object is immutable.
        Parameters:
        xml - a XML String representation of Response.
        Returns:
        a new instance of Response.
        Throws:
        SAML2Exception - if error occurs while processing the XML string.
      • createNameIDMappingRequest

        public NameIDMappingRequest createNameIDMappingRequest()
        Returns the NameIDMappingRequest Object.
        Returns:
        the NameIDMappingRequest object.
      • createNameIDMappingRequest

        public NameIDMappingRequest createNameIDMappingRequest​(Element elem)
                                                        throws SAML2Exception
        Returns the NameIDMappingRequest Object.
        Parameters:
        elem - the Document Element of NameIDMappingRequest object.
        Returns:
        the NameIDMappingRequest object.
        Throws:
        SAML2Exception - if NameIDMappingRequest cannot be created.
      • createNameIDMappingRequest

        public NameIDMappingRequest createNameIDMappingRequest​(String value)
                                                        throws SAML2Exception
        Returns the NameIDMappingRequest Object.
        Parameters:
        value - NameIDMappingRequest XML String.
        Returns:
        the NameIDMappingRequest object.
        Throws:
        SAML2Exception - if NameIDMappingRequest cannot be created.
      • createNameIDMappingResponse

        public NameIDMappingResponse createNameIDMappingResponse()
        Returns the NameIDMappingResponse Object.
        Returns:
        the NameIDMappingResponse object.
      • createNameIDMappingResponse

        public NameIDMappingResponse createNameIDMappingResponse​(Element elem)
                                                          throws SAML2Exception
        Returns the NameIDMappingResponse Object.
        Parameters:
        elem - the Document Element of NameIDMappingResponse object.
        Returns:
        the NameIDMappingResponse object.
        Throws:
        SAML2Exception - if NameIDMappingResponse cannot be created.
      • createNameIDMappingResponse

        public NameIDMappingResponse createNameIDMappingResponse​(String value)
                                                          throws SAML2Exception
        Returns the NameIDMappingResponse Object.
        Parameters:
        value - NameIDMappingResponse XML String.
        Returns:
        the NameIDMappingResponse object.
        Throws:
        SAML2Exception - if NameIDMappingResponse cannot be created.