tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sl...@apache.org
Subject svn commit: r1228143 - in /tuscany/sca-java-2.x/trunk: modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/injection/ modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/...
Date Fri, 06 Jan 2012 12:19:31 GMT
Author: slaws
Date: Fri Jan  6 12:19:29 2012
New Revision: 1228143

URL: http://svn.apache.org/viewvc?rev=1228143&view=rev
Log:
TUSCANY-4000 - Fix ClassCastException when user specifies WSDL interface
TUSCANY-4003 - Provide access to resource host from the resource itself. Thanks for the patch Brian

Added:
    tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/ResourceHost.java
    tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/ResourceResolutionException.java
    tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/   (with props)
    tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/pom.xml
    tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java
    tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallback.java
    tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackService.java
    tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackServiceImpl.java
    tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java
    tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplCallbackService.wsdl
    tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplCallbackService_schema1.xsd
    tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplService.wsdl
    tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplService_schema1.xsd
    tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplService_schema2.xsd
    tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldServiceService_schema1.xsd
    tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/META-INF/
    tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/META-INF/sca-contribution.xml
    tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/helloworld-external-service.wsdl
    tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/helloworld.composite
    tuscany/sca-java-2.x/trunk/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackWSDLIfaceTestCase.java
Removed:
    tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/injection/ResourceHost.java
    tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/injection/ResourceResolutionException.java
Modified:
    tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/injection/ResourceObjectFactory.java
    tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaAsyncImplementationInvoker.java
    tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaComponentContextProvider.java
    tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java
    tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationProvider.java
    tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/JavaResourceImpl.java
    tuscany/sca-java-2.x/trunk/testing/itest/ws/pom.xml

Modified: tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/injection/ResourceObjectFactory.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/injection/ResourceObjectFactory.java?rev=1228143&r1=1228142&r2=1228143&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/injection/ResourceObjectFactory.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/injection/ResourceObjectFactory.java Fri Jan  6 12:19:29 2012
@@ -21,6 +21,9 @@ package org.apache.tuscany.sca.implement
 import org.apache.tuscany.sca.core.factory.ObjectCreationException;
 import org.apache.tuscany.sca.core.factory.ObjectFactory;
 
