summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.x/itest
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-05-15 20:54:27 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-05-15 20:54:27 +0000
commit2811d859dec55a0be1669fb12fdb10ddc625cc0b (patch)
tree7f8c6aab1a4cb08990e37976f3383981068fd07a /branches/sca-java-1.x/itest
parentb478631a5bc3a7a01d3b62aa90138a331d858b0e (diff)
TUSCANY-3031 Ensure that JMS wire formats that don't required a data transformation work when interface.wsdl is used. Use the component type interface rather than the service
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@775328 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/itest')
-rw-r--r--branches/sca-java-1.x/itest/jms-format/src/main/resources/jmsobject/helloworld.composite3
-rw-r--r--branches/sca-java-1.x/itest/jms-format/src/main/resources/jmsobject/helloworld.wsdl452
-rw-r--r--branches/sca-java-1.x/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSObjectTestCase.java11
3 files changed, 352 insertions, 114 deletions
diff --git a/branches/sca-java-1.x/itest/jms-format/src/main/resources/jmsobject/helloworld.composite b/branches/sca-java-1.x/itest/jms-format/src/main/resources/jmsobject/helloworld.composite
index 81be76510c..3ca541c9fb 100644
--- a/branches/sca-java-1.x/itest/jms-format/src/main/resources/jmsobject/helloworld.composite
+++ b/branches/sca-java-1.x/itest/jms-format/src/main/resources/jmsobject/helloworld.composite
@@ -21,7 +21,7 @@
targetNamespace="http://helloworld"
xmlns:hw="http://helloworld"
xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
- name="helloworld">
+ name="jmsobject">
<component name="HelloWorldReferenceComponent">
<implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld.HelloWorldReferenceImpl" />
@@ -42,6 +42,7 @@
<component name="HelloWorldServiceComponent1">
<implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld.HelloWorldServiceImpl" />
<service name="HelloWorldService">
+ <interface.wsdl interface="http://helloworld.jmsobject.format.jms.binding.sca.tuscany.apache.org/#wsdl.interface(HelloWorldService)"/>
<binding.jms>
<destination name="HelloWorldService1"/>
<tuscany:wireFormat.jmsObject wrapSingle="true"/>
diff --git a/branches/sca-java-1.x/itest/jms-format/src/main/resources/jmsobject/helloworld.wsdl b/branches/sca-java-1.x/itest/jms-format/src/main/resources/jmsobject/helloworld.wsdl
index 092c56b31d..a2af528e9e 100644
--- a/branches/sca-java-1.x/itest/jms-format/src/main/resources/jmsobject/helloworld.wsdl
+++ b/branches/sca-java-1.x/itest/jms-format/src/main/resources/jmsobject/helloworld.wsdl
@@ -1,129 +1,355 @@
<?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 targetNamespace="http://helloworld" xmlns:tns="http://helloworld" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- name="helloworld">
-
+ <!--
+ * 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.jmsobject.format.jms.binding.sca.tuscany.apache.org/"
+ xmlns:tns="http://helloworld.jmsobject.format.jms.binding.sca.tuscany.apache.org/"
+ 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>
- <schema elementFormDefault="qualified" targetNamespace="http://helloworld" xmlns="http://www.w3.org/2001/XMLSchema">
-
- <xsd:complexType name="PersonType">
- <xsd:sequence>
- <xsd:element name="firstName" type="xsd:string"/>
- <xsd:element name="lastName" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <element name="getPersonGreetings">
- <complexType>
- <sequence>
- <element name="person" type="PersonType"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="getPersonGreetingsResponse">
- <complexType>
- <sequence>
- <element name="getPersonGreetingsReturn" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="getGreetings">
- <complexType>
- <sequence>
- <element name="name" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="getGreetingsResponse">
- <complexType>
- <sequence>
- <element name="getGreetingsReturn" type="xsd:string"/>
- </sequence>
- </complexType>
- </element>
-
- </schema>
+ <xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:complexType name="person">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="firstName"
+ type="xs:string" />
+ <xs:element minOccurs="0" name="lastName"
+ type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ <xs:schema targetNamespace="http://jaxb.dev.java.net/array"
+ version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:complexType final="#all" name="stringArray">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded"
+ minOccurs="0" name="item" nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType final="#all" name="anyTypeArray">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded"
+ minOccurs="0" name="item" nillable="true" type="xs:anyType" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ <xs:schema attributeFormDefault="qualified"
+ elementFormDefault="unqualified"
+ targetNamespace="http://helloworld.jmsobject.format.jms.binding.sca.tuscany.apache.org/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:import />
+ <xs:import />
+ <xs:import />
+ <xs:import />
+ <xs:element name="getObjectGreetingResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNullReturnGreetingsResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="person" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getPersonGreetings">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ nillable="true" type="person" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getPersonGreetingsResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="person" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getMultiGreetingsResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getObjectArrayGreeting">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded"
+ minOccurs="0" name="arg0" nillable="true"
+ type="xs:anyType" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getArrayGreeting">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded"
+ minOccurs="0" name="arg0" nillable="true"
+ type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getObjectArrayGreetingResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getMultiArrayGreetingsResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getObjectGreeting">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ nillable="true" type="xs:anyType" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNullReturnGreetings">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ nillable="true" type="person" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getMultiArrayGreetings">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded"
+ minOccurs="0" name="arg0" nillable="true"
+ type="xs:string" />
+ <xs:element maxOccurs="unbounded"
+ minOccurs="0" name="arg1" nillable="true"
+ type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getMultiGreetings">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ nillable="true" type="xs:string" />
+ <xs:element minOccurs="0" name="arg1"
+ nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getArrayGreetingResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:schema>
</wsdl:types>
-
- <wsdl:message name="getGreetingsRequest">
- <!-- wsdl:part element="tns:getGreetings" name="parameters"/-->
- <wsdl:part type="xsd:string" name="parameters"/>
+ <wsdl:message name="getObjectGreetingResponse">
+ <wsdl:part name="getObjectGreetingResponse" element="tns:getObjectGreetingResponse">
+ </wsdl:part>
</wsdl:message>
-
- <wsdl:message name="getGreetingsResponse">
- <!-- wsdl:part element="tns:getGreetingsResponse" name="parameters"/-->
- <wsdl:part type="xsd:string" name="parameters"/>
+ <wsdl:message name="getNullReturnGreetingsResponse">
+ <wsdl:part name="getNullReturnGreetingsResponse"
+ element="tns:getNullReturnGreetingsResponse">
+ </wsdl:part>
</wsdl:message>
-
- <!-- wsdl:message name="getPersonGreetingsRequest">
- <wsdl:part element="tns:getPersonGreetings" name="parameters"/>
+ <wsdl:message name="getPersonGreetings">
+ <wsdl:part name="getPersonGreetings" element="tns:getPersonGreetings">
+ </wsdl:part>
</wsdl:message>
-
<wsdl:message name="getPersonGreetingsResponse">
- <wsdl:part element="tns:getPersonGreetingsResponse" name="parameters"/>
- </wsdl:message-->
-
- <wsdl:portType name="HelloWorld">
- <wsdl:operation name="getGreetings">
- <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
- <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ <wsdl:part name="getPersonGreetingsResponse" element="tns:getPersonGreetingsResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getMultiGreetingsResponse">
+ <wsdl:part name="getMultiGreetingsResponse" element="tns:getMultiGreetingsResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getObjectArrayGreeting">
+ <wsdl:part name="getObjectArrayGreeting" element="tns:getObjectArrayGreeting">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getArrayGreeting">
+ <wsdl:part name="getArrayGreeting" element="tns:getArrayGreeting">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getObjectArrayGreetingResponse">
+ <wsdl:part name="getObjectArrayGreetingResponse"
+ element="tns:getObjectArrayGreetingResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getMultiArrayGreetingsResponse">
+ <wsdl:part name="getMultiArrayGreetingsResponse"
+ element="tns:getMultiArrayGreetingsResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getObjectGreeting">
+ <wsdl:part name="getObjectGreeting" element="tns:getObjectGreeting">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNullReturnGreetings">
+ <wsdl:part name="getNullReturnGreetings" element="tns:getNullReturnGreetings">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getMultiArrayGreetings">
+ <wsdl:part name="getMultiArrayGreetings" element="tns:getMultiArrayGreetings">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getMultiGreetings">
+ <wsdl:part name="getMultiGreetings" element="tns:getMultiGreetings">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getArrayGreetingResponse">
+ <wsdl:part name="getArrayGreetingResponse" element="tns:getArrayGreetingResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="HelloWorldService">
+ <wsdl:operation name="getPersonGreetings">
+ <wsdl:input message="tns:getPersonGreetings">
+ </wsdl:input>
+ <wsdl:output message="tns:getPersonGreetingsResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNullReturnGreetings">
+ <wsdl:input message="tns:getNullReturnGreetings">
+ </wsdl:input>
+ <wsdl:output message="tns:getNullReturnGreetingsResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getArrayGreeting">
+ <wsdl:input message="tns:getArrayGreeting">
+ </wsdl:input>
+ <wsdl:output message="tns:getArrayGreetingResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getMultiArrayGreetings">
+ <wsdl:input message="tns:getMultiArrayGreetings">
+ </wsdl:input>
+ <wsdl:output message="tns:getMultiArrayGreetingsResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getMultiGreetings">
+ <wsdl:input message="tns:getMultiGreetings">
+ </wsdl:input>
+ <wsdl:output message="tns:getMultiGreetingsResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getObjectGreeting">
+ <wsdl:input message="tns:getObjectGreeting">
+ </wsdl:input>
+ <wsdl:output message="tns:getObjectGreetingResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getObjectArrayGreeting">
+ <wsdl:input message="tns:getObjectArrayGreeting">
+ </wsdl:input>
+ <wsdl:output message="tns:getObjectArrayGreetingResponse">
+ </wsdl:output>
</wsdl:operation>
- <!-- wsdl:operation name="getPersonGreetings">
- <wsdl:input message="tns:getPersonGreetingsRequest" name="getPersonGreetingsRequest"/>
- <wsdl:output message="tns:getPersonGreetingsResponse" name="getPersonGreetingsResponse"/>
- </wsdl:operation-->
</wsdl:portType>
-
- <!-- wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
- <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
- <wsdl:operation name="getGreetings">
- <wsdlsoap:operation soapAction=""/>
- <wsdl:input name="getGreetingsRequest">
- <wsdlsoap:body use="literal"/>
+ <wsdl:binding name="HelloWorldServiceBinding" type="tns:HelloWorldService">
+ <SOAP:binding style="document"
+ transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="getPersonGreetings">
+ <SOAP:operation />
+ <wsdl:input>
+ <SOAP:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <SOAP:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNullReturnGreetings">
+ <SOAP:operation />
+ <wsdl:input>
+ <SOAP:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <SOAP:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getArrayGreeting">
+ <SOAP:operation />
+ <wsdl:input>
+ <SOAP:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <SOAP:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getMultiArrayGreetings">
+ <SOAP:operation />
+ <wsdl:input>
+ <SOAP:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <SOAP:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getMultiGreetings">
+ <SOAP:operation />
+ <wsdl:input>
+ <SOAP:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <SOAP:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getObjectGreeting">
+ <SOAP:operation />
+ <wsdl:input>
+ <SOAP:body use="literal" />
</wsdl:input>
- <wsdl:output name="getGreetingsResponse">
- <wsdlsoap:body use="literal"/>
+ <wsdl:output>
+ <SOAP:body use="literal" />
</wsdl:output>
</wsdl:operation>
- </wsdl:binding-->
-
- <!-- wsdl:binding name="HelloWorldSoapJmsBinding" type="tns:HelloWorld">
- <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/jms"/>
- <wsdl:operation name="getGreetings">
- <wsdlsoap:operation soapAction=""/>
- <wsdl:input name="getGreetingsRequest">
- <wsdlsoap:body use="literal"/>
+ <wsdl:operation name="getObjectArrayGreeting">
+ <SOAP:operation />
+ <wsdl:input>
+ <SOAP:body use="literal" />
</wsdl:input>
- <wsdl:output name="getGreetingsResponse">
- <wsdlsoap:body use="literal"/>
+ <wsdl:output>
+ <SOAP:body use="literal" />
</wsdl:output>
</wsdl:operation>
- </wsdl:binding-->
-
- <!-- wsdl:service name="HelloWorldService">
- <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
- <wsdlsoap:address location="http://localhost:8085/HelloWorldService"/>
+ </wsdl:binding>
+ <wsdl:service name="HelloWorldServiceService">
+ <wsdl:port name="HelloWorldServicePort" binding="tns:HelloWorldServiceBinding">
+ <SOAP:address location="/HelloWorldServiceComponent1" />
</wsdl:port>
- </wsdl:service-->
-
-</wsdl:definitions>
+ </wsdl:service>
+</wsdl:definitions> \ No newline at end of file
diff --git a/branches/sca-java-1.x/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSObjectTestCase.java b/branches/sca-java-1.x/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSObjectTestCase.java
index 7c535773b7..f22eacf93d 100644
--- a/branches/sca-java-1.x/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSObjectTestCase.java
+++ b/branches/sca-java-1.x/itest/jms-format/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSObjectTestCase.java
@@ -59,6 +59,17 @@ public class FormatJMSObjectTestCase {
helloWorldService.getGreetingsDontWrapSingle("Fred", "Bloggs"));
}
+
+ @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");
+ }
@After
public void end() {