mace-opensaml-users - About SAMLAuthorizationDecisionQuery!
Subject: OpenSAML user discussion
List archive
- 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
- About SAMLAuthorizationDecisionQuery!, pwu, 08/24/2004
- RE: About SAMLAuthorizationDecisionQuery!, Scott Cantor, 08/24/2004
- AttributeQuery use cases, Mike Ferraro, 08/26/2004
- RE: AttributeQuery use cases, Scott Cantor, 08/26/2004
- RE: AttributeQuery use cases, mlong, 08/26/2004
- RE: AttributeQuery use cases, Scott Cantor, 08/26/2004
- RE: AttributeQuery use cases, Scott Cantor, 08/26/2004
- RE: AttributeQuery use cases, mlong, 08/26/2004
- RE: AttributeQuery use cases, Mike Ferraro, 08/27/2004
- RE: AttributeQuery use cases, mlong, 08/26/2004
- Re: AttributeQuery use cases, mlong, 08/26/2004
- Re: AttributeQuery use cases, Mike Ferraro, 08/27/2004
- RE: AttributeQuery use cases, Scott Cantor, 08/26/2004
- AttributeQuery use cases, Mike Ferraro, 08/26/2004
- RE: About SAMLAuthorizationDecisionQuery!, Scott Cantor, 08/24/2004
Archive powered by MHonArc 2.6.16.