cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1498971 - /cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java
Date Tue, 02 Jul 2013 15:22:13 GMT
Author: coheigea
Date: Tue Jul  2 15:22:13 2013
New Revision: 1498971

URL: http://svn.apache.org/r1498971
Log:
Fixed problem with retrieving right policy for certain WSDL types

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=1498971&r1=1498970&r2=1498971&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
Tue Jul  2 15:22:13 2013
@@ -50,6 +50,7 @@ import org.apache.cxf.resource.ResourceM
 import org.apache.cxf.service.model.BindingInfo;
 import org.apache.cxf.service.model.BindingOperationInfo;
 import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.service.model.MessageInfo;
 import org.apache.cxf.ws.policy.AssertionInfo;
 import org.apache.cxf.ws.policy.AssertionInfoMap;
 import org.apache.cxf.ws.policy.EffectivePolicy;
@@ -422,7 +423,11 @@ public class PolicyBasedWSS4JStaxInInter
             if (MessageUtils.isRequestor(msg)) {
                 policy = 
                     (EffectivePolicy)bindingOperationInfo.getProperty("policy-engine-info-client-response");
-                localName = bindingOperationInfo.getOutput().getMessageInfo().getName().getLocalPart();
+                MessageInfo messageInfo = bindingOperationInfo.getOutput().getMessageInfo();
+                localName = messageInfo.getName().getLocalPart();
+                if (!messageInfo.getMessageParts().isEmpty()) {
+                    localName = messageInfo.getMessagePart(0).getConcreteName().getLocalPart();
+                }
             }
             SoapOperationInfo soapOperationInfo = bindingOperationInfo.getExtensor(SoapOperationInfo.class);
 



Mime
View raw message