diff options
author | dims <dims@13f79535-47bb-0310-9956-ffa450edef68> | 2008-06-17 00:23:01 +0000 |
---|---|---|
committer | dims <dims@13f79535-47bb-0310-9956-ffa450edef68> | 2008-06-17 00:23:01 +0000 |
commit | bdd0a41aed7edf21ec2a65cfa17a86af2ef8c48a (patch) | |
tree | 38a92061c0793434c4be189f1d70c3458b6bc41d /sandbox/sebastien/java/sca-node/itest/wsdl-multiple/src/main |
Move Tuscany from Incubator to top level.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@668359 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/sebastien/java/sca-node/itest/wsdl-multiple/src/main')
8 files changed, 352 insertions, 0 deletions
diff --git a/sandbox/sebastien/java/sca-node/itest/wsdl-multiple/src/main/java/helloworld/HelloWorldCallback.java b/sandbox/sebastien/java/sca-node/itest/wsdl-multiple/src/main/java/helloworld/HelloWorldCallback.java new file mode 100644 index 0000000000..842ae0a692 --- /dev/null +++ b/sandbox/sebastien/java/sca-node/itest/wsdl-multiple/src/main/java/helloworld/HelloWorldCallback.java @@ -0,0 +1,30 @@ +/* + * 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.Remotable; + +/** + * This is the business interface of the HelloWorld greetings service. + */ +@Remotable +public interface HelloWorldCallback { + + public void getGreetingsCallback(String name); +} diff --git a/sandbox/sebastien/java/sca-node/itest/wsdl-multiple/src/main/java/helloworld/HelloWorldClientImpl.java b/sandbox/sebastien/java/sca-node/itest/wsdl-multiple/src/main/java/helloworld/HelloWorldClientImpl.java new file mode 100644 index 0000000000..d2d898e9c4 --- /dev/null +++ b/sandbox/sebastien/java/sca-node/itest/wsdl-multiple/src/main/java/helloworld/HelloWorldClientImpl.java @@ -0,0 +1,42 @@ +/* + * 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.Scope; + +/** + * This client program shows how to create an SCA runtime, start it, + * locate the HelloWorld service and invoke it. + */ +@Scope("COMPOSITE") +public class HelloWorldClientImpl implements HelloWorldService, HelloWorldCallback { + + @Reference + protected HelloWorldService helloWorldService; + + public void getGreetings(String name) { + helloWorldService.getGreetings(name); + } + + public void getGreetingsCallback(String name) { + System.out.println("Callback " + name); + } + +}
\ No newline at end of file diff --git a/sandbox/sebastien/java/sca-node/itest/wsdl-multiple/src/main/java/helloworld/HelloWorldService.java b/sandbox/sebastien/java/sca-node/itest/wsdl-multiple/src/main/java/helloworld/HelloWorldService.java new file mode 100644 index 0000000000..d4fbd434fe --- /dev/null +++ b/sandbox/sebastien/java/sca-node/itest/wsdl-multiple/src/main/java/helloworld/HelloWorldService.java @@ -0,0 +1,32 @@ +/* + * 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.Callback; +import org.osoa.sca.annotations.Remotable; + +/** + * This is the business interface of the HelloWorld greetings service. + */ +@Remotable +@Callback(HelloWorldCallback.class) +public interface HelloWorldService { + + public void getGreetings(String name); +} diff --git a/sandbox/sebastien/java/sca-node/itest/wsdl-multiple/src/main/java/helloworld/HelloWorldServiceImpl.java b/sandbox/sebastien/java/sca-node/itest/wsdl-multiple/src/main/java/helloworld/HelloWorldServiceImpl.java new file mode 100644 index 0000000000..a46f763960 --- /dev/null +++ b/sandbox/sebastien/java/sca-node/itest/wsdl-multiple/src/main/java/helloworld/HelloWorldServiceImpl.java @@ -0,0 +1,37 @@ +/* + * 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.Callback; +import org.osoa.sca.annotations.Service; + +/** + * This class implements the HelloWorld service. + */ +@Service(HelloWorldService.class) +public class HelloWorldServiceImpl implements HelloWorldService { + + @Callback + protected HelloWorldCallback helloWorldCallback; + + public void getGreetings(String name) { + helloWorldCallback.getGreetingsCallback(name); + } + +} diff --git a/sandbox/sebastien/java/sca-node/itest/wsdl-multiple/src/main/resources/auto-wsdl.composite b/sandbox/sebastien/java/sca-node/itest/wsdl-multiple/src/main/resources/auto-wsdl.composite new file mode 100644 index 0000000000..20d4193227 --- /dev/null +++ b/sandbox/sebastien/java/sca-node/itest/wsdl-multiple/src/main/resources/auto-wsdl.composite @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" + xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance" + name="autohelloworldws"> + + <component name="HelloWorldClientComponent"> + <implementation.java class="helloworld.HelloWorldClientImpl"/> + <reference name="helloWorldService"> + <binding.ws uri="http://localhost:8085/HelloWorldServiceComponent"/> + <callback> + <binding.ws uri="http://localhost:8085/HelloWorldClientComponent/helloWorldService"/> + </callback> + </reference> + </component> + + <component name="HelloWorldServiceComponent"> + <implementation.java class="helloworld.HelloWorldServiceImpl"/> + <service name="HelloWorldService"> + <interface.java interface="helloworld.HelloWorldService" callbackInterface="helloworld.HelloWorldCallback"/> + <binding.ws uri="http://localhost:8085/HelloWorldServiceComponent"/> + <callback> + <binding.ws uri="http://localhost:8085/HelloWorldClientComponent/helloWorldService"/> + </callback> + </service> + </component> +</composite>
\ No newline at end of file diff --git a/sandbox/sebastien/java/sca-node/itest/wsdl-multiple/src/main/resources/manual-wsdl.composite b/sandbox/sebastien/java/sca-node/itest/wsdl-multiple/src/main/resources/manual-wsdl.composite new file mode 100644 index 0000000000..6c8e7e094f --- /dev/null +++ b/sandbox/sebastien/java/sca-node/itest/wsdl-multiple/src/main/resources/manual-wsdl.composite @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" + xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance" + name="manualhelloworldws"> + + <component name="HelloWorldClientComponent"> + <implementation.java class="helloworld.HelloWorldClientImpl"/> + <reference name="helloWorldService"> + <binding.ws wsdlElement="http://helloworld#wsdl.port(HelloWorldService/HelloWorldServiceSOAP11port)"/> + <callback> + <binding.ws uri="http://localhost:8085/HelloWorldClientComponent/helloWorldService" + wsdlElement="http://helloworld#wsdl.binding(HelloWorldCallbackSOAP11Binding)"/> + </callback> + </reference> + </component> + + <component name="HelloWorldServiceComponent"> + <implementation.java class="helloworld.HelloWorldServiceImpl"/> + <service name="HelloWorldService"> + <interface.java interface="helloworld.HelloWorldService" callbackInterface="helloworld.HelloWorldCallback"/> + <binding.ws wsdlElement="http://helloworld#wsdl.port(HelloWorldService/HelloWorldServiceSOAP11port)"/> + <callback> + <binding.ws uri="http://localhost:8085/HelloWorldClientComponent/helloWorldService" + wsdlElement="http://helloworld#wsdl.binding(HelloWorldCallbackSOAP11Binding)"/> + </callback> + </service> + </component> +</composite>
\ No newline at end of file diff --git a/sandbox/sebastien/java/sca-node/itest/wsdl-multiple/src/main/resources/wsdl/helloworld.HelloWorldCallback.wsdl b/sandbox/sebastien/java/sca-node/itest/wsdl-multiple/src/main/resources/wsdl/helloworld.HelloWorldCallback.wsdl new file mode 100644 index 0000000000..38e2c13b27 --- /dev/null +++ b/sandbox/sebastien/java/sca-node/itest/wsdl-multiple/src/main/resources/wsdl/helloworld.HelloWorldCallback.wsdl @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?> +<wsdl:definitions targetNamespace="http://helloworld" + xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" + xmlns:ns="http://helloworld/xsd" + xmlns:axis2="http://helloworld"> + <wsdl:types> + <xs:schema attributeFormDefault="qualified" + elementFormDefault="qualified" + targetNamespace="http://helloworld/xsd" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:element name="getGreetingsCallback"> + <xs:complexType> + <xs:sequence> + <xs:element name="param0" nillable="true" + type="xs:string" /> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="getGreetingsCallbackResponse"> + <xs:complexType/> + </xs:element> + </xs:schema> + </wsdl:types> + <wsdl:message name="getGreetingsCallbackMessage"> + <wsdl:part name="part1" element="ns:getGreetingsCallback"> + </wsdl:part> + </wsdl:message> + <wsdl:message name="getGreetingsCallbackResponseMessage"> + <wsdl:part name="part1" element="ns:getGreetingsCallbackResponse"> + </wsdl:part> + </wsdl:message> + <wsdl:portType name="HelloWorldCallbackPortType"> + <wsdl:operation name="getGreetingsCallback"> + <wsdl:input message="axis2:getGreetingsCallbackMessage"> + </wsdl:input> + <wsdl:output message="axis2:getGreetingsCallbackResponseMessage"> + </wsdl:output> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="HelloWorldCallbackSOAP11Binding" + type="axis2:HelloWorldCallbackPortType"> + <soap:binding style="document" + transport="http://schemas.xmlsoap.org/soap/http" /> + <wsdl:operation name="getGreetingsCallback"> + <soap:operation soapAction="urn:getGreetingsCallback" + style="document" /> + <wsdl:input> + <soap:body use="literal" namespace="http://helloworld" /> + </wsdl:input> + </wsdl:operation> + </wsdl:binding> + <wsdl:binding name="HelloWorldCallbackSOAP12Binding" + type="axis2:HelloWorldCallbackPortType"> + <soap12:binding style="document" + transport="http://schemas.xmlsoap.org/soap/http" /> + <wsdl:operation name="getGreetingsCallback"> + <soap12:operation soapAction="urn:getGreetingsCallback" + style="document" /> + <wsdl:input> + <soap12:body use="literal" namespace="http://helloworld" /> + </wsdl:input> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="HelloWorldCallback"> + <wsdl:port name="HelloWorldCallbackSOAP11port" + binding="axis2:HelloWorldCallbackSOAP11Binding"> + <soap:address + location="http://localhost:8085/axis2/services/HelloWorldCallback" /> + </wsdl:port> + <wsdl:port name="HelloWorldCallbackSOAP12port" + binding="axis2:HelloWorldCallbackSOAP12Binding"> + <soap12:address + location="http://localhost:8085/axis2/services/HelloWorldCallback" /> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> diff --git a/sandbox/sebastien/java/sca-node/itest/wsdl-multiple/src/main/resources/wsdl/helloworld.HelloWorldService.wsdl b/sandbox/sebastien/java/sca-node/itest/wsdl-multiple/src/main/resources/wsdl/helloworld.HelloWorldService.wsdl new file mode 100644 index 0000000000..b0ac630573 --- /dev/null +++ b/sandbox/sebastien/java/sca-node/itest/wsdl-multiple/src/main/resources/wsdl/helloworld.HelloWorldService.wsdl @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8"?> +<wsdl:definitions targetNamespace="http://helloworld" + xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" + xmlns:ns="http://helloworld/xsd" + xmlns:axis2="http://helloworld"> + <wsdl:types> + <xs:schema attributeFormDefault="qualified" + elementFormDefault="qualified" + targetNamespace="http://helloworld/xsd" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:element name="getGreetings"> + <xs:complexType> + <xs:sequence> + <xs:element name="param0" nillable="true" type="xs:string" /> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="getGreetingsResponse"> + <xs:complexType/> + </xs:element> + </xs:schema> + </wsdl:types> + <wsdl:message name="getGreetingsMessage"> + <wsdl:part name="part1" element="ns:getGreetings"></wsdl:part> + </wsdl:message> + <wsdl:message name="getGreetingsResponseMessage"> + <wsdl:part name="part1" element="ns:getGreetingsResponse"></wsdl:part> + </wsdl:message> + <wsdl:portType name="HelloWorldServicePortType"> + <wsdl:operation name="getGreetings"> + <wsdl:input message="axis2:getGreetingsMessage"> + </wsdl:input> + <wsdl:output message="axis2:getGreetingsResponseMessage"> + </wsdl:output> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="HelloWorldServiceSOAP12Binding" + type="axis2:HelloWorldServicePortType"> + <soap12:binding style="document" + transport="http://schemas.xmlsoap.org/soap/http" /> + <wsdl:operation name="getGreetings"> + <soap12:operation soapAction="urn:getGreetings" + style="document" /> + <wsdl:input> + <soap12:body use="literal" namespace="http://helloworld" /> + </wsdl:input> + </wsdl:operation> + </wsdl:binding> + <wsdl:binding name="HelloWorldServiceSOAP11Binding" + type="axis2:HelloWorldServicePortType"> + <soap:binding style="document" + transport="http://schemas.xmlsoap.org/soap/http" /> + <wsdl:operation name="getGreetings"> + <soap:operation soapAction="urn:getGreetings" + style="document" /> + <wsdl:input> + <soap:body use="literal" namespace="http://helloworld" /> + </wsdl:input> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="HelloWorldService"> + <wsdl:port name="HelloWorldServiceSOAP11port" + binding="axis2:HelloWorldServiceSOAP11Binding"> + <soap:address + location="http://localhost:8085/axis2/services/HelloWorldService" /> + </wsdl:port> + <wsdl:port name="HelloWorldServiceSOAP12port" + binding="axis2:HelloWorldServiceSOAP12Binding"> + <soap12:address + location="http://localhost:8085/axis2/services/HelloWorldService" /> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> |