Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0A8ADED15 for ; Thu, 17 Jan 2013 07:49:12 +0000 (UTC) Received: (qmail 21349 invoked by uid 500); 17 Jan 2013 07:49:11 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 21219 invoked by uid 500); 17 Jan 2013 07:49:10 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 21193 invoked by uid 99); 17 Jan 2013 07:49:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Jan 2013 07:49:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Jan 2013 07:49:08 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id A513023889DA; Thu, 17 Jan 2013 07:48:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 -0000 To: commits@cxf.apache.org From: ffang@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130117074826.A513023889DA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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() {