summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src')
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCABindingInvoker.java105
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCABindingProviderFactory.java68
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCAReferenceBindingProvider.java186
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCAServiceBindingProvider.java157
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCAServiceProvider.java79
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory19
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/AsynchTestCase.java74
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/BaseTest.java96
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/CallbackTestCase.java82
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/PromotionTestCase.java76
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/SimpleTestCase.java108
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/TestDistributedSCADomainImpl.java124
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/TestServiceDiscoveryImpl.java140
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldCallbackRemote.java29
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldClient.java27
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackOnewayRemote.java33
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackRemote.java31
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceLocal.java27
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote.java29
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote2.java29
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java44
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java42
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientLocalImpl.java36
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemote2Impl.java37
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemoteImpl.java36
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java36
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java35
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceLocalImpl.java30
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java41
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceRemoteImpl.java30
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeA/HelloWorld.composite71
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeA/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeB/HelloWorld.composite70
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeB/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeC/HelloWorld.composite33
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeC/HelloWorldComponent.composite37
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeC/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeD/HelloWorld.composite32
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeD/HelloWorldComponent.composite37
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeD/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeE/HelloWorld.composite31
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeE/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeF/HelloWorld.composite41
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeF/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeG/HelloWorld.composite31
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeG/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeH/HelloWorld.composite36
-rw-r--r--sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeH/META-INF/sca-contribution.xml24
48 files changed, 2497 insertions, 0 deletions
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCABindingInvoker.java b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCABindingInvoker.java
new file mode 100644
index 0000000000..c1a39cfecb
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCABindingInvoker.java
@@ -0,0 +1,105 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.sca.axis2.impl;
+
+import java.net.URL;
+
+import org.apache.tuscany.sca.invocation.Interceptor;
+import org.apache.tuscany.sca.invocation.Invoker;
+import org.apache.tuscany.sca.invocation.Message;
+import org.apache.tuscany.sca.runtime.EndpointReference;
+import org.osoa.sca.ServiceUnavailableException;
+
+/**
+ * A wrapper for the Axis2BindingInvoker that ensures that the url of the target
+ * service is correct by looking it up in the service registry if it is not provided
+ *
+ * @version $Rev: 563772 $ $Date: 2007-08-08 07:50:49 +0100 (Wed, 08 Aug 2007) $
+ */
+public class Axis2SCABindingInvoker implements Interceptor {
+
+ private Invoker axis2Invoker;
+ private Axis2SCAReferenceBindingProvider provider;
+
+ public Axis2SCABindingInvoker(Axis2SCAReferenceBindingProvider provider, Invoker axis2Invoker) {
+ this.axis2Invoker = axis2Invoker;
+ this.provider = provider;
+ }
+
+ public void setNext(Invoker next) {
+ }
+
+ public Invoker getNext() {
+ return null;
+ }
+
+ /**
+ * Fix up the URL for the message. The "to" EndPoint comes from the wire
+ * target and needs to b replaced with the endpoint from the registry.
+ * The default URL for an Endpoint URI where there is no
+ * target component or service information, as in the case of a
+ * wire crossing a node boundary, is "/"
+ */
+ public Message invoke(Message msg) {
+
+ // make sure that the epr of the target service is set in the TO
+ // field of the message
+ EndpointReference ep = msg.getTo();
+
+ // check to see if we either don't have an endpoint set or if the uri
+ // is dynamic or the target service is marked as unresolved
+ if ((ep == null) ||
+ ((ep != null) && (ep.getURI().equals("/"))) ||
+ ((ep != null) && (ep.getContract() == null)) ||
+ ((ep != null) && (ep.getContract().isUnresolved()))){
+
+ EndpointReference serviceEPR = provider.getServiceEndpoint();
+
+ if ( serviceEPR == null){
+ throw new ServiceUnavailableException("Endpoint for service: " +
+ provider.getSCABinding().getURI() +
+ " can't be found for component: " +
+ provider.getComponent().getName() +
+ " reference: " +
+ provider.getComponentReference().getName());
+ }
+ msg.setTo(serviceEPR);
+ }
+
+ // make sure that the epr of the callback service (if there is one) is set
+ // in the FROM field of the message.
+ ep = msg.getFrom();
+
+ if ((ep == null) ||
+ (ep != null) && (ep.getURI().equals("/")) ){
+
+ EndpointReference callbackEPR = provider.getCallbackEndpoint();
+
+ if ( callbackEPR != null){
+ msg.setTo(callbackEPR);
+ }
+ }
+
+
+
+ // do the axis2 stuff
+ return axis2Invoker.invoke(msg);
+ }
+
+}
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCABindingProviderFactory.java b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCABindingProviderFactory.java
new file mode 100644
index 0000000000..0ae598481c
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCABindingProviderFactory.java
@@ -0,0 +1,68 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.sca.axis2.impl;
+
+import org.apache.tuscany.sca.binding.sca.DistributedSCABinding;
+import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.host.http.ServletHost;
+import org.apache.tuscany.sca.host.http.ServletHostExtensionPoint;
+import org.apache.tuscany.sca.invocation.MessageFactory;
+import org.apache.tuscany.sca.provider.BindingProviderFactory;
+import org.apache.tuscany.sca.provider.ReferenceBindingProvider;
+import org.apache.tuscany.sca.provider.ServiceBindingProvider;
+import org.apache.tuscany.sca.runtime.RuntimeComponent;
+import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
+import org.apache.tuscany.sca.runtime.RuntimeComponentService;
+
+/**
+ * The factory for the Axis2 based implementation of the distributed sca binding
+ *
+ * @version $Rev: 563772 $ $Date: 2007-08-08 07:50:49 +0100 (Wed, 08 Aug 2007) $
+ */
+public class Axis2SCABindingProviderFactory implements BindingProviderFactory<DistributedSCABinding> {
+
+ private MessageFactory messageFactory;
+ private ServletHost servletHost;
+
+ public Axis2SCABindingProviderFactory(ExtensionPointRegistry extensionPoints) {
+ ServletHostExtensionPoint servletHosts = extensionPoints.getExtensionPoint(ServletHostExtensionPoint.class);
+ this.servletHost = servletHosts.getServletHosts().get(0);
+ ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ this.messageFactory = modelFactories.getFactory(MessageFactory.class);
+ }
+
+ public ReferenceBindingProvider createReferenceBindingProvider(RuntimeComponent component,
+ RuntimeComponentReference reference,
+ DistributedSCABinding binding) {
+ return new Axis2SCAReferenceBindingProvider(component, reference, binding, servletHost, messageFactory);
+ }
+
+ public ServiceBindingProvider createServiceBindingProvider(RuntimeComponent component,
+ RuntimeComponentService service,
+ DistributedSCABinding binding) {
+ return new Axis2SCAServiceBindingProvider(component, service, binding, servletHost, messageFactory);
+ }
+
+ public Class<DistributedSCABinding> getModelType() {
+ return DistributedSCABinding.class;
+ }
+
+}
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCAReferenceBindingProvider.java b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCAReferenceBindingProvider.java
new file mode 100644
index 0000000000..33db44fe3f
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCAReferenceBindingProvider.java
@@ -0,0 +1,186 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.sca.axis2.impl;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.tuscany.sca.assembly.Binding;
+import org.apache.tuscany.sca.assembly.SCABinding;
+import org.apache.tuscany.sca.binding.sca.DistributedSCABinding;
+import org.apache.tuscany.sca.binding.sca.impl.SCABindingImpl;
+import org.apache.tuscany.sca.binding.ws.DefaultWebServiceBindingFactory;
+import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
+import org.apache.tuscany.sca.binding.ws.axis2.Axis2ReferenceBindingProvider;
+import org.apache.tuscany.sca.binding.ws.axis2.Java2WSDLHelper;
+import org.apache.tuscany.sca.core.assembly.EndpointReferenceImpl;
+import org.apache.tuscany.sca.distributed.domain.DistributedSCADomain;
+import org.apache.tuscany.sca.distributed.management.ServiceDiscovery;
+import org.apache.tuscany.sca.host.http.ServletHost;
+import org.apache.tuscany.sca.interfacedef.InterfaceContract;
+import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceContract;
+import org.apache.tuscany.sca.invocation.Invoker;
+import org.apache.tuscany.sca.invocation.MessageFactory;
+import org.apache.tuscany.sca.provider.ReferenceBindingProvider2;
+import org.apache.tuscany.sca.runtime.EndpointReference;
+import org.apache.tuscany.sca.runtime.RuntimeComponent;
+import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
+
+/**
+ * The reference binding provider for the remote sca binding implementation. Relies on the
+ * binding-ws-axis implementation for sending messages to remote services to this provider
+ * just uses the ws-axis provider.
+ *
+ * @version $Rev: 563772 $ $Date: 2007-08-08 07:50:49 +0100 (Wed, 08 Aug 2007) $
+ */
+public class Axis2SCAReferenceBindingProvider implements ReferenceBindingProvider2 {
+
+ private RuntimeComponent component;
+ private RuntimeComponentReference reference;
+ private SCABinding binding;
+ private Axis2ReferenceBindingProvider axisReferenceBindingProvider;
+ private WebServiceBinding wsBinding;
+
+ private EndpointReference serviceEPR = null;
+ private EndpointReference callbackEPR = null;
+
+ public Axis2SCAReferenceBindingProvider(RuntimeComponent component,
+ RuntimeComponentReference reference,
+ DistributedSCABinding binding,
+ ServletHost servletHost,
+ MessageFactory messageFactory) {
+ this.component = component;
+ this.reference = reference;
+ this.binding = binding.getSCABinding();
+ wsBinding = (new DefaultWebServiceBindingFactory()).createWebServiceBinding();
+
+ // Turn the java interface contract into a wsdl interface contract
+ InterfaceContract contract = reference.getInterfaceContract();
+ if ((contract instanceof JavaInterfaceContract)) {
+ contract = Java2WSDLHelper.createWSDLInterfaceContract((JavaInterfaceContract)contract);
+ }
+
+ // Set to use the Axiom data binding
+ contract.getInterface().setDefaultDataBinding(OMElement.class.getName());
+
+ wsBinding.setBindingInterfaceContract(contract);
+ wsBinding.setName(this.binding.getName());
+
+ axisReferenceBindingProvider = new Axis2ReferenceBindingProvider(component,
+ reference,
+ wsBinding,
+ servletHost,
+ messageFactory);
+ }
+
+ public InterfaceContract getBindingInterfaceContract() {
+ return wsBinding.getBindingInterfaceContract();
+ }
+
+ public boolean supportsAsyncOneWayInvocation() {
+ return false;
+ }
+
+ public Invoker createInvoker(Operation operation) {
+ return new Axis2SCABindingInvoker(this, axisReferenceBindingProvider.createInvoker(operation));
+ }
+
+ @Deprecated
+ public Invoker createInvoker(Operation operation, boolean isCallback) {
+ if (isCallback) {
+ throw new UnsupportedOperationException();
+ } else {
+ return createInvoker(operation);
+ }
+ }
+
+ /**
+ * Uses the distributed domain service discovery feature to locate remote
+ * service endpoints
+ *
+ * @return An EPR for the target service that this reference refers to
+ */
+ public EndpointReference getServiceEndpoint(){
+
+ if ( serviceEPR == null ){
+ // try to resolve the service endpoint with the registry
+ DistributedSCADomain distributedDomain = ((SCABindingImpl)binding).getDistributedDomain();
+ ServiceDiscovery serviceDiscovery = distributedDomain.getServiceDiscovery();
+
+ // The binding URI might be null in the case where this reference is completely
+ // dynamic, for example, in the case of callbacks
+ if (binding.getURI() != null) {
+ String serviceUrl = serviceDiscovery.findServiceEndpoint(distributedDomain.getDomainName(),
+ binding.getURI(),
+ SCABinding.class.getName());
+
+ if ( (serviceUrl != null ) &&
+ (!serviceUrl.equals(""))){
+ serviceEPR = new EndpointReferenceImpl(serviceUrl);
+ }
+ }
+ }
+
+ return serviceEPR;
+ }
+
+ /**
+ * Retrieves the uri of the callback service (that this reference has created)
+ * returns null if there is no callback service for the sca binding
+ *
+ * @return the callback endpoint
+ */
+ public EndpointReference getCallbackEndpoint(){
+ if (callbackEPR == null) {
+ if (reference.getCallbackService() != null) {
+ for (Binding callbackBinding : reference.getCallbackService().getBindings()) {
+ if (callbackBinding instanceof SCABinding) {
+ callbackEPR = new EndpointReferenceImpl(reference.getName() + "/" + callbackBinding.getName());
+ continue;
+ }
+ }
+ }
+ }
+ return callbackEPR;
+ }
+
+
+ public SCABinding getSCABinding () {
+ return binding;
+ }
+
+ public RuntimeComponent getComponent () {
+ return component;
+ }
+
+ public RuntimeComponentReference getComponentReference () {
+ return reference;
+ }
+
+ public void start() {
+ // Try and resolve the service endpoint just in case it is available now
+ getServiceEndpoint();
+ axisReferenceBindingProvider.start();
+ }
+
+ public void stop() {
+ axisReferenceBindingProvider.stop();
+ }
+
+}
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCAServiceBindingProvider.java b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCAServiceBindingProvider.java
new file mode 100644
index 0000000000..eeb43cfd99
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCAServiceBindingProvider.java
@@ -0,0 +1,157 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.sca.axis2.impl;
+
+import java.net.URI;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.tuscany.sca.assembly.SCABinding;
+import org.apache.tuscany.sca.binding.sca.DistributedSCABinding;
+import org.apache.tuscany.sca.binding.sca.impl.SCABindingImpl;
+import org.apache.tuscany.sca.binding.ws.DefaultWebServiceBindingFactory;
+import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
+import org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider;
+import org.apache.tuscany.sca.binding.ws.axis2.Java2WSDLHelper;
+import org.apache.tuscany.sca.distributed.domain.DistributedSCADomain;
+import org.apache.tuscany.sca.distributed.management.ServiceDiscovery;
+import org.apache.tuscany.sca.host.http.ServletHost;
+import org.apache.tuscany.sca.interfacedef.InterfaceContract;
+import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceContract;
+import org.apache.tuscany.sca.invocation.Invoker;
+import org.apache.tuscany.sca.invocation.MessageFactory;
+import org.apache.tuscany.sca.provider.ServiceBindingProvider2;
+import org.apache.tuscany.sca.runtime.RuntimeComponent;
+import org.apache.tuscany.sca.runtime.RuntimeComponentService;
+
+/**
+ * The service binding provider for the remote sca binding implementation. Relies on the
+ * binding-ws-axis implementation for providing a remote message endpoint for this service
+ *
+ * @version $Rev: 563772 $ $Date: 2007-08-08 07:50:49 +0100 (Wed, 08 Aug 2007) $
+ */
+public class Axis2SCAServiceBindingProvider implements ServiceBindingProvider2 {
+
+ private SCABinding binding;
+ private Axis2ServiceProvider axisProvider;
+ private WebServiceBinding wsBinding;
+
+ private boolean started = false;
+
+
+ public Axis2SCAServiceBindingProvider(RuntimeComponent component,
+ RuntimeComponentService service,
+ DistributedSCABinding binding,
+ ServletHost servletHost,
+ MessageFactory messageFactory) {
+ this.binding = binding.getSCABinding();
+ wsBinding = (new DefaultWebServiceBindingFactory()).createWebServiceBinding();
+
+ // Turn the java interface contract into a wsdl interface contract
+ InterfaceContract contract = service.getInterfaceContract();
+ if ((contract instanceof JavaInterfaceContract)) {
+ contract = Java2WSDLHelper.createWSDLInterfaceContract((JavaInterfaceContract)contract);
+ }
+
+ // Set to use the Axiom data binding
+ contract.getInterface().setDefaultDataBinding(OMElement.class.getName());
+
+ wsBinding.setBindingInterfaceContract(contract);
+ wsBinding.setName(this.binding.getName());
+ wsBinding.setURI(this.binding.getURI());
+
+ axisProvider = new Axis2SCAServiceProvider(component,
+ service,
+ this.binding,
+ wsBinding,
+ servletHost,
+ messageFactory);
+
+ //this.binding.setURI(wsBinding.getURI());
+
+ // get the url out of the binding and send it to the registry if
+ // a distributed domain is configured
+ DistributedSCADomain distributedDomain = ((SCABindingImpl)this.binding).getDistributedDomain();
+
+ ServiceDiscovery serviceDiscovery = distributedDomain.getServiceDiscovery();
+
+ // register endpoint against the path element of the binding uri
+ String componentName = this.binding.getURI();
+
+ try {
+ URI servicePath = new URI(this.binding.getURI());
+ componentName = servicePath.getPath();
+
+ // strinp any leading slash
+ if (componentName.charAt(0) == '/'){
+ componentName = componentName.substring(1, componentName.length());
+ }
+ } catch(Exception ex) {
+ // do nothing, the binding uri string will be used
+ }
+
+
+ serviceDiscovery.registerServiceEndpoint(distributedDomain.getDomainName(),
+ distributedDomain.getNodeName(),
+ componentName,
+ SCABinding.class.getName(),
+ wsBinding.getURI());
+
+/*
+ serviceDiscovery.registerServiceEndpoint(distributedDomain.getDomainName(),
+ distributedDomain.getNodeName(),
+ component.getName(),
+ SCABinding.class.getName(),
+ wsBinding.getURI());
+ serviceDiscovery.registerServiceEndpoint(distributedDomain.getDomainName(),
+ distributedDomain.getNodeName(),
+ component.getName() + "/" + this.binding.getName(),
+ SCABinding.class.getName(),
+ wsBinding.getURI());
+*/
+ }
+
+ public InterfaceContract getBindingInterfaceContract() {
+ return wsBinding.getBindingInterfaceContract();
+ }
+
+ public boolean supportsAsyncOneWayInvocation() {
+ return false;
+ }
+
+ public Invoker createCallbackInvoker(Operation operation) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void start() {
+ if (started) {
+ return;
+ } else {
+ started = true;
+ }
+
+ axisProvider.start();
+ }
+
+ public void stop() {
+ axisProvider.stop();
+ }
+
+}
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCAServiceProvider.java b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCAServiceProvider.java
new file mode 100644
index 0000000000..fd7b2cdb29
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCAServiceProvider.java
@@ -0,0 +1,79 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.sca.axis2.impl;
+
+import org.apache.tuscany.sca.assembly.Binding;
+import org.apache.tuscany.sca.assembly.SCABinding;
+import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
+import org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider;
+import org.apache.tuscany.sca.host.http.ServletHost;
+import org.apache.tuscany.sca.invocation.MessageFactory;
+import org.apache.tuscany.sca.runtime.RuntimeComponent;
+import org.apache.tuscany.sca.runtime.RuntimeComponentService;
+
+/**
+ * A specialization of the Axis2BindingProvider that just switches in the SCABinding model
+ * element when it is required. The SCABinding is required as the service binding provider
+ * finds the service wire based in the binding
+ *
+ * @version $Rev: 563772 $ $Date: 2007-08-08 07:50:49 +0100 (Wed, 08 Aug 2007) $
+ */
+public class Axis2SCAServiceProvider extends Axis2ServiceProvider {
+
+ private SCABinding binding;
+
+ /**
+ * Switch in the fake ws binding
+ *
+ * @param component
+ * @param service
+ * @param binding
+ * @param wsBinding
+ * @param servletHost
+ * @param messageFactory
+ */
+ public Axis2SCAServiceProvider(RuntimeComponent component,
+ RuntimeComponentService service,
+ SCABinding binding,
+ WebServiceBinding wsBinding,
+ ServletHost servletHost,
+ MessageFactory messageFactory) {
+
+ super(component,
+ service,
+ wsBinding,
+ servletHost,
+ messageFactory);
+
+ this.binding = binding;
+ }
+
+ /**
+ * Return the sca binding as wires will be registered against this rather
+ * than against the wsBinding that the Axis2SCAServiceProvider is
+ * expecting
+ *
+ * @return the binding
+ */
+ @Override
+ protected Binding getBinding(){
+ return binding;
+ }
+}
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory
new file mode 100644
index 0000000000..1b369cde06
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory
@@ -0,0 +1,19 @@
+# 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.
+
+# Implementation class for the binding extension
+org.apache.tuscany.sca.binding.sca.axis2.impl.Axis2SCABindingProviderFactory;model=org.apache.tuscany.sca.binding.sca.DistributedSCABinding
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/AsynchTestCase.java b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/AsynchTestCase.java
new file mode 100644
index 0000000000..dc52e1710d
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/AsynchTestCase.java
@@ -0,0 +1,74 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.sca.axis2;
+
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientCallbackOnewayRemoteImpl;
+import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class AsynchTestCase extends BaseTest {
+
+ public static EmbeddedSCADomain domainA;
+ public static EmbeddedSCADomain domainB;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ System.out.println("Setting up distributed nodes");
+
+ try {
+ // create and start domainA
+ domainA = createDomain("nodeG");
+ domainB = createDomain("nodeH");
+ startDomain(domainA);
+ startDomain(domainB);
+
+ } catch (Exception ex) {
+ System.err.println("Exception when creating domain " + ex.getMessage());
+ ex.printStackTrace(System.err);
+ throw ex;
+ }
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ // stop the nodes and hence the domains they contain
+ stopDomain(domainA);
+ stopDomain(domainB);
+ }
+
+ @Test
+ public void testHelloWorldAsynch() throws Exception {
+ HelloWorldClient helloWorldClientB;
+ helloWorldClientB = domainA.getService(HelloWorldClient.class, "AHelloWorldClientCallbackRemote");
+ helloWorldClientB.getGreetings("fred");
+ System.out.println("Sleeping ...");
+ Thread.sleep(2000);
+ System.out.println("... Done");
+ Assert.assertEquals("callback fred", HelloWorldClientCallbackOnewayRemoteImpl.result );
+
+ }
+
+
+}
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/BaseTest.java b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/BaseTest.java
new file mode 100644
index 0000000000..fd72232dbd
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/BaseTest.java
@@ -0,0 +1,96 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.sca.axis2;
+
+import java.net.URL;
+
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceLocal;
+import org.apache.tuscany.sca.contribution.Contribution;
+import org.apache.tuscany.sca.contribution.service.ContributionService;
+import org.apache.tuscany.sca.distributed.domain.DistributedSCADomain;
+import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+
+public class BaseTest {
+
+ public static String DEFULT_DOMAIN_NAME = "mydomain";
+
+ public static EmbeddedSCADomain createDomain(String nodeName) throws Exception {
+ ClassLoader cl = BaseTest.class.getClassLoader();
+ EmbeddedSCADomain domain = null;
+
+ try {
+ // Create the distributed domain representation
+ TestDistributedSCADomainImpl distributedDomain = new TestDistributedSCADomainImpl(DEFULT_DOMAIN_NAME);
+ distributedDomain.setNodeName(nodeName);
+
+ // create and start domainA
+ domain = new EmbeddedSCADomain(cl, DEFULT_DOMAIN_NAME);
+ domain.start();
+
+ // add a contribution to the domain
+ ContributionService contributionService = domain.getContributionService();
+
+ // find the current directory as a URL. This is where our contribution
+ // will come from
+ URL contributionURL = Thread.currentThread().getContextClassLoader().getResource(nodeName + "/");
+
+ // Contribute the SCA application
+ Contribution contribution = contributionService.contribute("http://calculator", contributionURL, null, //resolver,
+ false);
+ Composite composite = contribution.getDeployables().get(0);
+
+ // Add the deployable composite to the domain
+ domain.getDomainComposite().getIncludes().add(composite);
+ domain.getCompositeBuilder().build(composite);
+
+ distributedDomain.addDistributedDomainToBindings(composite);
+
+ domain.getCompositeActivator().activate(composite);
+ } catch (Exception ex) {
+ System.err.println("Exception when creating domain " + ex.getMessage());
+ ex.printStackTrace(System.err);
+ throw ex;
+ }
+ return domain;
+ }
+
+ public static void startDomain(EmbeddedSCADomain domain)
+ throws Exception {
+ try {
+ // Start domain
+ for (Composite composite : domain.getDomainComposite().getIncludes()) {
+ domain.getCompositeActivator().start(composite);
+ }
+
+ } catch (Exception ex) {
+ System.err.println("Exception when creating domain " + ex.getMessage());
+ ex.printStackTrace(System.err);
+ throw ex;
+ }
+ }
+
+ public static void stopDomain(EmbeddedSCADomain domain) throws Exception {
+ // stop the domain
+ domain.stop();
+ }
+
+}
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/CallbackTestCase.java b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/CallbackTestCase.java
new file mode 100644
index 0000000000..b43c127301
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/CallbackTestCase.java
@@ -0,0 +1,82 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.sca.axis2;
+
+import java.net.URL;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceLocal;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote;
+import org.apache.tuscany.sca.contribution.Contribution;
+import org.apache.tuscany.sca.contribution.service.ContributionService;
+import org.apache.tuscany.sca.distributed.domain.DistributedSCADomain;
+import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class CallbackTestCase extends BaseTest {
+
+ public static EmbeddedSCADomain domainA;
+ public static EmbeddedSCADomain domainB;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ System.out.println("Setting up distributed nodes");
+
+ try {
+ // create and start domainA
+ domainA = createDomain("nodeE");
+ domainB = createDomain("nodeF");
+ startDomain(domainA);
+ startDomain(domainB);
+
+ } catch (Exception ex) {
+ System.err.println("Exception when creating domain " + ex.getMessage());
+ ex.printStackTrace(System.err);
+ throw ex;
+ }
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ // stop the nodes and hence the domains they contain
+ stopDomain(domainA);
+ stopDomain(domainB);
+ }
+
+ //@Test
+ public void testHelloWorldCallbackLocal() throws Exception {
+ HelloWorldClient helloWorldClientB;
+ helloWorldClientB = domainB.getService(HelloWorldClient.class, "BHelloWorldClientCallbackLocal");
+ Assert.assertEquals("Hello callback fred", helloWorldClientB.getGreetings("fred"));
+ }
+
+ @Test
+ public void testHelloWorldCallbackRemote() throws Exception {
+ HelloWorldClient helloWorldClientA;
+ helloWorldClientA = domainA.getService(HelloWorldClient.class, "AHelloWorldClientCallbackRemote");
+ Assert.assertEquals("Hello callback fred", helloWorldClientA.getGreetings("fred"));
+
+ }
+
+}
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/PromotionTestCase.java b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/PromotionTestCase.java
new file mode 100644
index 0000000000..1814a2959c
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/PromotionTestCase.java
@@ -0,0 +1,76 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.sca.axis2;
+
+import java.net.URL;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceLocal;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote;
+import org.apache.tuscany.sca.contribution.Contribution;
+import org.apache.tuscany.sca.contribution.service.ContributionService;
+import org.apache.tuscany.sca.distributed.domain.DistributedSCADomain;
+import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class PromotionTestCase extends BaseTest {
+
+ public static EmbeddedSCADomain domainA;
+ public static EmbeddedSCADomain domainB;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ System.out.println("Setting up distributed nodes");
+
+ try {
+ // create and start domainA
+ domainA = createDomain("nodeC");
+ domainB = createDomain("nodeD");
+ startDomain(domainA);
+ startDomain(domainB);
+
+ } catch (Exception ex) {
+ System.err.println("Exception when creating domain " + ex.getMessage());
+ ex.printStackTrace(System.err);
+ throw ex;
+ }
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ // stop the nodes and hence the domains they contain
+ stopDomain(domainA);
+ stopDomain(domainB);
+ }
+
+ @Test
+ public void testHelloWorldPromotion() throws Exception {
+/*
+ HelloWorldClient helloWorldClientA;
+ helloWorldClientA = domainA.getService(HelloWorldClient.class, "AHelloWorldClientRemotePromotion");
+ Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred");
+*/
+ }
+
+}
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/SimpleTestCase.java b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/SimpleTestCase.java
new file mode 100644
index 0000000000..a58a32dc4c
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/SimpleTestCase.java
@@ -0,0 +1,108 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.sca.axis2;
+
+import java.net.URL;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceLocal;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote;
+import org.apache.tuscany.sca.contribution.Contribution;
+import org.apache.tuscany.sca.contribution.service.ContributionService;
+import org.apache.tuscany.sca.distributed.domain.DistributedSCADomain;
+import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class SimpleTestCase extends BaseTest {
+
+ public static EmbeddedSCADomain domainA;
+ public static EmbeddedSCADomain domainB;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ System.out.println("Setting up distributed nodes");
+
+ try {
+ // create and start domainA
+ domainA = createDomain("nodeA");
+ domainB = createDomain("nodeB");
+ startDomain(domainA);
+ startDomain(domainB);
+
+ } catch (Exception ex) {
+ System.err.println("Exception when creating domain " + ex.getMessage());
+ ex.printStackTrace(System.err);
+ throw ex;
+ }
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ // stop the nodes and hence the domains they contain
+ stopDomain(domainA);
+ stopDomain(domainB);
+ }
+
+ @Test
+ public void testHelloWorldLocal() throws Exception {
+ HelloWorldClient helloWorldClientA = domainA.getService(HelloWorldClient.class, "AHelloWorldClientLocal");
+ Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred");
+
+ }
+
+ @Test
+ public void testHelloWorldRemote() throws Exception {
+ HelloWorldClient helloWorldClientA;
+ helloWorldClientA = domainA.getService(HelloWorldClient.class, "AHelloWorldClientRemote");
+ Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred");
+
+ }
+
+ @Test
+ public void testHelloWorldLocalAndRemote() throws Exception {
+ HelloWorldClient helloWorldClientA = domainA.getService(HelloWorldClient.class, "AHelloWorldClientLocalAndRemote");
+ HelloWorldClient helloWorldClientB = domainB.getService(HelloWorldClient.class, "BHelloWorldClientLocalAndRemote");
+ Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred");
+ Assert.assertEquals(helloWorldClientB.getGreetings("fred"), "Hello fred");
+ }
+
+ @Test
+ public void testHelloWorldMultipleServices() throws Exception {
+ HelloWorldClient helloWorldClientA = domainA.getService(HelloWorldClient.class, "AHelloWorldClientMultipleServices");
+ HelloWorldClient helloWorldClientA2 = domainA.getService(HelloWorldClient.class, "AHelloWorldClientMultipleServices2");
+ HelloWorldClient helloWorldClientB = domainB.getService(HelloWorldClient.class, "BHelloWorldClientMultipleServices");
+ Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred");
+ Assert.assertEquals(helloWorldClientA2.getGreetings("fred"), "Hello fred");
+ Assert.assertEquals(helloWorldClientB.getGreetings("fred"), "Hello fred");
+ }
+
+ //@Test
+ public void testHelloWorldMultipleBindings() throws Exception {
+ HelloWorldClient helloWorldClientA;
+ helloWorldClientA = domainA.getService(HelloWorldClient.class, "AHelloWorldClientMultipleBindings");
+ Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred");
+
+ }
+
+}
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/TestDistributedSCADomainImpl.java b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/TestDistributedSCADomainImpl.java
new file mode 100644
index 0000000000..177fee62f8
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/TestDistributedSCADomainImpl.java
@@ -0,0 +1,124 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.sca.axis2;
+
+import org.apache.tuscany.sca.assembly.Binding;
+import org.apache.tuscany.sca.assembly.Component;
+import org.apache.tuscany.sca.assembly.ComponentReference;
+import org.apache.tuscany.sca.assembly.ComponentService;
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.assembly.SCABinding;
+import org.apache.tuscany.sca.binding.sca.impl.SCABindingImpl;
+import org.apache.tuscany.sca.distributed.domain.DistributedSCADomain;
+import org.apache.tuscany.sca.distributed.management.ServiceDiscovery;
+
+/**
+ * A local representation of the sca domain distributed across a number
+ * of separate nodes. This provides access to various information relating
+ * to the distributed domain
+ *
+ * @version $Rev: 552343 $ $Date: 2007-07-01 18:43:40 +0100 (Sun, 01 Jul 2007) $
+ */
+public class TestDistributedSCADomainImpl implements DistributedSCADomain {
+
+ private String nodeName;
+ private String domainName;
+ private static ServiceDiscovery serviceDiscovery;
+
+ public TestDistributedSCADomainImpl(String domainName){
+ this.domainName = domainName;
+
+ if (serviceDiscovery == null) {
+ serviceDiscovery = new TestServiceDiscoveryImpl();
+ }
+ }
+
+ /**
+ * Returns the name of the node that this part of the
+ * distributed domain is running on
+ *
+ * @return the node name
+ */
+ public String getNodeName(){
+ return nodeName;
+ }
+
+ public void setNodeName(String nodeName){
+ this.nodeName = nodeName;
+ }
+
+ public String getDomainName(){
+ return domainName;
+ }
+
+ public void setDomainName(String domainName){
+ this.domainName = domainName;
+ }
+
+ public ServiceDiscovery getServiceDiscovery(){
+ return serviceDiscovery;
+ }
+
+ public void addDistributedDomainToBindings(Composite composite){
+ // traverse the composite adding in the distributed domain
+ // reference into all sca bindings.
+ for(Component component : composite.getComponents()){
+ for (ComponentService service : component.getServices()) {
+ for(Binding binding : service.getBindings()){
+ if (binding instanceof SCABinding) {
+ // TODO could do with changing the sca binding SPI
+ // to carry this piece of information
+ SCABindingImpl scaBinding = (SCABindingImpl)binding;
+ scaBinding.setDistributedDomain(this);
+ }
+ }
+ }
+
+ for (ComponentReference reference : component.getReferences()) {
+ for(Binding binding : reference.getBindings()){
+ if (binding instanceof SCABinding) {
+ // TODO could do with changing the sca binding SPI
+ // to carry this piece of information
+ SCABindingImpl scaBinding = (SCABindingImpl)binding;
+ scaBinding.setDistributedDomain(this);
+ }
+ }
+
+ // and reference targets. strange one this but the wiring puts
+ // all the bindings into a references target if the target remains
+ // unresolved after building
+ // This actually the only ones we really need to set as by now
+ // the service and reference bindings will already be resolved
+ // but it's not doing any hame for the time being
+ for ( ComponentService target : reference.getTargets()){
+ for(Binding binding : target.getBindings()){
+ if (binding instanceof SCABinding) {
+ // TODO could do with changing the sca binding SPI
+ // to carry this piece of information
+ SCABindingImpl scaBinding = (SCABindingImpl)binding;
+ scaBinding.setDistributedDomain(this);
+ }
+ }
+ }
+ }
+ }
+ }
+
+}
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/TestServiceDiscoveryImpl.java b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/TestServiceDiscoveryImpl.java
new file mode 100644
index 0000000000..0aa3cd27a3
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/TestServiceDiscoveryImpl.java
@@ -0,0 +1,140 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.sca.axis2;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.tuscany.sca.distributed.management.ServiceDiscovery;
+
+
+/**
+ * Stores details of services exposed and retrieves details of remote services
+ *
+ * @version $Rev: 552343 $ $Date: 2007-07-01 18:43:40 +0100 (Sun, 01 Jul 2007) $
+ */
+public class TestServiceDiscoveryImpl implements ServiceDiscovery{
+
+ List<ServiceEndpoint> serviceEndpoints = new ArrayList<ServiceEndpoint>();
+
+ public class ServiceEndpoint {
+ private String domainUri;
+ private String nodeUri;
+ private String serviceName;
+ private String bindingName;
+ private String url;
+
+ public ServiceEndpoint(String domainUri, String nodeUri, String serviceName, String bindingName, String URL){
+ this.domainUri = domainUri;
+ this.nodeUri = nodeUri;
+ this.serviceName = serviceName;
+ this.bindingName = bindingName;
+ this.url = URL;
+ }
+
+ public boolean match(String domainUri, String serviceName, String bindingName) {
+ // trap the case where the we are trying to map
+ // ComponentName/Service name with a registered ComponentName - this is OK
+ // ComponentName with a registered ComponentName/ServiceName - this should fail
+
+ boolean serviceNameMatch = false;
+
+ if (this.serviceName.equals(serviceName)) {
+ serviceNameMatch = true;
+ } else {
+ int s = serviceName.indexOf('/');
+ if ((s != -1) &&
+ (this.serviceName.equals(serviceName.substring(0, s)))){
+ serviceNameMatch = true;
+ }
+ }
+
+ return ((this.domainUri.equals(domainUri)) &&
+ (serviceNameMatch) &&
+ (this.bindingName.equals(bindingName)));
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ @Override
+ public String toString (){
+ return "[" +
+ domainUri + " " +
+ nodeUri + " " +
+ serviceName + " " +
+ bindingName + " " +
+ url +
+ "]";
+ }
+ }
+
+ /**
+ * Accepts information about a service endpoint and holds onto it
+ *
+ * @param domainUri the string uri for the distributed domain
+ * @param nodeUri the string uri for the current node
+ * @param serviceName the name of the service that is exposed and the provided endpoint
+ * @param bindingName the remote binding that is providing the endpoint
+ * @param url the enpoint url
+ */
+ public String registerServiceEndpoint(String domainUri, String nodeUri, String serviceName, String bindingName, String URL){
+ // if the service name ends in a "/" remove it
+ String modifiedServiceName = null;
+ if ( serviceName.endsWith("/") ) {
+ modifiedServiceName = serviceName.substring(0, serviceName.length() - 1);
+ } else {
+ modifiedServiceName = serviceName;
+ }
+ ServiceEndpoint serviceEndpoint = new ServiceEndpoint (domainUri, nodeUri, modifiedServiceName, bindingName, URL);
+ serviceEndpoints.add(serviceEndpoint);
+ System.err.println("Registering service: " + serviceEndpoint.toString());
+ return "";
+ }
+
+
+ /**
+ * Locates information about a service endpoint
+ *
+ * @param domainUri the string uri for the distributed domain
+ * @param serviceName the name of the service that is exposed and the provided endpoint
+ * @param bindingName the remote binding that we want to find an endpoint for
+ * @return url the endpoint url
+ */
+ public String findServiceEndpoint(String domainUri, String serviceName, String bindingName){
+ System.err.println("Finding service: [" +
+ domainUri + " " +
+ serviceName + " " +
+ bindingName +
+ "]");
+
+ String url = null;
+
+ for(ServiceEndpoint serviceEndpoint : serviceEndpoints){
+ if ( serviceEndpoint.match(domainUri, serviceName, bindingName)){
+ url = serviceEndpoint.getUrl();
+ System.err.println("Matching service url: " + url);
+ }
+ }
+ return url;
+ }
+
+}
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldCallbackRemote.java b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldCallbackRemote.java
new file mode 100644
index 0000000000..4db846cdf2
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldCallbackRemote.java
@@ -0,0 +1,29 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.sca.axis2.helloworld;
+
+import org.osoa.sca.annotations.Remotable;
+
+@Remotable
+public interface HelloWorldCallbackRemote {
+
+ public String getGreetingsCallbackRemote(String s);
+
+}
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldClient.java b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldClient.java
new file mode 100644
index 0000000000..d4d743648c
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldClient.java
@@ -0,0 +1,27 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.sca.axis2.helloworld;
+
+
+public interface HelloWorldClient {
+
+ public String getGreetings(String s);
+
+}
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackOnewayRemote.java b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackOnewayRemote.java
new file mode 100644
index 0000000000..0415368c20
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackOnewayRemote.java
@@ -0,0 +1,33 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.sca.axis2.helloworld;
+
+import org.osoa.sca.annotations.Callback;
+import org.osoa.sca.annotations.OneWay;
+import org.osoa.sca.annotations.Remotable;
+
+@Remotable
+@Callback(HelloWorldCallbackRemote.class)
+public interface HelloWorldServiceCallbackOnewayRemote {
+
+ @OneWay
+ public void getGreetingsRemote(String s);
+
+}
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackRemote.java b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackRemote.java
new file mode 100644
index 0000000000..23861bdf9f
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackRemote.java
@@ -0,0 +1,31 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.sca.axis2.helloworld;
+
+import org.osoa.sca.annotations.Callback;
+import org.osoa.sca.annotations.Remotable;
+
+@Remotable
+@Callback(HelloWorldCallbackRemote.class)
+public interface HelloWorldServiceCallbackRemote {
+
+ public String getGreetingsRemote(String s);
+
+}
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceLocal.java b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceLocal.java
new file mode 100644
index 0000000000..157fcc5251
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceLocal.java
@@ -0,0 +1,27 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.sca.axis2.helloworld;
+
+
+public interface HelloWorldServiceLocal {
+
+ public String getGreetingsLocal(String s);
+
+}
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote.java b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote.java
new file mode 100644
index 0000000000..46373ce90d
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote.java
@@ -0,0 +1,29 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.sca.axis2.helloworld;
+
+import org.osoa.sca.annotations.Remotable;
+
+@Remotable
+public interface HelloWorldServiceRemote {
+
+ public String getGreetingsRemote(String s);
+
+}
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote2.java b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote2.java
new file mode 100644
index 0000000000..ef34c87fc0
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote2.java
@@ -0,0 +1,29 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.sca.axis2.helloworld;
+
+import org.osoa.sca.annotations.Remotable;
+
+@Remotable
+public interface HelloWorldServiceRemote2 {
+
+ public String getGreetingsRemote2(String s);
+
+}
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java
new file mode 100644
index 0000000000..ed76b45f67
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java
@@ -0,0 +1,44 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceCallbackOnewayRemote;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceCallbackRemote;
+import org.osoa.sca.annotations.Reference;
+
+public class HelloWorldClientCallbackOnewayRemoteImpl implements HelloWorldClient {
+
+ public static String result;
+
+ @Reference
+ public HelloWorldServiceCallbackOnewayRemote helloWorldService;
+
+ public String getGreetings(String s) {
+ helloWorldService.getGreetingsRemote(s);
+ return null;
+ }
+
+ public String getGreetingsCallbackRemote(String s) {
+ result = "callback " + s;
+ return result;
+ }
+
+}
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java
new file mode 100644
index 0000000000..7d07c4ff43
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackRemoteImpl.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 org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceCallbackRemote;
+import org.osoa.sca.annotations.Reference;
+
+public class HelloWorldClientCallbackRemoteImpl implements HelloWorldClient {
+
+ public static String result;
+
+ @Reference
+ public HelloWorldServiceCallbackRemote helloWorldService;
+
+ public String getGreetings(String s) {
+ return helloWorldService.getGreetingsRemote(s);
+ }
+
+ public String getGreetingsCallbackRemote(String s) {
+ result = "callback " + s;
+ return result;
+ }
+
+}
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientLocalImpl.java b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientLocalImpl.java
new file mode 100644
index 0000000000..0e1f07f3f2
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientLocalImpl.java
@@ -0,0 +1,36 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceLocal;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote;
+import org.osoa.sca.annotations.Reference;
+
+public class HelloWorldClientLocalImpl implements HelloWorldClient {
+
+ @Reference
+ public HelloWorldServiceLocal helloWorldService;
+
+ public String getGreetings(String s) {
+ return helloWorldService.getGreetingsLocal(s);
+ }
+
+}
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemote2Impl.java b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemote2Impl.java
new file mode 100644
index 0000000000..804d1f1910
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemote2Impl.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 org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceLocal;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote2;
+import org.osoa.sca.annotations.Reference;
+
+public class HelloWorldClientRemote2Impl implements HelloWorldClient {
+
+ @Reference
+ public HelloWorldServiceRemote2 helloWorldService;
+
+ public String getGreetings(String s) {
+ return helloWorldService.getGreetingsRemote2(s);
+ }
+
+}
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemoteImpl.java b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemoteImpl.java
new file mode 100644
index 0000000000..ad83358b39
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemoteImpl.java
@@ -0,0 +1,36 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceLocal;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote;
+import org.osoa.sca.annotations.Reference;
+
+public class HelloWorldClientRemoteImpl implements HelloWorldClient {
+
+ @Reference
+ public HelloWorldServiceRemote helloWorldService;
+
+ public String getGreetings(String s) {
+ return helloWorldService.getGreetingsRemote(s);
+ }
+
+}
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java
new file mode 100644
index 0000000000..fd3e3a1158
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java
@@ -0,0 +1,36 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldCallbackRemote;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceCallbackOnewayRemote;
+import org.osoa.sca.annotations.Callback;
+
+
+public class HelloWorldServiceCallbackOnewayRemoteImpl implements HelloWorldServiceCallbackOnewayRemote {
+
+ @Callback
+ protected HelloWorldCallbackRemote theCallback;
+
+ public void getGreetingsRemote(String s) {
+ theCallback.getGreetingsCallbackRemote(s);
+ }
+
+}
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java
new file mode 100644
index 0000000000..3400e97447
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java
@@ -0,0 +1,35 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldCallbackRemote;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceCallbackRemote;
+import org.osoa.sca.annotations.Callback;
+
+public class HelloWorldServiceCallbackRemoteImpl implements HelloWorldServiceCallbackRemote {
+
+ @Callback
+ protected HelloWorldCallbackRemote theCallback;
+
+ public String getGreetingsRemote(String s) {
+ return "Hello " + theCallback.getGreetingsCallbackRemote(s);
+ }
+
+}
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceLocalImpl.java b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceLocalImpl.java
new file mode 100644
index 0000000000..20dd97b74a
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceLocalImpl.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 org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceLocal;
+
+public class HelloWorldServiceLocalImpl implements HelloWorldServiceLocal {
+
+ public String getGreetingsLocal(String s) {
+ return "Hello " + s;
+ }
+
+}
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java
new file mode 100644
index 0000000000..5f8ccf9466
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java
@@ -0,0 +1,41 @@
+/*
+ * 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 org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceLocal;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote2;
+import org.osoa.sca.annotations.Service;
+
+@Service(interfaces={HelloWorldServiceRemote.class, HelloWorldServiceRemote2.class, HelloWorldServiceLocal.class} )
+public class HelloWorldServiceMultipleServicesImpl implements HelloWorldServiceLocal, HelloWorldServiceRemote, HelloWorldServiceRemote2 {
+
+ public String getGreetingsLocal(String s) {
+ return "Hello " + s;
+ }
+
+ public String getGreetingsRemote(String s) {
+ return "Hello " + s;
+ }
+
+ public String getGreetingsRemote2(String s) {
+ return "Hello " + s;
+ }
+}
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceRemoteImpl.java b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceRemoteImpl.java
new file mode 100644
index 0000000000..b25aebd9df
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceRemoteImpl.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 org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote;
+
+public class HelloWorldServiceRemoteImpl implements HelloWorldServiceRemote {
+
+ public String getGreetingsRemote(String s) {
+ return "Hello " + s;
+ }
+
+}
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeA/HelloWorld.composite b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeA/HelloWorld.composite
new file mode 100644
index 0000000000..eecadac929
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeA/HelloWorld.composite
@@ -0,0 +1,71 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- local only wire -->
+ <component name="AHelloWorldClientLocal">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientLocalImpl"/>
+ <reference name="helloWorldService" target="AHelloWorldServiceLocal" />
+ </component>
+
+ <component name="AHelloWorldServiceLocal">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceLocalImpl" />
+ </component>
+
+ <!-- unresolved remote wire -->
+ <component name="AHelloWorldClientRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceRemote" />
+ </component>
+
+ <!-- local and remote wires -->
+ <component name="AHelloWorldClientLocalAndRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceLocalAndRemote" />
+ </component>
+
+ <!-- multiple services -->
+ <component name="AHelloWorldClientMultipleServices">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceMultipleServices/HelloWorldServiceRemote" />
+ </component>
+
+ <component name="AHelloWorldClientMultipleServices2">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemote2Impl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceMultipleServices/HelloWorldServiceRemote2" />
+ </component>
+
+ <!-- multiple bindings -->
+ <!--component name="AHelloWorldClientMultipleBindings">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceRemote" >
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote" />
+ <binding.sca/>
+ <binding.ws/>
+ </reference>
+ </component-->
+
+
+
+</composite>
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeA/META-INF/sca-contribution.xml b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeA/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..d6b9e82250
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeA/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeB/HelloWorld.composite b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeB/HelloWorld.composite
new file mode 100644
index 0000000000..c9e2d122e0
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeB/HelloWorld.composite
@@ -0,0 +1,70 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- local only wire -->
+
+
+ <!-- unresolved remote wire -->
+ <component name="BHelloWorldServiceRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ </component>
+
+ <!-- local and remote wires -->
+ <component name="BHelloWorldServiceLocalAndRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ </component>
+
+ <component name="BHelloWorldClientLocalAndRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceLocalAndRemote" />
+ </component>
+
+ <!-- multiple services -->
+ <component name="BHelloWorldServiceMultipleServices">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceMultipleServicesImpl" />
+ </component>
+
+ <component name="BHelloWorldClientMultipleServices">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientLocalImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceMultipleServices/HelloWorldServiceLocal" />
+ </component>
+
+ <!-- multiple bindings -->
+ <!--component name="BHelloWorldMultipleBindings">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ <service name="HelloWorldServiceRemote">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote" />
+ <binding.ws/>
+ <binding.sca/>
+ </service>
+ </component-->
+
+
+ <!-- Dynamic interfaces -->
+ <!--component name="BHelloWorldServiceScript">
+ <implementation.script script="calculator/AddServiceImpl.js"/>
+ </component-->
+
+</composite>
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeB/META-INF/sca-contribution.xml b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeB/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..d6b9e82250
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeB/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeC/HelloWorld.composite b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeC/HelloWorld.composite
new file mode 100644
index 0000000000..d5d7773353
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeC/HelloWorld.composite
@@ -0,0 +1,33 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- composite hierarchy -->
+ <component name="AHelloWorldClientRemotePromotion">
+ <implementation.composite name="sample:HelloWorldComponent" />
+ <reference name="AHelloWorldClientRemoteReference" target="BHelloWorldServiceRemotePromotion"/>
+ </component>
+
+
+</composite>
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeC/HelloWorldComponent.composite b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeC/HelloWorldComponent.composite
new file mode 100644
index 0000000000..485e0815d2
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeC/HelloWorldComponent.composite
@@ -0,0 +1,37 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorldComponent">
+
+ <service name="AHelloWorldClientRemoteService" promote="AHelloWorldClientRemoteComponent">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient"/>
+ </service>
+
+ <reference name="AHelloWorldClientRemoteReference" promote="AHelloWorldClientRemoteComponent/helloWorldService">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote"/>
+ </reference>
+
+ <component name="AHelloWorldClientRemoteComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeC/META-INF/sca-contribution.xml b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeC/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..d6b9e82250
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeC/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeD/HelloWorld.composite b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeD/HelloWorld.composite
new file mode 100644
index 0000000000..9396dfd1f2
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeD/HelloWorld.composite
@@ -0,0 +1,32 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- composite hierarchy -->
+ <component name="BHelloWorldServiceRemotePromotion">
+ <implementation.composite name="sample:HelloWorldComponent" />
+ </component>
+
+
+</composite>
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeD/HelloWorldComponent.composite b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeD/HelloWorldComponent.composite
new file mode 100644
index 0000000000..bf30bdf42d
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeD/HelloWorldComponent.composite
@@ -0,0 +1,37 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorldComponent">
+
+ <service name="BHelloWorldServiceRemoteService"
+ promote="BHelloWorldServiceRemoteComponent/HelloWorldServiceRemote"/>
+
+ <component name="BHelloWorldServiceRemoteComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceRemoteImpl"/>
+ </component>
+
+ <component name="BHelloWorldServiceLocalAndRemoteNested">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ </component>
+
+
+</composite>
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeD/META-INF/sca-contribution.xml b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeD/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..d6b9e82250
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeD/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeE/HelloWorld.composite b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeE/HelloWorld.composite
new file mode 100644
index 0000000000..67c240592d
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeE/HelloWorld.composite
@@ -0,0 +1,31 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+ <!-- callback remote wire -->
+ <component name="AHelloWorldClientCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientCallbackRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceCallbackRemote" />
+ </component>
+
+</composite>
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeE/META-INF/sca-contribution.xml b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeE/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..d6b9e82250
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeE/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeF/HelloWorld.composite b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeF/HelloWorld.composite
new file mode 100644
index 0000000000..eb0a386b2c
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeF/HelloWorld.composite
@@ -0,0 +1,41 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- callback remote wire -->
+ <component name="BHelloWorldServiceCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceCallbackRemoteImpl" />
+ <service name="HelloWorldServiceCallbackRemote">
+ <!-- explicit uri required as callback service will also come up on 8085 -->
+ <binding.sca uri="http://localhost:8086/BHelloWorldServiceCallbackRemote"/>
+ </service>
+ </component>
+
+ <!-- callback local wire -->
+ <!--component name="BHelloWorldClientCallbackLocal">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientCallbackRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceCallbackRemote" />
+ </component-->
+
+</composite>
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeF/META-INF/sca-contribution.xml b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeF/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..d6b9e82250
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeF/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeG/HelloWorld.composite b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeG/HelloWorld.composite
new file mode 100644
index 0000000000..fadb164636
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeG/HelloWorld.composite
@@ -0,0 +1,31 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+ <!-- callback remote wire -->
+ <component name="AHelloWorldClientCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientCallbackOnewayRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceCallbackRemote" />
+ </component>
+
+</composite>
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeG/META-INF/sca-contribution.xml b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeG/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..d6b9e82250
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeG/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeH/HelloWorld.composite b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeH/HelloWorld.composite
new file mode 100644
index 0000000000..e92c9ebd8e
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeH/HelloWorld.composite
@@ -0,0 +1,36 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- callback remote wire -->
+ <component name="BHelloWorldServiceCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceCallbackOnewayRemoteImpl" />
+ <service name="HelloWorldServiceCallbackOnewayRemote">
+ <!-- explicit uri required as callback service will also come up on 8085 -->
+ <binding.sca uri="http://localhost:8086/BHelloWorldServiceCallbackRemote"/>
+ </service>
+ </component>
+
+
+</composite>
diff --git a/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeH/META-INF/sca-contribution.xml b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeH/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..d6b9e82250
--- /dev/null
+++ b/sca-java-1.x/tags/0.99-incubating/modules/binding-sca-axis2/src/test/resources/nodeH/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file