cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1434581 - in /cxf/branches/2.5.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 07:48:26 GMT
Author: ffang
Date: Thu Jan 17 07:48:26 2013
New Revision: 1434581

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

................
  r1434568 | ffang | 2013-01-17 15:16:20 +0800 (四, 17  1 2013) | 16 lines
  
  Merged revisions 1434566 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes
  
  ................
    r1434566 | ffang | 2013-01-17 14:54:30 +0800 (四, 17  1 2013) | 9 lines
    
    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.5.x-fixes/   (props changed)
    cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerRPCLitTest.java
    cxf/branches/2.5.x-fixes/testutils/src/main/java/org/apache/hello_world_soap_http/RPCLitGreeterImpl.java

Propchange: cxf/branches/2.5.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Thu Jan 17 07:48:26 2013
@@ -0,0 +1,3 @@
+/cxf/branches/2.6.x-fixes:1434568
+/cxf/branches/2.7.x-fixes:1434566
+/cxf/trunk:1434564

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

Modified: cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerRPCLitTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerRPCLitTest.java?rev=1434581&r1=1434580&r2=1434581&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerRPCLitTest.java
(original)
+++ cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerRPCLitTest.java
Thu Jan 17 07:48:26 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,12 @@ 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;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
@@ -109,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);
@@ -119,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.5.x-fixes/testutils/src/main/java/org/apache/hello_world_soap_http/RPCLitGreeterImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/testutils/src/main/java/org/apache/hello_world_soap_http/RPCLitGreeterImpl.java?rev=1434581&r1=1434580&r2=1434581&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/testutils/src/main/java/org/apache/hello_world_soap_http/RPCLitGreeterImpl.java
(original)
+++ cxf/branches/2.5.x-fixes/testutils/src/main/java/org/apache/hello_world_soap_http/RPCLitGreeterImpl.java
Thu Jan 17 07:48:26 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