+import org.apache.tuscany.sca.implementation.java.ResourceHost;
+import org.apache.tuscany.sca.implementation.java.ResourceResolutionException;
+
 /**
  * Resolves a runtime resource to be injected on a field or method of a Java component type marked with {@link
  * javax.annotation.Resource}. If the mapped name of the resource is an absolute URI such as

Modified: tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaAsyncImplementationInvoker.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaAsyncImplementationInvoker.java?rev=1228143&r1=1228142&r2=1228143&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaAsyncImplementationInvoker.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaAsyncImplementationInvoker.java Fri Jan  6 12:19:29 2012
@@ -26,7 +26,6 @@ import org.apache.tuscany.sca.core.facto
 import org.apache.tuscany.sca.core.factory.ObjectCreationException;
 import org.apache.tuscany.sca.core.invocation.AsyncResponseException;
 import org.apache.tuscany.sca.interfacedef.DataType;
-import org.apache.tuscany.sca.interfacedef.InterfaceContract;
 import org.apache.tuscany.sca.interfacedef.Operation;
 import org.apache.tuscany.sca.interfacedef.java.JavaOperation;
 import org.apache.tuscany.sca.invocation.InterceptorAsync;
@@ -34,6 +33,7 @@ import org.apache.tuscany.sca.invocation
 import org.apache.tuscany.sca.invocation.InvokerAsyncResponse;
 import org.apache.tuscany.sca.invocation.Message;
 import org.apache.tuscany.sca.runtime.RuntimeComponent;
+import org.apache.tuscany.sca.runtime.RuntimeComponentService;
 import org.oasisopen.sca.ResponseDispatch;
 import org.oasisopen.sca.ServiceRuntimeException;
 
@@ -44,9 +44,8 @@ import org.oasisopen.sca.ServiceRuntimeE
  */
 public class JavaAsyncImplementationInvoker extends JavaImplementationInvoker implements InterceptorAsync {
 	
-    public JavaAsyncImplementationInvoker(Operation operation, Method method, RuntimeComponent component, 
-    		InterfaceContract interfaceContract) {
-    	super( operation, method, component, interfaceContract);
+    public JavaAsyncImplementationInvoker(Operation operation, Method method, RuntimeComponent component, RuntimeComponentService service) {
+    	super( operation, method, component, service);
         assert method != null : "Operation method cannot be null";
         assert ((JavaOperation) operation).isAsyncServer() : "Operation must be async";
     } // end constructor

Modified: tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaComponentContextProvider.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaComponentContextProvider.java?rev=1228143&r1=1228142&r2=1228143&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaComponentContextProvider.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaComponentContextProvider.java Fri Jan  6 12:19:29 2012
@@ -65,6 +65,7 @@ import org.apache.tuscany.sca.interfaced
 import org.apache.tuscany.sca.invocation.Invoker;
 import org.apache.tuscany.sca.runtime.RuntimeComponent;
 import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
+import org.apache.tuscany.sca.runtime.RuntimeComponentService;
 import org.apache.tuscany.sca.runtime.RuntimeEndpointReference;
 import org.oasisopen.sca.ServiceReference;
 
@@ -303,15 +304,15 @@ public class JavaComponentContextProvide
         //cleanUpPolicyHandlers();
     }
 
-    Invoker createInvoker(Operation operation, InterfaceContract interfaceContract) throws NoSuchMethodException {
+    Invoker createInvoker(Operation operation, RuntimeComponentService service) throws NoSuchMethodException {
         Class<?> implClass = instanceFactoryProvider.getImplementationClass();
 
         Method method = JavaInterfaceUtil.findMethod(implClass, operation);
         if (operation instanceof JavaOperation &&
             ((JavaOperation) operation).isAsyncServer() ) {
-        	return new JavaAsyncImplementationInvoker(operation, method, component, interfaceContract);
+        	return new JavaAsyncImplementationInvoker(operation, method, component, service);
         } else {
-        	return new JavaImplementationInvoker(operation, method, component, interfaceContract);
+        	return new JavaImplementationInvoker(operation, method, component, service);
         } // end if
     } // end 
 

Modified: tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java?rev=1228143&r1=1228142&r2=1228143&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationInvoker.java Fri Jan  6 12:19:29 2012
@@ -18,8 +18,6 @@
  */
 package org.apache.tuscany.sca.implementation.java.invocation;
 
-
-
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.security.AccessController;
@@ -30,6 +28,7 @@ import java.util.List;
 import javax.xml.ws.Holder;
 
 import org.apache.tuscany.sca.assembly.EndpointReference;
+import org.apache.tuscany.sca.assembly.Service;
 import org.apache.tuscany.sca.core.factory.ObjectCreationException;
 import org.apache.tuscany.sca.core.invocation.Constants;
 import org.apache.tuscany.sca.core.scope.Scope;
@@ -49,6 +48,7 @@ import org.apache.tuscany.sca.invocation
 import org.apache.tuscany.sca.invocation.Invoker;
 import org.apache.tuscany.sca.invocation.Message;
 import org.apache.tuscany.sca.runtime.RuntimeComponent;
+import org.apache.tuscany.sca.runtime.RuntimeComponentService;
 import org.oasisopen.sca.ServiceReference;
 import org.oasisopen.sca.ServiceRuntimeException;
 
@@ -61,26 +61,29 @@ import org.oasisopen.sca.ServiceRuntimeE
 public class JavaImplementationInvoker implements Invoker, DataExchangeSemantics {
     protected Operation operation;
     protected Method method;
+    protected RuntimeComponentService service;
     protected boolean allowsPBR;
 
     @SuppressWarnings("unchecked")
     protected final ScopeContainer scopeContainer;
 	private final InterfaceContract interfaze;
 
-    public JavaImplementationInvoker(Operation operation, Method method, RuntimeComponent component, InterfaceContract intf) {
+    public JavaImplementationInvoker(Operation operation, Method method, RuntimeComponent component, RuntimeComponentService service) {
         assert method != null : "Operation method cannot be null";
         this.method = method;
         this.operation = operation;
         this.scopeContainer = ((ScopedRuntimeComponent)component).getScopeContainer();
         this.allowsPBR = ((JavaImplementation)component.getImplementation()).isAllowsPassByReference(method);
-        this.interfaze = intf;
+        this.service = service;
+        this.interfaze = service.getInterfaceContract();
     }
 
-    public JavaImplementationInvoker(Operation operation, RuntimeComponent component, InterfaceContract intf) {
+    public JavaImplementationInvoker(Operation operation, RuntimeComponent component, RuntimeComponentService service) {
         // used if the method can't be computed statically in advance 
         this.operation = operation;
         this.scopeContainer = ((ScopedRuntimeComponent)component).getScopeContainer();
-        this.interfaze = intf;
+        this.service = service;
+        this.interfaze = service.getInterfaceContract();
     }
 
     @SuppressWarnings("unchecked")
@@ -121,7 +124,10 @@ public class JavaImplementationInvoker i
             // If there is a callback interface and the implementation is stateless, we need to
             // inject callbacks at invocation time. For Composite scope, this has already been done. 
             if (( interfaze.getCallbackInterface() != null )  && (scopeContainer.getScope().equals(Scope.STATELESS))){
-            	injectCallbacks(wrapper, (JavaInterface)interfaze.getCallbackInterface());
+                // TUSCANY-4000 - injectCallbacks needs the Java callback interface so get it 
+                //                from the component type just in case the user has specified a
+                //                WSDL interface and hence interfaze is WSDL
+            	injectCallbacks(wrapper, (JavaInterface)service.getService().getInterfaceContract().getCallbackInterface());
             }
             
             final Object instance = wrapper.getInstance();

Modified: tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationProvider.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationProvider.java?rev=1228143&r1=1228142&r2=1228143&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationProvider.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/JavaImplementationProvider.java Fri Jan  6 12:19:29 2012
@@ -32,8 +32,8 @@ import org.apache.tuscany.sca.core.scope
 import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint;
 import org.apache.tuscany.sca.implementation.java.JavaImplementation;
 import org.apache.tuscany.sca.implementation.java.JavaResourceImpl;
+import org.apache.tuscany.sca.implementation.java.ResourceHost;
 import org.apache.tuscany.sca.implementation.java.injection.RequestContextObjectFactory;
-import org.apache.tuscany.sca.implementation.java.injection.ResourceHost;
 import org.apache.tuscany.sca.implementation.java.injection.ResourceObjectFactory;
 import org.apache.tuscany.sca.interfacedef.Interface;
 import org.apache.tuscany.sca.interfacedef.Operation;
@@ -105,7 +105,8 @@ public class JavaImplementationProvider 
                 } else {
                     boolean optional = resource.isOptional();
                     String mappedName = resource.getMappedName();
-                    objectFactory = createResourceObjectFactory(type, mappedName, optional, null);
+                    ResourceHost resourceHost = resource.getResourceHost();
+                    objectFactory = createResourceObjectFactory(type, mappedName, optional, resourceHost);
                 }
             }
             componentContextProvider.addResourceFactory(name, objectFactory);
@@ -121,7 +122,7 @@ public class JavaImplementationProvider 
 
     public Invoker createInvoker(RuntimeComponentService service, Operation operation) {
         try {
-            return componentContextProvider.createInvoker(operation, service.getInterfaceContract());
+            return componentContextProvider.createInvoker(operation, service);
         } catch (NoSuchMethodException e) {
             // It's possible that the instance being invoked is a user-specified
             // callback object that isn't an instance of the component implementation
@@ -135,12 +136,12 @@ public class JavaImplementationProvider 
             if (iface instanceof JavaInterface) {
                 try {
                     Method method = JavaInterfaceUtil.findMethod(((JavaInterface)iface).getJavaClass(), operation);
-                    return new JavaImplementationInvoker(operation, method, componentContextProvider.getComponent(), service.getInterfaceContract());
+                    return new JavaImplementationInvoker(operation, method, componentContextProvider.getComponent(), service);
                 } catch (NoSuchMethodException e1) {
                     throw new IllegalArgumentException(e1);
                 }
             } else {
-                return new JavaImplementationInvoker(operation, componentContextProvider.getComponent(), service.getInterfaceContract());
+                return new JavaImplementationInvoker(operation, componentContextProvider.getComponent(), service);
             }
         }
     }

Modified: tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/JavaResourceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/JavaResourceImpl.java?rev=1228143&r1=1228142&r2=1228143&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/JavaResourceImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/JavaResourceImpl.java Fri Jan  6 12:19:29 2012
@@ -18,8 +18,6 @@
  */
 package org.apache.tuscany.sca.implementation.java;
 
-
-
 /**
  * A resource dependency declared by a Java component implementation
  * 
@@ -29,10 +27,16 @@ public class JavaResourceImpl {
     private JavaElementImpl element;
     private String mappedName;
     private boolean optional;
+    private ResourceHost resourceHost;
 
     public JavaResourceImpl(JavaElementImpl element) {
         this.element = element;
     }
+    
+    public JavaResourceImpl(JavaElementImpl element, ResourceHost resourceHost) {
+        this.element = element;
+        this.resourceHost = resourceHost;
+    }
 
     /**
      * The name of the resource
@@ -82,5 +86,10 @@ public class JavaResourceImpl {
         return element;
     }
 
-
+    /**
+     * @return the resourceHost
+     */
+    public ResourceHost getResourceHost() {
+        return resourceHost;
+    }
 }

Added: tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/ResourceHost.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/ResourceHost.java?rev=1228143&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/ResourceHost.java (added)
+++ tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/ResourceHost.java Fri Jan  6 12:19:29 2012
@@ -0,0 +1,47 @@
+/*
+ * 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.implementation.java;
+
+
+/**
+ * Interface implemented by host environments that allow for resolution of component implementation resources, e.g.
+ * items bound in a JNDI tree.
+ *
+ * @version $Rev: 537424 $ $Date: 2007-05-12 14:47:18 +0100 (Sat, 12 May 2007) $
+ */
+public interface ResourceHost {
+
+    /**
+     * Resolve a resource matching the given type
+     *
+     * @param type the type of the resources
+     * @throws ResourceResolutionException if an error is encountered during resolution
+     */
+    <T> T resolveResource(Class<T> type) throws ResourceResolutionException;
+
+    /**
+     * Resolve a resource matching the given type and name
+     *
+     * @param type       the type of the resources
+     * @param mappedName the mapped name of the resource
+     * @throws ResourceResolutionException if an error is encountered during resolution
+     */
+    <T> T resolveResource(Class<T> type, String mappedName) throws ResourceResolutionException;
+
+}

Added: tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/ResourceResolutionException.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/ResourceResolutionException.java?rev=1228143&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/ResourceResolutionException.java (added)
+++ tuscany/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/ResourceResolutionException.java Fri Jan  6 12:19:29 2012
@@ -0,0 +1,43 @@
+/*
+ * 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.implementation.java;
+
+
+/**
+ * @version $Rev: 537424 $ $Date: 2007-05-12 14:47:18 +0100 (Sat, 12 May 2007) $
+ */
+public class ResourceResolutionException extends Exception {
+    private static final long serialVersionUID = 13421352711315479L;
+
+    public ResourceResolutionException() {
+        super();
+    }
+
+    public ResourceResolutionException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public ResourceResolutionException(String message) {
+        super(message);
+    }
+
+    public ResourceResolutionException(Throwable cause) {
+        super(cause);
+    }
+}

Propchange: tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Jan  6 12:19:29 2012
@@ -0,0 +1,4 @@
+.classpath
+.project
+.settings
+target

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/pom.xml?rev=1228143&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/pom.xml (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/pom.xml Fri Jan  6 12:19:29 2012
@@ -0,0 +1,127 @@
+<?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.    
+-->
+<project>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.tuscany.sca</groupId>
+        <artifactId>itest-ws</artifactId>
+        <version>2.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>itest-ws-contribution-callback-wsdl-iface</artifactId>
+    <name>Apache Tuscany SCA iTest WS Contribution Callback WSDL Iface </name>
+
+    <dependencies>
+        
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-base-runtime-pom</artifactId>
+            <type>pom</type>
+            <version>2.0-SNAPSHOT</version>
+        </dependency>
+
+       <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+            <version>2.0-SNAPSHOT</version>
+       </dependency>
+                
+        <dependency>
+            <groupId>org.mortbay.jetty</groupId>
+            <artifactId>jetty</artifactId>
+            <version>6.1.19</version>
+        </dependency>
+                
+    </dependencies>
+
+    <build>
+       <finalName>${project.artifactId}</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <version>1.0</version>
+                <executions>
+                    <execution>
+                        <id>add-source</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>add-test-source</goal>
+                        </goals>
+                        <configuration>
+                            <sources>
+                                <source>target/jaxws-source</source>
+                            </sources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.jvnet.jax-ws-commons</groupId>
+                <artifactId>jaxws-maven-plugin</artifactId>
+                <version>2.1</version>
+                <dependencies>
+                   <dependency>
+                      <groupId>com.sun.xml.ws</groupId>
+                      <artifactId>jaxws-tools</artifactId>
+                      <version>2.2.6-promoted-b10</version>
+                   </dependency>
+                </dependencies>
+                <executions>
+                    <execution>
+                        <id>wsgen1</id>
+                        <phase>process-classes</phase>
+                        <goals>
+                            <goal>wsgen</goal>
+                        </goals>
+                        <configuration>
+                            <sei>org.apache.tuscany.sca.binding.ws.HelloWorldImpl</sei>
+                            <genWsdl>true</genWsdl>
+                            <staleFile>${project.build.directory}/jaxws/stale/.wsgen1StaleFlag</staleFile>
+                        </configuration>
+                    </execution>                  
+                    <execution>
+                        <id>wsimport1</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>wsimport</goal>
+                        </goals>
+                        <configuration>
+                            <packageName>org.apache.tuscany.sca.binding.ws.jaxws.external.service.iface</packageName>
+                            <wsdlDirectory>${basedir}/target/classes</wsdlDirectory>
+                            <wsdlFiles>
+                                <wsdlFile>helloworld-external-service.wsdl</wsdlFile>
+                            </wsdlFiles>
+                            <staleFile>${project.build.directory}/jaxws/stale/.wsimport1StaleFlag</staleFile>
+                        </configuration>
+                    </execution>                                      
+                </executions>
+                <configuration>
+                    <target>2.1</target>
+                    <sourceDestDir>${project.build.directory}/jaxws-source</sourceDestDir>
+                    <resourceDestDir>${project.build.directory}/jaxws-source</resourceDestDir>
+                    <verbose>true</verbose>
+                    <xnocompile>true</xnocompile>
+                </configuration>
+            </plugin>                     
+        </plugins>
+    </build>
+</project>

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java?rev=1228143&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java Fri Jan  6 12:19:29 2012
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package org.apache.tuscany.sca.binding.ws;
+
+import org.apache.tuscany.sca.binding.ws.jaxws.external.service.iface.Foo;
+import org.oasisopen.sca.ServiceRuntimeException;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorld {
+    
+    String getGreetings(String s);
+    String getGreetingsException(String s) throws ServiceRuntimeException;
+    Foo getGreetingsComplex(Foo foo);
+}

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallback.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallback.java?rev=1228143&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallback.java (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallback.java Fri Jan  6 12:19:29 2012
@@ -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.ws;
+
+import org.apache.tuscany.sca.binding.ws.jaxws.external.service.iface.Foo;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorldCallback {
+    
+    String getGreetingsCallback(String s);
+    Foo getGreetingsComplexCallback(Foo foo);
+
+}

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackService.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackService.java?rev=1228143&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackService.java (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackService.java Fri Jan  6 12:19:29 2012
@@ -0,0 +1,34 @@
+/*
+ * 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.ws;
+
+import org.apache.tuscany.sca.binding.ws.jaxws.external.service.iface.Foo;
+import org.oasisopen.sca.ServiceRuntimeException;
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+@Callback(HelloWorldCallback.class)
+public interface HelloWorldCallbackService {
+    
+    String getGreetings(String s);
+    String getGreetingsException(String s) throws ServiceRuntimeException;
+    Foo getGreetingsComplex(Foo foo);
+}

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackServiceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackServiceImpl.java?rev=1228143&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackServiceImpl.java (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackServiceImpl.java Fri Jan  6 12:19:29 2012
@@ -0,0 +1,53 @@
+/*
+ * 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.ws;
+
+import org.apache.tuscany.sca.binding.ws.jaxws.external.service.iface.Foo;
+import org.oasisopen.sca.ServiceRuntimeException;
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(HelloWorldCallbackService.class)
+public class HelloWorldCallbackServiceImpl implements HelloWorldCallbackService {
+
+    @Callback
+    protected HelloWorldCallback helloWorldCallback;
+    
+    public String getGreetings(String s) {
+        System.out.println("Entering SCA HelloWorldCallbackService.getGreetings: " + s);
+        String response = helloWorldCallback.getGreetingsCallback(s);
+        System.out.println("Leaving SCA HelloWorldCallbackService.getGreetings: " + response);
+        return response;
+    }
+
+    public String getGreetingsException(String s) throws ServiceRuntimeException {
+        System.out.println("Entering SCA HelloWorldCallbackService.getGreetingsException: " + s);
+        String response = helloWorldCallback.getGreetingsCallback(s);
+        System.out.println("Leaving SCA HelloWorldCallbackService.getGreetings: " + response);
+        throw new ServiceRuntimeException(response);
+    }       
+
+    public Foo getGreetingsComplex(Foo foo){
+        System.out.println("Entering SCA HelloWorldCallbackService.getGreetingsComplex: " + foo.getBars().get(0).getS());
+        Foo response = helloWorldCallback.getGreetingsComplexCallback(foo);
+        System.out.println("Leaving SCA HelloWorldCallbackService.getGreetingsComplex: " + foo.getBars().get(0).getS());
+        return response;
+    } 
+}

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java?rev=1228143&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java Fri Jan  6 12:19:29 2012
@@ -0,0 +1,84 @@
+/*
+ * 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.ws;
+
+import javax.jws.WebService;
+
+import org.apache.tuscany.sca.binding.ws.jaxws.external.service.iface.Foo;
+import org.apache.tuscany.sca.binding.ws.jaxws.external.service.iface.HelloWorldService;
+import org.oasisopen.sca.ServiceRuntimeException;
+import org.oasisopen.sca.annotation.Reference;
+
+@WebService
+public class HelloWorldImpl implements HelloWorld, HelloWorldCallback {
+
+    @Reference
+    public HelloWorldService helloWorldExternal;
+    
+    @Reference
+    public HelloWorldCallbackService helloWorldCallbackService;
+    
+    // HelloWorld operations
+    
+    public String getGreetings(String s) {
+        System.out.println("Entering SCA HelloWorld.getGreetings: " + s);
+        String response = helloWorldCallbackService.getGreetings(s);
+        System.out.println("Leaving SCA HelloWorld.getGreetings: " + response);
+        return response;
+    }
+    
+    public String getGreetingsException(String s) throws ServiceRuntimeException {
+        System.out.println("Entering SCA HelloWorld.getGreetingsException: " + s);
+        String response = helloWorldCallbackService.getGreetings(s);
+        System.out.println("Leaving SCA HelloWorld.getGreetings: " + response);
+        throw new ServiceRuntimeException(response);
+    }    
+
+    public Foo getGreetingsComplex(Foo foo){
+        System.out.println("Entering SCA HelloWorld.getGreetingsComplex: " + foo.getBars().get(0).getS());
+        Foo response = helloWorldCallbackService.getGreetingsComplex(foo);
+        System.out.println("Leaving SCA HelloWorld.getGreetingsComplex: " + foo.getBars().get(0).getS());
+        return response;
+    } 
+    
+    // HelloWorldCallback operations
+    
+    public String getGreetingsCallback(String s) {
+        System.out.println("Entering SCA HelloWorld.getGreetingsCallback: " + s);
+        String response = helloWorldExternal.getGreetings(s);
+        System.out.println("Leaving SCA HelloWorld.getGreetingsCallback: " + response);
+        return response;
+    }
+    
+    public String getGreetingsExceptionCallback(String s) throws ServiceRuntimeException {
+        System.out.println("Entering SCA HelloWorld.getGreetingsExceptionCallback: " + s);
+        String response = helloWorldExternal.getGreetings(s);
+        System.out.println("Leaving SCA HelloWorld.getGreetingsCallback: " + response);
+        throw new ServiceRuntimeException(response);
+    }    
+
+    public Foo getGreetingsComplexCallback(Foo foo){
+        System.out.println("Entering SCA HelloWorld.getGreetingsComplexCallback: " + foo.getBars().get(0).getS());
+        Foo response = helloWorldExternal.getGreetingsComplex(foo);
+        System.out.println("Leaving SCA HelloWorld.getGreetingsComplexCallback: " + foo.getBars().get(0).getS());
+        return response;
+    } 
+    
+}

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplCallbackService.wsdl
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplCallbackService.wsdl?rev=1228143&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplCallbackService.wsdl (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplCallbackService.wsdl Fri Jan  6 12:19:29 2012
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+ * 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.    
+-->
+<definitions targetNamespace="http://ws.binding.sca.tuscany.apache.org/" 
+             name="HelloWorldImplCallbackService" 
+             xmlns="http://schemas.xmlsoap.org/wsdl/" 
+             xmlns:tns="http://ws.binding.sca.tuscany.apache.org/" 
+             xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
+             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+  <types>
+    <xsd:schema>
+      <xsd:import namespace="http://ws.binding.sca.tuscany.apache.org/" 
+                  schemaLocation="HelloWorldImplCallbackService_schema1.xsd"/>
+    </xsd:schema>
+  </types>
+  
+  <message name="getGreetingsCallback">
+    <part name="parameters" element="tns:getGreetingsCallback"/>
+  </message>
+  <message name="getGreetingsCallbackResponse">
+    <part name="parameters" element="tns:getGreetingsCallbackResponse"/>
+  </message>
+  <message name="getGreetingsComplexCallback">
+    <part name="parameters" element="tns:getGreetingsComplexCallback"/>
+  </message>
+  <message name="getGreetingsComplexCallbackResponse">
+    <part name="parameters" element="tns:getGreetingsComplexCallbackResponse"/>
+  </message>
+  
+  <portType name="HelloWorldCallbackImpl">
+    <operation name="getGreetingsCallback">
+      <input message="tns:getGreetingsCallback"/>
+      <output message="tns:getGreetingsCallbackResponse"/>
+    </operation>
+    <operation name="getGreetingsComplexCallback">
+      <input message="tns:getGreetingsComplexCallback"/>
+      <output message="tns:getGreetingsComplexCallbackResponse"/>
+    </operation>     
+  </portType>
+  
+  <binding name="HelloWorldCallbackImplPortBinding" type="tns:HelloWorldCallbackImpl">
+    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+    <operation name="getGreetingsCallback">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+    </operation>
+    <operation name="getGreetingsComplexCallback">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+    </operation>  
+  </binding>
+  
+  <service name="HelloWorldImplCallbackService">
+    <port name="HelloWorldCallbackImplPort" binding="tns:HelloWorldCallbackImplPortBinding">
+      <soap:address location="http://localhost:8085/HelloWorldService/HelloWorld"/>
+    </port>
+  </service>
+</definitions>
+
+
+

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplCallbackService_schema1.xsd
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplCallbackService_schema1.xsd?rev=1228143&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplCallbackService_schema1.xsd (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplCallbackService_schema1.xsd Fri Jan  6 12:19:29 2012
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+ * 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.    
+-->
+<xs:schema version="1.0" targetNamespace="http://ws.binding.sca.tuscany.apache.org/" 
+                         xmlns:tns="http://ws.binding.sca.tuscany.apache.org/" 
+                         xmlns:tns2="http://helloworld/external"
+                         xmlns:xs="http://www.w3.org/2001/XMLSchema">
+                         
+  <xs:import namespace="http://helloworld/external" schemaLocation="./HelloWorldImplService_schema2.xsd"/>
+  
+  <xs:element name="getGreetingsCallback" type="tns:getGreetingsCallback"/>
+  
+  <xs:element name="getGreetingsCallbackResponse" type="tns:getGreetingsCallbackResponse"/>
+
+  <xs:element name="getGreetingsComplexCallback" type="tns:getGreetingsComplexCallback"/>
+
+  <xs:element name="getGreetingsComplexCallbackResponse" type="tns:getGreetingsComplexCallbackResponse"/>
+     
+  <xs:complexType name="getGreetingsCallback">
+    <xs:sequence>
+      <xs:element name="arg0" type="xs:string" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="getGreetingsCallbackResponse">
+    <xs:sequence>
+      <xs:element name="return" type="xs:string" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="getGreetingsComplexCallback">
+    <xs:sequence>
+      <xs:element name="arg0" type="tns2:foo" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="getGreetingsComplexCallbackResponse">
+    <xs:sequence>
+      <xs:element name="return" type="tns2:foo" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>                           
+
+</xs:schema>
+

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplService.wsdl
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplService.wsdl?rev=1228143&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplService.wsdl (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplService.wsdl Fri Jan  6 12:19:29 2012
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+ * 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.    
+-->
+<definitions targetNamespace="http://ws.binding.sca.tuscany.apache.org/" 
+             name="HelloWorldImplService" 
+             xmlns="http://schemas.xmlsoap.org/wsdl/" 
+             xmlns:tns="http://ws.binding.sca.tuscany.apache.org/" 
+             xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
+             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+  <types>
+    <xsd:schema>
+      <xsd:import namespace="http://ws.binding.sca.tuscany.apache.org/" 
+                  schemaLocation="HelloWorldImplService_schema1.xsd"/>
+    </xsd:schema>
+  </types>
+  <message name="getGreetings">
+    <part name="parameters" element="tns:getGreetings"/>
+  </message>
+  <message name="getGreetingsResponse">
+    <part name="parameters" element="tns:getGreetingsResponse"/>
+  </message>
+  <message name="getGreetingsException">
+    <part name="parameters" element="tns:getGreetingsException"/>
+  </message>
+  <message name="getGreetingsExceptionResponse">
+    <part name="parameters" element="tns:getGreetingsExceptionResponse"/>
+  </message>
+  <message name="Exception">
+    <part name="fault" element="tns:Exception"/>
+  </message>
+  <message name="getGreetingsComplex">
+    <part name="parameters" element="tns:getGreetingsComplex"/>
+  </message>
+  <message name="getGreetingsComplexResponse">
+    <part name="parameters" element="tns:getGreetingsComplexResponse"/>
+  </message>
+  <message name="GetGreetingsCaps">
+    <part name="parameters" element="tns:GetGreetingsCaps"/>
+  </message>
+  <message name="GetGreetingsCapsResponse">
+    <part name="parameters" element="tns:GetGreetingsCapsResponse"/>
+  </message>   
+  <portType name="HelloWorldImpl">
+    <operation name="getGreetings">
+      <input message="tns:getGreetings"/>
+      <output message="tns:getGreetingsResponse"/>
+    </operation>
+    <operation name="getGreetingsException">
+      <input message="tns:getGreetingsException"/>
+      <output message="tns:getGreetingsExceptionResponse"/>
+      <fault message="tns:Exception" name="Exception"/>
+    </operation>
+    <operation name="getGreetingsComplex">
+      <input message="tns:getGreetingsComplex"/>
+      <output message="tns:getGreetingsComplexResponse"/>
+    </operation>     
+  </portType>
+  <binding name="HelloWorldImplPortBinding" type="tns:HelloWorldImpl">
+    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+    <operation name="getGreetings">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+    </operation>
+    <operation name="getGreetingsException">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+      <fault name="Exception">
+        <soap:fault name="Exception" use="literal"/>
+      </fault>
+    </operation>
+    <operation name="getGreetingsComplex">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+    </operation>  
+  </binding>
+  <service name="HelloWorldImplService">
+    <port name="HelloWorldImplPort" binding="tns:HelloWorldImplPortBinding">
+      <soap:address location="http://localhost:8085/HelloWorldService/HelloWorld"/>
+    </port>
+  </service>
+</definitions>
+
+
+

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplService_schema1.xsd
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplService_schema1.xsd?rev=1228143&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplService_schema1.xsd (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplService_schema1.xsd Fri Jan  6 12:19:29 2012
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+ * 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.    
+-->
+<xs:schema version="1.0" targetNamespace="http://ws.binding.sca.tuscany.apache.org/" 
+                         xmlns:tns="http://ws.binding.sca.tuscany.apache.org/" 
+                         xmlns:tns2="http://helloworld/external"
+                         xmlns:xs="http://www.w3.org/2001/XMLSchema">
+                         
+  <xs:import namespace="http://helloworld/external" schemaLocation="./HelloWorldImplService_schema2.xsd"/>                         
+
+  <xs:element name="Exception" type="tns:Exception"/>
+
+  <xs:element name="getGreetings" type="tns:getGreetings"/>
+
+  <xs:element name="getGreetingsComplex" type="tns:getGreetingsComplex"/>
+
+  <xs:element name="getGreetingsComplexResponse" type="tns:getGreetingsComplexResponse"/>
+
+  <xs:element name="getGreetingsException" type="tns:getGreetingsException"/>
+
+  <xs:element name="getGreetingsExceptionResponse" type="tns:getGreetingsExceptionResponse"/>
+
+  <xs:element name="getGreetingsResponse" type="tns:getGreetingsResponse"/>
+  
+  <xs:element name="GetGreetingsCaps" type="tns:GetGreetingsCaps"/>
+
+  <xs:element name="GetGreetingsCapsResponse" type="tns:GetGreetingsCapsResponse"/>    
+
+  <xs:complexType name="getGreetingsException">
+    <xs:sequence>
+      <xs:element name="arg0" type="xs:string" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="getGreetingsExceptionResponse">
+    <xs:sequence>
+      <xs:element name="return" type="xs:string" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="Exception">
+    <xs:sequence>
+      <xs:element name="message" type="xs:string" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="getGreetings">
+    <xs:sequence>
+      <xs:element name="arg0" type="xs:string" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="getGreetingsResponse">
+    <xs:sequence>
+      <xs:element name="return" type="xs:string" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="getGreetingsComplex">
+    <xs:sequence>
+      <xs:element name="arg0" type="tns2:foo" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="getGreetingsComplexResponse">
+    <xs:sequence>
+      <xs:element name="return" type="tns2:foo" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  
+  <xs:complexType name="GetGreetingsCaps">
+    <xs:sequence>
+      <xs:element name="arg0" type="xs:string" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="GetGreetingsCapsResponse">
+    <xs:sequence>
+      <xs:element name="return" type="xs:string" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>    
+</xs:schema>
+

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplService_schema2.xsd
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplService_schema2.xsd?rev=1228143&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplService_schema2.xsd (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplService_schema2.xsd Fri Jan  6 12:19:29 2012
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+ * 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.    
+-->
+<xs:schema version="1.0" targetNamespace="http://helloworld/external" 
+                         xmlns:tns="http://helloworld/external" 
+                         xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+  <xs:complexType name="foo">
+    <xs:sequence>
+      <xs:element name="bars" type="tns:bar" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="bar">
+    <xs:sequence>
+      <xs:element name="b" type="xs:boolean" minOccurs="0"/>
+      <xs:element name="s" type="xs:string" minOccurs="0"/>
+      <xs:element name="x" type="xs:int"/>
+      <xs:element name="y" type="xs:int" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+
+</xs:schema>
+

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldServiceService_schema1.xsd
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldServiceService_schema1.xsd?rev=1228143&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldServiceService_schema1.xsd (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldServiceService_schema1.xsd Fri Jan  6 12:19:29 2012
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+ * 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.    
+-->
+<xs:schema version="1.0" targetNamespace="http://helloworld/external" xmlns:tns="http://helloworld/external" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+  <xs:element name="getGreetings" type="tns:getGreetings"/>
+
+  <xs:element name="getGreetingsComplex" type="tns:getGreetingsComplex"/>
+
+  <xs:element name="getGreetingsComplexResponse" type="tns:getGreetingsComplexResponse"/>
+
+  <xs:element name="getGreetingsResponse" type="tns:getGreetingsResponse"/>
+
+  <xs:complexType name="getGreetings">
+    <xs:sequence>
+      <xs:element name="name" type="xs:string" form="qualified" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="getGreetingsResponse">
+    <xs:sequence>
+      <xs:element name="getGreetingsReturn" type="xs:string" form="qualified" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="getGreetingsComplex">
+    <xs:sequence>
+      <xs:element name="arg0" type="tns:foo" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="foo">
+    <xs:sequence>
+      <xs:element name="bars" type="tns:bar" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="bar">
+    <xs:sequence>
+      <xs:element name="b" type="xs:boolean" minOccurs="0"/>
+      <xs:element name="s" type="xs:string" minOccurs="0"/>
+      <xs:element name="x" type="xs:int"/>
+      <xs:element name="y" type="xs:int" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="getGreetingsComplexResponse">
+    <xs:sequence>
+      <xs:element name="return" type="tns:foo" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+</xs:schema>
+
+

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/META-INF/sca-contribution.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/META-INF/sca-contribution.xml?rev=1228143&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/META-INF/sca-contribution.xml (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/META-INF/sca-contribution.xml Fri Jan  6 12:19:29 2012
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    * Licensed to the Apache Software Foundation (ASF) under one
+    * or more contributor license agreements.  See the NOTICE file
+    * distributed with this work for additional information
+    * regarding copyright ownership.  The ASF licenses this file
+    * to you under the Apache License, Version 2.0 (the
+    * "License"); you may not use this file except in compliance
+    * with the License.  You may obtain a copy of the License at
+    * 
+    *   http://www.apache.org/licenses/LICENSE-2.0
+    * 
+    * Unless required by applicable law or agreed to in writing,
+    * software distributed under the License is distributed on an
+    * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    * KIND, either express or implied.  See the License for the
+    * specific language governing permissions and limitations
+    * under the License.    
+-->
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+              xmlns:itest="http://www.tuscany.apache.org/itests/binding/ws/axis2">
+   <deployable composite="itest:HelloWorld"/>
+</contribution>
\ No newline at end of file

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/helloworld-external-service.wsdl
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/helloworld-external-service.wsdl?rev=1228143&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/helloworld-external-service.wsdl (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/helloworld-external-service.wsdl Fri Jan  6 12:19:29 2012
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+ * 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.    
+-->
+<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.7-b01-. -->
+<definitions targetNamespace="http://helloworld/external" name="HelloWorldServiceService" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://helloworld/external" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+  <types>
+    <xsd:schema>
+      <xsd:import namespace="http://helloworld/external" schemaLocation="HelloWorldServiceService_schema1.xsd"/>
+    </xsd:schema>
+  </types>
+  <message name="getGreetings">
+    <part name="parameters" element="tns:getGreetings"/>
+  </message>
+  <message name="getGreetingsResponse">
+    <part name="parameters" element="tns:getGreetingsResponse"/>
+  </message>
+  <message name="getGreetingsComplex">
+    <part name="parameters" element="tns:getGreetingsComplex"/>
+  </message>
+  <message name="getGreetingsComplexResponse">
+    <part name="parameters" element="tns:getGreetingsComplexResponse"/>
+  </message>
+  <portType name="HelloWorldService">
+    <operation name="getGreetings">
+      <input message="tns:getGreetings"/>
+      <output message="tns:getGreetingsResponse"/>
+    </operation>
+    <operation name="getGreetingsComplex">
+      <input message="tns:getGreetingsComplex"/>
+      <output message="tns:getGreetingsComplexResponse"/>
+    </operation>
+  </portType>
+  <binding name="HelloWorldServicePortBinding" type="tns:HelloWorldService">
+    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+    <operation name="getGreetings">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+    </operation>
+    <operation name="getGreetingsComplex">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+    </operation>
+  </binding>
+  <service name="HelloWorldServiceService">
+    <port name="HelloWorldServicePort" binding="tns:HelloWorldServicePortBinding">
+      <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+    </port>
+  </service>
+</definitions>

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/helloworld.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/helloworld.composite?rev=1228143&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/helloworld.composite (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/helloworld.composite Fri Jan  6 12:19:29 2012
@@ -0,0 +1,48 @@
+<?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://docs.oasis-open.org/ns/opencsa/sca/200912"
+		   xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+		   targetNamespace="http://www.tuscany.apache.org/itests/binding/ws/axis2"
+           name="HelloWorld">
+               
+    <component name="HelloWorldService">
+		<implementation.java class="org.apache.tuscany.sca.binding.ws.HelloWorldImpl"/>
+	    <service name="HelloWorld">
+            <binding.ws wsdlElement="http://ws.binding.sca.tuscany.apache.org/#wsdl.port(HelloWorldImplService/HelloWorldImplPort)"/>
+	    </service>
+        <reference name="helloWorldExternal">
+            <binding.ws uri="http://localhost:8086/External/HelloWorld"/>
+        </reference>  	    
+        <reference name="helloWorldCallbackService" target="HelloWorldCallbackService">
+            <interface.wsdl interface="http://ws.binding.sca.tuscany.apache.org/#wsdl.porttype(HelloWorldImpl)"
+                            callbackInterface="http://ws.binding.sca.tuscany.apache.org/#wsdl.porttype(HelloWorldCallbackImpl)" />
+        </reference> 
+    </component>
+    
+    <component name="HelloWorldCallbackService">
+        <implementation.java class="org.apache.tuscany.sca.binding.ws.HelloWorldCallbackServiceImpl"/>
+        <service name="HelloWorldCallbackService">
+            <interface.wsdl interface="http://ws.binding.sca.tuscany.apache.org/#wsdl.porttype(HelloWorldImpl)"
+                            callbackInterface="http://ws.binding.sca.tuscany.apache.org/#wsdl.porttype(HelloWorldCallbackImpl)" /> 
+            <binding.ws uri="http://localhost:8085/HelloWorldService/HelloWorldCallbackService"/>
+        </service>   
+    </component>    
+    
+</composite>

Added: tuscany/sca-java-2.x/trunk/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackWSDLIfaceTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackWSDLIfaceTestCase.java?rev=1228143&view=auto
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackWSDLIfaceTestCase.java (added)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackWSDLIfaceTestCase.java Fri Jan  6 12:19:29 2012
@@ -0,0 +1,112 @@
+/*
+ * 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.ws.launcher.axis2;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import org.apache.tuscany.sca.binding.ws.jaxws.external.client.HelloWorldClientLauncher;
+import org.apache.tuscany.sca.binding.ws.jaxws.external.service.HelloWorldServiceLauncher;
+import org.apache.tuscany.sca.binding.ws.jaxws.sca.Bar;
+import org.apache.tuscany.sca.binding.ws.jaxws.sca.Foo;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+
+public class CallbackWSDLIfaceTestCase {
+
+    private Node node;
+    private HelloWorldServiceLauncher externalService;
+    private HelloWorldClientLauncher externalClient;
+
+    @Before
+    public void setUp() throws Exception {
+        // Start the external service
+        externalService = new HelloWorldServiceLauncher();
+        externalService.createService();
+       
+        // Start the SCA contribution
+        node = NodeFactory.newInstance().createNode(new Contribution("wsdl-iface", "../contribution-callback-wsdl-iface/target/itest-ws-contribution-callback-wsdl-iface.jar"));
+        node.start();
+        
+        // start the external client
+        try {
+            externalClient = new HelloWorldClientLauncher();
+            externalClient.createClient();
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            throw ex;
+        }
+    }
+
+/*
+    @Test
+    public void testWait() throws Exception {
+        System.out.println("Press a key");
+        System.in.read();
+    }
+*/
+  
+    @Test
+    public void testGetGreetings() throws Exception {
+        assertEquals("Hello Fred", externalClient.getGreetings("Fred"));
+    }
+        
+    @Test
+    public void testGetGreetingsComplex() throws Exception {        
+        Foo f = new Foo();
+        Bar b1 = new Bar();
+        b1.setS("petra");
+        b1.setX(1);
+        b1.setY(new Integer(2));
+        b1.setB(Boolean.TRUE);
+        Bar b2 = new Bar();
+        b2.setS("beate");
+        b2.setX(3);
+        b2.setY(new Integer(4));
+        b2.setB(Boolean.FALSE);
+        f.getBars().add(b1);
+        f.getBars().add(b2);
+       
+        Foo f2 = externalClient.getGreetingsComplex(f);
+
+        assertEquals("petra", f2.getBars().get(0).getS());
+        assertEquals(1, f2.getBars().get(0).getX());
+        assertEquals(2, f2.getBars().get(0).getY().intValue());
+        assertTrue(f2.getBars().get(0).isB());
+        assertEquals("simon", f2.getBars().get(2).getS());
+        assertEquals(7, f2.getBars().get(2).getX());
+        assertEquals(8, f2.getBars().get(2).getY().intValue());
+        assertTrue(f2.getBars().get(2).isB().booleanValue());
+    }  
+    
+    @After
+    public void tearDown() throws Exception {
+        node.stop();
+        externalClient.destroyClient();
+        externalService.destoryService();
+    }
+
+}

Modified: tuscany/sca-java-2.x/trunk/testing/itest/ws/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/ws/pom.xml?rev=1228143&r1=1228142&r2=1228143&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/testing/itest/ws/pom.xml (original)
+++ tuscany/sca-java-2.x/trunk/testing/itest/ws/pom.xml Fri Jan  6 12:19:29 2012
@@ -52,6 +52,7 @@
     <module>contribution-callback-forwardspec</module>
     <module>contribution-callback-fullspec</module>
     <module>contribution-callback-promotion</module>
+    <module>contribution-callback-wsdl-iface</module>
     <module>contribution-doc-lit</module>
     <module>contribution-doc-lit-wrapped</module>
     <module>contribution-rpc-lit</module>



Mime
View raw message