cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject svn commit: r1301659 - in /cxf/branches/2.4.x-fixes: ./ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSMethodInvoker.java systests/jaxws/src/test/java/org/apache/cxf/systest/provider/InterpretNullAsOnewayProviderTest.java
Date Fri, 16 Mar 2012 17:30:32 GMT
Author: ay
Date: Fri Mar 16 17:30:31 2012
New Revision: 1301659

URL: http://svn.apache.org/viewvc?rev=1301659&view=rev
Log:
Merged revisions 1301636 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes

................
  r1301636 | ay | 2012-03-16 17:29:14 +0100 (Fri, 16 Mar 2012) | 9 lines
  
  Merged revisions 1301597
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r1301597 | ay | 2012-03-16 15:31:24 +0100 (Fri, 16 Mar 2012) | 1 line
    
    [CXF-4182] make jaxws.provider.interpretNullAsOneway prop configurable using a string
  ........
................

Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSMethodInvoker.java
    cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/InterpretNullAsOnewayProviderTest.java

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Mar 16 17:30:31 2012
@@ -1,2 +1,2 @@
-/cxf/branches/2.5.x-fixes:1299092,1299637,1299725,1300270,1300343,1300407-1300533,1300536,1300560,1301205
+/cxf/branches/2.5.x-fixes:1299092,1299637,1299725,1300270,1300343,1300407-1300533,1300536,1300560,1301205,1301636
 /cxf/trunk:1298470,1298830,1298832,1299086,1299635,1299682,1299747,1300342,1300518,1300530,1300555,1301201

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

Modified: cxf/branches/2.4.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSMethodInvoker.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSMethodInvoker.java?rev=1301659&r1=1301658&r2=1301659&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSMethodInvoker.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSMethodInvoker.java
Fri Mar 16 17:30:31 2012
@@ -32,6 +32,7 @@ import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.jaxws.context.WebServiceContextImpl;
 import org.apache.cxf.jaxws.context.WrappedMessageContext;
 import org.apache.cxf.message.Exchange;
+import org.apache.cxf.message.MessageUtils;
 import org.apache.cxf.service.invoker.Factory;
 import org.apache.cxf.service.invoker.SingletonFactory;
 
@@ -60,7 +61,7 @@ public class JAXWSMethodInvoker extends 
             }
             res = CastUtils.cast((List)super.invoke(exchange, serviceObject, m, params));
             if ((serviceObject instanceof Provider) 
-                && Boolean.TRUE.equals(exchange.getInMessage().
+                && MessageUtils.isTrue(exchange.getInMessage().
                                        getContextualProperty("jaxws.provider.interpretNullAsOneway"))
                 && (res != null && !res.isEmpty() && res.get(0) ==
null)) {
                 // treat the non-oneway call as oneway when a provider returns null

Modified: cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/InterpretNullAsOnewayProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/InterpretNullAsOnewayProviderTest.java?rev=1301659&r1=1301658&r2=1301659&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/InterpretNullAsOnewayProviderTest.java
(original)
+++ cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/InterpretNullAsOnewayProviderTest.java
Fri Mar 16 17:30:31 2012
@@ -43,6 +43,7 @@ public class InterpretNullAsOnewayProvid
 
     private static final String ADDRESS1 = "http://localhost:" + PORT + "/test/nullable1";
     private static final String ADDRESS2 = "http://localhost:" + PORT + "/test/nullable2";
+    private static final String ADDRESS3 = "http://localhost:" + PORT + "/test/nullable3";
     
     public static class Server extends AbstractBusTestServerBase {
     
@@ -57,6 +58,12 @@ public class InterpretNullAsOnewayProvid
             Endpoint ep2 = Endpoint.publish(ADDRESS2, servant2);
             assertNotNull("endpoint published", ep2);
             ep2.getProperties().put("jaxws.provider.interpretNullAsOneway", Boolean.TRUE);
+
+            // endpoint interpreting null as oneway
+            NullProviderService servant3 = new NullProviderService();
+            Endpoint ep3 = Endpoint.publish(ADDRESS3, servant3);
+            assertNotNull("endpoint published", ep3);
+            ep3.getProperties().put("jaxws.provider.interpretNullAsOneway", "true");
         }
     
         public static void main(String[] args) throws Exception { 
@@ -97,6 +104,12 @@ public class InterpretNullAsOnewayProvid
         HttpURLConnection conn = postRequest(ADDRESS2);
         assertEquals("http 202 must be returned", 202, conn.getResponseCode());
     }
+
+    @Test
+    public void testInterpretNullAsOneway2() throws Exception {
+        HttpURLConnection conn = postRequest(ADDRESS3);
+        assertEquals("http 202 must be returned", 202, conn.getResponseCode());
+    }
     
     private static HttpURLConnection postRequest(String address) throws Exception {
         URL url = new URL(address);



Mime
View raw message