You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2013/10/03 18:59:22 UTC
svn commit: r1528937 -
/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java
Author: coheigea
Date: Thu Oct 3 16:59:22 2013
New Revision: 1528937
URL: http://svn.apache.org/r1528937
Log:
A fix to get inbound security processing working with the streaming STS
Modified:
cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java
Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java?rev=1528937&r1=1528936&r2=1528937&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java (original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java Thu Oct 3 16:59:22 2013
@@ -508,25 +508,26 @@ public class PolicyBasedWSS4JStaxInInter
}
}
SoapOperationInfo soapOperationInfo = bindingOperationInfo.getExtensor(SoapOperationInfo.class);
-
- String soapNS;
- BindingInfo bindingInfo = bindingOperationInfo.getBinding();
- if (bindingInfo instanceof SoapBindingInfo) {
- soapNS = ((SoapBindingInfo)bindingInfo).getSoapVersion().getNamespace();
- } else {
- //no idea what todo here...
- //most probably throw an exception:
- throw new IllegalArgumentException("BindingInfo is not an instance of SoapBindingInfo");
+ if (soapOperationInfo != null) {
+ String soapNS;
+ BindingInfo bindingInfo = bindingOperationInfo.getBinding();
+ if (bindingInfo instanceof SoapBindingInfo) {
+ soapNS = ((SoapBindingInfo)bindingInfo).getSoapVersion().getNamespace();
+ } else {
+ //no idea what todo here...
+ //most probably throw an exception:
+ throw new IllegalArgumentException("BindingInfo is not an instance of SoapBindingInfo");
+ }
+
+ //todo: I think its a bug that we handover only the localPart of the operation.
+ // Needs to be fixed in ws-security-policy-stax
+ OperationPolicy operationPolicy = new OperationPolicy(localName);
+ operationPolicy.setPolicy(policy.getPolicy());
+ operationPolicy.setOperationAction(soapOperationInfo.getAction());
+ operationPolicy.setSoapMessageVersionNamespace(soapNS);
+
+ operationPolicies.add(operationPolicy);
}
-
- //todo: I think its a bug that we handover only the localPart of the operation.
- // Needs to be fixed in ws-security-policy-stax
- OperationPolicy operationPolicy = new OperationPolicy(localName);
- operationPolicy.setPolicy(policy.getPolicy());
- operationPolicy.setOperationAction(soapOperationInfo.getAction());
- operationPolicy.setSoapMessageVersionNamespace(soapNS);
-
- operationPolicies.add(operationPolicy);
}
String soapAction = SoapActionInInterceptor.getSoapAction(msg);