[jboss-cvs] JBossAS SVN: r71697 - projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/core.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Apr 3 12:06:21 EDT 2008


Author: anil.saldhana at jboss.com
Date: 2008-04-03 12:06:21 -0400 (Thu, 03 Apr 2008)
New Revision: 71697

Modified:
   projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/core/JBossResponseContext.java
Log:
SECURITY-179: take care of no-namespace case

Modified: projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/core/JBossResponseContext.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/core/JBossResponseContext.java	2008-04-03 16:03:09 UTC (rev 71696)
+++ projects/security/security-xacml/trunk/jboss-xacml/src/main/java/org/jboss/security/xacml/core/JBossResponseContext.java	2008-04-03 16:06:21 UTC (rev 71697)
@@ -31,8 +31,10 @@
 import javax.xml.parsers.DocumentBuilderFactory;
 
 import org.jboss.security.xacml.interfaces.ContextMapOp;
+import org.jboss.security.xacml.interfaces.ElementMappingType;
 import org.jboss.security.xacml.interfaces.ResponseContext;
 import org.jboss.security.xacml.interfaces.XACMLConstants;
+import org.jboss.security.xacml.sunxacml.Indenter;
 import org.jboss.security.xacml.sunxacml.ParsingException;
 import org.jboss.security.xacml.sunxacml.ctx.ResponseCtx;
 import org.jboss.security.xacml.sunxacml.ctx.Result;
@@ -104,7 +106,7 @@
    {
       ResponseCtx storedResponse = get(XACMLConstants.RESPONSE_CTX);
       if (storedResponse != null)
-         storedResponse.encode(os);
+         storedResponse.encode(os,new Indenter(0), XACMLConstants.CONTEXT_SCHEMA);
    }
    
    /**
@@ -153,6 +155,10 @@
       factory.setIgnoringComments(true);
       Document doc = factory.newDocumentBuilder().parse(is);
       NodeList nodes = doc.getElementsByTagNameNS(contextSchema, "Response");
+      if(nodes.getLength() == 0)
+      {
+         nodes = doc.getElementsByTagName("Response");
+      }
       return nodes.item(0);
    }
 }
\ No newline at end of file




More information about the jboss-cvs-commits mailing list