diff options
Diffstat (limited to 'sca-java-1.x/trunk/itest/wsdlgen/src/test/java/helloworld/HttpTransportTestCase.java')
-rw-r--r-- | sca-java-1.x/trunk/itest/wsdlgen/src/test/java/helloworld/HttpTransportTestCase.java | 27 |
1 files changed, 21 insertions, 6 deletions
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 { |