diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-05-15 20:58:11 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-05-15 20:58:11 +0000 |
commit | 4e0d053525da0b60b20e5c1ffc57d32d90325176 (patch) | |
tree | 34bdee572cb9f784923021d966790a211a5df791 /branches/sca-java-1.x/itest/wsdlgen | |
parent | bcf9d17195dd3abb361b0f256be2de57b718ed08 (diff) |
A tool to save to disc the WSDL for each service, with binding.ws, within all of the deployable composites in a specified contribution
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@775335 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/itest/wsdlgen')
3 files changed, 211 insertions, 83 deletions
diff --git a/branches/sca-java-1.x/itest/wsdlgen/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-1.x/itest/wsdlgen/src/main/resources/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..c7797931d2 --- /dev/null +++ b/branches/sca-java-1.x/itest/wsdlgen/src/main/resources/META-INF/sca-contribution.xml @@ -0,0 +1,23 @@ +<?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. +--> +<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" + xmlns:hw="http://helloworld"> + <deployable composite="hw:helloworldws" /> +</contribution> diff --git a/branches/sca-java-1.x/itest/wsdlgen/src/main/resources/wsdl/helloworld.wsdl b/branches/sca-java-1.x/itest/wsdlgen/src/main/resources/wsdl/helloworld.wsdl index 3dfee5414a..c76ed7b338 100644 --- a/branches/sca-java-1.x/itest/wsdlgen/src/main/resources/wsdl/helloworld.wsdl +++ b/branches/sca-java-1.x/itest/wsdlgen/src/main/resources/wsdl/helloworld.wsdl @@ -1,105 +1,210 @@ <?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/" + 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> - <schema elementFormDefault="qualified" targetNamespace="http://helloworld/" xmlns="http://www.w3.org/2001/XMLSchema"> - - <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 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="getGreetingsRequest"> - <wsdl:part element="tns:getGreetings" name="parameters"/> + <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 element="tns:getGreetingsResponse" name="parameters"/> + <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:getGreetingsRequest" name="getGreetingsRequest"/> - <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/> + <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="HelloWorldSoapBinding" type="tns:HelloWorldService"> - <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + <wsdl:binding name="HelloWorldJmsBinding" type="tns:HelloWorldService"> + <SOAP:binding style="document" + transport="http://schemas.xmlsoap.org/soap/jms" /> <wsdl:operation name="getGreetings"> - <wsdlsoap:operation soapAction=""/> - <wsdl:input name="getGreetingsRequest"> - <wsdlsoap:body use="literal"/> + <SOAP:operation soapAction="urn:getGreetings" /> + <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: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="HelloWorldJmsBinding" type="tns:HelloWorldService"> - <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/jms"/> + <wsdl:binding name="HelloWorldWSBinding" type="tns:HelloWorldService"> + <SOAP: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"/> + <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 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/HelloWorldServiceComponent"/> + <wsdl:port name="HelloWorldJmsPort" binding="tns:HelloWorldJmsBinding"> + <SOAP:address + location="jms:/queue.sample?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:51293" /> </wsdl:port> - - <wsdl:port binding="tns:HelloWorldJmsBinding" name="HelloWorldJmsPort"> - <wsdlsoap:address location="jms:/queue.sample?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:51293"/> - <!-- jms:address destinationStyle="queue" - initialContextFactory="com.ibm.NamingFactory"? - jndiProviderURL="iiop://something:900/wherever"? - jndiConnectionFactoryName="orange" - jndiDestinationName="fred"/--> - </wsdl:port> </wsdl:service> - -</wsdl:definitions> +</wsdl:definitions>
\ No newline at end of file diff --git a/branches/sca-java-1.x/itest/wsdlgen/src/test/java/helloworld/JmsTransportTestCase.java b/branches/sca-java-1.x/itest/wsdlgen/src/test/java/helloworld/JmsTransportTestCase.java index b175e27b02..fe74ef1a3d 100644 --- a/branches/sca-java-1.x/itest/wsdlgen/src/test/java/helloworld/JmsTransportTestCase.java +++ b/branches/sca-java-1.x/itest/wsdlgen/src/test/java/helloworld/JmsTransportTestCase.java @@ -61,7 +61,7 @@ public class JmsTransportTestCase{ assertEquals("Hello Smith", helloWorldService.getGreetings("Smith")); } - @Ignore + //@Ignore @Test public void testComponent2() throws IOException { HelloWorldService helloWorldService = scaDomain.getService(HelloWorldService.class, "HelloWorldServiceComponent2/HelloWorldService"); |