diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-11-10 12:37:38 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-11-10 12:37:38 +0000 |
commit | 7c15e6611d5681311b318db073ac7651a72adf21 (patch) | |
tree | 7da24c44ad327518a97e2cd2b0fa63ea8813e106 /sca-java-1.x/trunk/itest/wsdlgen/src/main | |
parent | 353403e57d555188c9101348583c76e71d3fcc36 (diff) |
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
Diffstat (limited to '')
5 files changed, 260 insertions, 79 deletions
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<ABean> bean); public String getGreetingsBBean(BBean bean); public String getGreetingsCBean(CBean bean); public String getGreetingsDBean(DBean bean); + + // collections + //public String getGreetingsBeanVector(Vector<ABean> 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);
+ }
+*/
+
+}
diff --git a/sca-java-1.x/trunk/itest/wsdlgen/src/main/resources/wsdl/HelloWorldService_TuscanyGen.wsdl b/sca-java-1.x/trunk/itest/wsdlgen/src/main/resources/wsdl/HelloWorldService_TuscanyGen.wsdl index 185aa2c649..a8bf30cb65 100644 --- a/sca-java-1.x/trunk/itest/wsdlgen/src/main/resources/wsdl/HelloWorldService_TuscanyGen.wsdl +++ b/sca-java-1.x/trunk/itest/wsdlgen/src/main/resources/wsdl/HelloWorldService_TuscanyGen.wsdl @@ -22,43 +22,74 @@ <wsdl:definitions name="HelloWorldServiceService" targetNamespace="http://helloworld/" xmlns="http://helloworld/" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" - xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:SOAP11="http://schemas.xmlsoap.org/wsdl/soap/"> + xmlns:ns4="http://yetanotherpackage/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:SOAP11="http://schemas.xmlsoap.org/wsdl/soap/"> <wsdl:types> + <xs:schema targetNamespace="http://test" version="1.0" + xmlns:__nnns="http://helloworld/" xmlns:tns="http://test" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:import namespace="http://helloworld/" /> + <xs:complexType name="aBean"> + <xs:sequence> + <xs:element minOccurs="0" name="field1" type="xs:string" /> + <xs:element minOccurs="0" name="field2" type="xs:string" /> + <xs:element minOccurs="0" name="field3" type="__nnns:bBean" /> + </xs:sequence> + </xs:complexType> + <xs:complexType final="#all" name="aBeanArray"> + <xs:sequence> + <xs:element maxOccurs="unbounded" minOccurs="0" name="item" + nillable="true" type="tns:aBean" /> + </xs:sequence> + </xs:complexType> + </xs:schema> + <xs:schema targetNamespace="http://yetanotherpackage/" + version="1.0" xmlns:tns="http://yetanotherpackage/" xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:element name="HelloWorldException" type="tns:HelloWorldException" /> + <xs:complexType name="HelloWorldException"> + <xs:sequence> + <xs:element minOccurs="0" name="message" type="xs:string" /> + </xs:sequence> + </xs:complexType> + </xs:schema> <xs:schema attributeFormDefault="qualified" elementFormDefault="unqualified" targetNamespace="http://helloworld/" xmlns:ns0="http://test" xmlns:tns="http://helloworld/" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:import namespace="http://test" /> - <xs:element name="getGreetingsBean"> + <xs:element name="getGreetingsByteArrayResponse"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="arg0" nillable="true" - type="ns0:aBean" /> + <xs:element minOccurs="0" name="return" nillable="true" + type="xs:byte" /> </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="getGreetingsDBean"> + <xs:element name="getGreetingsDBeanResponse"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="arg0" nillable="true" - type="tns:dBean" /> + <xs:element minOccurs="0" name="return" nillable="true" + type="xs:string" /> </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="getGreetings"> + <xs:element name="getGreetingsResponse"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="arg0" nillable="true" + <xs:element minOccurs="0" name="return" nillable="true" type="xs:string" /> </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="getGreetingsCBean"> + <xs:element name="getGreetingsBeanResponse"> <xs:complexType> - <xs:sequence/> + <xs:sequence> + <xs:element minOccurs="0" name="return" nillable="true" + type="xs:string" /> + </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="getGreetingsDBeanResponse"> + <xs:element name="getGreetingsBeanArrayResponse"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="return" nillable="true" @@ -66,31 +97,47 @@ </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="getGreetingsCBeanResponse"> + <xs:element name="getGreetingsBeanArray"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="return" nillable="true" - type="xs:string" /> + <xs:element maxOccurs="unbounded" minOccurs="0" name="arg0" + nillable="true" type="ns0:aBean" /> </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="getGreetingsBBean"> + <xs:element name="getGreetingsBean"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="arg0" nillable="true" - type="tns:bBean" /> + type="ns0:aBean" /> </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="getGreetingsResponse"> + <xs:element name="getGreetings"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="return" nillable="true" + <xs:element minOccurs="0" name="arg0" nillable="true" type="xs:string" /> </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="getGreetingsBeanResponse"> + <xs:element name="getGreetingsDBean"> + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" name="arg0" nillable="true" + type="tns:dBean" /> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="getGreetingsCBean"> + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" name="arg0" nillable="true" + type="" /> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="getGreetingsCBeanResponse"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="return" nillable="true" @@ -98,7 +145,7 @@ </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="getGreetingsBeanArrayResponse"> + <xs:element name="getGreetingsExceptionResponse"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="return" nillable="true" @@ -106,22 +153,39 @@ </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="getGreetingsBBeanResponse"> + <xs:element name="getGreetingsBBean"> <xs:complexType> <xs:sequence> - <xs:element minOccurs="0" name="return" nillable="true" + <xs:element minOccurs="0" name="arg0" nillable="true" + type="tns:bBean" /> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="getGreetingsByteArray"> + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" name="arg0" nillable="true" + type="xs:byte" /> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="getGreetingsException"> + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" name="arg0" nillable="true" type="xs:string" /> </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="getGreetingsBeanArray"> + <xs:element name="getGreetingsBBeanResponse"> <xs:complexType> <xs:sequence> - <xs:element maxOccurs="unbounded" minOccurs="0" name="arg0" - nillable="true" type="ns0:aBean" /> + <xs:element minOccurs="0" name="return" nillable="true" + type="xs:string" /> </xs:sequence> </xs:complexType> </xs:element> + <xs:complexType name="bBean"> <xs:sequence> <xs:element minOccurs="0" name="field1" type="xs:string" /> @@ -136,82 +200,86 @@ </xs:sequence> </xs:complexType> </xs:schema> - <xs:schema targetNamespace="http://test" version="1.0" - xmlns:__nnns="http://helloworld/" xmlns:tns="http://test" - xmlns:xs="http://www.w3.org/2001/XMLSchema"> - <xs:import namespace="http://helloworld/" /> - <xs:complexType name="aBean"> - <xs:sequence> - <xs:element minOccurs="0" name="field1" type="xs:string" /> - <xs:element minOccurs="0" name="field2" type="xs:string" /> - <xs:element minOccurs="0" name="field3" type="__nnns:bBean" /> - </xs:sequence> - </xs:complexType> - <xs:complexType final="#all" name="aBeanArray"> - <xs:sequence> - <xs:element maxOccurs="unbounded" minOccurs="0" name="item" - nillable="true" type="tns:aBean" /> - </xs:sequence> - </xs:complexType> - </xs:schema> </wsdl:types> - <wsdl:message name="getGreetingsBean"> - <wsdl:part name="getGreetingsBean" element="getGreetingsBean"> + <wsdl:message name="getGreetingsByteArrayResponse"> + <wsdl:part name="getGreetingsByteArrayResponse" element="getGreetingsByteArrayResponse"> + </wsdl:part> + </wsdl:message> + <wsdl:message name="getGreetingsDBeanResponse"> + <wsdl:part name="getGreetingsDBeanResponse" element="getGreetingsDBeanResponse"> + + </wsdl:part> + </wsdl:message> + <wsdl:message name="HelloWorldException"> + <wsdl:part name="HelloWorldException" element="ns4:HelloWorldException"> + </wsdl:part> + </wsdl:message> + <wsdl:message name="getGreetingsResponse"> + <wsdl:part name="getGreetingsResponse" element="getGreetingsResponse"> + </wsdl:part> + + </wsdl:message> + <wsdl:message name="getGreetingsBeanResponse"> + <wsdl:part name="getGreetingsBeanResponse" element="getGreetingsBeanResponse"> + </wsdl:part> + </wsdl:message> + <wsdl:message name="getGreetingsBeanArrayResponse"> + <wsdl:part name="getGreetingsBeanArrayResponse" element="getGreetingsBeanArrayResponse"> </wsdl:part> </wsdl:message> - <wsdl:message name="getGreetingsDBean"> - <wsdl:part name="getGreetingsDBean" element="getGreetingsDBean"> + <wsdl:message name="getGreetingsBeanArray"> + <wsdl:part name="getGreetingsBeanArray" element="getGreetingsBeanArray"> + </wsdl:part> + </wsdl:message> + <wsdl:message name="getGreetingsBean"> + <wsdl:part name="getGreetingsBean" element="getGreetingsBean"> </wsdl:part> </wsdl:message> <wsdl:message name="getGreetings"> + <wsdl:part name="getGreetings" element="getGreetings"> </wsdl:part> </wsdl:message> + <wsdl:message name="getGreetingsDBean"> + <wsdl:part name="getGreetingsDBean" element="getGreetingsDBean"> + </wsdl:part> + </wsdl:message> <wsdl:message name="getGreetingsCBean"> <wsdl:part name="getGreetingsCBean" element="getGreetingsCBean"> - </wsdl:part> - </wsdl:message> - <wsdl:message name="getGreetingsDBeanResponse"> - <wsdl:part name="getGreetingsDBeanResponse" element="getGreetingsDBeanResponse"> </wsdl:part> </wsdl:message> <wsdl:message name="getGreetingsCBeanResponse"> <wsdl:part name="getGreetingsCBeanResponse" element="getGreetingsCBeanResponse"> </wsdl:part> </wsdl:message> + <wsdl:message name="getGreetingsExceptionResponse"> + <wsdl:part name="getGreetingsExceptionResponse" element="getGreetingsExceptionResponse"> + </wsdl:part> + </wsdl:message> <wsdl:message name="getGreetingsBBean"> <wsdl:part name="getGreetingsBBean" element="getGreetingsBBean"> </wsdl:part> </wsdl:message> - <wsdl:message name="getGreetingsResponse"> - <wsdl:part name="getGreetingsResponse" element="getGreetingsResponse"> + <wsdl:message name="getGreetingsByteArray"> + <wsdl:part name="getGreetingsByteArray" element="getGreetingsByteArray"> </wsdl:part> </wsdl:message> - <wsdl:message name="getGreetingsBeanResponse"> - <wsdl:part name="getGreetingsBeanResponse" element="getGreetingsBeanResponse"> - </wsdl:part> - </wsdl:message> - <wsdl:message name="getGreetingsBeanArrayResponse"> - <wsdl:part name="getGreetingsBeanArrayResponse" element="getGreetingsBeanArrayResponse"> + <wsdl:message name="getGreetingsException"> + <wsdl:part name="getGreetingsException" element="getGreetingsException"> </wsdl:part> </wsdl:message> <wsdl:message name="getGreetingsBBeanResponse"> <wsdl:part name="getGreetingsBBeanResponse" element="getGreetingsBBeanResponse"> - - </wsdl:part> - </wsdl:message> - <wsdl:message name="getGreetingsBeanArray"> - <wsdl:part name="getGreetingsBeanArray" element="getGreetingsBeanArray"> </wsdl:part> </wsdl:message> <wsdl:portType name="HelloWorldService"> + <wsdl:operation name="getGreetings"> <wsdl:input message="getGreetings"> - </wsdl:input> <wsdl:output message="getGreetingsResponse"> </wsdl:output> @@ -219,11 +287,30 @@ <wsdl:operation name="getGreetingsDBean"> <wsdl:input message="getGreetingsDBean"> </wsdl:input> + <wsdl:output message="getGreetingsDBeanResponse"> </wsdl:output> + </wsdl:operation> + <wsdl:operation name="getGreetingsByteArray"> + <wsdl:input message="getGreetingsByteArray"> + </wsdl:input> + <wsdl:output message="getGreetingsByteArrayResponse"> + </wsdl:output> + </wsdl:operation> + <wsdl:operation name="getGreetingsException"> + <wsdl:input message="getGreetingsException"> + </wsdl:input> + <wsdl:output message="getGreetingsExceptionResponse"> + </wsdl:output> +<!-- TUSCANY-3778 - corrected manually + <wsdl:fault name="HelloWorldException" message="ns4:HelloWorldException"> +--> + <wsdl:fault name="HelloWorldException" message="HelloWorldException"> + </wsdl:fault> </wsdl:operation> <wsdl:operation name="getGreetingsBean"> + <wsdl:input message="getGreetingsBean"> </wsdl:input> <wsdl:output message="getGreetingsBeanResponse"> @@ -231,9 +318,9 @@ </wsdl:operation> <wsdl:operation name="getGreetingsBeanArray"> <wsdl:input message="getGreetingsBeanArray"> - </wsdl:input> <wsdl:output message="getGreetingsBeanArrayResponse"> + </wsdl:output> </wsdl:operation> <wsdl:operation name="getGreetingsBBean"> @@ -241,9 +328,9 @@ </wsdl:input> <wsdl:output message="getGreetingsBBeanResponse"> </wsdl:output> - </wsdl:operation> <wsdl:operation name="getGreetingsCBean"> + <wsdl:input message="getGreetingsCBean"> </wsdl:input> <wsdl:output message="getGreetingsCBeanResponse"> @@ -251,10 +338,10 @@ </wsdl:operation> </wsdl:portType> <wsdl:binding name="HelloWorldServiceBinding" type="HelloWorldService"> - <SOAP:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="getGreetings"> + <SOAP:operation /> <wsdl:input> <SOAP:body use="literal" /> @@ -262,9 +349,9 @@ <wsdl:output> <SOAP:body use="literal" /> </wsdl:output> - </wsdl:operation> <wsdl:operation name="getGreetingsDBean"> + <SOAP:operation /> <wsdl:input> <SOAP:body use="literal" /> @@ -272,9 +359,19 @@ <wsdl:output> <SOAP:body use="literal" /> </wsdl:output> + </wsdl:operation> + <wsdl:operation name="getGreetingsByteArray"> + <SOAP:operation /> + <wsdl:input> + <SOAP:body use="literal" /> + </wsdl:input> + <wsdl:output> + <SOAP:body use="literal" /> + </wsdl:output> </wsdl:operation> - <wsdl:operation name="getGreetingsBean"> + <wsdl:operation name="getGreetingsException"> + <SOAP:operation /> <wsdl:input> <SOAP:body use="literal" /> @@ -282,17 +379,30 @@ <wsdl:output> <SOAP:body use="literal" /> </wsdl:output> + <wsdl:fault name="HelloWorldException"> + <SOAP:fault name="HelloWorldException" use="literal" /> + </wsdl:fault> </wsdl:operation> - <wsdl:operation name="getGreetingsBeanArray"> + <wsdl:operation name="getGreetingsBean"> <SOAP:operation /> <wsdl:input> <SOAP:body use="literal" /> </wsdl:input> <wsdl:output> <SOAP:body use="literal" /> + </wsdl:output> + </wsdl:operation> + <wsdl:operation name="getGreetingsBeanArray"> + <SOAP:operation /> + <wsdl:input> + <SOAP:body use="literal" /> + </wsdl:input> + <wsdl:output> + <SOAP:body use="literal" /> + </wsdl:output> </wsdl:operation> <wsdl:operation name="getGreetingsBBean"> <SOAP:operation /> @@ -301,8 +411,8 @@ </wsdl:input> <wsdl:output> <SOAP:body use="literal" /> - </wsdl:output> + </wsdl:output> </wsdl:operation> <wsdl:operation name="getGreetingsCBean"> <SOAP:operation /> @@ -311,8 +421,8 @@ </wsdl:input> <wsdl:output> <SOAP:body use="literal" /> - </wsdl:output> + </wsdl:output> </wsdl:operation> </wsdl:binding> |