From 7c15e6611d5681311b318db073ac7651a72adf21 Mon Sep 17 00:00:00 2001 From: slaws Date: Wed, 10 Nov 2010 12:37:38 +0000 Subject: TUSCANY-3778 - changes to demonstrate the issues described in the JIRA. The failing tests are commented out. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1033436 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/helloworld/HttpTransportTestCase.java | 27 +++++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) (limited to 'sca-java-1.x/trunk/itest/wsdlgen/src/test/java') diff --git a/sca-java-1.x/trunk/itest/wsdlgen/src/test/java/helloworld/HttpTransportTestCase.java b/sca-java-1.x/trunk/itest/wsdlgen/src/test/java/helloworld/HttpTransportTestCase.java index 22f154fbf3..8d1694d1d7 100644 --- a/sca-java-1.x/trunk/itest/wsdlgen/src/test/java/helloworld/HttpTransportTestCase.java +++ b/sca-java-1.x/trunk/itest/wsdlgen/src/test/java/helloworld/HttpTransportTestCase.java @@ -20,9 +20,9 @@ package helloworld; import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.assertNotNull; +import static junit.framework.Assert.fail; import java.io.IOException; -import java.net.HttpURLConnection; import java.net.URL; import javax.xml.namespace.QName; @@ -85,15 +85,16 @@ public class HttpTransportTestCase{ } @Test - public void testComponent1JAXWS() throws IOException { + public void testComponent1JAXWSwsgen() throws IOException { // talk to the service using JAXWS with WSDL generated from this service used wsgen // the idea here is to demonstrate that the service is providing a JAXWS compliant // interface QName serviceName = new QName("http://helloworld/", "HelloWorldImplService"); + QName portName = new QName("http://helloworld/", "HelloWorldImplPort"); URL wsdlLocation = this.getClass().getClassLoader().getResource("wsdl/HelloWorldImplService.wsdl"); Service webService = Service.create( wsdlLocation, serviceName ); - HelloWorldService wsProxy = (HelloWorldService) webService.getPort(HelloWorldService.class); + HelloWorldService wsProxy = (HelloWorldService) webService.getPort(portName, HelloWorldService.class); assertEquals("Hello Fred", wsProxy.getGreetings("Fred")); @@ -107,10 +108,24 @@ public class HttpTransportTestCase{ abean.setField3(bbean); assertEquals("Hello 3 4 1 2", wsProxy.getGreetingsDBean(abean)); +/* TUSCANY-3778 + String byteArrayString = "Hello World"; + assertEquals(byteArrayString, String.valueOf(wsProxy.getGreetingsByteArray(byteArrayString.getBytes()))); - // repeat the JAXWS call with WSDL generated by tuscany - - } + try { + wsProxy.getGreetingsException("Fred"); + fail("exception not returned"); + } catch(Exception ex) { + + } +*/ + } + + @Test + public void testComponent1JAXWStuscanygen() throws IOException { + // repeat the JAXWS call with WSDL generated by tuscany + + } @After public void stopServer() throws Exception { -- cgit v1.2.3