This is an automated email from the ASF dual-hosted git repository. coheigea pushed a commit to branch wss4j_2.3.0 in repository https://gitbox.apache.org/repos/asf/cxf.git
commit c68290f5da825f2026bfbf2eaebd4d74dcd05c85 Author: Colm O hEigeartaigh <cohei...@apache.org> AuthorDate: Fri Feb 1 16:34:02 2019 +0000 Set the SOAP namespace on the streaming policy validation code --- .../apache/cxf/ws/security/wss4j/AbstractWSS4JStaxInterceptor.java | 2 ++ .../cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JStaxInterceptor.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JStaxInterceptor.java index d5cd6b6..585e908 100644 --- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JStaxInterceptor.java +++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JStaxInterceptor.java @@ -179,6 +179,8 @@ public abstract class AbstractWSS4JStaxInterceptor implements SoapInterceptor, boolean validateSchemas = MessageUtils.getContextualBoolean(msg, "schema-validation-enabled", false); securityProperties.setDisableSchemaValidation(!validateSchemas); + + securityProperties.setSoap12(WSSConstants.NS_SOAP12.equals(msg.getVersion().getNamespace())); } private Collection<Pattern> convertCertConstraints(String certConstraints, String separator) { diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java index a455cf8..02b5081 100644 --- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java +++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java @@ -55,6 +55,7 @@ import org.apache.wss4j.policy.model.AlgorithmSuite; import org.apache.wss4j.policy.stax.OperationPolicy; import org.apache.wss4j.policy.stax.enforcer.PolicyEnforcer; import org.apache.wss4j.policy.stax.enforcer.PolicyInputProcessor; +import org.apache.wss4j.stax.ext.WSSConstants; import org.apache.wss4j.stax.ext.WSSSecurityProperties; import org.apache.wss4j.stax.impl.securityToken.HttpsSecurityTokenImpl; import org.apache.wss4j.stax.securityEvent.HttpsTokenSecurityEvent; @@ -426,7 +427,6 @@ public class PolicyBasedWSS4JStaxInInterceptor extends WSS4JStaxInInterceptor { if (soapAction == null) { soapAction = ""; } - String actor = (String)msg.getContextualProperty(SecurityConstants.ACTOR); final Collection<org.apache.cxf.message.Attachment> attachments = msg.getAttachments(); int attachmentCount = 0; @@ -435,7 +435,8 @@ public class PolicyBasedWSS4JStaxInInterceptor extends WSS4JStaxInInterceptor { } return new PolicyEnforcer(operationPolicies, soapAction, isRequestor(msg), actor, attachmentCount, - new WSS4JPolicyAsserter(msg.get(AssertionInfoMap.class))); + new WSS4JPolicyAsserter(msg.get(AssertionInfoMap.class)), + WSSConstants.NS_SOAP12.equals(msg.getVersion().getNamespace())); } }