cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject cxf git commit: [CXF-7240]JAX-WS Dispatch incorrectly asserts that Message mode with XML/HTTP binding is invalid when using instances of DataSource
Date Fri, 17 Feb 2017 04:40:50 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes c4709d14f -> 407318934


[CXF-7240]JAX-WS Dispatch incorrectly asserts that Message mode with XML/HTTP binding is invalid
when using instances of DataSource

(cherry picked from commit 9596758ebbaa4e703307394a19bb6d2a411647b9)

Conflicts:
	rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/40731893
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/40731893
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/40731893

Branch: refs/heads/3.1.x-fixes
Commit: 4073189347b32df3195579a0c296b2c19b71d8bb
Parents: c4709d1
Author: Freeman Fang <freeman.fang@gmail.com>
Authored: Fri Feb 17 12:27:55 2017 +0800
Committer: Freeman Fang <freeman.fang@gmail.com>
Committed: Fri Feb 17 12:40:37 2017 +0800

----------------------------------------------------------------------
 .../java/org/apache/cxf/jaxws/DispatchImpl.java |  8 +-------
 .../handlers/DispatchHandlerInvocationTest.java | 20 +++++---------------
 2 files changed, 6 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/40731893/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java
index 0446546..843bfa3 100644
--- a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java
+++ b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java
@@ -148,13 +148,7 @@ public class DispatchImpl<T> implements Dispatch<T>, BindingProvider,
Closeable
                                 "SOAPMessage",
                                 m,
                                 "SOAP/HTTP");
-        } else if (DataSource.class.isAssignableFrom(clazz)
-            && binding instanceof HTTPBinding) {
-            error = new Message("DISPATCH_OBJECT_NOT_SUPPORTED", LOG,
-                                "DataSource",
-                                m,
-                                "XML/HTTP");            
-        }
+        } 
     }
     
     DispatchImpl(Client cl, Service.Mode m, Class<T> clazz) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/40731893/systests/jaxws/src/test/java/org/apache/cxf/systest/handlers/DispatchHandlerInvocationTest.java
----------------------------------------------------------------------
diff --git a/systests/jaxws/src/test/java/org/apache/cxf/systest/handlers/DispatchHandlerInvocationTest.java
b/systests/jaxws/src/test/java/org/apache/cxf/systest/handlers/DispatchHandlerInvocationTest.java
index 10964a2..7b25afd 100644
--- a/systests/jaxws/src/test/java/org/apache/cxf/systest/handlers/DispatchHandlerInvocationTest.java
+++ b/systests/jaxws/src/test/java/org/apache/cxf/systest/handlers/DispatchHandlerInvocationTest.java
@@ -49,9 +49,9 @@ import javax.xml.ws.handler.LogicalMessageContext;
 import javax.xml.ws.handler.MessageContext;
 import javax.xml.ws.handler.soap.SOAPHandler;
 import javax.xml.ws.handler.soap.SOAPMessageContext;
-import javax.xml.ws.http.HTTPException;
 import javax.xml.ws.soap.SOAPFaultException;
 
+
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.cxf.testutil.common.TestUtil;
 import org.apache.handlers.AddNumbersService;
@@ -305,12 +305,8 @@ public class DispatchHandlerInvocationTest extends AbstractBusClientServerTestBa
         URL is = getClass().getResource("/messages/XML_GreetMeDocLiteralReq.xml");
         DataSource ds = new URLDataSource(is);
 
-        try {
-            disp.invoke(ds);
-            fail("Did not get expected exception");
-        } catch (HTTPException e) {
-            //expected
-        }
+        DataSource resp = disp.invoke(ds);
+        assertNotNull(resp);
     }
 
     @Test
@@ -329,14 +325,8 @@ public class DispatchHandlerInvocationTest extends AbstractBusClientServerTestBa
 
         URL is = getClass().getResource("/messages/XML_GreetMeDocLiteralReq.xml");
         DataSource ds = new URLDataSource(is);
-
-        try {
-            disp.invoke(ds);
-            fail("Did not get expected exception");
-        } catch (HTTPException e) {
-            assertEquals(e.getCause().getMessage(),
-                         "DataSource is not valid in PAYLOAD mode with XML/HTTP binding.");
-        }
+        DataSource resp = disp.invoke(ds);
+        assertNotNull(resp);
     }
 
     @Test


Mime
View raw message