You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by co...@apache.org on 2012/02/08 16:35:25 UTC
svn commit: r1241939 -
/webservices/wss4j/branches/swssf/streaming-xml-security/src/main/java/org/swssf/xmlsec/ext/AbstractOutputProcessor.java
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);