diff options
Diffstat (limited to 'branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-oneway-wsclient/src')
8 files changed, 0 insertions, 319 deletions
diff --git a/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-oneway-wsclient/src/main/java/greeter/GreeterClient.java b/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-oneway-wsclient/src/main/java/greeter/GreeterClient.java deleted file mode 100644 index 1aa3dce320..0000000000 --- a/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-oneway-wsclient/src/main/java/greeter/GreeterClient.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 greeter; - -import org.osoa.sca.CompositeContext; -import org.osoa.sca.CurrentCompositeContext; - -public class GreeterClient { - - public final static void main(String[] args) throws Exception { - CompositeContext compositeContext = CurrentCompositeContext.getContext(); - GreeterLocal greeterLocal = - compositeContext.locateService(GreeterLocal.class, "GreeterServiceComponent"); - greeterLocal.greet("John"); - System.out.println("Sleeping for 5 seconds ..."); - Thread.sleep(5000); - System.out.println("Done ..."); - } -} diff --git a/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-oneway-wsclient/src/main/java/greeter/GreeterImpl.java b/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-oneway-wsclient/src/main/java/greeter/GreeterImpl.java deleted file mode 100644 index fc17992dbf..0000000000 --- a/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-oneway-wsclient/src/main/java/greeter/GreeterImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 greeter; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; - -@Scope("COMPOSITE") -public class GreeterImpl implements GreeterLocal { - - private GreeterService greeterService; - - @Reference - public void setGreeterService(GreeterService greeterService) { - this.greeterService = greeterService; - } - - public void greet(String name) { - this.greeterService.greet(name); - } -} diff --git a/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-oneway-wsclient/src/main/java/greeter/GreeterLocal.java b/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-oneway-wsclient/src/main/java/greeter/GreeterLocal.java deleted file mode 100644 index 7cf650f73b..0000000000 --- a/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-oneway-wsclient/src/main/java/greeter/GreeterLocal.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * 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 greeter; - -public interface GreeterLocal { - public void greet(String name); -} diff --git a/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-oneway-wsclient/src/main/java/greeter/GreeterService.java b/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-oneway-wsclient/src/main/java/greeter/GreeterService.java deleted file mode 100644 index 57279b8a7c..0000000000 --- a/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-oneway-wsclient/src/main/java/greeter/GreeterService.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 greeter; - -import org.osoa.sca.annotations.OneWay; -import org.osoa.sca.annotations.Remotable; -import org.osoa.sca.annotations.Service; - -@Remotable -@Service -public interface GreeterService { - @OneWay - public void greet(String name); -} diff --git a/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-oneway-wsclient/src/main/resources/META-INF/sca/default.scdl b/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-oneway-wsclient/src/main/resources/META-INF/sca/default.scdl deleted file mode 100644 index c450e10408..0000000000 --- a/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-oneway-wsclient/src/main/resources/META-INF/sca/default.scdl +++ /dev/null @@ -1,42 +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.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance" name="greeterws">
-
- <component name="GreeterServiceComponent">
- <implementation.java class="greeter.GreeterImpl" />
- </component>
-
- <component name="GreeterServiceComponent">
- <implementation.java class="greeter.GreeterImpl" />
- <reference name="greeterService">GreeterService</reference>
- </component>
-
- <reference name="GreeterService">
- <!--
- <interface.java interface="helloworld.HelloWorldService"
- callbackInterface="helloworld.HelloWorldCallback"/>
- -->
-
- <interface.wsdl xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance" interface="http://greeter#wsdl.interface(Greeter)"
- wsdli:wsdlLocation="http://greeter wsdl/greeter.wsdl" />
-
- <binding.ws endpoint="http://greeter#wsdl.endpoint(GreeterService/GreeterSoapPort)" location="wsdl/greeter.wsdl" />
- </reference>
-</composite>
diff --git a/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-oneway-wsclient/src/main/resources/wsdl/greeter.wsdl b/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-oneway-wsclient/src/main/resources/wsdl/greeter.wsdl deleted file mode 100644 index 9dfe244d8e..0000000000 --- a/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-oneway-wsclient/src/main/resources/wsdl/greeter.wsdl +++ /dev/null @@ -1,64 +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 targetNamespace="http://greeter" xmlns:tns="http://greeter" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="greeter">
-
- <wsdl:types>
- <schema elementFormDefault="qualified" targetNamespace="http://greeter" xmlns="http://www.w3.org/2001/XMLSchema">
-
- <element name="greet">
- <complexType>
- <sequence>
- <element name="name" type="xsd:string" />
- </sequence>
- </complexType>
- </element>
-
- </schema>
- </wsdl:types>
-
- <wsdl:message name="greetRequest">
- <wsdl:part element="tns:greet" name="parameters" />
- </wsdl:message>
-
- <wsdl:portType name="Greeter">
- <wsdl:operation name="greet">
- <wsdl:input message="tns:greetRequest" name="greetRequest" />
- </wsdl:operation>
- </wsdl:portType>
-
- <wsdl:binding name="GreeterSoapBinding" type="tns:Greeter">
- <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="greet">
- <wsdlsoap:operation soapAction="greet" />
- <wsdl:input name="greetRequest">
- <wsdlsoap:body use="literal" />
- </wsdl:input>
- </wsdl:operation>
- </wsdl:binding>
-
- <wsdl:service name="GreeterService">
- <wsdl:port binding="tns:GreeterSoapBinding" name="GreeterSoapPort">
- <wsdlsoap:address
- location="http://localhost:8080/sample-greeterws-oneway-1.0-incubator-SNAPSHOT/services/GreeterWebService" />
- </wsdl:port>
- </wsdl:service>
-
-</wsdl:definitions>
diff --git a/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-oneway-wsclient/src/test/java/greeter/GreeterWSOneWayClient.java b/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-oneway-wsclient/src/test/java/greeter/GreeterWSOneWayClient.java deleted file mode 100644 index 1f017744de..0000000000 --- a/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-oneway-wsclient/src/test/java/greeter/GreeterWSOneWayClient.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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 greeter; - -import org.apache.tuscany.test.SCATestCase; -import org.osoa.sca.CompositeContext; -import org.osoa.sca.CurrentCompositeContext; - -public class GreeterWSOneWayClient extends SCATestCase { - - private GreeterLocal greeterLocal; - - @Override - protected void setUp() throws Exception { - try { - setApplicationSCDL(GreeterService.class, "META-INF/sca/default.scdl"); - ClassLoader classLoader = getClass().getClassLoader(); - addExtension("test.extensions", classLoader.getResource("META-INF/tuscany/test-extensions.scdl")); - - super.setUp(); - CompositeContext compositeContext = CurrentCompositeContext.getContext(); - greeterLocal = compositeContext.locateService(GreeterLocal.class, "GreeterServiceComponent"); - } catch (Exception e) { - e.printStackTrace(); - fail(e.getMessage()); - } - } - - public void testWSClient() { - try { - greeterLocal.greet("John"); - - System.out.println("Sleeping ..."); - Thread.sleep(5000); - - System.out.println("Done ..."); - } catch (Exception e) { - e.printStackTrace(); - fail(e.getMessage()); - } - } -} diff --git a/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-oneway-wsclient/src/test/resources/META-INF/tuscany/test-extensions.scdl b/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-oneway-wsclient/src/test/resources/META-INF/tuscany/test-extensions.scdl deleted file mode 100644 index ec3643cf00..0000000000 --- a/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-oneway-wsclient/src/test/resources/META-INF/tuscany/test-extensions.scdl +++ /dev/null @@ -1,28 +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.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:system="http://tuscany.apache.org/xmlns/system/1.0-SNAPSHOT"
- name="test.extensions">
-
- <include name="org.apache.tuscany.databinding.axiom" scdlResource="META-INF/sca/databinding.axiom.scdl"/>
- <include name="org.apache.tuscany.databinding.sdo" scdlResource="META-INF/sca/databinding.sdo.scdl"/>
- <include name="org.apache.tuscany.idl.wsdl" scdlResource="META-INF/sca/idl.wsdl.scdl"/>
- <include name="org.apache.tuscany.binding.axis2" scdlResource="META-INF/sca/binding.axis2.scdl"/>
-
-</composite>
\ No newline at end of file |