summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.5.2/itest/wsdlgen/src
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-10-09 08:49:49 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-10-09 08:49:49 +0000
commit24e45a6f5fd47b94646276534f0377f1399ab3bb (patch)
tree67cac250d36c41fdcc5b0cd3829180468175ac8b /branches/sca-java-1.5.2/itest/wsdlgen/src
parent2566ede2ea1a755bef9522e6162f54342ea6c552 (diff)
TUSCANY-3283 generate unannotated beans into the namespace of the WSDL rather than an empty namespace
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@823459 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--branches/sca-java-1.5.2/itest/wsdlgen/src/main/java/helloworld/ABean.java13
-rw-r--r--branches/sca-java-1.5.2/itest/wsdlgen/src/main/java/helloworld/HelloWorldClientImpl.java68
-rw-r--r--branches/sca-java-1.5.2/itest/wsdlgen/src/main/java/helloworld/HelloWorldImpl.java39
-rw-r--r--branches/sca-java-1.5.2/itest/wsdlgen/src/main/java/helloworld/HelloWorldService.java11
-rw-r--r--branches/sca-java-1.5.2/itest/wsdlgen/src/main/resources/helloworld1.composite43
-rw-r--r--branches/sca-java-1.5.2/itest/wsdlgen/src/main/resources/wsdl/HelloWorldService_TuscanyGen.wsdl343
-rw-r--r--branches/sca-java-1.5.2/itest/wsdlgen/src/main/resources/wsdl/helloworld.wsdl210
-rw-r--r--branches/sca-java-1.5.2/itest/wsdlgen/src/test/java/helloworld/HttpTransportTestCase.java122
8 files changed, 629 insertions, 220 deletions
diff --git a/branches/sca-java-1.5.2/itest/wsdlgen/src/main/java/helloworld/ABean.java b/branches/sca-java-1.5.2/itest/wsdlgen/src/main/java/helloworld/ABean.java
index 8a99a81132..bcfa0f8be7 100644
--- a/branches/sca-java-1.5.2/itest/wsdlgen/src/main/java/helloworld/ABean.java
+++ b/branches/sca-java-1.5.2/itest/wsdlgen/src/main/java/helloworld/ABean.java
@@ -18,10 +18,15 @@
*/
package helloworld;
+import anotherpackage.BBean;
+
+
+
public class ABean {
protected String field1;
protected String field2;
+ protected BBean field3;
public String getField1() {
return field1;
@@ -38,5 +43,13 @@ public class ABean {
public void setField2(String field2) {
this.field2 = field2;
}
+
+ public BBean getField3() {
+ return field3;
+ }
+
+ public void setField3(BBean field3) {
+ this.field3 = field3;
+ }
}
diff --git a/branches/sca-java-1.5.2/itest/wsdlgen/src/main/java/helloworld/HelloWorldClientImpl.java b/branches/sca-java-1.5.2/itest/wsdlgen/src/main/java/helloworld/HelloWorldClientImpl.java
new file mode 100644
index 0000000000..04fbe6934a
--- /dev/null
+++ b/branches/sca-java-1.5.2/itest/wsdlgen/src/main/java/helloworld/HelloWorldClientImpl.java
@@ -0,0 +1,68 @@
+/*
+ * 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 helloworld;
+
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+import yetanotherpackage.DBean;
+
+import anotherpackage.BBean;
+import anotherpackage.CBean;
+
+/**
+ * This class implements the HelloWorld service.
+ */
+@Service(HelloWorldService.class)
+public class HelloWorldClientImpl implements HelloWorldService {
+
+ @Reference
+ protected HelloWorldService hwService;
+
+ public String getGreetings(String name) {
+ return "Hello " + hwService.getGreetings(name);
+ }
+
+ public String getGreetingsBean(ABean bean){
+ return "Hello " + hwService.getGreetingsBean(bean);
+ }
+
+ public String getGreetingsBeanArray(ABean[] bean){
+ return "Hello " + hwService.getGreetingsBeanArray(bean);
+ }
+
+ /*
+ public String getGreetingsBeanVector(Vector<ABean> bean){
+ return "Hello " + bean.get(0).getField1() + " " + bean.get(0).getField2();
+ }
+ */
+
+ public String getGreetingsBBean(BBean bean){
+ return "Hello " + hwService.getGreetingsBBean(bean);
+ }
+
+ public String getGreetingsCBean(CBean bean){
+ return "Hello " + hwService.getGreetingsCBean(bean);
+ }
+
+ public String getGreetingsDBean(DBean bean){
+ return "Hello " + hwService.getGreetingsDBean(bean);
+ }
+}
diff --git a/branches/sca-java-1.5.2/itest/wsdlgen/src/main/java/helloworld/HelloWorldImpl.java b/branches/sca-java-1.5.2/itest/wsdlgen/src/main/java/helloworld/HelloWorldImpl.java
index 83165307af..a92a819aaf 100644
--- a/branches/sca-java-1.5.2/itest/wsdlgen/src/main/java/helloworld/HelloWorldImpl.java
+++ b/branches/sca-java-1.5.2/itest/wsdlgen/src/main/java/helloworld/HelloWorldImpl.java
@@ -18,31 +18,52 @@
*/
package helloworld;
-import java.util.Vector;
+import javax.jws.WebService;
import org.osoa.sca.annotations.Service;
+import yetanotherpackage.DBean;
+
+import anotherpackage.BBean;
+import anotherpackage.CBean;
+
/**
* This class implements the HelloWorld service.
*/
+@WebService
@Service(HelloWorldService.class)
public class HelloWorldImpl implements HelloWorldService {
public String getGreetings(String name) {
return "Hello " + name;
}
-
- public String getGreetingsBean(ABean bean){
- return "Hello " + bean.getField1() + " " + bean.getField2();
+
+ public String getGreetingsBean(ABean bean) {
+ return "Hello " + bean.getField1() + " " + bean.getField2()
+ + bean.getField3().getField1() + " "
+ + bean.getField3().getField2();
}
- public String getGreetingsBeanArray(ABean[] bean){
+ public String getGreetingsBeanArray(ABean[] bean) {
return "Hello " + bean[0].getField1() + " " + bean[0].getField2();
}
-
+
/*
- public String getGreetingsBeanVector(Vector<ABean> bean){
- return "Hello " + bean.get(0).getField1() + " " + bean.get(0).getField2();
+ * public String getGreetingsBeanVector(Vector<ABean> bean){ return "Hello "
+ * + bean.get(0).getField1() + " " + bean.get(0).getField2(); }
+ */
+
+ public String getGreetingsBBean(BBean bean) {
+ return "Hello " + bean.getField1() + " " + bean.getField2();
+ }
+
+ public String getGreetingsCBean(CBean bean) {
+ return "Hello " + bean.getField1() + " " + bean.getField2();
}
- */
+
+ public String getGreetingsDBean(DBean bean) {
+ return "Hello " + bean.getField1() + " " + bean.getField2() + " "
+ + bean.getField3().getField1() + " "
+ + bean.getField3().getField2();
+ }
}
diff --git a/branches/sca-java-1.5.2/itest/wsdlgen/src/main/java/helloworld/HelloWorldService.java b/branches/sca-java-1.5.2/itest/wsdlgen/src/main/java/helloworld/HelloWorldService.java
index 6f3d57e6f7..6b0425d473 100644
--- a/branches/sca-java-1.5.2/itest/wsdlgen/src/main/java/helloworld/HelloWorldService.java
+++ b/branches/sca-java-1.5.2/itest/wsdlgen/src/main/java/helloworld/HelloWorldService.java
@@ -18,13 +18,19 @@
*/
package helloworld;
-import java.util.Vector;
+import javax.jws.WebService;
import org.osoa.sca.annotations.Remotable;
+import yetanotherpackage.DBean;
+
+import anotherpackage.BBean;
+import anotherpackage.CBean;
+
/**
* This is the business interface of the HelloWorld greetings service.
*/
+@WebService
@Remotable
public interface HelloWorldService {
@@ -32,5 +38,8 @@ public interface HelloWorldService {
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);
}
diff --git a/branches/sca-java-1.5.2/itest/wsdlgen/src/main/resources/helloworld1.composite b/branches/sca-java-1.5.2/itest/wsdlgen/src/main/resources/helloworld1.composite
new file mode 100644
index 0000000000..12d98d3453
--- /dev/null
+++ b/branches/sca-java-1.5.2/itest/wsdlgen/src/main/resources/helloworld1.composite
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://helloworld"
+ xmlns:hw="http://helloworld"
+ name="helloworldws">
+
+ <component name="HelloWorldClientComponent1">
+ <implementation.java class="helloworld.HelloWorldClientImpl" />
+ <service name="HelloWorldService">
+ <binding.sca/>
+ </service>
+ <reference name="hwService">
+ <binding.ws uri="http://L3AW203:8085/HelloWorldServiceComponent1"/>
+ </reference>
+ </component>
+
+ <component name="HelloWorldServiceComponent1">
+ <implementation.java class="helloworld.HelloWorldImpl" />
+ <service name="HelloWorldService">
+ <binding.ws uri="http://L3AW203:8085/HelloWorldServiceComponent1"/>
+ </service>
+ </component>
+
+</composite>
diff --git a/branches/sca-java-1.5.2/itest/wsdlgen/src/main/resources/wsdl/HelloWorldService_TuscanyGen.wsdl b/branches/sca-java-1.5.2/itest/wsdlgen/src/main/resources/wsdl/HelloWorldService_TuscanyGen.wsdl
new file mode 100644
index 0000000000..6c6d8c6637
--- /dev/null
+++ b/branches/sca-java-1.5.2/itest/wsdlgen/src/main/resources/wsdl/HelloWorldService_TuscanyGen.wsdl
@@ -0,0 +1,343 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+ <!--
+ * 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.
+ -->
+
+ <!--
+ Generated by pointing a browser at
+ http://l3aw203:8085/HelloWorldServiceComponent1?wsdl
+ -->
+ <!-- but with manual changes to introduce the JMS configuration -->
+
+<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/">
+ <wsdl:types>
+ <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:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0" nillable="true"
+ type="ns0:aBean" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <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="getGreetings">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0" nillable="true"
+ type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsCBean">
+ <xs:complexType>
+ <xs:sequence/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsDBeanResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" nillable="true"
+ type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsCBeanResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" nillable="true"
+ type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsBBean">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0" nillable="true"
+ type="tns:bBean" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" nillable="true"
+ type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsBeanResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" nillable="true"
+ type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsBeanArrayResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" nillable="true"
+ type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsBBeanResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" nillable="true"
+ type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsBeanArray">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="arg0"
+ nillable="true" type="ns0:aBean" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:complexType name="bBean">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="field1" type="xs:string" />
+ <xs:element minOccurs="0" name="field2" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="dBean">
+ <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="tns:bBean" />
+ </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:part>
+ </wsdl:message>
+ <wsdl:message name="getGreetingsDBean">
+ <wsdl:part name="getGreetingsDBean" element="getGreetingsDBean">
+
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getGreetings">
+ <wsdl:part name="getGreetings" element="getGreetings">
+ </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="getGreetingsBBean">
+ <wsdl:part name="getGreetingsBBean" element="getGreetingsBBean">
+ </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="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>
+ </wsdl:operation>
+ <wsdl:operation name="getGreetingsDBean">
+ <wsdl:input message="getGreetingsDBean">
+ </wsdl:input>
+ <wsdl:output message="getGreetingsDBeanResponse">
+ </wsdl:output>
+
+ </wsdl:operation>
+ <wsdl:operation name="getGreetingsBean">
+ <wsdl:input message="getGreetingsBean">
+ </wsdl:input>
+ <wsdl:output message="getGreetingsBeanResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getGreetingsBeanArray">
+ <wsdl:input message="getGreetingsBeanArray">
+
+ </wsdl:input>
+ <wsdl:output message="getGreetingsBeanArrayResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getGreetingsBBean">
+ <wsdl:input message="getGreetingsBBean">
+ </wsdl:input>
+ <wsdl:output message="getGreetingsBBeanResponse">
+ </wsdl:output>
+
+ </wsdl:operation>
+ <wsdl:operation name="getGreetingsCBean">
+ <wsdl:input message="getGreetingsCBean">
+ </wsdl:input>
+ <wsdl:output message="getGreetingsCBeanResponse">
+ </wsdl:output>
+ </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" />
+ </wsdl:input>
+ <wsdl:output>
+ <SOAP:body use="literal" />
+ </wsdl:output>
+
+ </wsdl:operation>
+ <wsdl:operation name="getGreetingsDBean">
+ <SOAP:operation />
+ <wsdl:input>
+ <SOAP:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <SOAP:body use="literal" />
+ </wsdl:output>
+
+ </wsdl:operation>
+ <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 />
+ <wsdl:input>
+ <SOAP:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <SOAP:body use="literal" />
+ </wsdl:output>
+
+ </wsdl:operation>
+ <wsdl:operation name="getGreetingsCBean">
+ <SOAP:operation />
+ <wsdl:input>
+ <SOAP:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <SOAP:body use="literal" />
+ </wsdl:output>
+
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:binding name="HelloWorldJmsBinding" type="HelloWorldService">
+ <SOAP:binding style="document" transport="http://schemas.xmlsoap.org/soap/jms" />
+ <wsdl:operation name="getGreetings">
+ <SOAP:operation />
+ <wsdl:input>
+ <SOAP:body use="literal" />
+ </wsdl:input>
+
+ <wsdl:output>
+ <SOAP:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+
+ </wsdl:binding>
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port name="HelloWorldJmsPort" binding="HelloWorldJmsBinding">
+ <SOAP:address
+ location="jms:/queue.sample?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&amp;java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp;java.naming.provider.url=tcp://localhost:51293" />
+ </wsdl:port>
+ <wsdl:port name="HelloWorldServicePort" binding="HelloWorldServiceBinding">
+ <SOAP:address location="http://l3aw203:8085/HelloWorldServiceComponent1" />
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
diff --git a/branches/sca-java-1.5.2/itest/wsdlgen/src/main/resources/wsdl/helloworld.wsdl b/branches/sca-java-1.5.2/itest/wsdlgen/src/main/resources/wsdl/helloworld.wsdl
deleted file mode 100644
index c76ed7b338..0000000000
--- a/branches/sca-java-1.5.2/itest/wsdlgen/src/main/resources/wsdl/helloworld.wsdl
+++ /dev/null
@@ -1,210 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
- <!--
- * 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.
- -->
-<wsdl:definitions name="HelloWorldServiceService"
- targetNamespace="http://helloworld/"
- xmlns:tns="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/">
- <wsdl:types>
- <xs:schema targetNamespace="http://test" version="1.0"
- xmlns:tns="http://test" xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <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: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 attributeFormDefault="qualified"
- elementFormDefault="unqualified" targetNamespace="http://helloworld/"
- xmlns:ns0="http://test" xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <xs:import namespace="http://test" />
- <xs:element name="getGreetingsBean">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="arg0"
- nillable="true" type="ns0:aBean" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getGreetings">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="arg0"
- nillable="true" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getGreetingsResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return"
- nillable="true" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getGreetingsBeanResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return"
- nillable="true" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getGreetingsBeanArrayResponse">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" name="return"
- nillable="true" type="xs:string" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="getGreetingsBeanArray">
- <xs:complexType>
- <xs:sequence>
- <xs:element maxOccurs="unbounded"
- minOccurs="0" name="arg0" nillable="true"
- type="ns0:aBean" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- </xs:schema>
- </wsdl:types>
- <wsdl:message name="getGreetingsBean">
- <wsdl:part name="getGreetingsBean" element="tns:getGreetingsBean">
- </wsdl:part>
- </wsdl:message>
- <wsdl:message name="getGreetings">
- <wsdl:part name="getGreetings" element="tns:getGreetings">
- </wsdl:part>
- </wsdl:message>
- <wsdl:message name="getGreetingsResponse">
- <wsdl:part name="getGreetingsResponse" element="tns:getGreetingsResponse">
- </wsdl:part>
- </wsdl:message>
- <wsdl:message name="getGreetingsBeanResponse">
- <wsdl:part name="getGreetingsBeanResponse" element="tns:getGreetingsBeanResponse">
- </wsdl:part>
- </wsdl:message>
- <wsdl:message name="getGreetingsBeanArrayResponse">
- <wsdl:part name="getGreetingsBeanArrayResponse"
- element="tns:getGreetingsBeanArrayResponse">
- </wsdl:part>
- </wsdl:message>
- <wsdl:message name="getGreetingsBeanArray">
- <wsdl:part name="getGreetingsBeanArray" element="tns:getGreetingsBeanArray">
- </wsdl:part>
- </wsdl:message>
- <wsdl:portType name="HelloWorldService">
- <wsdl:operation name="getGreetings">
- <wsdl:input message="tns:getGreetings">
- </wsdl:input>
- <wsdl:output message="tns:getGreetingsResponse">
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getGreetingsBean">
- <wsdl:input message="tns:getGreetingsBean">
- </wsdl:input>
- <wsdl:output message="tns:getGreetingsBeanResponse">
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getGreetingsBeanArray">
- <wsdl:input message="tns:getGreetingsBeanArray">
- </wsdl:input>
- <wsdl:output message="tns:getGreetingsBeanArrayResponse">
- </wsdl:output>
- </wsdl:operation>
- </wsdl:portType>
- <wsdl:binding name="HelloWorldJmsBinding" type="tns:HelloWorldService">
- <SOAP:binding style="document"
- transport="http://schemas.xmlsoap.org/soap/jms" />
- <wsdl:operation name="getGreetings">
- <SOAP:operation soapAction="urn:getGreetings" />
- <wsdl:input>
- <SOAP:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <SOAP:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getGreetingsBean">
- <SOAP:operation soapAction="urn:getGreetingsBean" />
- <wsdl:input>
- <SOAP:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <SOAP:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- <wsdl:operation name="getGreetingsBeanArray">
- <SOAP:operation soapAction="urn:getGreetingsBeanArray" />
- <wsdl:input>
- <SOAP:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <SOAP:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:binding name="HelloWorldWSBinding" type="tns:HelloWorldService">
- <SOAP:binding style="document"
- transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="getGreetings">
- <SOAP:operation />
- <wsdl:input>
- <SOAP:body use="literal" />
- </wsdl:input>
- <wsdl:output>
- <SOAP:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- <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:binding>
- <wsdl:service name="HelloWorldService">
- <wsdl:port name="HelloWorldJmsPort" binding="tns:HelloWorldJmsBinding">
- <SOAP:address
- location="jms:/queue.sample?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&amp;java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp;java.naming.provider.url=tcp://localhost:51293" />
- </wsdl:port>
- </wsdl:service>
-</wsdl:definitions> \ No newline at end of file
diff --git a/branches/sca-java-1.5.2/itest/wsdlgen/src/test/java/helloworld/HttpTransportTestCase.java b/branches/sca-java-1.5.2/itest/wsdlgen/src/test/java/helloworld/HttpTransportTestCase.java
new file mode 100644
index 0000000000..22f154fbf3
--- /dev/null
+++ b/branches/sca-java-1.5.2/itest/wsdlgen/src/test/java/helloworld/HttpTransportTestCase.java
@@ -0,0 +1,122 @@
+/*
+ * 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 helloworld;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertNotNull;
+
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import yetanotherpackage.DBean;
+
+import anotherpackage.BBean;
+
+/**
+ * Tests that the helloworld server is available
+ */
+public class HttpTransportTestCase{
+
+ private SCADomain scaDomain;
+
+ @Before
+ public void startServer() throws Exception {
+ scaDomain = SCADomain.newInstance("helloworld1.composite");
+ }
+
+ @Ignore
+ @Test
+ public void testWaitForInput() {
+ System.out.println("Press a key to end");
+ try {
+ System.in.read();
+ } catch (Exception ex) {
+ }
+ System.out.println("Shutting down");
+ }
+
+ @Test
+ public void testComponent1SCA() throws IOException {
+ HelloWorldService helloWorldService = scaDomain.getService(HelloWorldService.class, "HelloWorldServiceComponent1/HelloWorldService");
+ assertNotNull(helloWorldService);
+
+ HelloWorldService helloWorldClient = scaDomain.getService(HelloWorldService.class, "HelloWorldClientComponent1/HelloWorldService");
+ assertNotNull(helloWorldClient);
+
+ assertEquals("Hello Smith", helloWorldService.getGreetings("Smith"));
+ assertEquals("Hello Hello Smith", helloWorldClient.getGreetings("Smith"));
+
+ BBean bbean = new BBean();
+ bbean.setField1("1");
+ bbean.setField2("2");
+
+ DBean abean = new DBean();
+ abean.setField1("3");
+ abean.setField2("4");
+ abean.setField3(bbean);
+
+ assertEquals("Hello Hello 3 4 1 2", helloWorldClient.getGreetingsDBean(abean));
+ }
+
+ @Test
+ public void testComponent1JAXWS() 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");
+ URL wsdlLocation = this.getClass().getClassLoader().getResource("wsdl/HelloWorldImplService.wsdl");
+ Service webService = Service.create( wsdlLocation, serviceName );
+ HelloWorldService wsProxy = (HelloWorldService) webService.getPort(HelloWorldService.class);
+
+ assertEquals("Hello Fred", wsProxy.getGreetings("Fred"));
+
+ BBean bbean = new BBean();
+ bbean.setField1("1");
+ bbean.setField2("2");
+
+ DBean abean = new DBean();
+ abean.setField1("3");
+ abean.setField2("4");
+ abean.setField3(bbean);
+
+ assertEquals("Hello 3 4 1 2", wsProxy.getGreetingsDBean(abean));
+
+ // repeat the JAXWS call with WSDL generated by tuscany
+
+ }
+
+ @After
+ public void stopServer() throws Exception {
+ if (scaDomain != null) {
+ scaDomain.close();
+ }
+ }
+
+}