ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1241939 - /webservices/wss4j/branches/swssf/streaming-xml-security/src/main/java/org/swssf/xmlsec/ext/AbstractOutputProcessor.java
Date Wed, 08 Feb 2012 15:35:25 GMT
Author: coheigea
Date: Wed Feb  8 15:35:24 2012
New Revision: 1241939

URL: http://svn.apache.org/viewvc?rev=1241939&view=rev
Log:
Avoid outputing xmlns="" when using an Id with null namespace

Modified:
    webservices/wss4j/branches/swssf/streaming-xml-security/src/main/java/org/swssf/xmlsec/ext/AbstractOutputProcessor.java

Modified: webservices/wss4j/branches/swssf/streaming-xml-security/src/main/java/org/swssf/xmlsec/ext/AbstractOutputProcessor.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/swssf/streaming-xml-security/src/main/java/org/swssf/xmlsec/ext/AbstractOutputProcessor.java?rev=1241939&r1=1241938&r2=1241939&view=diff
==============================================================================
--- webservices/wss4j/branches/swssf/streaming-xml-security/src/main/java/org/swssf/xmlsec/ext/AbstractOutputProcessor.java
(original)
+++ webservices/wss4j/branches/swssf/streaming-xml-security/src/main/java/org/swssf/xmlsec/ext/AbstractOutputProcessor.java
Wed Feb  8 15:35:24 2012
@@ -23,6 +23,7 @@ import org.apache.commons.logging.LogFac
 import org.swssf.xmlsec.impl.EncryptionPartDef;
 import org.swssf.xmlsec.impl.util.RFC2253Parser;
 
+import javax.xml.XMLConstants;
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLEventFactory;
 import javax.xml.stream.XMLStreamException;
@@ -110,6 +111,9 @@ public abstract class AbstractOutputProc
 
         for (int i = 0; i < attributeList.size(); i++) {
             Attribute attribute = attributeList.get(i);
+            if (XMLConstants.NULL_NS_URI.equals(attribute.getName().getNamespaceURI())) {
+                continue;
+            }
             boolean found = false;
             for (int j = 0; j < namespaceList.size(); j++) {
                 Namespace namespace = namespaceList.get(j);



Mime
View raw message