summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/testing/itest/async-services
diff options
context:
space:
mode:
authoredwardsmj <edwardsmj@13f79535-47bb-0310-9956-ffa450edef68>2011-01-20 17:09:19 +0000
committeredwardsmj <edwardsmj@13f79535-47bb-0310-9956-ffa450edef68>2011-01-20 17:09:19 +0000
commit9cc1048cec667bab9e31c3d97759372730917556 (patch)
tree8b3e75d614f4faa62d0221108db644818356ed79 /sca-java-2.x/trunk/testing/itest/async-services
parentdec8d4b54c3df67becf018552ca3c2d9d091218d (diff)
Adding new group of Itests for Async Services
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1061396 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/testing/itest/async-services')
-rw-r--r--sca-java-2.x/trunk/testing/itest/async-services/pom.xml69
-rw-r--r--sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/ASM_0002_Client.java77
-rw-r--r--sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault1.java34
-rw-r--r--sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault2.java34
-rw-r--r--sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1.java26
-rw-r--r--sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServer.java38
-rw-r--r--sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServerImpl.java168
-rw-r--r--sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestException.java27
-rw-r--r--sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestInvocation.java32
-rw-r--r--sca-java-2.x/trunk/testing/itest/async-services/src/main/resources/TestClient.wsdl115
-rw-r--r--sca-java-2.x/trunk/testing/itest/async-services/src/main/resources/TestInvocation.wsdl68
-rw-r--r--sca-java-2.x/trunk/testing/itest/async-services/src/main/resources/Test_Async_001.composite51
-rw-r--r--sca-java-2.x/trunk/testing/itest/async-services/src/main/resources/Test_Async_002.composite51
-rw-r--r--sca-java-2.x/trunk/testing/itest/async-services/src/main/resources/Test_Async_003.composite51
-rw-r--r--sca-java-2.x/trunk/testing/itest/async-services/src/main/resources/oasis-sca-tests.properties20
-rw-r--r--sca-java-2.x/trunk/testing/itest/async-services/src/main/resources/tuscany-oasis-sca-tests-errors.properties91
-rw-r--r--sca-java-2.x/trunk/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_001_TestCase.java73
-rw-r--r--sca-java-2.x/trunk/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_002_TestCase.java71
-rw-r--r--sca-java-2.x/trunk/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_003_TestCase.java71
19 files changed, 1167 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/testing/itest/async-services/pom.xml b/sca-java-2.x/trunk/testing/itest/async-services/pom.xml
new file mode 100644
index 0000000000..0e5ac16fcb
--- /dev/null
+++ b/sca-java-2.x/trunk/testing/itest/async-services/pom.xml
@@ -0,0 +1,69 @@
+<?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.
+-->
+<!--
+ A set of tests dealing with Asynchronous services
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-itest</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-async-services</artifactId>
+ <name>Apache Tuscany SCA iTest Asynchronous Services</name>
+
+ <dependencies>
+
+ <!-- This is the SCA API bundle: published by OASIS -->
+ <dependency>
+ <groupId>org.oasis-open.sca.j</groupId>
+ <artifactId>sca-caa-apis</artifactId>
+ <version>1.1-CD04</version>
+ </dependency>
+
+ <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.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-jms-runtime</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.19</version>
+ </dependency>
+
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/ASM_0002_Client.java b/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/ASM_0002_Client.java
new file mode 100644
index 0000000000..880fd3cb9e
--- /dev/null
+++ b/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/ASM_0002_Client.java
@@ -0,0 +1,77 @@
+/*
+ *
+ * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved.
+ * OASIS trademark, IPR and other policies apply.
+ *
+ */
+package org.apache.tuscany.sca.itest;
+
+import org.oasisopen.sca.annotation.Service;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Property;
+import org.apache.tuscany.sca.itest.Service1;
+import org.apache.tuscany.sca.itest.TestException;
+import org.apache.tuscany.sca.itest.TestInvocation;
+
+
+/**
+ * Test initiation class with a single reference of multiplicity 1..1
+ * @author MikeEdwards
+ *
+ */
+@Service(TestInvocation.class)
+public class ASM_0002_Client implements org.apache.tuscany.sca.itest.TestInvocation {
+
+ @Property
+ public String testName = "ASM_xxxx";
+
+ // required=false implies a multiplicity of 0..1 so that this component need not be wired
+ @Reference(required=false)
+ public Service1 reference1;
+
+ /**
+ * This method is offered as a service and is
+ * invoked by the test client to run the test
+ */
+ public String invokeTest( String input ) throws TestException {
+ String response = null;
+
+ try {
+ response = runTest( input );
+ } catch( Exception e ) {
+ System.out.println("TestInvocation: Test service got an exception during execution:" + e.getClass().getName()+ " " + e.getMessage() );
+ e.printStackTrace();
+ throw new TestException("Test service got an exception during execution: " + e.getClass().getName()+ " " + e.getMessage() );
+ } // end try
+ return response;
+ } // end method invokeTest
+
+ /**
+ * This method actually runs the test - and is subclassed by classes that run other tests.
+ * @param input - an input string
+ * @return - a response string = "ASM_0001 inputString xxxxx" where xxxxx depends on the invoked service
+ *
+ */
+ public String runTest( String input ){
+ String response = null;
+ // Deals with cases where this component reference is not wired
+ if( reference1 != null ) {
+ String response1 = reference1.operation1(input);
+
+ response = testName + " " + input + " " + response1;
+ } else {
+ response = testName + " " + input + " no invocation";
+ } // end if
+
+ return response;
+ } // end method runTest
+
+ /**
+ * Sets the name of the test
+ * @param name - the test name
+ */
+ protected void setTestName( String name ) {
+ testName = name;
+ }
+
+} //
diff --git a/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault1.java b/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault1.java
new file mode 100644
index 0000000000..b2fea7a4dd
--- /dev/null
+++ b/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault1.java
@@ -0,0 +1,34 @@
+/*
+ *
+ * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved.
+ * OASIS trademark, IPR and other policies apply.
+ *
+ */
+ package org.apache.tuscany.sca.itest;
+
+/**
+ * A business exception
+ *
+ */
+public class BusinessFault1 extends Exception {
+
+ // Serialization UID
+ private static final long serialVersionUID = 44240525335368929L;
+
+ public BusinessFault1() {
+ super();
+ }
+
+ public BusinessFault1(String arg0) {
+ super(arg0);
+ }
+
+ public BusinessFault1(Throwable arg0) {
+ super(arg0);
+ }
+
+ public BusinessFault1(String arg0, Throwable arg1) {
+ super(arg0, arg1);
+ }
+
+} // end class BusinessFault1
diff --git a/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault2.java b/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault2.java
new file mode 100644
index 0000000000..fac4f58c75
--- /dev/null
+++ b/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault2.java
@@ -0,0 +1,34 @@
+/*
+ *
+ * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved.
+ * OASIS trademark, IPR and other policies apply.
+ *
+ */
+ package org.apache.tuscany.sca.itest;
+
+/**
+ * A business exception
+ *
+ */
+public class BusinessFault2 extends Exception {
+
+ // Serialization UID
+ private static final long serialVersionUID = 44240525335368929L;
+
+ public BusinessFault2() {
+ super();
+ }
+
+ public BusinessFault2(String arg0) {
+ super(arg0);
+ }
+
+ public BusinessFault2(Throwable arg0) {
+ super(arg0);
+ }
+
+ public BusinessFault2(String arg0, Throwable arg1) {
+ super(arg0, arg1);
+ }
+
+} // end class BusinessFault1
diff --git a/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1.java b/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1.java
new file mode 100644
index 0000000000..6c45fa3c03
--- /dev/null
+++ b/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1.java
@@ -0,0 +1,26 @@
+/*
+ *
+ * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved.
+ * OASIS trademark, IPR and other policies apply.
+ *
+ */
+package org.apache.tuscany.sca.itest;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * A test service interface
+ * @author MikeEdwards
+ *
+ */
+@Remotable
+public interface Service1 {
+
+ /**
+ * Method for invoking testcase service
+ * @param input - input parameter(s) as a String
+ * @return - output data as a String
+ */
+ public String operation1( String input );
+
+}
diff --git a/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServer.java b/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServer.java
new file mode 100644
index 0000000000..80bdba955e
--- /dev/null
+++ b/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServer.java
@@ -0,0 +1,38 @@
+/*
+ *
+ * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved.
+ * OASIS trademark, IPR and other policies apply.
+ *
+ */
+package org.apache.tuscany.sca.itest;
+
+import org.oasisopen.sca.ResponseDispatch;
+import org.oasisopen.sca.annotation.AsyncFault;
+import org.oasisopen.sca.annotation.AsyncInvocation;
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * Service1 service interface
+ * - Asynchronous server version
+ */
+@AsyncInvocation
+@Remotable
+public interface Service1AsyncServer {
+
+ /**
+ * Synchronous method for invoking testcase service
+ * @param input - input parameter as a String
+ * @return - output data as a String
+ * Listed here for documentation purposes - this is the operation that the async server operation maps to
+ */
+ // public String operation1( String input );
+
+ /**
+ * Async server version of the synchronous operation1 method
+ * @param input - input parameter as a String
+ * @param handler - the ResponseDispatch<String> handler used to send the response message (a String in this case)
+ */
+ @AsyncFault( {BusinessFault1.class, BusinessFault2.class} )
+ public void operation1Async( String input, ResponseDispatch<String> handler );
+
+} // end interface Service1AsyncServer
diff --git a/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServerImpl.java b/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServerImpl.java
new file mode 100644
index 0000000000..16c513bbf3
--- /dev/null
+++ b/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServerImpl.java
@@ -0,0 +1,168 @@
+/*
+ *
+ * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved.
+ * OASIS trademark, IPR and other policies apply.
+ *
+ */
+package org.apache.tuscany.sca.itest;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+import org.oasisopen.sca.ResponseDispatch;
+import org.oasisopen.sca.ServiceUnavailableException;
+import org.oasisopen.sca.annotation.*;
+
+
+/**
+ * Java component implementation
+ * 1 service with interface Service1AsyncServer
+ * 0 references
+ *
+ * Async server implementation of the Service1 service
+ *
+ */
+@Service(Service1AsyncServer.class)
+public class Service1AsyncServerImpl implements Service1AsyncServer {
+
+ private volatile ResponseDispatch<String> responseHandler = null;
+
+ private volatile String tmpFilePath = null;
+
+ @Property(required=true)
+ public volatile String serviceName = "service1";
+
+ /*
+ public String operation1(String input) {
+ return serviceName + " operation1 invoked";
+ }
+ */
+
+ public void operation1Async(String input, ResponseDispatch<String> handler) {
+ // Store the ResponseDispatch object
+ responseHandler = handler;
+
+ serializeResponseHandler(responseHandler);
+
+ // Now kick off processing on a separate thread that will dispatch the response some time after this
+ // initial method returns...
+ runResponseThread( input );
+
+ // return
+ return;
+ } // end method operation1Async
+
+ /**
+ * Serialize the response handler to a file
+ * @param responseHandler2
+ */
+ private void serializeResponseHandler(
+ ResponseDispatch<String> responseHandler2) {
+ if( responseHandler2 instanceof Serializable ) {
+ Serializable obj = (Serializable)responseHandler2;
+ FileOutputStream fos;
+ try {
+ File tmpFile = File.createTempFile("Async_Server", null);
+ tmpFilePath = tmpFile.getCanonicalPath();
+ fos = new FileOutputStream(tmpFile);
+ ObjectOutputStream oos = new ObjectOutputStream(fos);
+
+ oos.writeObject(obj);
+
+ oos.close();
+ } catch (FileNotFoundException e) {
+ } catch (IOException e) {
+ e.printStackTrace();
+ } // end try
+
+ } // end if
+ } // end method serializeResponseHandler
+
+ @SuppressWarnings("unchecked")
+ public ResponseDispatch<String> deserializeResponseHandler() {
+ try {
+ if( tmpFilePath == null ) return null;
+ FileInputStream fis = new FileInputStream( tmpFilePath );
+ ObjectInputStream ois = new ObjectInputStream(fis);
+
+ ResponseDispatch<String> responseDispatch = (ResponseDispatch<String>) ois.readObject();
+
+ ois.close();
+ return responseDispatch;
+ } catch (Exception e) {
+ e.printStackTrace();
+ } // end try
+
+ return null;
+ } // end method deserializeResponseHandler
+
+ /**
+ * Method used to run a separate thread, to invoke the ResponseDispatch
+ */
+ private void runResponseThread( String input ) {
+
+ int invocationCount = 2; // # of threads to use
+ long maxWaitTime = 5000; // Max wait time for completion = 5sec
+
+ // Run the tests using a ThreadPoolExecutor
+ ThreadPoolExecutor theExecutor = new ThreadPoolExecutor( invocationCount, invocationCount,
+ maxWaitTime, TimeUnit.MILLISECONDS,
+ new ArrayBlockingQueue<Runnable>( invocationCount ) );
+
+
+
+ // Perform the invocations on separate thread...
+ theExecutor.execute( new separateThreadInvoker( input ) );
+
+ } // end method runResponseThread
+
+ /**
+ * An inner class which acts as a runnable task for invoking APIs on threads that are not processing
+ * either a service operation or a callback operation
+ */
+ private class separateThreadInvoker implements Runnable {
+
+ private long pauseTime = 1000; // Pause interval to allow initiating thread to complete
+ private String input; // Input parameter
+
+ public separateThreadInvoker( String input ) {
+ super();
+ this.input = input;
+ } // end constructor
+
+ public void run() {
+
+ // Wait for a short time to ensure that the invoking thread has time to return
+ try {
+ Thread.sleep(pauseTime);
+ } catch (InterruptedException e) {
+ // Nothing to do here...
+ } // end try
+
+ ResponseDispatch<String> responseHandler2 = deserializeResponseHandler();
+ if( responseHandler2 != null ) {
+ responseHandler = responseHandler2;
+ } // end if
+
+ if( "exception".equals(input) ) {
+ // Invoke the response dispatch object to return a an exception
+ responseHandler.sendFault( new BusinessFault1(serviceName + " operation1 invoked asynchronously"));
+
+ } else {
+ // Invoke the response dispatch object to return a response
+ responseHandler.sendResponse( serviceName + " operation1 invoked asynchronously");
+ } // end if
+ } // end method run
+
+ } // end class separateThreadInvoker
+
+}
diff --git a/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestException.java b/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestException.java
new file mode 100644
index 0000000000..456ed2ba02
--- /dev/null
+++ b/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestException.java
@@ -0,0 +1,27 @@
+/*
+ *
+ * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved.
+ * OASIS trademark, IPR and other policies apply.
+ *
+ */
+package org.apache.tuscany.sca.itest;
+
+/*
+ * Exception thrown by SCA Test services
+ */
+public class TestException extends Exception {
+
+ /**
+ * Required serialVersionUID field
+ */
+ private static final long serialVersionUID = -6978058912756564824L;
+
+ public TestException() { super(); };
+
+ public TestException( String msg ) { super( msg ); };
+
+ public TestException( String msg, Throwable cause ) { super( msg, cause); };
+
+ public TestException( Throwable cause ) { super( cause ); };
+
+}
diff --git a/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestInvocation.java b/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestInvocation.java
new file mode 100644
index 0000000000..a0233946b5
--- /dev/null
+++ b/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestInvocation.java
@@ -0,0 +1,32 @@
+/*
+ *
+ * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved.
+ * OASIS trademark, IPR and other policies apply.
+ *
+ */
+package org.apache.tuscany.sca.itest;
+
+import javax.jws.WebMethod;
+import org.oasisopen.sca.annotation.Remotable;
+import org.apache.tuscany.sca.itest.TestException;
+
+
+/**
+ * Basic interface to invoke testcases
+ * 1 operation
+ * - "invokeTest", string input, string output
+ *
+ */
+@Remotable
+public interface TestInvocation {
+
+ /**
+ * Method for invoking testcase
+ * @param input - input parameter(s) as a String
+ * @return - output data as a String
+ * @throws - a TestException is thrown in cases where the test service fails internally
+ */
+ @WebMethod
+ public String invokeTest( String input ) throws TestException ;
+
+}
diff --git a/sca-java-2.x/trunk/testing/itest/async-services/src/main/resources/TestClient.wsdl b/sca-java-2.x/trunk/testing/itest/async-services/src/main/resources/TestClient.wsdl
new file mode 100644
index 0000000000..c67d651fae
--- /dev/null
+++ b/sca-java-2.x/trunk/testing/itest/async-services/src/main/resources/TestClient.wsdl
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ *
+ * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved.
+ * OASIS trademark, IPR and other policies apply.
+ *
+-->
+<!-- Produced from the TestInvocation.java interface by running a service
+ based on that interface in an SCA runtime using a Web services binding
+
+ Mike Edwards, 6th January 2008
+-->
+<wsdl:definitions name="TestInvocationService"
+ targetNamespace="http://test.sca.oasisopen.org/"
+ xmlns:tns="http://test.sca.oasisopen.org/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:SOAP11="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:SOAP12="http://schemas.xmlsoap.org/wsdl/soap12/">
+ <wsdl:types>
+ <xs:schema targetNamespace="http://test.sca.oasisopen.org/" version="1.0"
+ xmlns:tns="http://test.sca.oasisopen.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="TestException" type="tns:TestException"/>
+ <xs:complexType name="TestException">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="message" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ <xs:schema attributeFormDefault="qualified" elementFormDefault="unqualified"
+ targetNamespace="http://test.sca.oasisopen.org/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="invokeTest">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="invokeTestResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:schema>
+ </wsdl:types>
+ <wsdl:message name="invokeTest">
+ <wsdl:part name="parameters" element="tns:invokeTest">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="invokeTestResponse">
+ <wsdl:part name="parameters" element="tns:invokeTestResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="TestException">
+ <wsdl:part name="TestException" element="tns:TestException">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="TestInvocation">
+ <wsdl:operation name="invokeTest">
+ <wsdl:input message="tns:invokeTest">
+ </wsdl:input>
+ <wsdl:output message="tns:invokeTestResponse">
+ </wsdl:output>
+ <wsdl:fault name="TestException" message="tns:TestException">
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:portType>
+ <!-- Binding for Service1 that uses SOAP v1.1 protocol -->
+ <wsdl:binding name="TestInvocationBinding" type="tns:TestInvocation">
+ <SOAP:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="invokeTest">
+ <SOAP:operation soapAction=""/>
+ <wsdl:input>
+ <SOAP:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <SOAP:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="TestException">
+ <SOAP:fault name="TestException" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+ <!-- Binding for Service1 that uses SOAP v1.2 protocol -->
+ <wsdl:binding name="TestInvocationBindingSOAP12" type="tns:TestInvocation">
+ <SOAP12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="invokeTest">
+ <SOAP12:operation soapAction=""/>
+ <wsdl:input>
+ <SOAP12:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <SOAP12:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="TestException">
+ <SOAP12:fault name="TestException" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="TestInvocationService">
+ <wsdl:port name="TestInvocationPort" binding="tns:TestInvocationBinding">
+ <SOAP:address location="http://localhost:8080/TestClient/TestInvocation"/>
+ </wsdl:port>
+ </wsdl:service>
+ <wsdl:service name="TestInvocationServiceSOAP12">
+ <wsdl:port name="TestInvocationPortSOAP12" binding="tns:TestInvocationBindingSOAP12">
+ <SOAP12:address location="http://localhost:8080/TestClient/TestInvocation"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
diff --git a/sca-java-2.x/trunk/testing/itest/async-services/src/main/resources/TestInvocation.wsdl b/sca-java-2.x/trunk/testing/itest/async-services/src/main/resources/TestInvocation.wsdl
new file mode 100644
index 0000000000..a8a7210496
--- /dev/null
+++ b/sca-java-2.x/trunk/testing/itest/async-services/src/main/resources/TestInvocation.wsdl
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ *
+ * Copyright(C) OASIS(R) 2009, 2010. All Rights Reserved.
+ * OASIS trademark, IPR and other policies apply.
+ *
+ * WSDL version of the client TestInvocation interface
+-->
+<wsdl:definitions name="TestInvocationService"
+ targetNamespace="http://test.sca.oasisopen.org/"
+ xmlns:tns="http://test.sca.oasisopen.org/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <wsdl:types>
+ <xs:schema
+ targetNamespace="http://test.sca.oasisopen.org/" version="1.0"
+ xmlns:tns="http://test.sca.oasisopen.org/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="TestException" type="tns:TestException"/>
+ <xs:complexType name="TestException">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="message" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ <xs:schema attributeFormDefault="qualified"
+ elementFormDefault="unqualified"
+ targetNamespace="http://test.sca.oasisopen.org/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="invokeTest">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="invokeTestResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:schema>
+ </wsdl:types>
+ <wsdl:message name="invokeTest">
+ <wsdl:part name="invokeTest" element="tns:invokeTest">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="invokeTestResponse">
+ <wsdl:part name="parameters" element="tns:invokeTestResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="TestException">
+ <wsdl:part name="TestException" element="tns:TestException">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="TestInvocation">
+ <wsdl:operation name="invokeTest">
+ <wsdl:input message="tns:invokeTest">
+ </wsdl:input>
+ <wsdl:output message="tns:invokeTestResponse">
+ </wsdl:output>
+ <wsdl:fault name="TestException" message="tns:TestException">
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:portType>
+</wsdl:definitions> \ No newline at end of file
diff --git a/sca-java-2.x/trunk/testing/itest/async-services/src/main/resources/Test_Async_001.composite b/sca-java-2.x/trunk/testing/itest/async-services/src/main/resources/Test_Async_001.composite
new file mode 100644
index 0000000000..5c51f4a7b6
--- /dev/null
+++ b/sca-java-2.x/trunk/testing/itest/async-services/src/main/resources/Test_Async_001.composite
@@ -0,0 +1,51 @@
+<?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.
+-->
+<!--
+ Async test 001
+ Tests that an async service can be invoked over the SCA binding
+ - the async service:
+ a) returns the response from a different thread than the one that receives the service request
+ b) serializes the ResponseDispatch object between the request thread and the response thread
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
+ xmlns:test="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
+ name="TEST_Async_001">
+
+ <component name="TestClient">
+ <implementation.java class="org.apache.tuscany.sca.itest.ASM_0002_Client"/>
+ <service name="TestInvocation">
+ <interface.java interface="org.apache.tuscany.sca.itest.TestInvocation"/>
+ <binding.ws/>
+ </service>
+ <reference name="reference1" target="Async_001Component1/Service1AsyncServer" />
+ <property name="testName">Async_001</property>
+ </component>
+
+ <component name="Async_001Component1">
+ <implementation.java class="org.apache.tuscany.sca.itest.Service1AsyncServerImpl"/>
+ <service name="Service1AsyncServer">
+ <interface.java interface="org.apache.tuscany.sca.itest.Service1AsyncServer"/>
+ <binding.jms/>
+ </service>
+ <property name="serviceName">service1</property>
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/trunk/testing/itest/async-services/src/main/resources/Test_Async_002.composite b/sca-java-2.x/trunk/testing/itest/async-services/src/main/resources/Test_Async_002.composite
new file mode 100644
index 0000000000..1eee9501d6
--- /dev/null
+++ b/sca-java-2.x/trunk/testing/itest/async-services/src/main/resources/Test_Async_002.composite
@@ -0,0 +1,51 @@
+<?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.
+-->
+<!--
+ Async test 002
+ Tests that an async service can be invoked over the SCA binding
+ - the async service:
+ a) returns the response from a different thread than the one that receives the service request
+ b) serializes the ResponseDispatch object between the request thread and the response thread
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
+ xmlns:test="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
+ name="TEST_Async_002">
+
+ <component name="TestClient">
+ <implementation.java class="org.apache.tuscany.sca.itest.ASM_0002_Client"/>
+ <service name="TestInvocation">
+ <interface.java interface="org.apache.tuscany.sca.itest.TestInvocation"/>
+ <binding.ws/>
+ </service>
+ <reference name="reference1" target="Async_002Component1/Service1AsyncServer" />
+ <property name="testName">Async_002</property>
+ </component>
+
+ <component name="Async_002Component1">
+ <implementation.java class="org.apache.tuscany.sca.itest.Service1AsyncServerImpl"/>
+ <service name="Service1AsyncServer">
+ <interface.java interface="org.apache.tuscany.sca.itest.Service1AsyncServer"/>
+ <binding.sca/>
+ </service>
+ <property name="serviceName">service1</property>
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/trunk/testing/itest/async-services/src/main/resources/Test_Async_003.composite b/sca-java-2.x/trunk/testing/itest/async-services/src/main/resources/Test_Async_003.composite
new file mode 100644
index 0000000000..ae56034ccf
--- /dev/null
+++ b/sca-java-2.x/trunk/testing/itest/async-services/src/main/resources/Test_Async_003.composite
@@ -0,0 +1,51 @@
+<?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.
+-->
+<!--
+ Async test 003
+ Tests that an async service can be invoked over the Web services binding
+ - the async service:
+ a) returns the response from a different thread than the one that receives the service request
+ b) serializes the ResponseDispatch object between the request thread and the response thread
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
+ xmlns:test="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
+ name="TEST_Async_003">
+
+ <component name="TestClient">
+ <implementation.java class="org.apache.tuscany.sca.itest.ASM_0002_Client"/>
+ <service name="TestInvocation">
+ <interface.java interface="org.apache.tuscany.sca.itest.TestInvocation"/>
+ <binding.ws/>
+ </service>
+ <reference name="reference1" target="Async_003Component1/Service1AsyncServer" />
+ <property name="testName">Async_003</property>
+ </component>
+
+ <component name="Async_003Component1">
+ <implementation.java class="org.apache.tuscany.sca.itest.Service1AsyncServerImpl"/>
+ <service name="Service1AsyncServer">
+ <interface.java interface="org.apache.tuscany.sca.itest.Service1AsyncServer"/>
+ <binding.ws/>
+ </service>
+ <property name="serviceName">service1</property>
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/trunk/testing/itest/async-services/src/main/resources/oasis-sca-tests.properties b/sca-java-2.x/trunk/testing/itest/async-services/src/main/resources/oasis-sca-tests.properties
new file mode 100644
index 0000000000..742566fd5a
--- /dev/null
+++ b/sca-java-2.x/trunk/testing/itest/async-services/src/main/resources/oasis-sca-tests.properties
@@ -0,0 +1,20 @@
+#
+# Copyright(C) OASIS(R) 2009, 2010. All Rights Reserved.
+# OASIS trademark, IPR and other policies apply.
+#
+
+# OASIS SCA Assembly test properties
+# The implementation type to use for Assembly test suite
+# Examples: "Java" "BPEL" "CPP" "C"
+org.oasis.sca.tests.assembly.lang=Java
+
+# The class to use as the Runtime Bridge for the SCA runtime under test
+org.oasis.sca.tests.assembly.runtime_bridge=org.apache.tuscany.sca.itest.TuscanyRuntimeBridge
+
+# The location of the contributions for the test suite
+# %1 represents the placement of the name of each contribution into the location URI
+# Following uses directories for the contributions
+org.oasis.sca.tests.assembly.contribution.location=file:/target/classes/
+# Following uses ZIP files for the contributions
+#org.oasis.sca.tests.assembly.contribution.location=file:/C:/OASIS_TESTS/SCA-Assembly/TestCases/%1/target/%1.zip
+
diff --git a/sca-java-2.x/trunk/testing/itest/async-services/src/main/resources/tuscany-oasis-sca-tests-errors.properties b/sca-java-2.x/trunk/testing/itest/async-services/src/main/resources/tuscany-oasis-sca-tests-errors.properties
new file mode 100644
index 0000000000..ea9a5efdfb
--- /dev/null
+++ b/sca-java-2.x/trunk/testing/itest/async-services/src/main/resources/tuscany-oasis-sca-tests-errors.properties
@@ -0,0 +1,91 @@
+# 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.
+
+ASM_4002=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM40003,ASM60003] Duplicate implementation service name: Component = TestComponent1 Service = Service1
+ASM_4003=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM40004,ASM50007,ASM60006] Duplicate implementation reference name: Component = TestComponent1 Reference = Reference1
+ASM_4004=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM40005,ASM60014] Duplicate implementation property name: Component = TestComponent1 Property = propertyName
+ASM_4007=org.apache.tuscany.sca.contribution.processor.ContributionReadException: [ASM40010,ASM60040] Error: property has both @type and @element attribute values - propertyName
+ASM_4008=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM40011,ASM60034] No value configured on a mustSupply property: Component = TestComponent1 Property = propertyName
+ASM_5004=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestClient] - [ASM50022] Too many targets on reference: reference1
+ASM_5005=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: Test_ASM_5005Component1] - [ASM40003,ASM60003] Duplicate implementation service name: Component = Test_ASM_5005Component1 Service = Service1
+ASM_5006=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - Component type service not found for component service (missing @Remotable annotation?): Component = TestComponent1 Service = InvalidName
+ASM_5007=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: Test_ASM_5007Component1] - [ASM40004,ASM50007,ASM60006] Duplicate implementation reference name: Component = Test_ASM_5007Component1 Reference = Reference1
+ASM_5008=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM50008] Component type reference not found for component reference: Component = TestComponent1 Reference = InvalidName
+ASM_5009=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}] - [ASM50001] Duplicate component name: Composite = {http://docs.oasis-open.org/ns/opencsa/sca/200912} Component = TestComponent1
+ASM_5010=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM50004] Component service interface incompatible with implementation service interface: Component = TestComponent1 Service = Service1
+ASM_5014=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM50009] Component reference multiplicity incompatible with reference multiplicity: Component = TestComponent1 Reference = Reference1
+ASM_5023=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite11, Component: Composite11Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite4, Component: Composite4Component1] - [ASM50022] Too many targets on reference: reference1
+ASM_5024=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Reference: Reference1] - [ASM50026] Composite {http://docs.oasis-open.org/ns/opencsa/sca/200912} Component TestComponent1 Reference Reference1 must not specify endpoints using both target attribute and with a binding child element
+ASM_5027=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - Duplicate component property name: Component = TestComponent1 Property = serviceName
+ASM_5028=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM50031] Property not found for component property: Component = TestComponent1 Property = randomName
+ASM_5029=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM50032] The property component TestComponent1 property complexType has many values but its "many" attribute is set to false
+ASM_5030=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_5030, Artifact: Test_ASM_5030.composite] - ASM50033: value attribute exists for the property element
+ASM_5035=org.apache.tuscany.sca.contribution.processor.ContributionReadException: [ASM40010,ASM60040] Error: property has both @type and @element attribute values - complexType
+ASM_5036=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_5036Component1] - [ASM_5036] The property component TEST_ASM_5036Component1 property complexType has XSD type {http://docs.oasis-open.org/ns/opencsa/scatests/200903}ComplexType2 while its component type property has the XSD type {http://docs.oasis-open.org/ns/opencsa/scatests/200903}ComplexType1
+ASM_5037=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_5037Component1] - [ASM50031] Property not found for component property: Component = TEST_ASM_5037Component1 Property = bogusName
+ASM_5038=unknown
+ASM_5039=unknown
+ASM_5040=unknown
+ASM_6001=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_6001, Artifact: TestDuplicate1.composite] - [ASM_6001] More than one composite with the same name {http://docs.oasis-open.org/ns/opencsa/scatests/200903}DuplicateComposite found in contribution
+ASM_6002=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM40003,ASM60003] Duplicate implementation service name: Component = TestComponent1 Service = Service1
+ASM_6003=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite17] - [ASM60004,ASM60032] Promoted component service not found: Composite = {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite17 Service = SpuriousComponent/SpuriousService
+ASM_6005=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM40004,ASM50007,ASM60006] Duplicate implementation reference name: Component = TestComponent1 Reference = Reference1
+ASM_6006=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite20] - [ASM60007] Promoted component reference not found: Composite = {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite20 Reference = Composite20Componentz/Reference1
+ASM_6008=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_6008Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite22] - [ASM60008,ASM60013] Interface of composite reference Reference1 must be compatible with the interface declared by promoted component reference. Operation operation2 not found on target
+ASM_6012=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_6012TestComponent1] - [ASM40005,ASM60014] Duplicate implementation property name: Component = TEST_ASM_6012TestComponent1 Property = propertyName
+ASM_6016=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite30, Component: TestComponent1, Reference: Reference1] - [ASM60028] No target services found for the component reference to be autowired: Reference1
+ASM_6020=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Reference: Reference1] - [ASM60028] No target services found for the component reference to be autowired: Reference1
+ASM_6021=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_6021TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite31] - [ASM60004,ASM60032] Promoted component service not found: Composite = {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite31 Service = Not_A_URI_of_a_Component
+ASM_6022=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite32, Component: TestComponent1] - [ASM60033] No targets for reference: Composite = {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite32 Reference = Reference1
+ASM_6023=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM40011,ASM60034] No value configured on a mustSupply property: Component = TestComponent1 Property = simpleType
+ASM_6024=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM60030] Component implementation not resolved: Component = TestComponent1 Uri = TestComponent1
+ASM_6025=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}] - [ASM50001] Duplicate component name: Composite = {http://docs.oasis-open.org/ns/opencsa/sca/200912} Component = TestComponent1
+ASM_6028=org.apache.tuscany.sca.contribution.processor.ContributionReadException: [ASM40010,ASM60040] Error: property has both @type and @element attribute values - InvalidProperty
+ASM_6029=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: [ASM60041] Error: Composite {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_ASM_6029 can only include another composite with the identical @local attribute value
+ASM_6030=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: [ASM60042] Error: Composite {http://docs.oasis-open.org/ns/opencsa/scatests/200903}Invalid_composite_name is not a valid composite within the domain
+ASM_6031=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite39] - [POL40009,ASM60009,ASM60010] Intent {http://docs.oasis-open.org/ns/opencsa/sca/200912}suspendsTransaction and {http://docs.oasis-open.org/ns/opencsa/sca/200912}propagatesTransaction are mutually exclusive
+ASM_6032=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite40] - [POL40009,ASM60009,ASM60010] Intent {http://docs.oasis-open.org/ns/opencsa/sca/200912}suspendsTransaction and {http://docs.oasis-open.org/ns/opencsa/sca/200912}propagatesTransaction are mutually exclusive
+ASM_6033=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite41] - [ASM60011] Composite reference multiplicity incompatible with component reference multiplicity: Composite = TestComposite41.composite Composite reference = Reference1 Component reference = Reference1
+ASM_6036=unknown
+ASM_6039=unknown
+ASM_8006=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_8006, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TEST_ASM_8006] - The interface.wsdl element has a forward interface with a callback declared in the WSDL {http://test.sca.oasisopen.org/}Service9Callback and a callback interface also declared using the callbackInterface attribute {http://test.sca.oasisopen.org/}Service8Callback but the callback interfaces are not equal.
+ASM_8007=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent2] - [ASM50004] Component service interface incompatible with implementation service interface: Component = TestComponent2 Service = Service1
+ASM_8008=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - Component reference interface incompatible with implementation reference interface: Component = TestComponent1 Reference = Reference1
+ASM_8009=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_8009Component1] - Component reference interface incompatible with implementation reference interface: Component = TEST_ASM_8009Component1 Reference = Reference1
+ASM_8010=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_8010Component2, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite63] - Interface of composite service Service1 must be subset of the interface declared by promoted component service. Callback operation not found on target
+ASM_8011=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite62] - [ASM60008,ASM60013] Interface of composite reference Reference1 must be compatible with the interface declared by promoted component reference. Callback operation not found on target
+ASM_8012=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_8012Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite64] - [ASM60008,ASM60013] Interface of composite reference Reference1 must be compatible with the interface declared by promoted component reference.
+ASM_8017=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_8017Component1, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestComposite72] - Interface of composite service Service1a must be subset of the interface declared by promoted component service. Callback interface doesn't match
+ASM_8018= org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestClient] - [ASM50004,JCA30002,JCI80001] Component service interface incompatible with implementation service interface: Component = TestClient Service = TestInvocation Callback interface doesn't match as one of the callback interfaces is null
+ASM_8019=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_8019, Artifact: Test_ASM_8019.composite] - The interface.wsdl interface {http://test.sca.oasisopen.org/}Service1 element can only have a remotable attribute with the value "true" as WSDL interface are assumed to be remotable by default. The value that was found is: false.
+ASM_9002=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - Multiple bindings with the same name for a service: Service = Service1 Binding name = Fred
+ASM_9005=unknown
+ASM_10001=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_10001, Artifact: META-INF/definitions.xml, Definitions: jar:file:***ASM_10001***.zip!/META-INF/definitions.xml] - [ASM10001,POL30002] Duplicate intent {http://docs.oasis-open.org/ns/opencsa/scatests/200903}Fred found in domain
+ASM_10003=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_10003, Artifact: META-INF/definitions.xml, Definitions: jar:file:***ASM_10003***.zip!/META-INF/definitions.xml] - XMLSchema validation error occured in: Test_ASM_10003.composite ,line = ***, column = ***, Message = cvc-complex-type.2.4.a: Invalid content was found starting with element 'component'. One of '{"http://docs.oasis-open.org/ns/opencsa/sca/200912":documentation, "http://docs.oasis-open.org/ns/opencsa/sca/200912":intent, "http://docs.oasis-open.org/ns/opencsa/sca/200912":policySet, "http://docs.oasis-open.org/ns/opencsa/sca/200912":bindingType, "http://docs.oasis-open.org/ns/opencsa/sca/200912":implementationType, WC[##other:"http://docs.oasis-open.org/ns/opencsa/sca/200912"]}' is expected.
+ASM_12003=org.apache.tuscany.sca.contribution.processor.ContributionResolveException: Invalid interface when resolving
+ASM_12007=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM50004] Component service interface incompatible with implementation service interface: Component = TestComponent1 Service = Service1 Operation operation1 not found on target
+ASM_12008=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TEST_ASM_12008TestComponent1] - [ASM50004] Component service interface incompatible with implementation service interface: Component = TEST_ASM_12008TestComponent1 Service = Service1 Operation operation1 not found on target
+ASM_12011=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestComponent1] - [ASM60030] Component implementation not resolved: Component = TestComponent1 Uri = TestComponent1
+ASM_12012=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_12012, Artifact: META-INF/sca-contribution.xml] - XMLSchema validation error occured in: jar:file:***ASM_12012***.zip!/META-INF/sca-contribution.xml ,line = ***, column = ***, Message = cvc-complex-type.2.4.a: Invalid content was found starting with element 'component'. One of '{"http://docs.oasis-open.org/ns/opencsa/sca/200912":documentation, "http://docs.oasis-open.org/ns/opencsa/sca/200912":deployable, "http://docs.oasis-open.org/ns/opencsa/sca/200912":importBase, "http://docs.oasis-open.org/ns/opencsa/sca/200912":exportBase, WC[##other:"http://docs.oasis-open.org/ns/opencsa/sca/200912"]}' is expected.
+ASM_13001=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_13001, Artifact: Test_ASM_13001.composite] - XMLSchema validation error occured in: Test_ASM_13001.composite ,line = ***, column = ***, Message = cvc-complex-type.2.4.a: Invalid content was found starting with element 'sevrice'. One of '{"http://docs.oasis-open.org/ns/opencsa/sca/200912":service, "http://docs.oasis-open.org/ns/opencsa/sca/200912":reference, "http://docs.oasis-open.org/ns/opencsa/sca/200912":property, "http://docs.oasis-open.org/ns/opencsa/sca/200912":requires, "http://docs.oasis-open.org/ns/opencsa/sca/200912":policySetAttachment, WC[##other:"http://docs.oasis-open.org/ns/opencsa/sca/200912"]}' is expected.
+ASM_13002=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_13002, Artifact: Test_ASM_13002.composite] - XMLSchema validation error occured in: Test_ASM_13002.composite ,line = ***, column = ***, Message = cvc-complex-type.2.4.a: Invalid content was found starting with element 'operation'. One of '{"http://docs.oasis-open.org/ns/opencsa/sca/200912":binding, "http://docs.oasis-open.org/ns/opencsa/sca/200912":callback, WC[##other:"http://docs.oasis-open.org/ns/opencsa/sca/200912"]}' is expected.
+ASM_13003=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_13003, Artifact: Test_ASM_13003.composite] - XMLSchema validation error occured in: Test_ASM_13003.composite ,line = ***, column = ***, Message = cvc-complex-type.2.4.a: Invalid content was found starting with element 'binding.ws'. One of '{"http://docs.oasis-open.org/ns/opencsa/sca/200912":documentation, "http://docs.oasis-open.org/ns/opencsa/sca/200912":include, "http://docs.oasis-open.org/ns/opencsa/sca/200912":requires, "http://docs.oasis-open.org/ns/opencsa/sca/200912":policySetAttachment, "http://docs.oasis-open.org/ns/opencsa/sca/200912":service, "http://docs.oasis-open.org/ns/opencsa/sca/200912":property, "http://docs.oasis-open.org/ns/opencsa/sca/200912":component, "http://docs.oasis-open.org/ns/opencsa/sca/200912":reference, "http://docs.oasis-open.org/ns/opencsa/sca/200912":wire, WC[##other:"http://docs.oasis-open.org/ns/opencsa/sca/200912"]}' is expected.
+ASM_13004=org.oasisopen.sca.ServiceRuntimeException: [Composite: {http://docs.oasis-open.org/ns/opencsa/sca/200912}, Component: TestClient, Composite: {http://docs.oasis-open.org/ns/opencsa/scatests/200903}TestClient_0002, Component: TestClient_0002TestClient] - [ASM40011,ASM60034] No value configured on a mustSupply property
+ASM_13005=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_13005, Artifact: Test_ASM_13005.composite] - XMLSchema validation error occured in: Test_ASM_13005.composite ,line = ***, column = ***, Message = cvc-elt.2: The value of {abstract} in the element declaration for 'implementation' must be false.
+ASM_13006=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_13006, Artifact: Test_ASM_13006.composite] - XMLSchema validation error occured in: Test_ASM_13006.composite ,line = ***, column = ***, Message = cvc-complex-type.3.2.2: Attribute 'callback' is not allowed to appear in element 'interface.java'.
+ASM_13007=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_13007, Artifact: Test_ASM_13007.composite] - XMLSchema validation error occured in: Test_ASM_13007.composite ,line = ***, column = ***, Message = cvc-complex-type.3.2.2: Attribute 'mulplicity' is not allowed to appear in element 'reference'.
+ASM_13008=org.oasisopen.sca.ServiceRuntimeException: [Contribution: ASM_13008, Artifact: Test_ASM_13008.composite] - XMLSchema validation error occured in: Test_ASM_13008.composite ,line = ***, column = ***, Message = cvc-complex-type.2.4.a: Invalid content was found starting with element 'operation'. One of '{"http://docs.oasis-open.org/ns/opencsa/sca/200912":documentation, "http://docs.oasis-open.org/ns/opencsa/sca/200912":wireFormat, "http://docs.oasis-open.org/ns/opencsa/sca/200912":operationSelector, "http://docs.oasis-open.org/ns/opencsa/sca/200912":requires, "http://docs.oasis-open.org/ns/opencsa/sca/200912":policySetAttachment}' is expected. \ No newline at end of file
diff --git a/sca-java-2.x/trunk/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_001_TestCase.java b/sca-java-2.x/trunk/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_001_TestCase.java
new file mode 100644
index 0000000000..d28d7ae113
--- /dev/null
+++ b/sca-java-2.x/trunk/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_001_TestCase.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved.
+ * OASIS trademark, IPR and other policies apply.
+ */
+package org.apache.tuscany.sca.itest;
+
+import static org.junit.Assert.assertEquals;
+
+//import org.apache.tuscany.sca.node.equinox.launcher.Contribution;
+//import org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher;
+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.Test;
+import org.junit.Ignore;
+
+import org.apache.tuscany.sca.itest.TestInvocation;
+
+/**
+ * Client for Async_001_TestCase
+ * Async service invocation test #001
+ * Tests that an async service can be invoked over the JMS Binding
+ */
+public class Async_001_TestCase {
+
+ //protected NodeLauncher launcher;
+ protected Node node;
+
+ private String testName = this.getClass().getSimpleName().substring(0, 9);
+ private String input = "request";
+ private String[] output = new String[] { "Async_001 request service1 operation1 invoked asynchronously" };
+ private String composite = "Test_" + testName + ".composite";
+ private String[] contributionNames = new String[] { "Async_001" };
+
+ @Before
+ public void setUp() throws Exception {
+
+ final NodeFactory nf = NodeFactory.newInstance();
+ String here = ASM_0002_Client.class.getProtectionDomain().getCodeSource().getLocation().toString();
+ // Create the node using the pattern "name of composite file to start" / Contribution to use
+ node = nf.createNode(this.composite, new Contribution("test", here));
+
+ node.start();
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testReference() {
+ TestInvocation test = node.getService(TestInvocation.class, "TestClient/TestInvocation");
+ try {
+ final String response = test.invokeTest(this.input);
+ System.out.println(response);
+ assertEquals(this.output[0], response);
+ } catch (Throwable t) {
+ assertEquals("exception", this.output[0]);
+ } // end try
+ } // end testReference
+
+ /**
+ * Dummy method to ensure that things work with JUnit 3 eg within Eclipse Ganymede
+ */
+ @Ignore
+ @Test
+ public void testFoo() throws Exception {
+ }
+
+} // end class Async_001_TestCase
diff --git a/sca-java-2.x/trunk/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_002_TestCase.java b/sca-java-2.x/trunk/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_002_TestCase.java
new file mode 100644
index 0000000000..9581a8e35c
--- /dev/null
+++ b/sca-java-2.x/trunk/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_002_TestCase.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved.
+ * OASIS trademark, IPR and other policies apply.
+ */
+package org.apache.tuscany.sca.itest;
+
+import static org.junit.Assert.assertEquals;
+
+//import org.apache.tuscany.sca.node.equinox.launcher.Contribution;
+//import org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher;
+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.Test;
+import org.junit.Ignore;
+
+import org.apache.tuscany.sca.itest.TestInvocation;
+
+/**
+ * Client for Async_002_TestCase
+ * Async service invocation test #001
+ * Tests that an async service can be invoked over the SCA Binding
+ */
+public class Async_002_TestCase {
+
+ //protected NodeLauncher launcher;
+ protected Node node;
+
+ private String input = "request";
+ private String[] output = new String[] { "Async_002 request service1 operation1 invoked asynchronously" };
+ private String composite = "Test_Async_002.composite";
+
+ @Before
+ public void setUp() throws Exception {
+
+ final NodeFactory nf = NodeFactory.newInstance();
+ String here = ASM_0002_Client.class.getProtectionDomain().getCodeSource().getLocation().toString();
+ // Create the node using the pattern "name of composite file to start" / Contribution to use
+ node = nf.createNode(this.composite, new Contribution("test", here));
+
+ node.start();
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testReference() {
+ TestInvocation test = node.getService(TestInvocation.class, "TestClient/TestInvocation");
+ try {
+ final String response = test.invokeTest(this.input);
+ System.out.println(response);
+ assertEquals(this.output[0], response);
+ } catch (Throwable t) {
+ assertEquals("exception", this.output[0]);
+ } // end try
+ } // end testReference
+
+ /**
+ * Dummy method to ensure that things work with JUnit 3 eg within Eclipse Ganymede
+ */
+ @Ignore
+ @Test
+ public void testFoo() throws Exception {
+ }
+
+} // end class Async_001_TestCase
diff --git a/sca-java-2.x/trunk/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_003_TestCase.java b/sca-java-2.x/trunk/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_003_TestCase.java
new file mode 100644
index 0000000000..0525c32322
--- /dev/null
+++ b/sca-java-2.x/trunk/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_003_TestCase.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright(C) OASIS(R) 2009,2010. All Rights Reserved.
+ * OASIS trademark, IPR and other policies apply.
+ */
+package org.apache.tuscany.sca.itest;
+
+import static org.junit.Assert.assertEquals;
+
+//import org.apache.tuscany.sca.node.equinox.launcher.Contribution;
+//import org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher;
+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.Test;
+import org.junit.Ignore;
+
+import org.apache.tuscany.sca.itest.TestInvocation;
+
+/**
+ * Client for Async_003_TestCase
+ * Async service invocation test #003
+ * Tests that an async service can be invoked over the Web services Binding
+ */
+public class Async_003_TestCase {
+
+ //protected NodeLauncher launcher;
+ protected Node node;
+
+ private String input = "request";
+ private String[] output = new String[] { "Async_003 request service1 operation1 invoked asynchronously" };
+ private String composite = "Test_Async_003.composite";
+
+ @Before
+ public void setUp() throws Exception {
+
+ final NodeFactory nf = NodeFactory.newInstance();
+ String here = ASM_0002_Client.class.getProtectionDomain().getCodeSource().getLocation().toString();
+ // Create the node using the pattern "name of composite file to start" / Contribution to use
+ node = nf.createNode(this.composite, new Contribution("test", here));
+
+ node.start();
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testReference() {
+ TestInvocation test = node.getService(TestInvocation.class, "TestClient/TestInvocation");
+ try {
+ final String response = test.invokeTest(this.input);
+ System.out.println(response);
+ assertEquals(this.output[0], response);
+ } catch (Throwable t) {
+ assertEquals("exception", this.output[0]);
+ } // end try
+ } // end testReference
+
+ /**
+ * Dummy method to ensure that things work with JUnit 3 eg within Eclipse Ganymede
+ */
+ @Ignore
+ @Test
+ public void testFoo() throws Exception {
+ }
+
+} // end class Async_001_TestCase