cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject svn commit: r1301636 - in /cxf/branches/2.5.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 16:29:15 GMT
Author: ay
Date: Fri Mar 16 16:29:14 2012
New Revision: 1301636

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

........
  r1299707 | ay | 2012-03-12 16:17:47 +0100 (Mon, 12 Mar 2012) | 1 line
  
  handle null-EndpointReference in WS-RM Destination and Source for JMX monitor
........

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

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

Modified: cxf/branches/2.5.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSMethodInvoker.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSMethodInvoker.java?rev=1301636&r1=1301635&r2=1301636&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSMethodInvoker.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSMethodInvoker.java
Fri Mar 16 16:29:14 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;
 
@@ -62,7 +63,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.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/InterpretNullAsOnewayProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/InterpretNullAsOnewayProviderTest.java?rev=1301636&r1=1301635&r2=1301636&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/InterpretNullAsOnewayProviderTest.java
(original)
+++ cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/InterpretNullAsOnewayProviderTest.java
Fri Mar 16 16:29:14 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