cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r937835 - in /cxf/branches/2.2.x-fixes: ./ rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/ systests/jaxrs/ systests/jaxrs/src/test/resources/jaxrs_soap_rest/WEB-INF/
Date Sun, 25 Apr 2010 17:38:49 GMT
Author: sergeyb
Date: Sun Apr 25 17:38:48 2010
New Revision: 937835

URL: http://svn.apache.org/viewvc?rev=937835&view=rev
Log:
Merged revisions 937409 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r937409 | sergeyb | 2010-04-23 18:19:41 +0100 (Fri, 23 Apr 2010) | 1 line
  
  Adding guards to policy interceptors
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/ClientPolicyInFaultInterceptor.java
    cxf/branches/2.2.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyInInterceptor.java
    cxf/branches/2.2.x-fixes/systests/jaxrs/pom.xml
    cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/resources/jaxrs_soap_rest/WEB-INF/beans.xml

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Apr 25 17:38:48 2010
@@ -1 +1 @@
-/cxf/trunk:935945,935995,936318
+/cxf/trunk:935945,935995,936318,937409

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.2.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/ClientPolicyInFaultInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/ClientPolicyInFaultInterceptor.java?rev=937835&r1=937834&r2=937835&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/ClientPolicyInFaultInterceptor.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/ClientPolicyInFaultInterceptor.java
Sun Apr 25 17:38:48 2010
@@ -79,11 +79,15 @@ public class ClientPolicyInFaultIntercep
         LOG.fine("ep: " + ep);
         
         List<Interceptor> faultInterceptors = ep.getFaultInterceptors();
+        
         LOG.fine("faultInterceptors: " + faultInterceptors);
-        for (Interceptor i : faultInterceptors) {
-            msg.getInterceptorChain().add(i);
-            LOG.log(Level.FINE, "Added interceptor of type {0}", i.getClass().getSimpleName());
-        }
+
+        if (null != faultInterceptors) {
+            for (Interceptor i : faultInterceptors) {
+                msg.getInterceptorChain().add(i);
+                LOG.log(Level.FINE, "Added interceptor of type {0}", i.getClass().getSimpleName());
+            }
+        } 
         
         // insert assertions of endpoint's fault vocabulary into message
         

Modified: cxf/branches/2.2.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyInInterceptor.java?rev=937835&r1=937834&r2=937835&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyInInterceptor.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyInInterceptor.java
Sun Apr 25 17:38:48 2010
@@ -93,9 +93,11 @@ public class PolicyInInterceptor extends
                 EndpointPolicy ep = pe.getClientEndpointPolicy(ei, conduit);
                 
                 List<Interceptor> interceptors = ep.getInterceptors();
-                for (Interceptor i : interceptors) {
-                    msg.getInterceptorChain().add(i);
-                }
+                if (null != interceptors) {
+                    for (Interceptor i : interceptors) {
+                        msg.getInterceptorChain().add(i);
+                    }
+                } 
                 
                 // insert assertions of endpoint's vocabulary into message
                 
@@ -111,8 +113,10 @@ public class PolicyInInterceptor extends
                 EffectivePolicy ep = pe.getEffectiveClientResponsePolicy(ei, boi);
         
                 List<Interceptor> interceptors = ep.getInterceptors();
-                for (Interceptor i : interceptors) {
-                    msg.getInterceptorChain().add(i);
+                if (null != interceptors) {
+                    for (Interceptor i : interceptors) {
+                        msg.getInterceptorChain().add(i);
+                    }
                 }
                 // insert assertions of endpoint's vocabulary into message
                 if (ep.getPolicy() != null) {
@@ -129,9 +133,11 @@ public class PolicyInInterceptor extends
             EndpointPolicy ep = pe.getServerEndpointPolicy(ei, destination);
             
             List<Interceptor> interceptors = ep.getInterceptors();
-            for (Interceptor i : interceptors) {
-                msg.getInterceptorChain().add(i);
-                LOG.log(Level.FINE, "Added interceptor of type {0}", i.getClass().getSimpleName());
+            if (null != interceptors) {
+                for (Interceptor i : interceptors) {
+                    msg.getInterceptorChain().add(i);
+                    LOG.log(Level.FINE, "Added interceptor of type {0}", i.getClass().getSimpleName());
+                }
             }
             
             // insert assertions of endpoint's vocabulary into message

Modified: cxf/branches/2.2.x-fixes/systests/jaxrs/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxrs/pom.xml?rev=937835&r1=937834&r2=937835&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/jaxrs/pom.xml (original)
+++ cxf/branches/2.2.x-fixes/systests/jaxrs/pom.xml Sun Apr 25 17:38:48 2010
@@ -115,6 +115,11 @@
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-ws-policy</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-rt-frontend-js</artifactId>
             <version>${project.version}</version>
         </dependency>

Modified: cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/resources/jaxrs_soap_rest/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/resources/jaxrs_soap_rest/WEB-INF/beans.xml?rev=937835&r1=937834&r2=937835&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/resources/jaxrs_soap_rest/WEB-INF/beans.xml
(original)
+++ cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/resources/jaxrs_soap_rest/WEB-INF/beans.xml
Sun Apr 25 17:38:48 2010
@@ -38,6 +38,11 @@ http://cxf.apache.org/schemas/jaxrs.xsd"
   <import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" />
   <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
 
+  <bean id="org.apache.cxf.ws.policy.PolicyEngine" class="org.apache.cxf.ws.policy.PolicyEngineImpl">
+      <property name="bus" ref="cxf"/>
+      <property name="enabled" value="true"/>
+   </bean>
+
   <jaxrs:client id="restClient"
          address="http://localhost:9092/test/services/rest"
          serviceClass="org.apache.cxf.systest.jaxrs.BookStoreJaxrsJaxws"



Mime
View raw message