Skip to Content.
Sympa Menu

mace-opensaml-users - About SAMLAuthorizationDecisionQuery!

Subject: OpenSAML user discussion

List archive

About SAMLAuthorizationDecisionQuery!


Chronological Thread 
  • From:
  • To:
  • Subject: About SAMLAuthorizationDecisionQuery!
  • Date: Tue, 24 Aug 2004 03:48:03 -0400 (EDT)


Hi:

Im using openSAML Java Api to generate a SAMLAuthorizationDecisionQuery. I

have a question about the method "todom" in
SAMLAuthorizationDecisionQuery.java.

In opensaml 1.0 ,the src file like:

public Node toDOM(Document doc, boolean xmlns) throws SAMLException {
if ((root = super.toDOM(doc, xmlns)) != null) {
if (xmlns)
((Element)root).setAttributeNS(XML.XMLNS_NS, "xmlns",
"XML.SAMLP_NS");
~~~~~~~~~~~~~~~
return root;
}

Element q = doc.createElementNS(XML.SAMLP_NS,
"AuthorizationDecisionQuery");
if (xmlns)
q.setAttributeNS(XML.XMLNS_NS, "xmlns",
"XML.SAMLP_NS");
~~~~~~~~~~~~~~~~
q.setAttributeNS(null, "Resource", resource);
q.appendChild(subject.toDOM(doc));

Iterator i = actions.iterator();
while (i.hasNext())
q.appendChild(((SAMLAction)i.next()).toDOM(doc));

if (evidence.size()>0) {
Element ev = doc.createElementNS(XML.SAML_NS, "Evidence");
ev.setAttributeNS(XML.XMLNS_NS, "xmlns", XML.SAML_NS);
~~~~~~~~~~~~~~
i = evidence.iterator();
while (i.hasNext()) {
Object o = i.next();
if (o instanceof SAMLAssertion)
ev.appendChild(((SAMLAssertion)o).toDOM(doc, false));
else if (o instanceof String && !XML.isEmpty((String)o))

ev.appendChild(doc.createElementNS(XML.SAML_NS,"AssertionIDReference")).appendChild(doc.createTextNode((String)o));
}
q.appendChild(ev);
}

return root = q;
}

There are three XML.SAMLP_NS(or "XML.SAMLP_NS"). In my opinion, the first and

two may be XML.SAMLP_NS, here quotation marks may be redundant.


thanks a lot

--pwu



Archive powered by MHonArc 2.6.16.

Top of Page