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 --- .../main/java/helloworld/HelloWorldClientImpl.java | 11 +++++- .../src/main/java/helloworld/HelloWorldImpl.java | 12 +++++- .../main/java/helloworld/HelloWorldService.java | 12 +++++- .../yetanotherpackage/HelloWorldException.java | 44 ++++++++++++++++++++++ 4 files changed, 75 insertions(+), 4 deletions(-) create mode 100644 sca-java-1.x/trunk/itest/wsdlgen/src/main/java/yetanotherpackage/HelloWorldException.java (limited to 'sca-java-1.x/trunk/itest/wsdlgen/src/main/java') diff --git a/sca-java-1.x/trunk/itest/wsdlgen/src/main/java/helloworld/HelloWorldClientImpl.java b/sca-java-1.x/trunk/itest/wsdlgen/src/main/java/helloworld/HelloWorldClientImpl.java index 04fbe6934a..4ee6056438 100644 --- a/sca-java-1.x/trunk/itest/wsdlgen/src/main/java/helloworld/HelloWorldClientImpl.java +++ b/sca-java-1.x/trunk/itest/wsdlgen/src/main/java/helloworld/HelloWorldClientImpl.java @@ -23,6 +23,7 @@ import org.osoa.sca.annotations.Reference; import org.osoa.sca.annotations.Service; import yetanotherpackage.DBean; +import yetanotherpackage.HelloWorldException; import anotherpackage.BBean; import anotherpackage.CBean; @@ -64,5 +65,13 @@ public class HelloWorldClientImpl implements HelloWorldService { public String getGreetingsDBean(DBean bean){ return "Hello " + hwService.getGreetingsDBean(bean); - } + } + + public String getGreetingsException(String input) throws HelloWorldException { + return hwService.getGreetingsException(input); + } + + public byte[] getGreetingsByteArray(byte[] input) { + return input; + } } diff --git a/sca-java-1.x/trunk/itest/wsdlgen/src/main/java/helloworld/HelloWorldImpl.java b/sca-java-1.x/trunk/itest/wsdlgen/src/main/java/helloworld/HelloWorldImpl.java index a92a819aaf..7dc779c930 100644 --- a/sca-java-1.x/trunk/itest/wsdlgen/src/main/java/helloworld/HelloWorldImpl.java +++ b/sca-java-1.x/trunk/itest/wsdlgen/src/main/java/helloworld/HelloWorldImpl.java @@ -23,6 +23,7 @@ import javax.jws.WebService; import org.osoa.sca.annotations.Service; import yetanotherpackage.DBean; +import yetanotherpackage.HelloWorldException; import anotherpackage.BBean; import anotherpackage.CBean; @@ -65,5 +66,14 @@ public class HelloWorldImpl implements HelloWorldService { return "Hello " + bean.getField1() + " " + bean.getField2() + " " + bean.getField3().getField1() + " " + bean.getField3().getField2(); - } + } + + public String getGreetingsException(String input) throws HelloWorldException { + throw new HelloWorldException("Hello " + input); + } + + public byte[] getGreetingsByteArray(byte[] input){ + System.out.println(String.valueOf(input)); + return input; + } } diff --git a/sca-java-1.x/trunk/itest/wsdlgen/src/main/java/helloworld/HelloWorldService.java b/sca-java-1.x/trunk/itest/wsdlgen/src/main/java/helloworld/HelloWorldService.java index 6b0425d473..f62a998df2 100644 --- a/sca-java-1.x/trunk/itest/wsdlgen/src/main/java/helloworld/HelloWorldService.java +++ b/sca-java-1.x/trunk/itest/wsdlgen/src/main/java/helloworld/HelloWorldService.java @@ -23,6 +23,7 @@ import javax.jws.WebService; import org.osoa.sca.annotations.Remotable; import yetanotherpackage.DBean; +import yetanotherpackage.HelloWorldException; import anotherpackage.BBean; import anotherpackage.CBean; @@ -33,13 +34,20 @@ import anotherpackage.CBean; @WebService @Remotable public interface HelloWorldService { + + // primitives + public String getGreetings(String name); + byte[] getGreetingsByteArray(byte[] input); + String getGreetingsException(String input) throws HelloWorldException; - public String getGreetings(String name); + // beans public String getGreetingsBean(ABean bean); public String getGreetingsBeanArray(ABean[] bean); - //public String getGreetingsBeanVector(Vector bean); public String getGreetingsBBean(BBean bean); public String getGreetingsCBean(CBean bean); public String getGreetingsDBean(DBean bean); + + // collections + //public String getGreetingsBeanVector(Vector bean); } diff --git a/sca-java-1.x/trunk/itest/wsdlgen/src/main/java/yetanotherpackage/HelloWorldException.java b/sca-java-1.x/trunk/itest/wsdlgen/src/main/java/yetanotherpackage/HelloWorldException.java new file mode 100644 index 0000000000..caf0c357bb --- /dev/null +++ b/sca-java-1.x/trunk/itest/wsdlgen/src/main/java/yetanotherpackage/HelloWorldException.java @@ -0,0 +1,44 @@ +/* + * 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 yetanotherpackage; + +public class HelloWorldException extends Exception { + + public HelloWorldException() { + } + + public HelloWorldException(String message) { + super(message); + } + + public HelloWorldException(Throwable cause) { + super(cause); + } + + public HelloWorldException(String message, Throwable cause) { + super(message, cause); + } + +/* + public HelloWorldException(String message, String errorCode) { + super(message, errorCode); + } +*/ + +} -- cgit v1.2.3