Fix namespace issue with persistent id.
authorwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 20 May 2005 00:56:34 +0000 (00:56 +0000)
committerwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 20 May 2005 00:56:34 +0000 (00:56 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@1555 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/aa/attrresolv/provider/SAML2PersistentID.java

index d406531..7db09d0 100644 (file)
@@ -256,8 +256,11 @@ public class SAML2PersistentID extends BaseAttributeDefinition implements Attrib
 
                        // SAML2 persistent NameId format
                        try {
-                               Document placeHolder = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+                               DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+                               docFactory.setNamespaceAware(true);
+                               Document placeHolder = docFactory.newDocumentBuilder().newDocument();
                                Element nameIDNode = placeHolder.createElementNS(XML.SAML2ASSERT_NS, "NameID");
+                               nameIDNode.setAttribute("xmlns", XML.SAML2ASSERT_NS);
                                nameIDNode.setAttribute("Format", "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent");
                                nameIDNode.setAttribute("NameQualifier", responder);
                                nameIDNode.setAttribute("SPNameQualifier", requester);