diff options
Diffstat (limited to 'branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-async-wsclient/src/main/java/helloworld')
5 files changed, 0 insertions, 196 deletions
diff --git a/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-async-wsclient/src/main/java/helloworld/HelloWorldCallback.java b/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-async-wsclient/src/main/java/helloworld/HelloWorldCallback.java deleted file mode 100644 index adc48e85a4..0000000000 --- a/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-async-wsclient/src/main/java/helloworld/HelloWorldCallback.java +++ /dev/null @@ -1,27 +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 helloworld; - -import org.osoa.sca.annotations.Remotable; - -@Remotable -public interface HelloWorldCallback { - - public void getGreetingsCallback(String getGreetingsReturn); -} diff --git a/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-async-wsclient/src/main/java/helloworld/HelloWorldClient.java b/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-async-wsclient/src/main/java/helloworld/HelloWorldClient.java deleted file mode 100644 index f59c409f45..0000000000 --- a/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-async-wsclient/src/main/java/helloworld/HelloWorldClient.java +++ /dev/null @@ -1,40 +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 helloworld; - -import org.osoa.sca.CompositeContext; -import org.osoa.sca.CurrentCompositeContext; - -/** - * This client program shows how to invoke a web service asynchronously with a callback - */ - -public class HelloWorldClient { - - public final static void main(String[] args) throws Exception { - - CompositeContext compositeContext = CurrentCompositeContext.getContext(); - HelloWorldLocal helloWorldLocal = - compositeContext.locateService(HelloWorldLocal.class, "HelloWorldServiceComponent"); - helloWorldLocal.getGreetings("John"); - - // Sleep for 5 seconds to wait the callback to happen - Thread.sleep(5000); - } -} diff --git a/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-async-wsclient/src/main/java/helloworld/HelloWorldLocal.java b/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-async-wsclient/src/main/java/helloworld/HelloWorldLocal.java deleted file mode 100644 index a5b9074af0..0000000000 --- a/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-async-wsclient/src/main/java/helloworld/HelloWorldLocal.java +++ /dev/null @@ -1,33 +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 helloworld; - -import org.apache.tuscany.api.annotation.DataType; -import org.osoa.sca.annotations.Service; - -import commonj.sdo.DataObject; - -@Service -public interface HelloWorldLocal { - - public String getGreetings(String name); - @DataType(name="commonj.sdo.DataObject") - public String getGreetings1(DataObject name); - -} diff --git a/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-async-wsclient/src/main/java/helloworld/HelloWorldService.java b/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-async-wsclient/src/main/java/helloworld/HelloWorldService.java deleted file mode 100644 index fc64f62a7b..0000000000 --- a/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-async-wsclient/src/main/java/helloworld/HelloWorldService.java +++ /dev/null @@ -1,38 +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 helloworld; - -import org.apache.tuscany.api.annotation.DataType; -import org.osoa.sca.annotations.Callback; -import org.osoa.sca.annotations.Remotable; -import org.osoa.sca.annotations.Service; - -import commonj.sdo.DataObject; - -@Remotable -@Service -@Callback(HelloWorldCallback.class) -public interface HelloWorldService { - - public String getGreetings(String name); - @DataType(name="commonj.sdo.DataObject") - public String getGreetings1(DataObject name); - - public void getGreetingsWithCallback(String name); -} diff --git a/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-async-wsclient/src/main/java/helloworld/HelloWorldServiceComponent.java b/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-async-wsclient/src/main/java/helloworld/HelloWorldServiceComponent.java deleted file mode 100644 index 132b44efd8..0000000000 --- a/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-async-wsclient/src/main/java/helloworld/HelloWorldServiceComponent.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 helloworld; - -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; - -import commonj.sdo.DataObject; - - -/** - * This client program shows how to create an SCA runtime, start it, - * locate the HelloWorld service and invoke it. - */ - -@Service(HelloWorldLocal.class) -@Scope("COMPOSITE") -public class HelloWorldServiceComponent implements HelloWorldLocal, HelloWorldCallback { - - HelloWorldService helloWorldService; - - public String getGreetings(String name) { - - return helloWorldService.getGreetings(name); - } - - public HelloWorldService getHelloWorldService() { - return helloWorldService; - } - - public void setHelloWorldService(HelloWorldService helloWorldService) { - this.helloWorldService = helloWorldService; - } - - public String getGreetings1(DataObject name) { - return helloWorldService.getGreetings1(name); - } - - public void getGreetingsCallback(String getGreetingsReturn) { - System.out.println("Callback: " + getGreetingsReturn); - } -} |