Return-Path: Delivered-To: apmail-incubator-cxf-commits-archive@locus.apache.org Received: (qmail 19467 invoked from network); 6 Feb 2007 06:01:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Feb 2007 06:01:54 -0000 Received: (qmail 85231 invoked by uid 500); 6 Feb 2007 06:02:00 -0000 Delivered-To: apmail-incubator-cxf-commits-archive@incubator.apache.org Received: (qmail 85176 invoked by uid 500); 6 Feb 2007 06:02:00 -0000 Mailing-List: contact cxf-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cxf-dev@incubator.apache.org Delivered-To: mailing list cxf-commits@incubator.apache.org Received: (qmail 85167 invoked by uid 99); 6 Feb 2007 06:02:00 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Feb 2007 22:02:00 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Feb 2007 22:01:52 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id 76FAC1A981A; Mon, 5 Feb 2007 22:01:32 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r504004 - in /incubator/cxf/trunk: systests/src/test/java/org/apache/cxf/systest/jaxws/ testutils/ testutils/src/main/java/org/apache/hello_world_xml_http/mixed/ testutils/src/main/resources/wsdl/ Date: Tue, 06 Feb 2007 06:01:32 -0000 To: cxf-commits@incubator.apache.org From: jliu@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070206060132.76FAC1A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jliu Date: Mon Feb 5 22:01:30 2007 New Revision: 504004 URL: http://svn.apache.org/viewvc?view=rev&rev=504004 Log: Added system test for mixed style XML binding. Added: incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_xml_http/mixed/ incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_xml_http/mixed/GreeterImpl.java (with props) incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_xml_mixed.wsdl (with props) Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLTest.java incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServerXMLBinding.java incubator/cxf/trunk/testutils/pom.xml Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLTest.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLTest.java?view=diff&rev=504004&r1=504003&r2=504004 ============================================================================== --- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLTest.java (original) +++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLTest.java Mon Feb 5 22:01:30 2007 @@ -53,6 +53,8 @@ import org.apache.hello_world_xml_http.bare.Greeter; import org.apache.hello_world_xml_http.bare.XMLService; import org.apache.hello_world_xml_http.bare.types.MyComplexStructType; +import org.apache.hello_world_xml_http.mixed.types.SayHi; +import org.apache.hello_world_xml_http.mixed.types.SayHiResponse; import org.apache.hello_world_xml_http.wrapped.GreeterFaultImpl; import org.apache.hello_world_xml_http.wrapped.PingMeFault; @@ -63,8 +65,13 @@ private final QName wrapServiceName = new QName("http://apache.org/hello_world_xml_http/wrapped", "XMLService"); + private final QName mixedServiceName = new QName("http://apache.org/hello_world_xml_http/mixed", + "XMLService"); + private final QName wrapPortName = new QName("http://apache.org/hello_world_xml_http/wrapped", "XMLPort"); + private final QName mixedPortName = new QName("http://apache.org/hello_world_xml_http/mixed", "XMLPort"); + private final QName wrapFakePortName = new QName("http://apache.org/hello_world_xml_http/wrapped", "FakePort"); @@ -160,6 +167,37 @@ reply = greeter.sayHi(); assertNotNull("no response received from service", reply); assertEquals(response2, reply); + + greeter.greetMeOneWay(System.getProperty("user.name")); + + } catch (UndeclaredThrowableException ex) { + throw (Exception) ex.getCause(); + } + } + + public void testMixedConnection() throws Exception { + + org.apache.hello_world_xml_http.mixed.XMLService service = + new org.apache.hello_world_xml_http.mixed.XMLService( + this.getClass().getResource("/wsdl/hello_world_xml_mixed.wsdl"), mixedServiceName); + assertNotNull(service); + + String response1 = new String("Hello "); + String response2 = new String("Bonjour"); + try { + org.apache.hello_world_xml_http.mixed.Greeter greeter = service.getPort(mixedPortName, + org.apache.hello_world_xml_http.mixed.Greeter.class); + String username = System.getProperty("user.name"); + String reply = greeter.greetMe(username); + + assertNotNull("no response received from service", reply); + assertEquals(response1 + username, reply); + + SayHi request = new SayHi(); + + SayHiResponse response = greeter.sayHi1(request); + assertNotNull("no response received from service", response); + assertEquals(response2, response.getResponseType()); greeter.greetMeOneWay(System.getProperty("user.name")); Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServerXMLBinding.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServerXMLBinding.java?view=diff&rev=504004&r1=504003&r2=504004 ============================================================================== --- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServerXMLBinding.java (original) +++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServerXMLBinding.java Mon Feb 5 22:01:30 2007 @@ -45,6 +45,10 @@ Object implementor2 = new HeaderTesterImpl(); address = "http://localhost:9034/XMLContext/XMLPort"; Endpoint.publish(address, implementor2); + + Object implementor3 = new org.apache.hello_world_xml_http.mixed.GreeterImpl(); + address = "http://localhost:9028/XMLService/XMLPort"; + Endpoint.publish(address, implementor3); } public static void main(String[] args) { Modified: incubator/cxf/trunk/testutils/pom.xml URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/pom.xml?view=diff&rev=504004&r1=504003&r2=504004 ============================================================================== --- incubator/cxf/trunk/testutils/pom.xml (original) +++ incubator/cxf/trunk/testutils/pom.xml Mon Feb 5 22:01:30 2007 @@ -209,6 +209,9 @@ ${basedir}/src/main/resources/wsdl/swa-mime.wsdl + ${basedir}/src/main/resources/wsdl/hello_world_xml_mixed.wsdl + + ${basedir}/src/main/resources/wsdl/hello_world_xml_bare.wsdl Added: incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_xml_http/mixed/GreeterImpl.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_xml_http/mixed/GreeterImpl.java?view=auto&rev=504004 ============================================================================== --- incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_xml_http/mixed/GreeterImpl.java (added) +++ incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_xml_http/mixed/GreeterImpl.java Mon Feb 5 22:01:30 2007 @@ -0,0 +1,59 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.hello_world_xml_http.mixed; + +import org.apache.hello_world_xml_http.mixed.types.FaultDetail; +import org.apache.hello_world_xml_http.mixed.types.SayHi; +import org.apache.hello_world_xml_http.mixed.types.SayHiResponse; + +@javax.jws.WebService(serviceName = "XMLService", + portName = "XMLPort", + endpointInterface = "org.apache.hello_world_xml_http.mixed.Greeter", + targetNamespace = "http://apache.org/hello_world_xml_http/mixed") + +@javax.xml.ws.BindingType(value = "http://cxf.apache.org/bindings/xformat") + +public class GreeterImpl implements Greeter { + + public String greetMe(String me) { + System.out.println("Executing operation greetMe\n"); + return "Hello " + me; + } + + public void greetMeOneWay(String me) { + System.out.println("Executing operation greetMeOneWay\n"); + System.out.println("Hello there " + me); + } + + public SayHiResponse sayHi1(SayHi in) { + System.out.println("Executing operation sayHi1\n"); + SayHiResponse response = new SayHiResponse(); + response.setResponseType("Bonjour"); + return response; + + } + + public void pingMe() throws PingMeFault { + FaultDetail faultDetail = new FaultDetail(); + faultDetail.setMajor((short)2); + faultDetail.setMinor((short)1); + throw new PingMeFault("PingMeFault raised by server", faultDetail); + } +} Propchange: incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_xml_http/mixed/GreeterImpl.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/cxf/trunk/testutils/src/main/java/org/apache/hello_world_xml_http/mixed/GreeterImpl.java ------------------------------------------------------------------------------ svn:keywords = Rev Date Added: incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_xml_mixed.wsdl URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_xml_mixed.wsdl?view=auto&rev=504004 ============================================================================== --- incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_xml_mixed.wsdl (added) +++ incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_xml_mixed.wsdl Mon Feb 5 22:01:30 2007 @@ -0,0 +1,169 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Propchange: incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_xml_mixed.wsdl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_xml_mixed.wsdl ------------------------------------------------------------------------------ svn:keywords = Rev Date Propchange: incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_xml_mixed.wsdl ------------------------------------------------------------------------------ svn:mime-type = text/xml