Author: coheigea
Date: Fri Nov 29 16:47:41 2013
New Revision: 1546604
URL: http://svn.apache.org/r1546604
Log:
Only create an EncryptedHeader if the part is not "Content"
Modified:
webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/EncryptOutputProcessor.java
Modified:
webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/EncryptOutputProcessor.java
URL:
http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/EncryptOutputProcessor.java?rev=1546604&r1=1546603&r2=1546604&view=diff
==============================================================================
---
webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/EncryptOutputProcessor.java
(original)
+++
webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/output/EncryptOutputProcessor.java
Fri Nov 29 16:47:41 2013
@@ -46,6 +46,7 @@ import org.apache.xml.security.stax.conf
import org.apache.xml.security.stax.config.TransformerAlgorithmMapper;
import org.apache.xml.security.stax.ext.OutputProcessorChain;
import org.apache.xml.security.stax.ext.SecurePart;
+import org.apache.xml.security.stax.ext.SecurePart.Modifier;
import org.apache.xml.security.stax.ext.XMLSecurityConstants;
import org.apache.xml.security.stax.ext.stax.XMLSecAttribute;
import org.apache.xml.security.stax.ext.stax.XMLSecEvent;
@@ -295,7 +296,8 @@ public class EncryptOutputProcessor exte
List<QName> elementPath = xmlSecStartElement.getElementPath();
//WSS 1.1 EncryptedHeader Element:
- if (elementPath.size() == 3 &&
WSSUtils.isInSOAPHeader(elementPath)) {
+ if (elementPath.size() == 3 && WSSUtils.isInSOAPHeader(elementPath)
+ && Modifier.Content !=
super.getEncryptionPartDef().getModifier()) {
doEncryptedHeader = true;
List<XMLSecAttribute> attributes = new
ArrayList<XMLSecAttribute>(1);