cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1434566 - in /cxf/branches/2.7.x-fixes: ./ systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerRPCLitTest.java testutils/src/main/java/org/apache/hello_world_soap_http/RPCLitGreeterImpl.java
Date Thu, 17 Jan 2013 06:54:31 GMT
Author: ffang
Date: Thu Jan 17 06:54:30 2013
New Revision: 1434566

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

........
  r1434564 | ffang | 2013-01-17 14:24:54 +0800 (四, 17  1 2013) | 1 line
  
  [CXF-4761]a testcase which demonstrate CXF follow jaxws spec 3.6.2.3
........

Modified:
    cxf/branches/2.7.x-fixes/   (props changed)
    cxf/branches/2.7.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerRPCLitTest.java
    cxf/branches/2.7.x-fixes/testutils/src/main/java/org/apache/hello_world_soap_http/RPCLitGreeterImpl.java

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
    svn:mergeinfo = /cxf/trunk:1434564

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Jan 17 06:54:30 2013
@@ -1 +1 @@
-/cxf/trunk:1-1430398,1430564,1430881-1430882,1430905,1430965,1430976,1431315,1431604-1431607,1432070,1432236,1432798,1433007,1433033,1433135,1433305,1433347,1433895,1434042,1434124
+/cxf/trunk:1-1430398,1430564,1430881-1430882,1430905,1430965,1430976,1431315,1431604-1431607,1432070,1432236,1432798,1433007,1433033,1433135,1433305,1433347,1433895,1434042,1434124,1434564

Modified: cxf/branches/2.7.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerRPCLitTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerRPCLitTest.java?rev=1434566&r1=1434565&r2=1434566&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerRPCLitTest.java
(original)
+++ cxf/branches/2.7.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerRPCLitTest.java
Thu Jan 17 06:54:30 2013
@@ -43,6 +43,7 @@ import javax.xml.transform.stream.Stream
 import javax.xml.ws.BindingProvider;
 import javax.xml.ws.Dispatch;
 import javax.xml.ws.Endpoint;
+import javax.xml.ws.WebServiceException;
 import javax.xml.ws.soap.SOAPFaultException;
 import javax.xml.xpath.XPathConstants;
 
@@ -52,8 +53,10 @@ import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
 import org.apache.cxf.binding.soap.Soap11;
+import org.apache.cxf.frontend.ClientProxy;
 import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.helpers.XPathUtils;
+import org.apache.cxf.interceptor.LoggingInInterceptor;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.staxutils.W3CNamespaceContext;
@@ -111,6 +114,7 @@ public class ClientServerRPCLitTest exte
         String response2 = new String("Bonjour");
         try {
             GreeterRPCLit greeter = service.getPort(portName, GreeterRPCLit.class);
+            ClientProxy.getClient(greeter).getInInterceptors().add(new LoggingInInterceptor());
             updateAddressPort(greeter, PORT);
             for (int idx = 0; idx < 1; idx++) {
                 String greeting = greeter.greetMe("Milestone-" + idx);
@@ -121,6 +125,25 @@ public class ClientServerRPCLitTest exte
                 String reply = greeter.sayHi();
                 assertNotNull("no response received from service", reply);
                 assertEquals(response2, reply);
+                try {
+                    greeter.greetMe("return null");
+                    fail("should catch WebServiceException");
+                } catch (WebServiceException e) {
+                    //do nothing
+                } catch (Exception e) {
+                    fail("should catch WebServiceException");
+                    throw e;
+                }
+                
+                try {
+                    greeter.greetMe(null);
+                    fail("should catch WebServiceException");
+                } catch (WebServiceException e) {
+                    //do nothing
+                } catch (Exception e) {
+                    fail("should catch WebServiceException");
+                    throw e;
+                }
             }
         } catch (UndeclaredThrowableException ex) {
             throw (Exception)ex.getCause();

Modified: cxf/branches/2.7.x-fixes/testutils/src/main/java/org/apache/hello_world_soap_http/RPCLitGreeterImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/testutils/src/main/java/org/apache/hello_world_soap_http/RPCLitGreeterImpl.java?rev=1434566&r1=1434565&r2=1434566&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/testutils/src/main/java/org/apache/hello_world_soap_http/RPCLitGreeterImpl.java
(original)
+++ cxf/branches/2.7.x-fixes/testutils/src/main/java/org/apache/hello_world_soap_http/RPCLitGreeterImpl.java
Thu Jan 17 06:54:30 2013
@@ -37,7 +37,11 @@ public class RPCLitGreeterImpl implement
     public String greetMe(String me) {
         //System.out.println("Executing operation greetMe");
         //System.out.println("Message received: " + me + "\n");
-        return "Hello " + me;
+        if ("return null".equals(me)) {
+            return null;
+        } else {
+            return "Hello " + me;
+        }
     }
 
     public String sayHi() {



Mime
View raw message