summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/tags/2.0.1-RC1/testing/itest
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/tags/2.0.1-RC1/testing/itest')
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/T3558/pom.xml45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/T3558/src/test/java/org/apache/tuscany/sca/itest/t3558/T3558TestCase.java72
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/T3558/src/test/resources/sample-store-all.jarbin0 -> 15723 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/T3558/src/test/resources/sample-store-client.jarbin0 -> 4829 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/T3558/src/test/resources/sample-store.jarbin0 -> 13510 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/pom.xml156
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/client/CreditCardClient.java69
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/client/CreditCardPaymentCallback.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/client/CreditCardPaymentCallbackSync.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/client/CreditCardPaymentClientImpl.java188
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/client/CreditCardPaymentRequestClient.java37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/client/CreditCardPaymentRequestClientSync.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/server/CreditCardPaymentImpl.java82
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/server/CreditCardPaymentRequestServer.java39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/server/CreditCardPaymentRequestServerSync.java37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/resources/jndi.properties39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/resources/test/client/creditcard-client.composite47
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/resources/wsdl/creditcard-client.xml29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/resources/wsdl/creditcard-server.xml29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/resources/wsdl/creditcard.wsdl125
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/test/java/itest/CreditCardTestCase.java89
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/pom.xml78
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/ASM_0002_Client.java89
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault1.java46
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault2.java46
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncClient.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServer.java50
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServerImpl.java180
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServerImpl2.java31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1ClientImpl.java99
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1NonAsyncServer.java46
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1NonAsyncServerImpl.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestException.java39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestInvocation.java44
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/TestClient.wsdl127
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/TestInvocation.wsdl81
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/Test_Async_001.composite51
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/Test_Async_002.composite51
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/Test_Async_003.composite51
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1AsyncService.composite28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1Client.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1NonAsyncService.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1NonAsyncServiceJMS.composite37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1NonAsyncServiceWS.composite37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1SyncService.composite28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1jms.composite37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1jmsbytes.composite40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1jmsbytesxml.composite40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1jmsobject.composite40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1jmstext.composite40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1jmstextxml.composite40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1ws.composite36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_001_TestCase.java87
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_002_TestCase.java85
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_003_TestCase.java85
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1DistributedSyncServiceTestCase.java58
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1DistributedTestCase.java60
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsBytesTestCase.java56
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsBytesXmlTestCase.java54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsObjectTestCase.java54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsTestCase.java54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsTextTestCase.java54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsTextXmlTestCase.java54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1NonAsyncServiceJMSTestCase.java54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1NonAsyncServiceTestCase.java54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1NonAsyncServiceWSTestCase.java54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1TestCase.java54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1WSTestCase.java54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/base/dependencies/pom.xml59
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/base/dependencies/src/test/java/org/apache/tuscany/sca/itest/base/dependencies/ValidateDependenciesTestCase.java65
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/base/pom.xml36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/pom.xml280
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsService.java31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsServiceImpl.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsTestCase.java65
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldService.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldServiceImpl.java47
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldTestCase.java64
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/resources/greetings/greetings.composite32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/resources/greetings/greetings.wsdl87
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.bpel84
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.composite36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.wsdl94
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/resources/log4j.properties36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-ws/pom.xml179
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-ws/src/test/java/helloworld/HelloWorld.java45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-ws/src/test/java/helloworld/HelloWorldTestCase.java71
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.bpel66
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.composite32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.wsdl82
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-ws/src/test/resources/log4j.properties36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld/pom.xml208
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld/src/test/java/helloworld/HelloWorld.java45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld/src/test/java/helloworld/HelloWorldTestCase.java75
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.bpel78
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.composite36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.wsdl94
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld/src/test/resources/log4j.properties36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/pom.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/pom.xml63
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDImpl.java43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDReferenceMultiplicityImpl.java48
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentEImpl.java36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentFImpl.java36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/Service3.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/Service3a.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario1/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario1/scenario1.composite45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario1/scenario1a.composite47
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario10/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario10/scenario10.composite62
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario10/scenario10a.composite61
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario10/service3.wsdl63
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario11/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario11/scenario11.composite59
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario11/scenario11a.composite64
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario11/service3.wsdl63
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario12/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario12/scenario12.composite58
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario12/scenario12a.composite64
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario13/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario13/scenario13.composite58
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario13/scenario13a.composite64
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario2/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario2/scenario2.composite45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario2/scenario2a.composite47
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario3/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario3/scenario3.composite44
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario3/scenario3a.composite48
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario4/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario4/scenario4.composite44
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario4/scenario4a.composite48
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario5/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario5/scenario5.composite46
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario5/scenario5a.composite47
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario5/scenarios.wsdl63
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario6/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario6/scenario6.composite47
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario6/scenario6a.composite47
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario6/scenarios.wsdl63
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario7/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario7/scenario7.composite45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario7/scenario7a.composite49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario7/scenarios.wsdl63
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario8/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario8/scenario8.composite44
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario8/scenario8a.composite50
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario8/scenarios.wsdl63
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario9/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario9/scenario9.composite60
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario9/scenario9a.composite61
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java814
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CustomCompositeBuilder.java99
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/TestUtils.java319
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/pom.xml45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiCallBack.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClient.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClientImpl.java201
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiService.java50
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiServiceImpl.java113
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/main/resources/CallBackApiTest.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/test/java/org/apache/tuscany/sca/test/CallBackApiTestCase.java70
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/pom.xml45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java129
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java56
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/main/resources/CallBackBasicTest.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java56
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/pom.xml40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeCallBack.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClient.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClientImpl.java138
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeService.java37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.java59
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/main/resources/CallBackCTypeClient.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/main/resources/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.componentType28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/test/java/org/apache/tuscany/sca/test/CallBackCTypeTestCase.java54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/pom.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClient.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl1.java49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl2.java49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyService.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceCallback.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceImpl.java50
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/main/resources/CallbackMultiWireTest.composite38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/test/java/org/apache/tuscany/sca/test/callback/CallbackMultiWireTestCase.java64
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/pom.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadClient.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadClientImpl.java186
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorCallBack.java37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorService.java45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorServiceImpl.java217
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/src/main/resources/CallBackSeparateThreadTest.composite31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/src/test/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadTestCase.java73
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/pom.xml56
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java129
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java56
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/resources/CallBackReference.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/resources/CallBackService.composite31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/resources/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/test/java/org/apache/tuscany/sca/test/CallBackTwoCompositesTestCase.java56
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/pom.xml83
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java131
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java56
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/BSCACallBackReference.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/BSCACallBackService.composite28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/BWSCallBackReference.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/BWSCallBackService.composite31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/BWSURICallBackReference.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/CallBackReference.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/CallBackService.composite31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/test/java/org/apache/tuscany/sca/test/CallBackTwoNodesHzBSCAWSTestCase.java60
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/test/java/org/apache/tuscany/sca/test/CallBackTwoNodesHzBWSTestCase.java58
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/test/java/org/apache/tuscany/sca/test/CallBackTwoNodesHzBWSURITestCase.java54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/test/java/org/apache/tuscany/sca/test/CallBackTwoNodesHzTestCase.java58
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/test/java/org/apache/tuscany/sca/test/CallBackTwoNodesTestCase.java77
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/pom.xml41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/AddService.java31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/AddServiceImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/CalculatorClient.java49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/CalculatorService.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/CalculatorServiceImpl.java63
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/DivideService.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/DivideServiceImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/MultiplyService.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/MultiplyServiceImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/SubtractService.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/SubtractServiceImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/resources/Calculator.composite49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/resources/calculator/AddServiceImpl.componentType27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/resources/calculator/CalculatorServiceImpl.componentType43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/resources/calculator/DivideServiceImpl.componentType27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/resources/calculator/MultiplyServiceImpl.componentType27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/resources/calculator/SubtractServiceImpl.componentType27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/test/java/calculator/CalculatorTestCase.java60
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/context/pom.xml63
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/context/src/main/java/itest/helloworld/ApplicationContext.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/context/src/main/java/itest/helloworld/Helloworld.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/context/src/main/java/itest/helloworld/HelloworldClientImpl.java45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/context/src/main/java/itest/helloworld/HelloworldServiceImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/context/src/main/resources/context.composite41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/context/src/test/java/itest/helloworld/ContextTestCase.java54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-app/pom.xml109
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-app/src/main/java/org/apache/tuscany/sca/binding/sca/DisableWrappedImpl.java72
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-app/src/main/resources/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-app/src/main/resources/disablewrapped.wsdl138
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-app/src/main/resources/guessAndGreet.xsd91
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-app/src/main/resources/jaxbService.composite35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-test/pom.xml109
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-test/src/main/resources/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-test/src/main/resources/disablewrapped.wsdl138
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-test/src/main/resources/guessAndGreet.xsd91
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-test/src/main/resources/jaxbService.composite35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-test/src/test/java/org/apache/tuscany/sca/binding/sca/launcher/base/DocLitDisableWrappedTestCase.java89
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/pom.xml37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/pom.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/src/test/java/calculator/CalculatorService.java31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/src/test/java/test/ContributionFolderTestCase.java55
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/src/test/resources/repository/folderWithJars/Calculator.composite49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/src/test/resources/repository/folderWithJars/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/src/test/resources/repository/folderWithJars/service.jarbin0 -> 2380 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/src/test/resources/repository/folderWithJars/serviceImpl.jarbin0 -> 4655 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/src/test/resources/repository3/contribution.zipbin0 -> 5478 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-composite/pom.xml67
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-composite/src/main/java/hello/Hello.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-composite/src/main/java/hello/HelloImpl.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-composite/src/main/resources/META-INF/sca-contribution.xml25
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-composite/src/main/resources/hello.composite31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-composite/src/test/java/org/apache/tuscany/sca/test/contribution/HelloTestCase.java91
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-java/pom.xml67
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-java/src/main/java/helloworld/HelloWorldService.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-java/src/main/resources/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-java/src/main/resources/helloworld/HelloWorldImpl.componentType30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-resource/pom.xml31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-resource/src/main/resources/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-resource/src/main/resources/ufservices/store.html27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-wsdl/pom.xml31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-wsdl/src/main/resources/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.wsdl76
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.xsd35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/pom.xml73
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldServer.java46
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldService.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/main/resources/META-INF/sca-contribution.xml27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/main/resources/helloworld.wsdl76
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/main/resources/helloworld.xsd35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/main/resources/helloworldws.composite39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/test/java/org/apache/tuscany/test/contribution/HelloWorldServerTestCase.java126
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-java/pom.xml73
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-java/src/main/java/helloworld/HelloWorldImpl.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-java/src/main/resources/META-INF/sca-contribution.xml25
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-java/src/main/resources/helloworldws.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-java/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java127
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-resource/pom.xml102
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-resource/src/main/resources/META-INF/sca-contribution.xml25
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-resource/src/main/resources/store.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-resource/src/test/java/org/apache/tuscany/sca/test/contribution/StoreTestCase.java129
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-wsdl/pom.xml73
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldImpl.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldServer.java46
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldService.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-wsdl/src/main/resources/META-INF/sca-contribution.xml25
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-wsdl/src/main/resources/helloworldws.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-wsdl/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java137
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/pom.xml50
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-zip/pom.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-zip/src/test/java/calculator/CalculatorService.java31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-zip/src/test/java/org/apache/tuscany/sca/contribution/zip/ContributionZIPTestCase.java56
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-zip/src/test/resources/repository/contribution.zipbin0 -> 7287 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/pom.xml144
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/ScenarioFiveTestCase.java53
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/ScenarioFourTestCase.java153
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/ScenarioOneTestCase.java373
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/ScenarioSixTestCase.java230
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/ScenarioThreeTestCase.java132
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/ScenarioTwoTestCase.java141
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/TestCorbaHost.java56
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/TestCorbaHostModuleActivator.java50
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/AnnotatedStruct.java43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/AnnotatedStructHelper.java97
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/AnnotatedStructHolder.java57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/Color.java61
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ColorHelper.java72
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ColorHolder.java57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerStruct.java47
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerStructHelper.java112
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerStructHolder.java57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerUnion.java130
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerUnionHelper.java124
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerUnionHolder.java56
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/LongSequenceHelper.java79
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/LongSequenceHolder.java58
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichStruct.java47
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichStructHelper.java110
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichStructHolder.java57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichUnion.java195
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichUnionHelper.java175
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichUnionHolder.java56
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioOne.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioOneHelper.java104
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioOneHolder.java57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioOneOperations.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSix.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSixHelper.java104
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSixHolder.java57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSixOperations.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioTwo.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioTwoHelper.java106
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioTwoHolder.java59
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioTwoOperations.java36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/StringArrayHelper.java95
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/StringArrayHolder.java58
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/StringSequenceHelper.java81
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/StringSequenceHolder.java58
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/TwoDimLongSequenceHelper.java83
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/TwoDimLongSequenceHolder.java58
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/UnexpectedException.java52
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/UnexpectedExceptionHelper.java98
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/UnexpectedExceptionHolder.java57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/WrongColor.java55
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/WrongColorHelper.java105
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/WrongColorHolder.java57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioOneImplBase.java91
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioOneStub.java84
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioSixImplBase.java105
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioSixStub.java119
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioTwoImplBase.java93
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioTwoStub.java99
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFive.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFiveComponent.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFiveImpl.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFour.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFourComponent.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFourException.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFourImpl.java44
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFourStruct.java40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioOneComponent.java46
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioOneServant.java45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioSixServant.java46
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioTwoServant.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TAnnotatedStruct.java40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TColor.java62
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TInnerStruct.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TInnerUnion.java59
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TRichStruct.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TRichUnion.java95
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioOne.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioOneComponent.java43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioOneServant.java44
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioSix.java37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioSixComponent.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioSixServant.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioThree.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioThreeComponent.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioThreeServant.java52
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioTwo.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioTwoComponent.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioTwoServant.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator18
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/ScenarioFive.composite41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/ScenarioFour.composite56
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/ScenarioOne.composite111
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/ScenarioSix.composite41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/ScenarioThree.composite43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/ScenarioTwo.composite43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/itest_scenario.idl110
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/scenariofour.xsd31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/client/pom.xml49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/client/src/main/java/itest/client/impl/ClientImpl.java118
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/client/src/main/java/itest/privatecopy/intf/ServiceIntf.java39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/client/src/main/java/itest/privatecopy/types/Name.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/client/src/main/resources/helloworld-client.composite51
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/common/pom.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/common/src/main/java/itest/common/intf/ClientIntf.java31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/common/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/driver/pom.xml79
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/driver/src/test/java/itest/CrossContribTestCase.java178
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/pom.xml43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/service/pom.xml51
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/service/src/main/java/itest/privatecopy/intf/ServiceIntf.java51
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/service/src/main/java/itest/privatecopy/types/Name.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/service/src/main/java/itest/service/impl/ServiceImpl.java101
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/service/src/main/resources/helloworld-service.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/pom.xml113
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AClientService.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AService.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean1.java66
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean10.java25
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean11.java25
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean2.java59
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean3.java56
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean31.java56
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsLocalService.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsService.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsServiceClient.java43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloLocalServiceSimple.java37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimple.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimpleClient.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesLocalService.java47
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesService.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesServiceClient.java48
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesLocalService.java78
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesService.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesServiceClient.java79
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AClientServiceImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AServiceImpl.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsLocalServiceClientImpl.java77
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsServiceClientImpl.java40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsServiceImpl.java69
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsTransformer.java125
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloLocalServiceSimpleClientImpl.java73
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleClientImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleImpl.java86
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesLocalServiceClientImpl.java138
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceClientImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceImpl.java151
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesLocalServiceClientImpl.java157
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceClientImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceImpl.java208
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesTransformer.java144
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/resources/aservice.wsdl127
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/resources/doclitbarewsdl.composite37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/resources/generics-service.composite67
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/resources/helloservice.composite63
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/resources/primitivesservice.composite64
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/resources/standard-types-service.composite64
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DatabindingTestCase.java345
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DocLitBareWsdlTestCase.java75
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsDatabindingTestCase.java493
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesDatabindingTestCase.java784
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesDatabindingTestCase.java1443
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/pom.xml114
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloService.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceClient.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesService.java51
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesServiceClient.java50
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesService.java84
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesServiceClient.java81
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceClientImpl.java73
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceImpl.java86
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceClientImpl.java139
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceImpl.java151
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceClientImpl.java159
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceImpl.java207
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesTransformer.java142
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/hello-service.wsdl372
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/helloservice.composite80
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/primitives-service.wsdl927
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/primitivesservice.composite80
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/standard-types-service.composite80
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/standard-types-service.wsdl1155
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/DatabindingTestCase.java346
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/PrimitivesDatabindingTestCase.java849
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/StandardTypesDatabindingTestCase.java1442
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/pom.xml41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/bin-distro-unzip/build.xml27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/bin-distro-unzip/pom.xml128
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-jsonrpc-calculator/build.xml40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-jsonrpc-calculator/pom.xml87
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-rmi-calculator/build.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-rmi-calculator/pom.xml68
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-sca-calculator/build.xml40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-sca-calculator/pom.xml87
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-ws-calculator/build.xml40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-ws-calculator/pom.xml69
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-implementation-java-calculator/build.xml40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-implementation-java-calculator/pom.xml87
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/launcher-embedded-jse/build.xml57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/launcher-embedded-jse/pom.xml69
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/launcher-embedded-osgi/build.xml45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/launcher-embedded-osgi/pom.xml69
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/legal-checks/pom.xml76
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/legal-checks/src/test/java/itest/JarsInLICENSETestCase.java164
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/pom.xml100
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/src-distro-rat/pom.xml94
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/src-distro-unzip/build.xml27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/src-distro-unzip/pom.xml128
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/pom.xml79
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/java/itest/nodes/Helloworld.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/java/org/apache/tuscany/sca/impl/Node2TestCase.java312
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/java/org/apache/tuscany/sca/runtime/DomainCompositeTestCase.java69
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/java/org/apache/tuscany/sca/runtime/TwoNodesTestCase.java50
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/java/sample/Helloworld.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/compositeImpl.composite30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/export.jarbin0 -> 2285 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/helloworld-invalidComposite.jarbin0 -> 4868 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/helloworld2.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/helloworld2.jarbin0 -> 5620 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/helloworldNode.xml27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/import.jarbin0 -> 3932 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/include.composite28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/itest-nodes-helloworld-client-2.0-SNAPSHOT.jarbin0 -> 4779 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/itest-nodes-helloworld-service-2.0-SNAPSHOT.jarbin0 -> 4586 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/nested.composite28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/sample-helloworld-nodeployable.jarbin0 -> 4761 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/sample-helloworld.jarbin0 -> 4808 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/sample-helloworld2.jarbin0 -> 4845 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/sca-contribution-generated.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/MyDomain/domain.properties17
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/MyDomain/helloworld-contribution.deployable.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/MyDomain/helloworld-contribution.jarbin0 -> 4788 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/MyDomain/helloworld-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/MyDomain/readme.txt8
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/NodeXMLDomain/node.xml27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/NodeXMLDomain/readme.txt2
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/default/readme.txt4
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/default/sample-helloworld.jarbin0 -> 4808 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/dependencies/export1.jarbin0 -> 2270 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/dependencies/export2.jarbin0 -> 2269 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/dependencies/import1.dependencies19
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/dependencies/import1.jarbin0 -> 3969 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/dependencies/import2.dependencies19
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/dependencies/import2.jarbin0 -> 3969 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/dependencies/readme.txt14
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/readme.txt4
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld.jarbin0 -> 4808 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/MANIFEST.MF14
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/maven/org.apache.tuscany.sca/sample-helloworld/pom.properties5
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/maven/org.apache.tuscany.sca/sample-helloworld/pom.xml58
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld/helloworld.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld/sample/Helloworld.classbin0 -> 251 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld/sample/HelloworldImpl.classbin0 -> 819 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/distributed/pom.xml51
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/distributed/src/test/java/itest/Helloworld.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/distributed/src/test/java/itest/StandaloneTestCase.java46
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/endpoint-uri/pom.xml49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/endpoint-uri/src/test/java/itest/EndpointURITestCase.java97
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/endpoint-uri/src/test/resources/helloworld-ws.jarbin0 -> 10639 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/helloworld/pom.xml83
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/helloworld/src/main/java/itest/HelloworldImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/helloworld/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/helloworld/src/main/resources/helloworld.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/interfaces/pom.xml51
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/interfaces/src/main/java/itest/Helloworld.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/pom.xml38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/standalone/pom.xml57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/standalone/src/test/java/itest/StandaloneTestCase.java66
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/dynamicRefURI/pom.xml56
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/dynamicRefURI/src/main/java/org/apache/tuscany/sca/itest/Helloworld.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/dynamicRefURI/src/main/java/org/apache/tuscany/sca/itest/HelloworldClient.java43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/dynamicRefURI/src/main/java/org/apache/tuscany/sca/itest/HelloworldImpl.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/dynamicRefURI/src/main/resources/client.composite31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/dynamicRefURI/src/main/resources/service.composite31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/dynamicRefURI/src/test/java/org/apache/tuscany/sca/itest/Test1TestCase.java54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/pom.xml68
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/src/test/java/helloworld/HelloWorldImpl.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/src/test/java/helloworld/HelloWorldService.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/src/test/java/test/EndpointsTestCase.java110
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/src/test/java/test/NestedEndpointsTestCase.java110
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/src/test/java/test/Utils.java70
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/src/test/resources/helloworld.composite116
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/src/test/resources/nested.composite30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/pom.xml51
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/Checked.java57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionHandler.java39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionRemoteThrower.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionThrower.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/UnChecked.java57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionHandlerImpl.java152
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionRemoteThrowerImpl.java49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionThrowerImpl.java50
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/RemoteExceptionHandlerImpl.java153
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/RemoteWSExceptionHandlerImpl.java176
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/resources/ExceptionTest.composite55
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/test/java/org/apache/tuscany/sca/test/exceptions/ExceptionsTestCase.java109
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/pom.xml59
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/policy/Target.java26
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/policy/TargetClientImpl.java44
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/policy/TargetServiceImpl.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/recursive/Composer.java26
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/recursive/ComposerClient.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/recursive/ComposerClientImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/recursive/ComposerImpl.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/recursive/ComposerServer.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions17
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/bindingoverride/InnerComposite.composite36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/bindingoverride/OuterComposite.composite38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/policy/PolicyInnerComposite.composite36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/policy/PolicyOuterComposite.composite48
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/policy/definitions.xml38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/recursive/Client.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/recursive/Inner.composite27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/recursive/Outer.composite32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/test/java/bindingoverride/BindingOverrideTestCase.java62
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/test/java/policy/PolicyTestCase.java87
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/test/java/recursive/ComposerClientTestCase.java68
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/test/java/recursive/CompositeMulitStartTestCase.java73
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/pom.xml57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/bigbank/stockquote/StockQuoteImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/bigbank/stockquote/StockQuoteService.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/AddService.java31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/AddServiceImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/CalculatorService.java37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/CalculatorServiceImpl.java79
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/DivideService.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/DivideServiceImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/MultiplyService.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/MultiplyServiceImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/SubtractService.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/SubtractServiceImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/security/CalculatorCallbackHandler.java50
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/security/JaasLoginModule.java178
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/security/UserPrincipal.java66
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/context/access/SCAApplicationContextProvider.java37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/helloworld/HelloWorld.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/helloworld/HelloWorldImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/helloworld/HelloWorldProxy.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/mock/TestBean.java31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/mock/TestBeanImpl.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/mock/TestHelloWorldBean.java39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/mock/TestReference.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/mock/TestReferenceBean.java57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/mock/TestSCAPropertyBean.java55
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/spring/annotations/CalculatorServiceImpl.java131
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/access/CalculatorService-context.xml45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/access/ContextAccess.composite49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/imports/ContextImports.composite49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/CalculatorService-context.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/SpringImport-context.xml29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/MANIFEST.MF3
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/SpringHelloWorld-context.xml31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/StockQuoteService-context.xml36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/beanRefContext.xml34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorJass.config3
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorLogMessages.properties18
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/implementation/policies/ImplementationPolicies.composite58
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/implementation/policies/META-INF/definitions.xml54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/implementation/policies/META-INF/spring/CalculatorService-context.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/location/folder/SpringFolderLocation.composite40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/MANIFEST.MF3
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/spring/SpringSCAProperty-context.xml34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/location/jar/SpringJarLocation.composite40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/location/jar/spring-context.jarbin0 -> 1454 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringDelegationHelloWorld-context.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringHelloWorld-context.xml31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringExplicitReference-context.xml33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringImplicitReference-context.xml34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/references/SpringExplicitReference.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/references/SpringImplicitReference.composite40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringExplicitService-context.xml41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringImplicitService-context.xml31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/services/SpringExplicitService.composite34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/services/SpringImplicitService.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/spring/annotations/Calculator.composite60
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/spring/annotations/CalculatorService-context.xml41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/context/access/CalculatorClient.java59
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/context/access/ContextAccessTestCase.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/context/imports/CalculatorClient.java53
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/context/imports/ContextImportsTestCase.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/context/multiple/MultipleContextTestCase.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.java54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java77
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/implementation/policies/ImplementationPoliciesTestCase.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/location/folder/SpringFolderLocationTestCase.java45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/location/jar/SpringJarLocationTestCase.java45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractHelloWorldTestCase.java44
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java58
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorld.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorldProxy.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringHelloWorldTestCase.java36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldBean.java36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldDelegatorBean.java40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/sca/references/SpringExplicitReferenceTestCase.java45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/sca/references/SpringImplicitReferenceTestCase.java48
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/sca/services/SpringExplicitServiceTestCase.java40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/sca/services/SpringImplicitServiceTestCase.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.java55
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/spring/annotations/SpringAnnotationsTestCase.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/exports/pom.xml40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/exports/src/main/java/org/apache/tuscany/sca/itest/exports/Helloworld.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/exports/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/imports/pom.xml46
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/imports/src/main/java/org/apache/tuscany/sca/itest/imports/HelloworldImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/imports/src/main/resources/Helloworld.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/imports/src/main/resources/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/pom.xml38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/tests/pom.xml41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/tests/src/test/java/org/apache/tuscany/sca/itests/TestTestCase.java60
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/pom.xml92
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/CallbackInterface.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/CallbackMissmatchInterface.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ClientClientComponentImpl.java81
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ClientComponent.java51
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ClientComponentImpl.java92
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackInterface.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackMissmatchInterface.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponentImpl.java88
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceCallbackMissmatchComponent.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceCallbackMissmatchComponentImpl.java50
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponent.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponentImpl.java49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceMissmatchComponent.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceMissmatchComponentImpl.java49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBClientComponentImpl.java92
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBParameterObject.java51
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBServiceComponent.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBServiceComponentImpl.java60
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ParameterObject.java48
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceCallbackMissmatchComponent.java39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceCallbackMissmatchComponentImpl.java49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceComponent.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceComponentImpl.java57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceMissmatchComponent.java52
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceMissmatchComponentImpl.java68
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions17
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/definitions.xml36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchDistributedClient.composite34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchDistributedClientClient.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchDistributedService.composite27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchNonJAXBDistributedClient.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchNonJAXBDistributedService.composite27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchPolicyDistributedClient.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchPolicyDistributedService.composite31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchWSDistributedClient.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchWSDistributedService.composite30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/local/MatchLocal.composite32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchCallbackDistributedService.composite27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchDistributedClient.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchDistributedService.composite27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchPolicyDistributedClient.composite30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchPolicyDistributedService.composite31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/local/MissmatchCallbackLocal.composite32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/local/MissmatchLocal.composite32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/local/MissmatchRemoteable.composite32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/test/java/org/apache/tuscany/sca/itest/interfaces/InerfaceMatchTestCase.java369
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/test/java/org/apache/tuscany/sca/itest/interfaces/InerfaceMissmatchTestCase.java246
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfaceWriteTestCase.java110
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/pom.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/Helloworld.java25
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/HelloworldImpl.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackInterface.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponent.java47
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponentImpl.java83
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponent.java37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponentImpl.java49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/ParameterObject.java48
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteCallbackInterface.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponent.java64
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponentImpl.java82
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponent.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponentImpl.java54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/resources/org/apache/tuscany/sca/itest/interfaces/invalid/InvalidRemoteAttribute.composite28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/resources/org/apache/tuscany/sca/itest/interfaces/remoteoverride/helloworld.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/resources/org/apache/tuscany/sca/itest/interfaces/valid/InterfacesTest.composite40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java136
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InvalidRemoteAttributeTestCase.java52
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/RemoteOverrideTestCase.java76
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/pom.xml48
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/main/java/itest/ConstructorException.java49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/main/java/itest/DestroyCompositeScopeException.java58
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/main/java/itest/InitCompositeScopeException.java57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/main/java/itest/InitStatelessScopeException.java57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/main/java/itest/OkImpl.java52
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/main/java/itest/Service.java26
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/main/resources/test.composite49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/test/java/itest/InitTestCase.java161
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/pom.xml53
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/src/main/java/stock/StockQuote.java36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteClient.java69
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteImpl.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteRef.java39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/src/main/resources/StockQuote.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/src/test/java/itest/AsyncServiceTestCase.java67
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws/pom.xml53
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws/src/test/java/stock/AsyncServiceTestCase.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws/src/test/java/stock/StockQuote.java45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws/src/test/java/stock/StockQuoteImpl.java46
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws/src/test/resources/StockQuote.composite31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/pom.xml35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java26
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/main/resources/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/main/resources/dynamic/client.composite34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/main/resources/jndi.properties39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/main/resources/simple/service.composite37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/test/java/org/apache/tuscany/sca/binding/jms/DynamicReplyQTestCase.java53
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/pom.xml32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/MyService.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/ServiceImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/src/main/resources/jndi.properties38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/src/main/resources/selectors/selectors.composite38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/src/test/java/org/apache/tuscany/sca/binding/jms/ArgsTestCase.java62
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/pom.xml34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClientImpl.java50
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSService.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSServiceCallback.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSServiceImpl.java47
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/resources/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/resources/jndi.properties40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/resources/simple/client.composite44
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/resources/simple/tempq.composite50
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/test/java/org/apache/tuscany/sca/binding/jms/CallbackTestCase.java61
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/test/java/org/apache/tuscany/sca/binding/jms/TempCallbackQTestCase.java64
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/pom.xml35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java26
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/main/resources/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/main/resources/defaults/client.composite31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/main/resources/defaults/service.composite31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/main/resources/jndi.properties38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/test/java/org/apache/tuscany/sca/binding/jms/DefaultsTestCase.java54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/pom.xml35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/main/resources/definitions.xml28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/main/resources/definitions/definitions.composite39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/main/resources/jndi.properties38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/test/java/org/apache/tuscany/sca/binding/jms/DefinitionsTestCase.java62
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/pom.xml35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion2Args.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionChained.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionNoArgs.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionService.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceImpl.java44
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/resources/exceptions/service.composite44
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/resources/jndi.properties40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/test/java/org/apache/tuscany/sca/binding/jms/ExceptionsTestCase.java210
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/pom.xml35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion2Args.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionChained.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionNoArgs.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionService.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceClient.java57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceImpl.java44
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/resources/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/resources/exceptions/client.composite31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/resources/exceptions/service.composite31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/resources/jndi.properties38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/test/java/org/apache/tuscany/sca/binding/jms/ExceptionsTestCase.java111
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/pom.xml35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java26
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/main/resources/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/main/resources/external/client.composite36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/main/resources/external/service.composite36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/main/resources/jndi.properties39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/test/java/org/apache/tuscany/sca/binding/jms/ExternalBrokerTestCase.java71
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/pom.xml35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java50
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/resources/jmsbytes/helloworld.composite45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/resources/jndi.properties39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesTestCase.java69
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/pom.xml35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/CheckedException.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReference.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReferenceImpl.java46
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldService.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldServiceImpl.java39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/resources/jmsbytesxml/helloworld.composite45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/resources/jndi.properties39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesXMLTestCase.java58
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java50
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/pom.xml35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java50
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/CheckedException.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReference.java36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReferenceImpl.java85
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldService.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldServiceImpl.java51
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/Person.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/resources/jmsdefault/helloworld.composite94
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/resources/jmsdefault/helloworld.wsdl139
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/resources/jndi.properties39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSDefaultTestCase.java68
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/pom.xml35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java50
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReference.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReferenceImpl.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldService.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java51
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceReferenceSide.java37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/README3
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/resources/jmsmessage/helloworld.composite46
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/resources/jmsmessage/helloworld.wsdl129
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/resources/jndi.properties39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSMessageTestCase.java58
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/pom.xml35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java50
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.java112
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.java63
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.java47
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/resources/jmsobject/helloworld.composite61
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/resources/jndi.properties39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSObjectTestCase.java73
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/pom.xml35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java50
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/CheckedException.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReference.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReferenceImpl.java46
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldService.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceReference.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/resources/jmstext/helloworld.composite45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/resources/jndi.properties39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextTestCase.java60
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/pom.xml35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/CheckedException.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReference.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReferenceImpl.java62
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldService.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldServiceImpl.java44
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/Person.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/resources/jmstextxml/helloworld.composite80
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/resources/jmstextxml/helloworld.wsdl161
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/resources/jndi.properties39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLTestCase.java62
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/pom.xml35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java50
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/CheckedException.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReference.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReferenceImpl.java46
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldService.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldServiceImpl.java39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/CheckedException.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReference.java36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReferenceImpl.java85
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldService.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldServiceImpl.java51
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/Person.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReference.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReferenceImpl.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldService.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java51
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceReferenceSide.java37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/README3
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.java112
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.java63
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.java47
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/CheckedException.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReference.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReferenceImpl.java46
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldService.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceReference.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/CheckedException.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReference.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReferenceImpl.java62
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldService.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldServiceImpl.java44
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/Person.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldReferenceImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldService.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldServiceImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/Person.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jmstextxmlinjmsobjectout/helloworld.composite52
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jmstextxmlinjmsobjectout/helloworld.wsdl139
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jndi.properties39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLInJMSObjectOutTestCase.java63
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-wf-writing/pom.xml35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-wf-writing/src/test/java/org/apache/tuscany/sca/binding/jms/format/WireFormatWritingTestCase.java262
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/pom.xml35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectService.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectServiceImpl.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/main/resources/jndi.properties39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/main/resources/nonSCAclient/service.composite54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/test/java/org/apache/tuscany/sca/binding/jms/NonSCAClientTestCase.java144
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/noreplyto/pom.xml35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/noreplyto/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java26
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/noreplyto/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/noreplyto/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/noreplyto/src/main/resources/jndi.properties39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/noreplyto/src/main/resources/service.composite38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/noreplyto/src/test/java/org/apache/tuscany/sca/binding/jms/NoReplyToTestCase.java100
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/pom.xml35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/MyService.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/ServiceImpl.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/src/main/resources/jndi.properties39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/src/main/resources/nulls.composite57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/src/test/java/org/apache/tuscany/sca/binding/jms/NullsTestCase.java60
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/pom.xml34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/main/resources/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/main/resources/jndi.properties38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/main/resources/oneway/OneWayClient.composite35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/main/resources/oneway/OneWayService.composite34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/test/java/org/apache/tuscany/sca/binding/jms/OneWayTestCase.java59
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/pom.xml35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectService.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectServiceImpl.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/resources/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/resources/jndi.properties39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/resources/oneway/OneWayClient.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/resources/oneway/OneWayService.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/test/java/org/apache/tuscany/sca/binding/jms/OneWayTestCase.java60
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/pom.xml35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClient.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientService.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgService.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgServiceImpl.java39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/resources/META-INF/definitions.xml65
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/resources/jndi.properties38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/resources/policyHeaders/policyHeaders.composite45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/test/java/org/apache/tuscany/sca/binding/jms/PolicyHeadersTestCase.java94
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/pom.xml100
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/pom.xml35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClient.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientService.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgService.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgServiceImpl.java39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/resources/jndi.properties38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/resources/properties/properties.composite53
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/test/java/org/apache/tuscany/sca/binding/jms/PropertiesTestCase.java93
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/pom.xml35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java26
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/main/resources/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/main/resources/cf/client.composite36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/main/resources/cf/service.composite36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/main/resources/jndi.properties39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/test/java/org/apache/tuscany/sca/binding/jms/ResponseCFTestCase.java53
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/pom.xml35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java26
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/main/resources/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/main/resources/jndi.properties39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/main/resources/simple/client.composite37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/main/resources/simple/service.composite37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/test/java/org/apache/tuscany/sca/binding/jms/RPCTestCase.java53
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/pom.xml35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorService.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl1.java40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl2.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl3.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldReference.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldReferenceImpl.java39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldService.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldServiceImpl.java47
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldReference.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldReferenceImpl.java36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldService.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldServiceImpl.java47
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/resources/META-INF/sca-contribution.xml25
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/resources/jmsdefault/helloworld.composite69
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/resources/jmsuserprop/helloworld.composite65
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/resources/jndi.properties38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/resources/selectors/selectors.composite68
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/OperationselectorJMSDefaultTestCase.java57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/OperationselectorJMSUserPropTestCase.java57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/SelectorsTestCase.java76
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/pom.xml35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/main/resources/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/main/resources/jndi.properties38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/main/resources/topics/TopicsClient.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/main/resources/topics/TopicsService.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/test/java/org/apache/tuscany/sca/binding/jms/TopicsTestCase.java59
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/pom.xml35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/src/main/java/itest/MockInitialContextFactory.java904
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/src/main/java/org/apache/tuscany/sca/binding/jms/ClientIface.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/src/main/resources/jndi.properties38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/src/main/resources/ttl.composite35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/src/test/java/org/apache/tuscany/sca/binding/jms/TTLTestCase.java64
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/pom.xml35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java26
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/main/resources/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/main/resources/jndi.properties38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/main/resources/simple/service.composite37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/main/resources/simple/uriclient.composite31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/test/java/org/apache/tuscany/sca/binding/jms/URIRPCTestCase.java54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/pom.xml43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleBinding.java49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleBindingFactory.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleBindingProviderFactory.java47
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleReferenceBindingProvider.java63
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleReferenceInvoker.java48
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleServiceBindingProvider.java56
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleServiceInvoker.java40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/helloworld/Helloworld.java31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/helloworld/HelloworldClientImplC.java78
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/helloworld/HelloworldClientImplCE.java80
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/helloworld/HelloworldClientImplS.java78
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/helloworld/HelloworldServiceImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/helloworld/StatusImpl.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/implementation/lifecycle/LifecycleImplementation.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/implementation/lifecycle/LifecycleImplementationProcessor.java105
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/implementation/lifecycle/LifecycleJavaInvoker.java46
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/implementation/lifecycle/LifecycleProvider.java77
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/implementation/lifecycle/LifecycleProviderFactory.java50
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/META-INF/services/binding.lifecycle.BindingFactory20
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor21
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema21
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory20
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory20
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/binding-lifecycle.xsd37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/implementation-lifecycle.xsd38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/lifecycle.composite55
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/test/java/org/apache/tuscany/sca/itest/lifecycle/LifecycleTestCase.java836
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/node-launcher-equinox/pom.xml76
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/node-launcher-equinox/src/test/java/hello/HelloWorld.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/node-launcher-equinox/src/test/java/hello/HelloWorldClient.java50
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/node-launcher-equinox/src/test/java/hello/HelloWorldImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/node-launcher-equinox/src/test/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxOSGiHostTestCase.java100
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/node-launcher-equinox/src/test/java/org/apache/tuscany/sca/node/equinox/launcher/NodeLauncherTestCase.java67
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/node-launcher-equinox/src/test/resources/HelloWorld.composite34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/pom.xml74
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Client.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/ClientImpl.java53
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Customer.java70
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/CustomerNotFoundException.java64
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Local.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/LocalServiceImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Remote.java36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/RemoteServiceImpl.java66
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/SCAClientImpl.java57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Client.composite30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Service.composite31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/AsynchTestCase.java79
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/CallbackTestCase.java83
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/PromotionTestCase.java74
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/SimpleTestCase.java110
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldCallbackRemote.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldClient.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackOnewayRemote.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackRemote.java31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceLocal.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote2.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientLocalImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemote2Impl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemoteImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceLocalImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceRemoteImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/AsynchTestCase.java79
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/CallbackTestCase.java84
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/PromotionTestCase.java76
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/SimpleTestCase.java116
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldCallbackRemote.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldClient.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackOnewayRemote.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackRemote.java31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceLocal.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote2.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientLocalImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemote2Impl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemoteImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceLocalImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceRemoteImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/BindingSCATestCase.java170
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedCustomerTestCase.java62
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedLocalTestCase.java62
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedCustomerTestCase.java54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedLocalTestCase.java63
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ServiceNode.java48
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/TestCaseRunner.java329
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchReference/HelloWorld.composite36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchService/HelloWorld.composite38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackReference/HelloWorld.composite36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackService/HelloWorld.composite43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionReference/HelloWorld.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionReference/HelloWorldComponent.composite37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionService/HelloWorld.composite35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionService/HelloWorldComponent.composite37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleReference/HelloWorld.composite67
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleService/HelloWorld.composite85
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchReference/HelloWorld.composite36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchService/HelloWorld.composite38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackReference/HelloWorld.composite36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackService/HelloWorld.composite43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionReference/HelloWorld.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionReference/HelloWorldComponent.composite37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionService/HelloWorld.composite35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionService/HelloWorldComponent.composite37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleReference/HelloWorld.composite67
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleService/HelloWorld.composite84
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/pom.xml70
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Client.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/ClientImpl.java53
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Customer.java70
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/CustomerNotFoundException.java64
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Local.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/LocalServiceImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Remote.java36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/RemoteServiceImpl.java66
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/SCAClientImpl.java57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Client.composite30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Service.composite31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/AsynchTestCase.java79
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/CallbackTestCase.java83
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/PromotionTestCase.java74
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/SimpleTestCase.java110
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldCallbackRemote.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldClient.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackOnewayRemote.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackRemote.java31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceLocal.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote2.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientLocalImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemote2Impl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemoteImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceLocalImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceRemoteImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/AsynchTestCase.java79
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/CallbackTestCase.java84
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/PromotionTestCase.java76
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/SimpleTestCase.java116
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldCallbackRemote.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldClient.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackOnewayRemote.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackRemote.java31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceLocal.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote2.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientLocalImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemote2Impl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemoteImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceLocalImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceRemoteImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/BindingSCATestCase.java170
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedCustomerTestCase.java62
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedLocalTestCase.java62
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedCustomerTestCase.java54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedLocalTestCase.java63
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ServiceNode.java48
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/TestCaseRunner.java329
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchReference/HelloWorld.composite36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchService/HelloWorld.composite38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackReference/HelloWorld.composite36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackService/HelloWorld.composite43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionReference/HelloWorld.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionReference/HelloWorldComponent.composite37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionService/HelloWorld.composite35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionService/HelloWorldComponent.composite37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleReference/HelloWorld.composite67
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleService/HelloWorld.composite85
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchReference/HelloWorld.composite36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchService/HelloWorld.composite38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackReference/HelloWorld.composite36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackService/HelloWorld.composite43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionReference/HelloWorld.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionReference/HelloWorldComponent.composite37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionService/HelloWorld.composite35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionService/HelloWorldComponent.composite37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleReference/HelloWorld.composite67
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleReference/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleService/HelloWorld.composite84
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleService/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/pom.xml59
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/java/helloworld/HelloWorldClientImpl.java37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/java/helloworld/HelloWorldImpl.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/java/helloworld/HelloWorldService.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/resources/helloworld.composite47
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/test/java/helloworld/DomainNodeTestCase.java90
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/pom.xml44
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/src/main/resources/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/src/main/resources/helloworld-client.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-iface/pom.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-iface/src/main/java/itest/nodes/Helloworld.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-iface/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/pom.xml44
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/src/main/java/itest/nodes/HelloworldImpl.java43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/src/main/resources/service-a.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/pom.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/Helloworld.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/HelloworldClientImpl.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/HelloworldServiceImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/resources/helloworld-service.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/pom.xml49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/src/main/java/itest/nodes/HelloworldImpl.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/src/main/resources/service-b.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/pom.xml49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/src/main/java/itest/nodes/HelloworldImpl.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/src/main/resources/service-c.composite28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/pom.xml43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/src/main/java/itest/nodes/HelloworldImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/src/main/resources/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/src/main/resources/helloworld-service.composite28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast-client/pom.xml51
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast-client/src/test/java/itest/ClientTestCase.java112
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/pom.xml54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/OneNodeOneContributionTestCase.java64
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/OneNodeTestCase.java76
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/TwoNodeTestCase.java82
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/TwoRemoteNodesTestCase.java89
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/pom.xml82
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/src/test/java/itest/OneNodeTestCase.java76
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/src/test/java/itest/TwoNodeTestCase.java82
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/src/test/java/itest/TwoRemoteNodesTestCase.java83
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm/pom.xml53
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm/src/test/java/itest/OneNodeTestCase.java76
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm/src/test/java/itest/TwoNodeTestCase.java82
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-node-test/pom.xml48
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-node-test/src/test/java/itest/OneNodeTestCase.java88
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/pom.xml64
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/pom.xml71
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/java/itest/HelloworldService.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/java/itest/HelloworldServiceImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/java/itest/RemoteHelloworldService.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/resources/Helloworld.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/test/java/test/scaclient/StopStartTestCase.java62
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/build.xml38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/client.xml31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/pom.xml104
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/server.xml30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/service-a-config.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/service-b-config.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/service-c-config.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/src/test/java/itest/ServiceA.java65
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/src/test/java/itest/ServiceB.java55
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/src/test/java/itest/ServiceC.java55
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/build.xml54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/pom.xml98
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/main/java/org/apache/tuscany/sca/impl/Tuscany.java138
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/helloworld-client-contribution.jarbin0 -> 9625 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/helloworld-iface-contribution.jarbin0 -> 8212 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/helloworld-service-contribution.jarbin0 -> 9432 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/node-nodeClient/node.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/node-nodeService/node.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/pom.xml59
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java93
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/ServiceNode.java58
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/StopStartNodesTestCase.java103
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/TestCaseRunner.java292
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java106
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/build.xml38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/client-config.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/client.xml31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/pom.xml104
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/server-config.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/server.xml33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Client.java69
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Service.java61
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/build.xml127
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/pom.xml52
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/src/main/java/org/apache/tuscany/sca/itest/oneway/OneWayClient.java40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/src/main/java/org/apache/tuscany/sca/itest/oneway/OneWayService.java47
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/src/main/java/org/apache/tuscany/sca/itest/oneway/impl/OneWayClientImpl.java64
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/src/main/java/org/apache/tuscany/sca/itest/oneway/impl/OneWayServiceImpl.java68
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/src/main/resources/OneWayContribution/META-INF/sca-deployables/oneWay.composite57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/src/test/java/org/apache/tuscany/sca/itest/oneway/OneWayTestCase.java235
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/operation-overloading/pom.xml53
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/OverloadASourceTarget.java61
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadASource.java113
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATarget.java99
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/operation-overloading/src/main/resources/OperationOverload.composite34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/operation-overloading/src/test/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATestCase.java98
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/pom.xml50
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/src/main/java/org/apache/tuscany/sca/test/performance/BeanA.java44
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/src/main/java/org/apache/tuscany/sca/test/performance/Helloworld.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/src/main/java/org/apache/tuscany/sca/test/performance/impl/HelloworldClientImpl.java36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/src/main/java/org/apache/tuscany/sca/test/performance/impl/HelloworldServiceImpl.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/src/main/resources/LoggingMessages.properties16
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/src/main/resources/META-INF/definitions.xml41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/src/main/resources/PerformanceTest.composite38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-test/pom.xml57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-test/src/main/java/org/apache/tuscany/sca/test/performance/client/BeanA.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-test/src/main/java/org/apache/tuscany/sca/test/performance/client/Helloworld.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-test/src/test/java/org/apache/tuscany/sca/test/performance/PerformanceTestCase.java471
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/pom.xml36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/pom.xml54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CreditCard.java65
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CreditCardPayment.java37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/Customer.java51
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CustomerRegistry.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/Payment.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/CreditCardPaymentImpl.java40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/CustomerRegistryImpl.java78
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/PaymentImpl.java54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/resources/Customer.composite34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/resources/LoggingMessages.properties16
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/resources/META-INF/definitions.xml83
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/resources/Payment.composite56
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/test/java/org/apache/tuscany/sca/itest/policies/PaymentTestCase.java69
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy-transaction/pom.xml57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy-transaction/src/main/java/customer/Customer.java44
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy-transaction/src/main/java/customer/CustomerRegistry.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy-transaction/src/main/java/customer/impl/CustomerRegistryImpl.java63
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy-transaction/src/main/resources/Customer.composite30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy-transaction/src/test/java/org/apache/tuscany/sca/itest/policy/transaction/CustomerTestCase.java69
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/pom.xml57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorld.java31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorldClient.java49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorldException.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorldService.java44
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/helloworld/StatusImpl.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSAxisHandler.java45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSPolicy.java63
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSPolicyBuilder.java84
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSPolicyInterceptor.java84
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSPolicyProcessor.java99
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSPolicyProviderFactory.java69
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSPolicyProviderReference.java72
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSPolicyProviderService.java72
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicy.java63
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyBuilder.java84
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyInterceptor.java102
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyProcessor.java99
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyProviderFactory.java68
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyProviderImplementation.java56
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyProviderReference.java53
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyProviderService.java53
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.PolicyBuilder18
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor21
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions17
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory21
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/definitions.xml61
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/helloworld.composite48
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/helloworld.wsdl90
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/test/java/interceptors/HelloworldTestCase.java155
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/pom.xml52
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/java/org/apache/tuscany/sca/policy/matching/helloworld/HelloWorld.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/java/org/apache/tuscany/sca/policy/matching/helloworld/HelloWorldClient.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/java/org/apache/tuscany/sca/policy/matching/helloworld/HelloWorldService.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions17
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/definitions.xml67
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/helloworld.composite86
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/helloworld.wsdl90
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/test/java/org/apache/tuscany/sca/policy/matching/MatchingTestCase.java130
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/pom.xml76
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/java/org/apache/tuscany/sca/policy/operations/helloworld/HelloWorld.java31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/java/org/apache/tuscany/sca/policy/operations/helloworld/HelloWorldClient.java39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/java/org/apache/tuscany/sca/policy/operations/helloworld/HelloWorldService.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/java/org/apache/tuscany/sca/policy/operations/helloworld/HelloWorldService1.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/resources/LoggingMessages.properties16
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions17
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/resources/org/apache/tuscany/sca/policy/operations/helloworld/definitions.xml42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/resources/org/apache/tuscany/sca/policy/operations/helloworld/helloworld.composite46
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/resources/org/apache/tuscany/sca/policy/operations/helloworld/helloworld.wsdl90
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/test/java/org/apache/tuscany/sca/policy/operations/OperationsPolicyTestCase.java65
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/pom.xml40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/pom.xml57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/helloworld/HelloWorld.java31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/helloworld/HelloWorldClient.java48
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/helloworld/HelloWorldException.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/helloworld/HelloWorldService.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/helloworld/StatusImpl.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSAxisHandler.java45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSPolicy.java63
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSPolicyBuilder.java84
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSPolicyInterceptor.java84
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSPolicyProcessor.java99
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSPolicyProviderFactory.java69
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSPolicyProviderReference.java72
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSPolicyProviderService.java72
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicy.java63
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicyBuilder.java84
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicyInterceptor.java110
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicyProcessor.java99
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicyProviderFactory.java68
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicyProviderImplementation.java56
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicyProviderReference.java53
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicyProviderService.java53
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.PolicyBuilder18
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor21
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions17
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory21
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/definitions.xml48
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/helloworld.composite40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/helloworld.wsdl90
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/test/java/interceptors/HelloworldTestCase.java87
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/pom.xml64
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/java/org/apache/tuscany/sca/policy/wspolicy/helloworld/HelloWorld.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/java/org/apache/tuscany/sca/policy/wspolicy/helloworld/HelloWorldClient.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/java/org/apache/tuscany/sca/policy/wspolicy/helloworld/HelloWorldService.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/resources/LoggingMessages.properties16
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions17
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/resources/org/apache/tuscany/sca/policy/wspolicy/helloworld/definitions.xml42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/resources/org/apache/tuscany/sca/policy/wspolicy/helloworld/helloworld.composite38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/resources/org/apache/tuscany/sca/policy/wspolicy/helloworld/helloworld.wsdl90
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/test/java/org/apache/tuscany/sca/policy/wspolicy/WSPolicyTestCase.java50
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/pom.xml125
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/pom.xml80
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/mysca/test/myservice/impl/MyService.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/mysca/test/myservice/impl/MyServiceImpl.java88
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/mysca/test/myservice/impl/MyTotalServiceImpl.java46
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponent.java50
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponentImpl.java73
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponent.java75
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponentImpl.java131
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponent.java71
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponentImpl.java143
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ComplexPropertyBean.java151
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideService.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideServiceImpl.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponent.java114
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponentImpl.java148
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyService.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Bar.java23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo1.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo2.java39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo3.java44
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/Annotated1CTCalcComponentImpl.java36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/Annotated2CTCalcComponentImpl.java36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/AnnotatedBaseCTCalcComponentImpl.java58
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/AnnotatedCTCalcComponentImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/BaseCTCalcComponentImpl.java54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/CTCalcComponent.java23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/DefaultHelperContext.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/UnannotatedCTCalcComponentImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/test/jaxb/props/ObjectFactory.java75
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/test/jaxb/props/ReturnCodeProperties.java103
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/test/jaxb/props/package-info.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/CTCalcTest.composite42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/ConstructorPropertyInjection.composite39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/Outer.composite48
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/OuterPropertyTest.composite42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/PropertyTest.composite260
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/customer.xsd30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/fileProperty.txt22
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/foo.xsd41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/manyValuesFileProperty.txt25
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/mySimpleService.composite40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/noNamespace.xsd47
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/rcProps.txt25
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/rcprops.xsd55
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/test/java/org/apache/tuscany/sca/itest/MyTotalServiceTestCase.java104
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/test/java/org/apache/tuscany/sca/itest/OuterPropertyTestCase.java169
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/test/java/org/apache/tuscany/sca/itest/PropertyTestCase.java422
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/test/java/org/apache/tuscany/sca/itest/cdi/ConstructorPropertyInjectionTestCase.java73
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/test/java/org/apache/tuscany/sca/itest/ctcalc/CTCalcTestCase.java104
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/pom.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MyService.java26
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MyServiceImpl.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalService.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalServiceImpl.java46
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/main/resources/TotalService1Auto.composite53
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/main/resources/TotalService2Auto.composite49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/main/resources/TotalService3Auto.composite52
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/test/java/test/sca/tests/MultiLevelTestCase.java92
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/pom.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/AService.java56
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/AServiceClient.java55
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ClientImplA.java87
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ClientImplB.java90
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/MutableObject.java77
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ServiceImplA.java61
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ServiceImplB.java70
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponent.java40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponentImpl.java125
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponent.java26
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentImpl.java39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentWrongTargetImpl.java39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponent.java24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponentImpl.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponent.java26
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponentImpl.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/resources/AllowsPBRTest.composite50
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/resources/AutoWiredReferencesTest.composite61
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/resources/InnerReferencesTest.composite51
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/resources/ManualWiredReferencesTest.composite59
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/AllowsPBRTestCase.java77
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/AutoWiredReferenceTestCase.java114
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/InnerReferenceTestCase.java99
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/ManualWiredReferenceTestCase.java97
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/samples/helloworld/pom.xml38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/samples/helloworld/src/test/java/itest/helloworld/Helloworld.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/samples/helloworld/src/test/java/itest/helloworld/HelloworldDomainNodeTestCase.java51
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/samples/helloworld/src/test/java/itest/helloworld/HelloworldNodeTestCase.java49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/pom.xml63
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/main/java/itest/scabindingmapper/MyMapper.java72
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/main/java/itest/scabindingmapper/MyUnknownEndpointHandler.java47
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCABindingMapper18
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/main/resources/META-INF/services/org.apache.tuscany.sca.runtime.UnknownEndpointHandler19
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/java/itest/helloworld/Helloworld.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/java/itest/helloworld/HelloworldClientImpl.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/java/itest/helloworld/HelloworldServiceImpl.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/java/itest/helloworld/Mapper1TestCase.java82
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/java/itest/helloworld/UnknownEndpointTestCase.java58
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/resources/clients.composite34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/resources/services.composite31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/resources/test.composite41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-jse-osgi/pom.xml57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-jse-osgi/src/main/java/itest/HelloworldService.java25
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-jse-osgi/src/main/java/itest/HelloworldServiceImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-jse-osgi/src/main/resources/Helloworld.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-jse-osgi/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-jse-osgi/src/test/java/test/scaclient/SCAClientTestCase.java63
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-osgi/META-INF/MANIFEST.MF20
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-osgi/pom.xml109
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-osgi/src/main/java/itest/HelloworldService.java25
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-osgi/src/main/java/itest/HelloworldServiceImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-osgi/src/main/resources/Helloworld.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-osgi/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-osgi/src/test/java/test/scaclient/SCAClientTestCase.java65
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-remote/pom.xml46
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-remote/src/main/java/itest/HelloworldService.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-remote/src/main/java/itest/HelloworldServiceImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-remote/src/main/resources/Helloworld.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-remote/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-remote/src/test/java/test/scaclient/SCAClientTestCase.java121
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/pom.xml54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/HelloworldService.java25
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/HelloworldServiceAgain.java25
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/HelloworldServiceImpl.java44
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/MultipleServiceClientImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/MultipleServiceImpl.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/RemotableHelloworldImpl.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/RemoteHelloworldService.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/SingleServiceImpl.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/resources/Helloworld.composite66
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/test/java/test/scaclient/SCAClientTestCase.java198
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-remote/pom.xml71
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-remote/src/main/java/itest/HelloworldService.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-remote/src/main/java/itest/HelloworldServiceImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-remote/src/main/java/itest/RemoteHelloworldService.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-remote/src/main/resources/Helloworld.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-remote/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-remote/src/test/java/test/scaclient/SCAClientTestCase.java45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scdl/pom.xml59
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ContributionTestCase.java80
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/SCDLTestCase.java109
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ValidateDependenciesTestCase.java60
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scdl/src/test/resources/sample-binding-sca-calculator-contribution.jarbin0 -> 11431 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scdl/src/test/resources/test.composite50
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scopes/pom.xml40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/CompositeScopeStateVerifierImpl.java46
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/StateVerifier.java25
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scopes/src/main/resources/scopes.composite29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/scopes/src/test/java/org/apache/tuscany/sca/test/ScopeTestCase.java89
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/pom.xml51
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/AComponent.java39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/AComponentImpl.java112
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/BComponent.java31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/BComponentImpl.java38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/Base64Binary.java297
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/CComponent.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/CComponentImpl.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/DComponent.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/DComponentImpl.java64
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/resources/nodeA/CompositeA.composite44
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/resources/nodeB/CompositeB.composite46
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/resources/servicereference/ServiceReferenceTest.composite48
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/test/java/org/apache/tuscany/sca/itest/serviceref/CallableReferenceRemoteTestCase.java139
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/test/java/org/apache/tuscany/sca/itest/serviceref/ServiceReferenceTestCase.java88
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/pom.xml40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponent.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponentImpl.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponent.java25
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponentImpl.java31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponent.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponentImpl.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/D1Component.java24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponent.java24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponentImpl.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/SubGenericsService.java25
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/SubGenericsServiceClient.java27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/SubGenericsServiceClientImpl.java51
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/SubGenericsServiceImpl.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/SuperGenericsService.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/SuperGenericsServiceImpl.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/resources/ServicesTest.composite81
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java127
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/spi/build.xml134
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/spi/pom.xml80
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/spi/spi-safe.txt4102
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/spi/src/test/java/org/apache/tuscany/sca/itest/spi/SPITestCase.java91
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/wires/pom.xml39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireClient.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireClientImpl.java51
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireService.java36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireServiceImpl.java39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/wires/src/main/resources/WireTest.composite39
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/wires/src/test/java/org/apache/tuscany/sca/itest/WireTestCase.java78
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/README83
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/pom.xml127
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/Bar.java58
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/Foo.java36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/HelloWorld.java31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/HelloWorldImpl.java53
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/resources/HelloWorldServiceService_schema1.xsd38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/resources/helloworld-external-service.wsdl57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/resources/helloworld.composite35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-wsdl-first/pom.xml129
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-wsdl-first/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/impl/HelloWorldImpl.java43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-wsdl-first/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-wsdl-first/src/main/resources/helloworld-external.wsdl84
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-wsdl-first/src/main/resources/helloworld-sca.wsdl84
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-wsdl-first/src/main/resources/helloworld.composite35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/external-client/pom.xml117
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/external-client/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/client/HelloWorldClientLauncher.java73
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/external-client/src/main/resources/HelloWorldImplService.wsdl104
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/external-client/src/main/resources/HelloWorldImplService_schema1.xsd93
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/external-service/pom.xml96
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldService.java57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldServiceLauncher.java49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/launcher-ri/pom.xml60
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/launcher-ri/src/test/java/org/apache/tuscany/sca/binding/ws/jaxws/launcher/JavaFirstTestCase.java119
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/launcher-ri/src/test/java/org/apache/tuscany/sca/binding/ws/jaxws/launcher/WSDLFirstTestCaseOFF.java143
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/pom.xml41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/README135
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/pom.xml63
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorld.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldClient.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldService.java45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions17
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/definitions.xml46
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.composite45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.wsdl90
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/HelloworldTestCase.java52
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/pom.xml127
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallback.java31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackService.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackServiceImpl.java53
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java84
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/resources/HelloWorldServiceService_schema1.xsd70
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/resources/helloworld-external-service.wsdl75
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/resources/helloworld.composite45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/pom.xml127
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallback.java31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackService.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackServiceImpl.java61
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java104
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/resources/HelloWorldServiceService_schema1.xsd70
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/resources/META-INF/definitions.xml36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/resources/helloworld-external-service.wsdl75
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/resources/helloworld.composite52
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/pom.xml127
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallback.java31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackService.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackServiceImpl.java53
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java84
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/resources/HelloWorldServiceService_schema1.xsd70
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/resources/helloworld-external-service.wsdl75
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/resources/helloworld.composite43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/resources/helloworldcallbackservice-bottom.composite34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/resources/helloworldservice-bottom.composite40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/pom.xml127
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallback.java31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackService.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackServiceImpl.java53
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java84
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplCallbackService.wsdl87
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplCallbackService_schema1.xsd60
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplService.wsdl115
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplService_schema1.xsd99
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplService_schema2.xsd40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldServiceService_schema1.xsd70
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/helloworld-external-service.wsdl75
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/helloworld.composite48
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/pom.xml127
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallback.java31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackService.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackServiceImpl.java53
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java84
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/resources/HelloWorldServiceService_schema1.xsd70
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/resources/helloworld-external-service.wsdl75
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/resources/helloworld.composite43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/pom.xml129
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld1Impl.java67
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld2Impl.java67
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/HelloWorldImplService-doclit.wsdl109
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/HelloWorldImplService-doclit1.xsd83
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/HelloWorldImplService-doclit2.xsd40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/HelloWorldImplService.wsdl64
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/HelloWorldImplService_schema1.xsd111
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/HelloWorldServiceService_schema1.xsd70
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/helloworld-external-service.wsdl75
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/helloworld.composite45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/pom.xml127
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld1Impl.java54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld2Impl.java55
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/resources/HelloWorldImplService-doclit.wsdl109
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/resources/HelloWorldImplService-doclit1.xsd83
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/resources/HelloWorldImplService-doclit2.xsd40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/resources/HelloWorldServiceService_schema1.xsd70
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/resources/helloworld-external-service.wsdl75
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/resources/helloworld.composite44
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/pom.xml127
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld1Impl.java55
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld2Impl.java56
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldBare.java37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/resources/HelloWorldImplService-doclit.wsdl113
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/resources/HelloWorldImplService-doclit1.xsd49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/resources/HelloWorldImplService-doclit2.xsd40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/resources/HelloWorldServiceService_schema1.xsd70
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/resources/helloworld-external-service.wsdl75
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/resources/helloworld.composite44
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-java-first/pom.xml127
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java55
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-java-first/src/main/resources/HelloWorldServiceService_schema1.xsd70
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-java-first/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-java-first/src/main/resources/helloworld-external-service.wsdl75
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-java-first/src/main/resources/helloworld.composite35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/pom.xml129
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java59
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldInternalImpl.java60
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/resources/HelloWorldImplService.wsdl131
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/resources/HelloWorldImplService_schema1.xsd99
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/resources/HelloWorldImplService_schema2.xsd40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/resources/HelloWorldServiceService_schema1.xsd86
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/resources/helloworld-external-service.wsdl99
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/resources/helloworld.composite43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/README254
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/pom.xml127
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java32
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld1Impl.java54
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld2Impl.java55
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/resources/HelloWorldImplService-rpclit.wsdl110
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/resources/HelloWorldImplService-rpclit1.xsd83
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/resources/HelloWorldImplService-rpclit2.xsd40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/resources/HelloWorldServiceService_schema1.xsd70
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/resources/helloworld-external-service.wsdl75
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/resources/helloworld.composite64
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/pom.xml129
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java37
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java60
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/resources/HelloWorldImplService.wsdl128
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/resources/HelloWorldImplService_schema1.xsd99
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/resources/HelloWorldImplService_schema2.xsd40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/resources/HelloWorldServiceService_schema1.xsd86
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/resources/helloworld-external-service.wsdl99
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/resources/helloworld.composite35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/pom.xml58
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Bar.java58
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Foo.java36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorld.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldClient.java40
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldService.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld.composite41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld.wsdl90
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/DefaultsTestCase.java74
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoint-references/pom.xml64
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoint-references/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorld.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoint-references/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldComponent.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoint-references/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldService.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoint-references/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/HelloWorld.composite48
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoint-references/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld.wsdl86
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoint-references/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldTestCase.java52
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/pom.xml58
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldMultiService.java51
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOM.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOM2.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOMComponent.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOMService.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/DefaultMultiService.composite53
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/DefaultSingleService.composite51
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/RelativeURI.composite83
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/WSDLExplicitURI.composite50
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/WSDLRelativeURI.composite51
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld-om-relative-uri.wsdl78
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld-om-uri.wsdl78
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld-om.wsdl78
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/AbstractHelloWorldOMTestCase.java72
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/DefaultMultiServiceTestCase.java24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/DefaultSingleServiceTestCase.java24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/RelativeURITestCase.java63
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLExplicitURITestCase.java24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLRelativeURITestCase.java24
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-client/pom.xml106
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-client/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/client/HelloWorldClientLauncher.java91
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-client/src/main/resources/HelloWorldImplService.wsdl128
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-client/src/main/resources/HelloWorldImplService_schema1.xsd111
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/pom.xml96
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/Bar.java152
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/Foo.java88
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldService.java64
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldServiceLauncher.java49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml123
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/Order.java147
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderService.java72
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBare.java45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareForwardImpl.java47
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareImpl.java75
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceForwardImpl.java70
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceImpl.java165
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/Status.java75
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.bare.composite46
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.composite41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java206
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java395
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/README68
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/pom.xml58
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorld.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldClient.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldService.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions17
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/definitions.xml35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.composite59
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.wsdl90
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/tuscany.jksbin0 -> 1378 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/HTTPSTestCase.java59
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/pom.xml72
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackForwardSpecTestCase.java114
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackFullSpecTestCase.java133
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackPromotionTestCase.java112
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackTestCase.java112
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackWSDLIfaceTestCase.java112
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/DocLitTestCase.java124
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/DocLitWrappedDOMTestCase.java84
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/DocLitWrappedTestCase.java122
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/JavaFirstTestCase.java123
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/ReferenceTargetTestCase.java130
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/RpcLitTestCase.java122
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/WSDLFirstTestCase.java130
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/pom.xml59
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/base/CallbackForwardSpecTestCase.java112
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/base/CallbackFullSpecTestCase.java111
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/base/CallbackPromotionTestCase.java112
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/base/CallbackTestCase.java112
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/base/DocLitWrappedTestCase.java122
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/base/JavaFirstTestCase.java123
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/base/WSDLFirstTestCase.java125
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/pom.xml67
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/pom.xml58
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Account.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/AccountService.java33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/CustomerProfileData.java113
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorld.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOM.java30
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOMComponent.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOMService.java41
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldService.java28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/package-info.java21
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/customerdata.xsd36
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/customerdefs.xsd27
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/customerinfo.xsd31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld-om-merged.composite43
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld-om-merged.wsdl59
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld.wsdl86
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-import-nested.wsdl70
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-import.wsdl49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-include.wsdl90
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-wsdl-import.composite31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-wsdl-include.composite31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-wsdl.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize-nested.wsdl71
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize-nested.xsd31
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize-top.wsdl49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize.composite33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize.xsd28
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldWSDLMergedTestCase.java110
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/QuestionMarkWSDLImportTestCase.java99
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/QuestionMarkWSDLIncludeTestCase.java122
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/QuestionMarkWSDLTestCase.java126
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLSerializationTestCase.java477
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/pom.xml94
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/anotherpackage/BBean.java56
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/anotherpackage/CBean.java45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/datatypes/BaseClass.java46
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/datatypes/ComplexNumber.java48
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/datatypes/DataTypes.java78
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/datatypes/ExtClass.java34
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/datatypes/GetDataServiceWithoutException.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/datatypes/impl/DataTypesImpl.java100
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/datatypes/impl/GetDataServiceWithoutExceptionImpl.java53
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/helloworld/ABean.java65
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/helloworld/HelloWorldClientImpl.java85
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/helloworld/HelloWorldException.java44
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/helloworld/HelloWorldImpl.java87
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/helloworld/HelloWorldService.java57
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/helloworld/package-info.java20
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/other/EBean.java44
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/other/OtherPojo.java48
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/other/package-info.java23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/yetanotherpackage/AnotherHelloWorldException.java44
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/yetanotherpackage/DBean.java73
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/yetyetanotherpackage/FBean.java42
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/yetyetanotherpackage/package-info.java23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/DataTypes.composite38
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/definitions.xml49
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/helloworld.composite55
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/jaxws/wsgen/wsdl/HelloWorldImplService.wsdl251
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/jaxws/wsgen/wsdl/HelloWorldImplService_schema1.xsd29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/jaxws/wsgen/wsdl/HelloWorldImplService_schema2.xsd33
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/jaxws/wsgen/wsdl/HelloWorldImplService_schema3.xsd29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/jaxws/wsgen/wsdl/HelloWorldImplService_schema4.xsd237
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/jaxws/wsgen/wsdl/README2
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/test/java/datatypes/BaseFramework.java266
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/test/java/datatypes/DataTypesTestCase.java186
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/test/java/datatypes/DynamicSDOTestCase.java81
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/test/java/helloworld/SchemaCorrectionTestCase.java462
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/test/java/helloworld/WSDLGenTestCase.java184
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/wsgen.bat18
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/README116
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/pom.xml68
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorld.java29
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldClient.java35
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldService.java45
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/ServerPWCBHandler.java55
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/resources/META-INF/sca-contribution.xml23
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions17
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/resources/helloworldKeys.jksbin0 -> 1354 bytes
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/definitions.xml102
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.composite46
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.wsdl90
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/HelloworldTestCase.java50
2213 files changed, 134101 insertions, 0 deletions
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/T3558/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/T3558/pom.xml
new file mode 100644
index 0000000000..d9d7693af1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/T3558/pom.xml
@@ -0,0 +1,45 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-t3558</artifactId>
+ <name>Apache Tuscany SCA iTest T3558</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-data-api</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/T3558/src/test/java/org/apache/tuscany/sca/itest/t3558/T3558TestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/T3558/src/test/java/org/apache/tuscany/sca/itest/t3558/T3558TestCase.java
new file mode 100644
index 0000000000..5bb860ef89
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/T3558/src/test/java/org/apache/tuscany/sca/itest/t3558/T3558TestCase.java
@@ -0,0 +1,72 @@
+/*
+ * 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.itest.t3558;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.Test;
+
+public class T3558TestCase {
+
+ @Test
+ public void testAllJar() throws Exception {
+ Node node = NodeFactory.newInstance().createNode((String)null, new String[]{"src/test/resources/sample-store-all.jar"});
+ node.start();
+ }
+
+ @Test
+ public void testOneNode() throws Exception {
+ Node node = NodeFactory.newInstance().createNode((String)null, new String[]{"src/test/resources/sample-store.jar","src/test/resources/sample-store-client.jar"});
+ node.start();
+ }
+
+ @Test
+ public void testTwoNodes() throws Exception {
+ Node node2 = NodeFactory.newInstance().createNode((String)null, new String[]{"src/test/resources/sample-store.jar"});
+ node2.start();
+ Node node1 = NodeFactory.newInstance().createNode((String)null, new String[]{"src/test/resources/sample-store-client.jar"});
+ node1.start();
+ }
+
+ @Test
+ public void testTwoNodesJIRACode1() throws Exception {
+ String storeLocation = "src/test/resources/sample-store.jar";
+ String storeClientLocation = "src/test/resources/sample-store-client.jar";
+
+ Node node1 = NodeFactory.newInstance().createNode(new Contribution("store",storeLocation));
+ node1.start();
+ // The dependent contributions need to be added in the Node and need to be following the main contribution
+ Node node2 = NodeFactory.newInstance().createNode("store-client.composite",new Contribution("storeClient", storeClientLocation),new Contribution("store", storeLocation));
+ node2.start();
+ }
+
+ @Test
+ public void testTwoNodesJIRACode2() throws Exception {
+ String storeLocation = "src/test/resources/sample-store.jar";
+ String storeClientLocation = "src/test/resources/sample-store-client.jar";
+
+ Node node1 = NodeFactory.newInstance().createNode(new Contribution("store",storeLocation));
+ node1.start();
+
+ Node node2 = NodeFactory.newInstance().createNode("store-client.composite",new Contribution("storeClient", storeClientLocation));
+ node2.start();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/T3558/src/test/resources/sample-store-all.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/T3558/src/test/resources/sample-store-all.jar
new file mode 100644
index 0000000000..6f3649ff23
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/T3558/src/test/resources/sample-store-all.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/T3558/src/test/resources/sample-store-client.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/T3558/src/test/resources/sample-store-client.jar
new file mode 100644
index 0000000000..5dfecda310
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/T3558/src/test/resources/sample-store-client.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/T3558/src/test/resources/sample-store.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/T3558/src/test/resources/sample-store.jar
new file mode 100644
index 0000000000..98e1f6ebb4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/T3558/src/test/resources/sample-store.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/pom.xml
new file mode 100644
index 0000000000..d4edc68dfc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/pom.xml
@@ -0,0 +1,156 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-async-integrations</artifactId>
+ <name>Apache Tuscany Async Integration Tests</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-jms-runtime</artifactId>
+ <version>2.0.1</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>activemq-core</artifactId>
+ <version>5.2.0</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.5</version>
+ <executions>
+ <execution>
+ <id>add-jaxws</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-test-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${project.build.directory}/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>
+ <configuration>
+ <target>2.1</target>
+ </configuration>
+ <executions>
+ <execution>
+ <id>wsimport-client</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>wsimport</goal>
+ </goals>
+ <configuration>
+ <wsdlDirectory>${basedir}/src/main/resources/wsdl</wsdlDirectory>
+ <wsdlFiles>
+ <wsdlFile>creditcard.wsdl</wsdlFile>
+ </wsdlFiles>
+ <bindingDirectory>${basedir}/src/main/resources/wsdl</bindingDirectory>
+ <bindingFiles>
+ <bindingFile>creditcard-client.xml</bindingFile>
+ </bindingFiles>
+ <sourceDestDir>${project.build.directory}/jaxws-source</sourceDestDir>
+ <!-- Configure the stale file so that two executions will work -->
+ <staleFile>${project.build.directory}/wsimport-client.stale</staleFile>
+ <verbose>false</verbose>
+ <xnocompile>true</xnocompile>
+
+ <xjcArgs>
+ <xjcArg>-p</xjcArg>
+ <xjcArg>com.example.test.jaxb.client</xjcArg>
+ </xjcArgs>
+
+ </configuration>
+ </execution>
+ <execution>
+ <id>wsimport-server</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>wsimport</goal>
+ </goals>
+ <configuration>
+ <wsdlDirectory>${basedir}/src/main/resources/wsdl</wsdlDirectory>
+ <wsdlFiles>
+ <wsdlFile>creditcard.wsdl</wsdlFile>
+ </wsdlFiles>
+ <bindingDirectory>${basedir}/src/main/resources/wsdl</bindingDirectory>
+ <bindingFiles>
+ <bindingFile>creditcard-server.xml</bindingFile>
+ </bindingFiles>
+ <sourceDestDir>${project.build.directory}/jaxws-source</sourceDestDir>
+ <staleFile>${project.build.directory}/wsimport-server.stale</staleFile>
+ <verbose>false</verbose>
+ <xnocompile>true</xnocompile>
+
+ <xjcArgs>
+ <xjcArg>-p</xjcArg>
+ <xjcArg>com.example.test.jaxb.server</xjcArg>
+ </xjcArgs>
+
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/client/CreditCardClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/client/CreditCardClient.java
new file mode 100644
index 0000000000..31a9bc3f9c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/client/CreditCardClient.java
@@ -0,0 +1,69 @@
+/*
+ * 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 test.client;
+
+/**
+ * A client interface to invoke the CreditCardPayment using different interaction patterns
+ */
+public interface CreditCardClient {
+ /**
+ * Invoke the service synchronously
+ * @param creditCardNumber
+ * @param holder
+ * @param amount
+ * @return
+ */
+ String authorize(String creditCardNumber, String holder, float amount);
+
+ /**
+ * Invoke the service asynchronously and poll for the result
+ * @param creditCardNumber
+ * @param holder
+ * @param amount
+ * @return
+ */
+ String authorizeAsync(String creditCardNumber, String holder, float amount);
+
+ /**
+ * Invoke the service asynchronously and get the result from a callback
+ * @param creditCardNumber
+ * @param holder
+ * @param amount
+ * @return
+ */
+ String authorizeAsyncWithCallback(String creditCardNumber, String holder, float amount);
+
+ /**
+ * Invoke the service using oneway (fire-and-forget) and the target component will make a callback upon the request has been processed
+ * @param creditCardNumber
+ * @param holder
+ * @param amount
+ * @return
+ */
+ String authorizeSCAAsyncWithCallback(String creditCardNumber, String holder, float amount);
+
+ /**
+ * Invoke the service using request/response and the target component will make a callback upon the request has been processed
+ * @param creditCardNumber
+ * @param holder
+ * @param amount
+ * @return
+ */
+ String authorizeSCAWithCallback(String creditCardNumber, String holder, float amount);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/client/CreditCardPaymentCallback.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/client/CreditCardPaymentCallback.java
new file mode 100644
index 0000000000..648f30d804
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/client/CreditCardPaymentCallback.java
@@ -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 test.client;
+
+import org.oasisopen.sca.annotation.OneWay;
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * The oneway callback interface
+ */
+@Remotable
+public interface CreditCardPaymentCallback {
+ // Makes a callback
+ @OneWay
+ void authorizeResponseOneway(String creditCardNumber, String status);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/client/CreditCardPaymentCallbackSync.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/client/CreditCardPaymentCallbackSync.java
new file mode 100644
index 0000000000..801effa734
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/client/CreditCardPaymentCallbackSync.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package test.client;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * The synchronous callback interface
+ */
+@Remotable
+public interface CreditCardPaymentCallbackSync {
+ // Makes a callback
+ String authorizeResponse(String creditCardNumber, String status);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/client/CreditCardPaymentClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/client/CreditCardPaymentClientImpl.java
new file mode 100644
index 0000000000..69a6203045
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/client/CreditCardPaymentClientImpl.java
@@ -0,0 +1,188 @@
+/*
+ * 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 test.client;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.Future;
+
+import javax.xml.ws.AsyncHandler;
+import javax.xml.ws.Response;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+import com.example.test.jaxb.client.AuthorizeResponse;
+import com.example.test.jaxb.client.CreditCardDetailsType;
+import com.example.test.jaxb.client.ObjectFactory;
+import com.example.test.jaxb.client.PayerType;
+import com.example.test.jaxws.client.AuthorizeFault;
+import com.example.test.jaxws.client.CreditCardPayment;
+
+/**
+ * Mocked implementation of CreditCardPaymentClient
+ */
+@Service(CreditCardClient.class)
+public class CreditCardPaymentClientImpl implements CreditCardClient, CreditCardPaymentCallback,
+ CreditCardPaymentCallbackSync {
+
+ @Reference
+ private CreditCardPayment proxy;
+
+ @Reference
+ private CreditCardPaymentRequestClient asyncProxy;
+
+ @Reference
+ private CreditCardPaymentRequestClientSync syncProxy;
+
+ @Override
+ public String authorize(String creditCardNumber, String holder, float amount) {
+ CreditCardDetailsType creditCard = createCreditCard(creditCardNumber, holder);
+
+ try {
+ return proxy.authorize(creditCard, amount);
+ } catch (AuthorizeFault e) {
+ return "FAIL: " + e.getFaultInfo().getErrorCode();
+ }
+
+ }
+
+ private CreditCardDetailsType createCreditCard(String creditCardNumber, String holder) {
+ ObjectFactory factory = new ObjectFactory();
+ CreditCardDetailsType creditCard = factory.createCreditCardDetailsType();
+ creditCard.setCreditCardNumber(creditCardNumber);
+ PayerType payer = factory.createPayerType();
+ payer.setName(holder);
+ creditCard.setCardOwner(payer);
+ return creditCard;
+ }
+
+ public String authorizeAsync(String creditCardNumber, String holder, float amount) {
+ CreditCardDetailsType creditCard = createCreditCard(creditCardNumber, holder);
+
+ Response<AuthorizeResponse> respone = proxy.authorizeAsync(creditCard, amount);
+ try {
+ return respone.get().getStatus();
+ } catch (Exception e) {
+ e.printStackTrace();
+ return "FAIL: " + e.getMessage();
+ }
+
+ }
+
+ public String authorizeAsyncWithCallback(String creditCardNumber, String holder, float amount) {
+ CreditCardDetailsType creditCard = createCreditCard(creditCardNumber, holder);
+
+ Future<?> respone = proxy.authorizeAsync(creditCard, amount, new AsyncHandler<AuthorizeResponse>() {
+
+ @Override
+ public void handleResponse(Response<AuthorizeResponse> res) {
+ try {
+ System.out.println(Thread.currentThread() + " Response has arrived: " + res.get().getStatus());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ });
+
+ while (!(respone.isDone() || respone.isCancelled())) {
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ return "FAIL: " + e.getMessage();
+ }
+ }
+
+ System.out.println(Thread.currentThread() + " The task is done");
+ try {
+ return ((AuthorizeResponse)respone.get()).getStatus();
+ } catch (Exception e) {
+ e.printStackTrace();
+ return "FAIL: " + e.getMessage();
+ }
+ }
+
+ /**
+ * A map that host the result for a given credit card
+ */
+ private static Map<String, String> statusMap = new HashMap<String, String>();
+
+ public String authorizeSCAAsyncWithCallback(String creditCardNumber, String holder, float amount) {
+ CreditCardDetailsType creditCard = createCreditCard(creditCardNumber, holder);
+ asyncProxy.authorizeRequestOneway(creditCard, amount);
+ synchronized (statusMap) {
+ while (true) {
+ String status = statusMap.remove("ASYNC:" + creditCardNumber);
+ if (status != null) {
+ System.out.println("Response found for " + creditCardNumber + " :" + status);
+ return status;
+ } else {
+ try {
+ statusMap.wait();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ return "FAIL: " + e.getMessage();
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ public void authorizeResponseOneway(String creditCardNumber, String status) {
+ System.out.println("SCA one callback: CreditCard: " + creditCardNumber + " Status: " + status);
+ synchronized (statusMap) {
+ statusMap.put("ASYNC:" + creditCardNumber, status);
+ statusMap.notifyAll();
+ }
+ }
+
+ public String authorizeSCAWithCallback(String creditCardNumber, String holder, float amount) {
+ CreditCardDetailsType creditCard = createCreditCard(creditCardNumber, holder);
+ syncProxy.authorizeRequest(creditCard, amount);
+ synchronized (statusMap) {
+ while (true) {
+ String status = statusMap.remove("SYNC:" + creditCardNumber);
+ if (status != null) {
+ System.out.println("Response found for " + creditCardNumber + " :" + status);
+ return status;
+ } else {
+ try {
+ statusMap.wait();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ return "FAIL: " + e.getMessage();
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ public String authorizeResponse(String creditCardNumber, String status) {
+ System.out.println("SCA synchronous callback: CreditCard: " + creditCardNumber + " Status: " + status);
+ synchronized (statusMap) {
+ statusMap.put("SYNC:" + creditCardNumber, status);
+ statusMap.notifyAll();
+ }
+ return "ACK";
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/client/CreditCardPaymentRequestClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/client/CreditCardPaymentRequestClient.java
new file mode 100644
index 0000000000..fe0e99cd50
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/client/CreditCardPaymentRequestClient.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package test.client;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.OneWay;
+import org.oasisopen.sca.annotation.Remotable;
+
+import com.example.test.jaxb.client.CreditCardDetailsType;
+
+/**
+ * The bi-direction interface for the client side (we need separate classes for the client and server so that they can take different CreditCardDetailsType)
+ */
+@Remotable
+@Callback(CreditCardPaymentCallback.class)
+public interface CreditCardPaymentRequestClient {
+ // Send out the request
+ @OneWay
+ void authorizeRequestOneway(CreditCardDetailsType creditCard, float amount);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/client/CreditCardPaymentRequestClientSync.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/client/CreditCardPaymentRequestClientSync.java
new file mode 100644
index 0000000000..52f5014af0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/client/CreditCardPaymentRequestClientSync.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package test.client;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Remotable;
+
+import com.example.test.jaxb.client.CreditCardDetailsType;
+
+/**
+ * The synchronous bi-direction interface for the client side (we need separate classes for the client and server so that they can take different CreditCardDetailsType)
+ */
+@Remotable
+@Callback(CreditCardPaymentCallbackSync.class)
+public interface CreditCardPaymentRequestClientSync {
+ // Send out the request
+ String authorizeRequest(CreditCardDetailsType creditCard, float amount);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/server/CreditCardPaymentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/server/CreditCardPaymentImpl.java
new file mode 100644
index 0000000000..8d946b5723
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/server/CreditCardPaymentImpl.java
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package test.server;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Service;
+
+import test.client.CreditCardPaymentCallback;
+import test.client.CreditCardPaymentCallbackSync;
+
+import com.example.test.jaxb.server.CreditCardDetailsType;
+import com.example.test.jaxws.server.AuthorizeFault;
+import com.example.test.jaxws.server.CreditCardPayment;
+
+/**
+ * Mocked implementation of CreditCardPayment
+ */
+@Service({CreditCardPayment.class, CreditCardPaymentRequestServer.class, CreditCardPaymentRequestServerSync.class})
+public class CreditCardPaymentImpl implements CreditCardPayment, CreditCardPaymentRequestServer,
+ CreditCardPaymentRequestServerSync {
+ @Callback
+ protected CreditCardPaymentCallback callback;
+
+ @Callback
+ protected CreditCardPaymentCallbackSync callbackSync;
+
+ @Override
+ public void authorizeRequestOneway(CreditCardDetailsType creditCard, float amount) {
+ String status;
+ try {
+ status = authorize(creditCard, amount);
+ } catch (AuthorizeFault e) {
+ status = "FAIL: " + e.getFaultInfo().getErrorCode();
+ }
+ callback.authorizeResponseOneway(creditCard.getCreditCardNumber(), status);
+ }
+
+ @Override
+ public String authorizeRequest(CreditCardDetailsType creditCard, float amount) {
+ String status;
+ try {
+ status = authorize(creditCard, amount);
+ } catch (AuthorizeFault e) {
+ status = "FAIL: " + e.getFaultInfo().getErrorCode();
+ }
+ callbackSync.authorizeResponse(creditCard.getCreditCardNumber(), status);
+ return "ACK";
+ }
+
+ @Override
+ public String authorize(CreditCardDetailsType creditCard, float amount) throws AuthorizeFault {
+ if (creditCard != null) {
+ System.out.println("Checking card: name = " + creditCard.getCardOwner().getName()
+ + " number = "
+ + creditCard.getCreditCardNumber()
+ + " for amount "
+ + amount);
+ } else {
+ System.out.println("Checking card is null");
+ }
+
+ return "OK";
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/server/CreditCardPaymentRequestServer.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/server/CreditCardPaymentRequestServer.java
new file mode 100644
index 0000000000..f257e5a0ee
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/server/CreditCardPaymentRequestServer.java
@@ -0,0 +1,39 @@
+/*
+ * 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 test.server;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.OneWay;
+import org.oasisopen.sca.annotation.Remotable;
+
+import test.client.CreditCardPaymentCallback;
+
+import com.example.test.jaxb.server.CreditCardDetailsType;
+
+/**
+ * The bi-direction interface for the server side
+ */
+@Remotable
+@Callback(CreditCardPaymentCallback.class)
+public interface CreditCardPaymentRequestServer {
+ // Send out the request
+ @OneWay
+ void authorizeRequestOneway(CreditCardDetailsType creditCard, float amount);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/server/CreditCardPaymentRequestServerSync.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/server/CreditCardPaymentRequestServerSync.java
new file mode 100644
index 0000000000..93351c0f89
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/java/test/server/CreditCardPaymentRequestServerSync.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package test.server;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Remotable;
+
+import test.client.CreditCardPaymentCallbackSync;
+
+import com.example.test.jaxb.server.CreditCardDetailsType;
+
+/**
+ * The synchronous bi-direction interface for the client side (we need separate classes for the client and server so that they can take different CreditCardDetailsType)
+ */
+@Remotable
+@Callback(CreditCardPaymentCallbackSync.class)
+public interface CreditCardPaymentRequestServerSync {
+ // Send out the request
+ String authorizeRequest(CreditCardDetailsType creditCard, float amount);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..324132604b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/resources/jndi.properties
@@ -0,0 +1,39 @@
+ # 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.
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+queue.RequestQueue = RequestQueue
+queue.ResponseQueue = ResponseQueue
+
+queue.CreditCardPayment = CreditCardPaymentQueue
+queue.CreditCardPaymentRequestServer = CreditCardPaymentRequestServerQueue
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/resources/test/client/creditcard-client.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/resources/test/client/creditcard-client.composite
new file mode 100644
index 0000000000..92a802fff3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/resources/test/client/creditcard-client.composite
@@ -0,0 +1,47 @@
+<?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" targetNamespace="http://www.example.com"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" name="CreditCardComposite">
+
+ <component name="CreditCardPaymentComponent">
+ <implementation.java class="test.server.CreditCardPaymentImpl" />
+ <service name="CreditCardPayment">
+ <binding.jms>
+ <tuscany:wireFormat.jmsTextXML />
+ <destination jndiName="CreditCardPayment" />
+ </binding.jms>
+ </service>
+
+ <service name="CreditCardPaymentRequestServer">
+ <binding.jms>
+ <tuscany:wireFormat.jmsTextXML />
+ <destination jndiName="CreditCardPaymentRequestServer" />
+ </binding.jms>
+ </service>
+ </component>
+
+ <component name="CreditCardClientComponent">
+ <implementation.java class="test.client.CreditCardPaymentClientImpl" />
+ <reference name="proxy" target="CreditCardPaymentComponent/CreditCardPayment" />
+ <reference name="asyncProxy" target="CreditCardPaymentComponent/CreditCardPaymentRequestServer" />
+ <reference name="syncProxy" target="CreditCardPaymentComponent/CreditCardPaymentRequestServerSync" />
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/resources/wsdl/creditcard-client.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/resources/wsdl/creditcard-client.xml
new file mode 100644
index 0000000000..edf8f375bc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/resources/wsdl/creditcard-client.xml
@@ -0,0 +1,29 @@
+<?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.
+-->
+<bindings
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="creditcard.wsdl"
+ xmlns="http://java.sun.com/xml/ns/jaxws">
+ <bindings node="wsdl:definitions">
+ <package name="com.example.test.jaxws.client"/>
+ <enableAsyncMapping>true</enableAsyncMapping>
+ </bindings>
+</bindings> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/resources/wsdl/creditcard-server.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/resources/wsdl/creditcard-server.xml
new file mode 100644
index 0000000000..9f39e164b2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/resources/wsdl/creditcard-server.xml
@@ -0,0 +1,29 @@
+<?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.
+-->
+<bindings
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="creditcard.wsdl"
+ xmlns="http://java.sun.com/xml/ns/jaxws">
+ <bindings node="wsdl:definitions">
+ <package name="com.example.test.jaxws.server"/>
+ <enableAsyncMapping>false</enableAsyncMapping>
+ </bindings>
+</bindings> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/resources/wsdl/creditcard.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/resources/wsdl/creditcard.wsdl
new file mode 100644
index 0000000000..93988329cb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/main/resources/wsdl/creditcard.wsdl
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions name="CreditCardPayment" targetNamespace="http://www.example.com/CreditCardPayment/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://www.example.com/CreditCardPayment/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ <wsdl:types>
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.com/CreditCardPayment/"
+ xmlns:tns="http://www.example.com/CreditCardPayment/">
+
+ <!-- https://jaxb.dev.java.net/issues/show_bug.cgi?id=518 -->
+ <!-- I have to change the complex types to be annoymous -->
+ <xsd:element name="authorize">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="CreditCard" type="tns:CreditCardDetailsType"></xsd:element>
+ <xsd:element name="Amount" type="xsd:float"></xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="authorizeResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="Status" type="xsd:string"></xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:complexType name="CreditCardDetailsType">
+ <xsd:sequence>
+ <xsd:element name="CreditCardType" type="tns:CreditCardTypeType" minOccurs="0" />
+ <xsd:element name="CreditCardNumber" type="xsd:string" minOccurs="0" />
+ <xsd:element name="ExpMonth" type="xsd:int" minOccurs="0" />
+ <xsd:element name="ExpYear" type="xsd:int" minOccurs="0" />
+ <xsd:element name="CardOwner" type="tns:PayerType" minOccurs="0" />
+ <xsd:element name="CVV2" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:simpleType name="CreditCardTypeType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="Visa" />
+ <xsd:enumeration value="MasterCard" />
+ <xsd:enumeration value="Discover" />
+ <xsd:enumeration value="Amex" />
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:complexType name="PayerType">
+ <xsd:sequence>
+ <xsd:element name="Name" type="xsd:string" />
+ <xsd:element name="Address" type="tns:AddressType" />
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="AddressType">
+ <xsd:sequence>
+ <xsd:element name="Street" type="xsd:string" />
+ <xsd:element name="City" type="xsd:string" />
+ <xsd:element name="State" type="xsd:string" />
+ <xsd:element name="ZipCode" type="xsd:string" />
+ <xsd:element name="HomePhone" type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:element name="authorizeFault">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="errorCode" type="xsd:string"></xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ </wsdl:types>
+ <wsdl:message name="AuthorizeRequest">
+ <wsdl:part name="parameters" element="tns:authorize"></wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="AuthorizeResponse">
+ <wsdl:part name="parameters" element="tns:authorizeResponse"></wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="AuthorizeFault">
+ <wsdl:part name="parameters" element="tns:authorizeFault"></wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="CreditCardPayment">
+ <wsdl:operation name="authorize">
+ <wsdl:input message="tns:AuthorizeRequest"></wsdl:input>
+ <wsdl:output message="tns:AuthorizeResponse"></wsdl:output>
+ <wsdl:fault name="authorizationFailure" message="tns:AuthorizeFault"></wsdl:fault>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="CreditCardPaymentBinding" type="tns:CreditCardPayment">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="authorize">
+ <soap:operation soapAction="http://www.example.com/CreditCardPayment/authorize" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ <wsdl:fault name="authorizationFailure">
+ <soap:fault name="authorizationFailure" use="literal" />
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="CreditCardPaymentService">
+ <wsdl:port name="CreditCardPaymentPort" binding="tns:CreditCardPaymentBinding">
+ <soap:address location="http://localhost:8080/CreditCardPayment" />
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/test/java/itest/CreditCardTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/test/java/itest/CreditCardTestCase.java
new file mode 100644
index 0000000000..d9b82175cc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-interactions/src/test/java/itest/CreditCardTestCase.java
@@ -0,0 +1,89 @@
+/*
+ * 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 itest;
+
+import java.util.concurrent.ExecutionException;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import test.client.CreditCardClient;
+
+/**
+ * A test case for two SCA components exchange data via binding.jms
+ */
+public class CreditCardTestCase {
+
+ private static Node node;
+ private static CreditCardClient client;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ String contribution = ContributionLocationHelper.getContributionLocation(CreditCardClient.class);
+ node =
+ NodeFactory.newInstance().createNode("test/client/creditcard-client.composite",
+ new Contribution("cc", contribution));
+ node.start();
+
+ client = node.getService(CreditCardClient.class, "CreditCardClientComponent/CreditCardClient");
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+
+ @Test
+ public void testCreditCard() {
+ String status = client.authorize("123", "John", 100.0f);
+ Assert.assertEquals("OK", status);
+ }
+
+ @Test
+ public void testCreditCardAsync() throws InterruptedException, ExecutionException {
+ String result = client.authorizeAsync("456", "Mary", 120.0f);
+ Assert.assertEquals("OK", result);
+ }
+
+ @Test
+ public void testCreditCardAsyncWithCallback() throws InterruptedException, ExecutionException {
+ String result = client.authorizeAsyncWithCallback("789", "Smith", 180.0f);
+ Assert.assertEquals("OK", result);
+ }
+
+ @Test
+ public void testCreditCardSCAAsyncWithCallback() throws InterruptedException, ExecutionException {
+ String result = client.authorizeSCAAsyncWithCallback("888", "Jane", 110.0f);
+ Assert.assertEquals("OK", result);
+ }
+
+ @Test
+ public void testCreditCardSCAWithCallback() throws InterruptedException, ExecutionException {
+ String result = client.authorizeSCAWithCallback("999", "Steve", 210.0f);
+ Assert.assertEquals("OK", result);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/pom.xml
new file mode 100644
index 0000000000..40281101f5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/pom.xml
@@ -0,0 +1,78 @@
+<?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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-async-services</artifactId>
+ <name>Apache Tuscany SCA iTest Asynchronous Services</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-jms-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-jms-runtime-activemq</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>activemq-core</artifactId>
+ <version>5.2.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-domain-hazelcast</artifactId>
+ <version>2.0.1</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/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/ASM_0002_Client.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/ASM_0002_Client.java
new file mode 100644
index 0000000000..2fb9c069ad
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/ASM_0002_Client.java
@@ -0,0 +1,89 @@
+/*
+ * 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.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/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault1.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault1.java
new file mode 100644
index 0000000000..01446c88e5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault1.java
@@ -0,0 +1,46 @@
+/*
+ * 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.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/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault2.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault2.java
new file mode 100644
index 0000000000..7f9d965820
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/BusinessFault2.java
@@ -0,0 +1,46 @@
+/*
+ * 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.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/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1.java
new file mode 100644
index 0000000000..84ba75e0e2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1.java
@@ -0,0 +1,38 @@
+/*
+ * 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.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/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncClient.java
new file mode 100644
index 0000000000..5b76af2e8f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncClient.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest;
+
+import java.util.concurrent.Future;
+
+import javax.xml.ws.AsyncHandler;
+import javax.xml.ws.Response;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface Service1AsyncClient extends Service1 {
+ Response<String> operation1Async(String input);
+ Future<?> operation1Async(String input, AsyncHandler<String> handler);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServer.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServer.java
new file mode 100644
index 0000000000..1500cbdb07
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServer.java
@@ -0,0 +1,50 @@
+/*
+ * 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.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/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServerImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServerImpl.java
new file mode 100644
index 0000000000..e4e17ca860
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServerImpl.java
@@ -0,0 +1,180 @@
+/*
+ * 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.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/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServerImpl2.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServerImpl2.java
new file mode 100644
index 0000000000..1f653ed8a8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1AsyncServerImpl2.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest;
+
+import org.oasisopen.sca.ResponseDispatch;
+
+public class Service1AsyncServerImpl2 implements Service1AsyncServer {
+
+ @Override
+ public void operation1Async(String input, ResponseDispatch<String> handler) {
+ handler.sendResponse("Service1AsyncServerImpl2.operation1Async " + input);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1ClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1ClientImpl.java
new file mode 100644
index 0000000000..d45acdcde9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1ClientImpl.java
@@ -0,0 +1,99 @@
+/*
+ * 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.itest;
+
+import javax.xml.ws.AsyncHandler;
+import javax.xml.ws.Response;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class Service1ClientImpl implements Service1 {
+
+ @Reference
+ Service1AsyncClient service1;
+
+ Object threeMutex = new Object();
+ String threeResp;
+ Throwable threeEx;
+
+ @Override
+ public String operation1(String input) {
+
+ String resp = "";
+ resp += service1.operation1(input);
+ try {
+ Thread.sleep(3000);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ resp += invokeAsyncType1(input);
+ resp += invokeAsyncType2(input);
+ return resp;
+ }
+
+ private String invokeAsyncType1(String input) {
+ // two
+ Response<String> h = service1.operation1Async(input+"TypeOne");
+ try {
+ return h.get();
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ private String invokeAsyncType2(String input) {
+ // three
+ System.out.println("invokeAsyncType2 entry");
+ AsyncHandler<String> ah = new AsyncHandler<String>() {
+ @Override
+ public void handleResponse(Response<String> res) {
+ try {
+ System.out.println("invokeAsyncType2 callback handler invoked");
+ threeResp = res.get();
+ } catch (Throwable e) {
+ threeEx = e;
+ }
+ synchronized (threeMutex) {
+ threeMutex.notifyAll();
+ }
+ }
+ };
+ service1.operation1Async(input+"TypeTwo",ah);
+ if (threeResp == null && threeEx == null) {
+ synchronized (threeMutex) {
+ if (threeResp == null && threeEx == null) {
+ try {
+ threeMutex.wait(15000);
+ System.out.println("invokeAsyncType2 mutex notified or wait expired");
+ } catch (InterruptedException e) {
+ }
+ }
+ }
+ }
+
+ if (threeResp == null && threeEx == null) {
+ throw new RuntimeException("no response recieved");
+ }
+ if (threeEx != null) {
+ throw new RuntimeException("got exception", threeEx);
+ }
+ return threeResp;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1NonAsyncServer.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1NonAsyncServer.java
new file mode 100644
index 0000000000..daafd10ec6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1NonAsyncServer.java
@@ -0,0 +1,46 @@
+/*
+ * 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.itest;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * Service1 service interface
+ * - Non-Asynchronous server version
+ */
+@Remotable
+public interface Service1NonAsyncServer {
+
+ /**
+ * Synchronous method for invoking testcase service
+ * @param input - input parameter as a String
+ * @return - output data as a String
+ */
+ 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)
+ * Listed here for documentation purposes - this is the operation that the async server operation maps to
+ */
+// @AsyncFault( {BusinessFault1.class, BusinessFault2.class} )
+// public void operation1Async( String input, ResponseDispatch<String> handler );
+
+} // end interface Service1AsyncServer
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1NonAsyncServerImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1NonAsyncServerImpl.java
new file mode 100644
index 0000000000..05d01dda78
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1NonAsyncServerImpl.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest;
+
+public class Service1NonAsyncServerImpl implements Service1NonAsyncServer {
+
+ @Override
+ public String operation1(String input) {
+ return "Service1NonAsyncServerImpl.operation1 " + input;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestException.java
new file mode 100644
index 0000000000..1de688dfcd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestException.java
@@ -0,0 +1,39 @@
+/*
+ * 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.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/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestInvocation.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestInvocation.java
new file mode 100644
index 0000000000..5b624d4712
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/TestInvocation.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.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/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/TestClient.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/TestClient.wsdl
new file mode 100644
index 0000000000..92cabda65d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/TestClient.wsdl
@@ -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.
+-->
+<!-- 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/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/TestInvocation.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/TestInvocation.wsdl
new file mode 100644
index 0000000000..a1030a4881
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/TestInvocation.wsdl
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ * WSDL 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/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/Test_Async_001.composite b/sca-java-2.x/tags/2.0.1-RC1/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/tags/2.0.1-RC1/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/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/Test_Async_002.composite b/sca-java-2.x/tags/2.0.1-RC1/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/tags/2.0.1-RC1/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/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/Test_Async_003.composite b/sca-java-2.x/tags/2.0.1-RC1/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/tags/2.0.1-RC1/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/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1.composite
new file mode 100644
index 0000000000..6a2b2c2409
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
+ name="Test1Composite">
+
+ <component name="Client">
+ <implementation.java class="org.apache.tuscany.sca.itest.Service1ClientImpl"/>
+ <reference name="service1" target="AsyncServiceComponent" />
+ </component>
+
+ <component name="AsyncServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.Service1AsyncServerImpl2"/>
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1AsyncService.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1AsyncService.composite
new file mode 100644
index 0000000000..4d9a1166df
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1AsyncService.composite
@@ -0,0 +1,28 @@
+<?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"
+ targetNamespace="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
+ name="Test1AsyncServiceComposite">
+
+ <component name="AsyncServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.Service1AsyncServerImpl2"/>
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1Client.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1Client.composite
new file mode 100644
index 0000000000..923e780e06
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1Client.composite
@@ -0,0 +1,29 @@
+<?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"
+ targetNamespace="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
+ name="Test1ClientComposite">
+
+ <component name="Client">
+ <implementation.java class="org.apache.tuscany.sca.itest.Service1ClientImpl"/>
+ <reference name="service1" target="AsyncServiceComponent" />
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1NonAsyncService.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1NonAsyncService.composite
new file mode 100644
index 0000000000..fbe207d7a0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1NonAsyncService.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
+ name="Test1NonAsyncServiceComposite">
+
+ <component name="Client">
+ <implementation.java class="org.apache.tuscany.sca.itest.Service1ClientImpl"/>
+ <reference name="service1" target="AsyncServiceComponent" />
+ </component>
+
+ <component name="AsyncServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.Service1NonAsyncServerImpl"/>
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1NonAsyncServiceJMS.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1NonAsyncServiceJMS.composite
new file mode 100644
index 0000000000..b9527231f0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1NonAsyncServiceJMS.composite
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
+ name="Test1NonAsyncServiceJMSComposite">
+
+ <component name="Client">
+ <implementation.java class="org.apache.tuscany.sca.itest.Service1ClientImpl"/>
+ <reference name="service1" target="AsyncServiceComponent" />
+ </component>
+
+ <component name="AsyncServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.Service1NonAsyncServerImpl"/>
+ <service name="Service1NonAsyncServer">
+ <interface.java interface="org.apache.tuscany.sca.itest.Service1NonAsyncServer"/>
+ <binding.jms />
+ </service>
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1NonAsyncServiceWS.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1NonAsyncServiceWS.composite
new file mode 100644
index 0000000000..abc4b0ebc4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1NonAsyncServiceWS.composite
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
+ name="Test1NonAsyncServiceWSComposite">
+
+ <component name="Client">
+ <implementation.java class="org.apache.tuscany.sca.itest.Service1ClientImpl"/>
+ <reference name="service1" target="AsyncServiceComponent" />
+ </component>
+
+ <component name="AsyncServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.Service1NonAsyncServerImpl"/>
+ <service name="Service1NonAsyncServer">
+ <interface.java interface="org.apache.tuscany.sca.itest.Service1NonAsyncServer"/>
+ <binding.ws />
+ </service>
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1SyncService.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1SyncService.composite
new file mode 100644
index 0000000000..8928543f43
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1SyncService.composite
@@ -0,0 +1,28 @@
+<?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"
+ targetNamespace="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
+ name="Test1SyncServiceComposite">
+
+ <component name="AsyncServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.Service1NonAsyncServerImpl"/>
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1jms.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1jms.composite
new file mode 100644
index 0000000000..c520805aea
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1jms.composite
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
+ name="Test1JmsComposite">
+
+ <component name="Client">
+ <implementation.java class="org.apache.tuscany.sca.itest.Service1ClientImpl"/>
+ <reference name="service1" target="AsyncServiceComponent"/>
+ </component>
+
+ <component name="AsyncServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.Service1AsyncServerImpl2"/>
+ <service name="Service1AsyncServer">
+ <interface.java interface="org.apache.tuscany.sca.itest.Service1AsyncServer"/>
+ <binding.jms />
+ </service>
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1jmsbytes.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1jmsbytes.composite
new file mode 100644
index 0000000000..d73862f480
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1jmsbytes.composite
@@ -0,0 +1,40 @@
+<?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"
+ targetNamespace="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
+ xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1"
+ name="Test1JmsBytesComposite">
+
+ <component name="Client">
+ <implementation.java class="org.apache.tuscany.sca.itest.Service1ClientImpl"/>
+ <reference name="service1" target="AsyncServiceComponent"/>
+ </component>
+
+ <component name="AsyncServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.Service1AsyncServerImpl2"/>
+ <service name="Service1AsyncServer">
+ <interface.java interface="org.apache.tuscany.sca.itest.Service1AsyncServer"/>
+ <binding.jms>
+ <t:wireFormat.jmsBytes />
+ </binding.jms>
+ </service>
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1jmsbytesxml.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1jmsbytesxml.composite
new file mode 100644
index 0000000000..e9bd051796
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1jmsbytesxml.composite
@@ -0,0 +1,40 @@
+<?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"
+ targetNamespace="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
+ xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1"
+ name="Test1JmsBytesXmlComposite">
+
+ <component name="Client">
+ <implementation.java class="org.apache.tuscany.sca.itest.Service1ClientImpl"/>
+ <reference name="service1" target="AsyncServiceComponent"/>
+ </component>
+
+ <component name="AsyncServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.Service1AsyncServerImpl2"/>
+ <service name="Service1AsyncServer">
+ <interface.java interface="org.apache.tuscany.sca.itest.Service1AsyncServer"/>
+ <binding.jms>
+ <t:wireFormat.jmsBytesXML />
+ </binding.jms>
+ </service>
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1jmsobject.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1jmsobject.composite
new file mode 100644
index 0000000000..9d20b1bf1f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1jmsobject.composite
@@ -0,0 +1,40 @@
+<?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"
+ targetNamespace="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
+ xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1"
+ name="Test1JmsObjectComposite">
+
+ <component name="Client">
+ <implementation.java class="org.apache.tuscany.sca.itest.Service1ClientImpl"/>
+ <reference name="service1" target="AsyncServiceComponent"/>
+ </component>
+
+ <component name="AsyncServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.Service1AsyncServerImpl2"/>
+ <service name="Service1AsyncServer">
+ <interface.java interface="org.apache.tuscany.sca.itest.Service1AsyncServer"/>
+ <binding.jms>
+ <t:wireFormat.jmsObject />
+ </binding.jms>
+ </service>
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1jmstext.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1jmstext.composite
new file mode 100644
index 0000000000..7d2003351f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1jmstext.composite
@@ -0,0 +1,40 @@
+<?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"
+ targetNamespace="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
+ xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1"
+ name="Test1JmsTextComposite">
+
+ <component name="Client">
+ <implementation.java class="org.apache.tuscany.sca.itest.Service1ClientImpl"/>
+ <reference name="service1" target="AsyncServiceComponent"/>
+ </component>
+
+ <component name="AsyncServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.Service1AsyncServerImpl2"/>
+ <service name="Service1AsyncServer">
+ <interface.java interface="org.apache.tuscany.sca.itest.Service1AsyncServer"/>
+ <binding.jms>
+ <t:wireFormat.jmsText />
+ </binding.jms>
+ </service>
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1jmstextxml.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1jmstextxml.composite
new file mode 100644
index 0000000000..ecf67264b8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1jmstextxml.composite
@@ -0,0 +1,40 @@
+<?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"
+ targetNamespace="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
+ xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1"
+ name="Test1JmsTextXmlComposite">
+
+ <component name="Client">
+ <implementation.java class="org.apache.tuscany.sca.itest.Service1ClientImpl"/>
+ <reference name="service1" target="AsyncServiceComponent"/>
+ </component>
+
+ <component name="AsyncServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.Service1AsyncServerImpl2"/>
+ <service name="Service1AsyncServer">
+ <interface.java interface="org.apache.tuscany.sca.itest.Service1AsyncServer"/>
+ <binding.jms>
+ <t:wireFormat.jmsTextXML />
+ </binding.jms>
+ </service>
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1ws.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1ws.composite
new file mode 100644
index 0000000000..573748f373
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/main/resources/test1ws.composite
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
+ name="Test1WSComposite">
+
+ <component name="Client">
+ <implementation.java class="org.apache.tuscany.sca.itest.Service1ClientImpl"/>
+ <reference name="service1" target="AsyncServiceComponent"/>
+ </component>
+
+ <component name="AsyncServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.Service1AsyncServerImpl2"/>
+ <service name="Service1AsyncServer">
+ <binding.ws/>
+ </service>
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_001_TestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_001_TestCase.java
new file mode 100644
index 0000000000..27ff4da34b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_001_TestCase.java
@@ -0,0 +1,87 @@
+/*
+ * 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.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/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_002_TestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_002_TestCase.java
new file mode 100644
index 0000000000..d18b8d3b73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_002_TestCase.java
@@ -0,0 +1,85 @@
+/*
+ * 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.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/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_003_TestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_003_TestCase.java
new file mode 100644
index 0000000000..fafe522da8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Async_003_TestCase.java
@@ -0,0 +1,85 @@
+/*
+ * 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.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
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1DistributedSyncServiceTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1DistributedSyncServiceTestCase.java
new file mode 100644
index 0000000000..6b7bf1b8b0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1DistributedSyncServiceTestCase.java
@@ -0,0 +1,58 @@
+/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+
+import java.net.URI;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class Test1DistributedSyncServiceTestCase {
+
+ private static final URI DOMAIN = URI.create("uri:Test1DistributedTestCase?bind=127.0.0.1:8765");
+ protected static Node clientNode, serviceNode;
+
+ @BeforeClass
+ public static void setUp() throws Exception {
+ serviceNode = TuscanyRuntime.runComposite(DOMAIN, "test1SyncService.composite", "target/classes");
+ clientNode = TuscanyRuntime.runComposite(DOMAIN, "test1Client.composite", "target/classes");
+ }
+
+ @AfterClass
+ public static void tearDown() throws Exception {
+ if (clientNode != null) clientNode.stop();
+ if (serviceNode != null) serviceNode.stop();
+ }
+
+ @Test
+ public void testReference() throws NoSuchServiceException {
+ Service1 test = clientNode.getService(Service1.class, "Client");
+ assertEquals("Service1NonAsyncServerImpl.operation1 foo" +
+ "Service1NonAsyncServerImpl.operation1 fooTypeOne" +
+ "Service1NonAsyncServerImpl.operation1 fooTypeTwo",
+ test.operation1("foo"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1DistributedTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1DistributedTestCase.java
new file mode 100644
index 0000000000..d506441220
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1DistributedTestCase.java
@@ -0,0 +1,60 @@
+/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+
+import java.net.URI;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+@Ignore
+public class Test1DistributedTestCase {
+
+ private static final URI DOMAIN = URI.create("uri:Test1DistributedTestCase?bind=127.0.0.1:8765");
+ protected Node clientNode, serviceNode;
+
+ @Before
+ public void setUp() throws Exception {
+ clientNode = TuscanyRuntime.runComposite(DOMAIN, "test1Client.composite", "target/classes");
+ serviceNode = TuscanyRuntime.runComposite(DOMAIN, "test1AsyncService.composite", "target/classes");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ if (clientNode != null) clientNode.stop();
+ if (serviceNode != null) serviceNode.stop();
+ }
+
+ @Test
+ public void testReference() throws NoSuchServiceException {
+ Service1 test = clientNode.getService(Service1.class, "Client");
+ assertEquals("Service1AsyncServerImpl2.operation1Async foo" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeOne" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeTwo",
+ test.operation1("foo"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsBytesTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsBytesTestCase.java
new file mode 100644
index 0000000000..3ec19f5140
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsBytesTestCase.java
@@ -0,0 +1,56 @@
+/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+@Ignore
+public class Test1JmsBytesTestCase {
+
+ protected TuscanyRuntime runtime;
+ protected Node node;
+
+ @Before
+ public void setUp() throws Exception {
+ node = TuscanyRuntime.runComposite("test1jmsbytes.composite", "target/classes");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testReference() throws NoSuchServiceException {
+ Service1 test = node.getService(Service1.class, "Client");
+ assertEquals("Service1AsyncServerImpl2.operation1Async foo" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeOne" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeTwo",
+ test.operation1("foo"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsBytesXmlTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsBytesXmlTestCase.java
new file mode 100644
index 0000000000..76bcd3b631
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsBytesXmlTestCase.java
@@ -0,0 +1,54 @@
+/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class Test1JmsBytesXmlTestCase {
+
+ protected TuscanyRuntime runtime;
+ protected Node node;
+
+ @Before
+ public void setUp() throws Exception {
+ node = TuscanyRuntime.runComposite("test1jmsbytesxml.composite", "target/classes");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testReference() throws NoSuchServiceException {
+ Service1 test = node.getService(Service1.class, "Client");
+ assertEquals("Service1AsyncServerImpl2.operation1Async foo" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeOne" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeTwo",
+ test.operation1("foo"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsObjectTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsObjectTestCase.java
new file mode 100644
index 0000000000..09b6fa5ba1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsObjectTestCase.java
@@ -0,0 +1,54 @@
+/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class Test1JmsObjectTestCase {
+
+ protected TuscanyRuntime runtime;
+ protected Node node;
+
+ @Before
+ public void setUp() throws Exception {
+ node = TuscanyRuntime.runComposite("test1jmsobject.composite", "target/classes");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testReference() throws NoSuchServiceException {
+ Service1 test = node.getService(Service1.class, "Client");
+ assertEquals("Service1AsyncServerImpl2.operation1Async foo" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeOne" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeTwo",
+ test.operation1("foo"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsTestCase.java
new file mode 100644
index 0000000000..46006f77ac
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsTestCase.java
@@ -0,0 +1,54 @@
+/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class Test1JmsTestCase {
+
+ protected TuscanyRuntime runtime;
+ protected Node node;
+
+ @Before
+ public void setUp() throws Exception {
+ node = TuscanyRuntime.runComposite("test1jms.composite", "target/classes");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testReference() throws NoSuchServiceException {
+ Service1 test = node.getService(Service1.class, "Client");
+ assertEquals("Service1AsyncServerImpl2.operation1Async foo" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeOne" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeTwo",
+ test.operation1("foo"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsTextTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsTextTestCase.java
new file mode 100644
index 0000000000..1c760b1ad5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsTextTestCase.java
@@ -0,0 +1,54 @@
+/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class Test1JmsTextTestCase {
+
+ protected TuscanyRuntime runtime;
+ protected Node node;
+
+ @Before
+ public void setUp() throws Exception {
+ node = TuscanyRuntime.runComposite("test1jmstext.composite", "target/classes");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testReference() throws NoSuchServiceException {
+ Service1 test = node.getService(Service1.class, "Client");
+ assertEquals("Service1AsyncServerImpl2.operation1Async foo" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeOne" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeTwo",
+ test.operation1("foo"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsTextXmlTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsTextXmlTestCase.java
new file mode 100644
index 0000000000..79f3ee69bb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1JmsTextXmlTestCase.java
@@ -0,0 +1,54 @@
+/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class Test1JmsTextXmlTestCase {
+
+ protected TuscanyRuntime runtime;
+ protected Node node;
+
+ @Before
+ public void setUp() throws Exception {
+ node = TuscanyRuntime.runComposite("test1jmstextxml.composite", "target/classes");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ if (node != null) node.stop();
+ }
+
+ @Test
+ public void testReference() throws NoSuchServiceException {
+ Service1 test = node.getService(Service1.class, "Client");
+ assertEquals("Service1AsyncServerImpl2.operation1Async foo" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeOne" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeTwo",
+ test.operation1("foo"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1NonAsyncServiceJMSTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1NonAsyncServiceJMSTestCase.java
new file mode 100644
index 0000000000..1c0cbbafa2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1NonAsyncServiceJMSTestCase.java
@@ -0,0 +1,54 @@
+/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class Test1NonAsyncServiceJMSTestCase {
+
+ protected TuscanyRuntime runtime;
+ protected Node node;
+
+ @Before
+ public void setUp() throws Exception {
+ node = TuscanyRuntime.runComposite("test1NonAsyncServiceJMS.composite", "target/classes");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testReference() throws NoSuchServiceException {
+ Service1 test = node.getService(Service1.class, "Client");
+ assertEquals("Service1NonAsyncServerImpl.operation1 foo" +
+ "Service1NonAsyncServerImpl.operation1 fooTypeOne" +
+ "Service1NonAsyncServerImpl.operation1 fooTypeTwo",
+ test.operation1("foo"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1NonAsyncServiceTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1NonAsyncServiceTestCase.java
new file mode 100644
index 0000000000..b7084a61f8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1NonAsyncServiceTestCase.java
@@ -0,0 +1,54 @@
+/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class Test1NonAsyncServiceTestCase {
+
+ protected TuscanyRuntime runtime;
+ protected Node node;
+
+ @Before
+ public void setUp() throws Exception {
+ node = TuscanyRuntime.runComposite("test1NonAsyncService.composite", "target/classes");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testReference() throws NoSuchServiceException {
+ Service1 test = node.getService(Service1.class, "Client");
+ assertEquals("Service1NonAsyncServerImpl.operation1 foo" +
+ "Service1NonAsyncServerImpl.operation1 fooTypeOne" +
+ "Service1NonAsyncServerImpl.operation1 fooTypeTwo",
+ test.operation1("foo"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1NonAsyncServiceWSTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1NonAsyncServiceWSTestCase.java
new file mode 100644
index 0000000000..f7c7544cfa
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1NonAsyncServiceWSTestCase.java
@@ -0,0 +1,54 @@
+/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class Test1NonAsyncServiceWSTestCase {
+
+ protected TuscanyRuntime runtime;
+ protected Node node;
+
+ @Before
+ public void setUp() throws Exception {
+ node = TuscanyRuntime.runComposite("test1NonAsyncServiceWS.composite", "target/classes");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testReference() throws NoSuchServiceException {
+ Service1 test = node.getService(Service1.class, "Client");
+ assertEquals("Service1NonAsyncServerImpl.operation1 foo" +
+ "Service1NonAsyncServerImpl.operation1 fooTypeOne" +
+ "Service1NonAsyncServerImpl.operation1 fooTypeTwo",
+ test.operation1("foo"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1TestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1TestCase.java
new file mode 100644
index 0000000000..3c293b2dc8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1TestCase.java
@@ -0,0 +1,54 @@
+/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class Test1TestCase {
+
+ protected TuscanyRuntime runtime;
+ protected Node node;
+
+ @Before
+ public void setUp() throws Exception {
+ node = TuscanyRuntime.runComposite("test1.composite", "target/classes");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testReference() throws NoSuchServiceException {
+ Service1 test = node.getService(Service1.class, "Client");
+ assertEquals("Service1AsyncServerImpl2.operation1Async foo" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeOne" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeTwo",
+ test.operation1("foo"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1WSTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1WSTestCase.java
new file mode 100644
index 0000000000..9fe28c855a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/async-services/src/test/java/org/apache/tuscany/sca/itest/Test1WSTestCase.java
@@ -0,0 +1,54 @@
+/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class Test1WSTestCase {
+
+ protected TuscanyRuntime runtime;
+ protected Node node;
+
+ @Before
+ public void setUp() throws Exception {
+ node = TuscanyRuntime.runComposite("test1ws.composite", "target/classes");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testReference() throws NoSuchServiceException {
+ Service1 test = node.getService(Service1.class, "Client");
+ assertEquals("Service1AsyncServerImpl2.operation1Async foo" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeOne" +
+ "Service1AsyncServerImpl2.operation1Async fooTypeTwo",
+ test.operation1("foo"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/base/dependencies/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/base/dependencies/pom.xml
new file mode 100644
index 0000000000..42287da271
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/base/dependencies/pom.xml
@@ -0,0 +1,59 @@
+<?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-base</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-base-dependencies</artifactId>
+ <name>Apache Tuscany SCA iTest Base Dependencies</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <!-- Copy all the dependencies so the test can verify only the expected ones get dragged in -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/base/dependencies/src/test/java/org/apache/tuscany/sca/itest/base/dependencies/ValidateDependenciesTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/base/dependencies/src/test/java/org/apache/tuscany/sca/itest/base/dependencies/ValidateDependenciesTestCase.java
new file mode 100644
index 0000000000..2c665183ce
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/base/dependencies/src/test/java/org/apache/tuscany/sca/itest/base/dependencies/ValidateDependenciesTestCase.java
@@ -0,0 +1,65 @@
+/*
+ * 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.itest.base.dependencies;
+
+import java.io.File;
+
+import junit.framework.Assert;
+
+import org.junit.Test;
+
+/**
+ * Test case for verifying the expected dependencies of the base jar
+ * (Uses maven-dependency-plugin config in the pom.xml to generate the dependency list)
+ *
+ * Current required jars are:
+ * asm-3.1.jar
+ * cglib-2.2.jar
+ * tuscany-base-2.0-SNAPSHOT.jar
+ * wsdl4j-1.6.2.jar
+ * XmlSchema-1.4.3.jar
+ *
+ * *** NOTE: this is an API! If the dependencies change the API is changed and users will be broken.
+ * Don't just change the list without thinking about the consequencies
+ * or probably asking on the dev list first
+ *
+ * junit-4.8.1.jar (only from this testcase)
+ *
+ */
+public class ValidateDependenciesTestCase {
+
+ @Test
+ public void countDependencies() {
+
+ File dependenciesDir = new File("target/dependency");
+ Assert.assertTrue(dependenciesDir.exists());
+
+ File[] dependencyFiles = dependenciesDir.listFiles();
+
+
+ String vend = System.getProperty("java.vendor");
+
+ if(vend.equals("IBM Corporation")) {
+ Assert.assertEquals(12, dependencyFiles.length);
+ } else {
+ Assert.assertEquals(8, dependencyFiles.length);
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/base/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/base/pom.xml
new file mode 100644
index 0000000000..6965290cd9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/base/pom.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <packaging>pom</packaging>
+ <artifactId>itest-base</artifactId>
+ <name>Apache Tuscany SCA iTest Base</name>
+
+ <modules>
+ <module>dependencies</module>
+ </modules>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/pom.xml
new file mode 100644
index 0000000000..b762f6650d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/pom.xml
@@ -0,0 +1,280 @@
+<?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-bpel</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-bpel-helloworld-reference</artifactId>
+ <name>Apache Tuscany SCA iTest BPEL HelloWorld Reference</name>
+
+ <repositories>
+ <repository>
+ <id>apache.incubator</id>
+ <url>http://people.apache.org/repo/m2-incubating-repository</url>
+ </repository>
+ </repositories>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0.1</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-jetty</artifactId>
+ <version>2.0.1</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-bpel-runtime</artifactId>
+ <version>2.0.1</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.ode</groupId>
+ <artifactId>ode-dao-jpa-ojpa-derby</artifactId>
+ <version>1.1</version>
+ <type>zip</type>
+ </dependency>
+
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>2.8.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <!-- http://jira.codehaus.org/browse/SUREFIRE-322 -->
+ <version>2.3.1</version>
+ <configuration>
+ <useFile>false</useFile>
+ <trimStackTrace>false</trimStackTrace>
+ <useSystemClassLoader>true</useSystemClassLoader>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>unpack</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.apache.ode</groupId>
+ <artifactId>ode-dao-jpa-ojpa-derby</artifactId>
+ <version>1.1</version>
+ <type>zip</type>
+ <overWrite>true</overWrite>
+ <outputDirectory>${project.build.directory}/test-classes/</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <argLine>-Djava.endorsed.dirs=target/endorsed</argLine>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>javax.xml.ws</groupId>
+ <artifactId>jaxws-api</artifactId>
+ <version>2.1</version>
+ <type>jar</type>
+ </artifactItem>
+ <artifactItem>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <version>2.1</version>
+ <type>jar</type>
+ </artifactItem>
+ </artifactItems>
+ <outputDirectory>${project.build.directory}/endorsed</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.0</version>
+ <executions>
+ <execution>
+ <id>add-test-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>
+ <configuration>
+ <target>2.1</target>
+ </configuration>
+ <executions>
+ <execution>
+ <id>wsimport</id>
+ <phase>generate-test-sources</phase>
+ <goals>
+ <goal>wsimport</goal>
+ </goals>
+ <configuration>
+ <packageName>org.apache.tuscany.implementation.bpel.example.helloworld</packageName>
+ <wsdlDirectory>${basedir}/src/test/resources/helloworld/</wsdlDirectory>
+ <wsdlFiles>
+ <wsdlFile>helloworld.wsdl</wsdlFile>
+ </wsdlFiles>
+ <sourceDestDir>${project.build.directory}/jaxws-source</sourceDestDir>
+ <verbose>false</verbose>
+ <xnocompile>true</xnocompile>
+ </configuration>
+ </execution>
+
+ <!--
+ <execution>
+ <id>wsgen</id>
+ <phase>process-test-classes</phase>
+ <goals>
+ <goal>wsgen-test</goal>
+ </goals>
+ <configuration>
+ <sei>org.apache.tuscany.sca.interfacedef.java.jaxws.MyServiceImpl</sei>
+ <genWsdl>true</genWsdl>
+ <keep>true</keep>
+ <resourceDestDir>${project.build.directory}/jaxws-source</resourceDestDir>
+ <sourceDestDir>${project.build.directory}/jaxws-source</sourceDestDir>
+ </configuration>
+ </execution>
+ -->
+ </executions>
+
+ </plugin>
+
+ <!--
+ wsimport cannot handle WSDL files without a service/binding element.
+ CXF wsdl2java plugin does support that. I had to override the default
+ value of wsdlRoot/testWsdlRoot to a non-existent file to avoid NPE -->
+ <!--
+ <plugin>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-codegen-plugin</artifactId>
+ <version>2.1</version>
+ <executions>
+ <execution>
+ <id>generate-sources</id>
+ <phase>generate-sources</phase>
+
+ <configuration>
+ <sourceRoot>${basedir}/target/jaxws-source</sourceRoot>
+ <wsdlRoot>NONE</wsdlRoot>
+ <testWsdlRoot>NONE</testWsdlRoot>
+ <wsdlOptions>
+ <wsdlOption>
+ <wsdl>${basedir}/src/test/resources/wsdl/Stock.wsdl</wsdl>
+ <outputDir>${basedir}/target/jaxws-source</outputDir>
+ <packagenames>
+ <packagename>com.example.stock.cxf</packagename>
+ </packagenames>
+ </wsdlOption>
+ </wsdlOptions>
+ </configuration>
+ <goals>
+ <goal>wsdl2java</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ -->
+ </plugins>
+ </build>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsService.java
new file mode 100644
index 0000000000..d7dff093f9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsService.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package greetings;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface GreetingsService {
+
+ public String getGreetings(String name);
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsServiceImpl.java
new file mode 100644
index 0000000000..5ecf5494be
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsServiceImpl.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package greetings;
+
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements the HelloWorld service.
+ */
+@Service(GreetingsService.class)
+public class GreetingsServiceImpl implements GreetingsService {
+
+ public String getGreetings(String name) {
+ return "Hello " + name;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsTestCase.java
new file mode 100644
index 0000000000..24ab0a4181
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/java/greetings/GreetingsTestCase.java
@@ -0,0 +1,65 @@
+/*
+ * 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 greetings;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Tests the Greetings service
+ *
+ * @version $Rev$ $Date$
+ */
+public class GreetingsTestCase {
+
+ private static Node node;
+
+ /**
+ * @throws java.lang.Exception
+ */
+ @BeforeClass
+ public static void setUp() throws Exception {
+ String location = ContributionLocationHelper.getContributionLocation("greetings/greetings.composite");
+ node = NodeFactory.newInstance().createNode("greetings/greetings.composite", new Contribution("c1", location));
+ node.start();
+ }
+
+ /**
+ * @throws java.lang.Exception
+ */
+ @AfterClass
+ public static void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testInvoke() {
+ GreetingsService greetingsService = node.getService(GreetingsService.class, "GreetingsServiceComponent");
+ String response = greetingsService.getGreetings("Luciano");
+ Assert.assertEquals("Hello Luciano", response);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..f46893481b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldService.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * The interface for the helloworld service
+ */
+@Remotable
+public interface HelloWorldService {
+ public String hello(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..a687534bb2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldServiceImpl.java
@@ -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 helloworld;
+
+import greetings.GreetingsService;
+
+import org.oasisopen.sca.annotation.Reference;
+
+/**
+ * The HelloWorld service implementation
+ */
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ protected GreetingsService greetingsService;
+
+ public GreetingsService getGreetingsService() {
+ System.out.println("Got Injected greetingsService");
+ return greetingsService;
+ }
+
+ @Reference
+ public void setGreetingsService(GreetingsService greetingsService) {
+ System.out.println("Injected greetingsService");
+ this.greetingsService = greetingsService;
+ }
+
+ public String hello(String name) {
+ System.out.println("Calling greeting services getGreetings");
+ return greetingsService.getGreetings(name);
+ }
+} \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldTestCase.java
new file mode 100644
index 0000000000..a9268ac1b5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/java/helloworld/HelloWorldTestCase.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Tests the BPEL Helloworld Service
+ *
+ * @version $Rev$ $Date$
+ */
+public class HelloWorldTestCase {
+ private static Node node;
+
+ /**
+ * @throws java.lang.Exception
+ */
+ @BeforeClass
+ public static void setUp() throws Exception {
+ String location = ContributionLocationHelper.getContributionLocation("helloworld/helloworld.composite");
+ node = NodeFactory.newInstance().createNode("helloworld/helloworld.composite", new Contribution("c1", location));
+ node.start();
+ }
+
+ /**
+ * @throws java.lang.Exception
+ */
+ @AfterClass
+ public static void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testServiceInvocation() {
+ HelloWorldService bpelService = node.getService(HelloWorldService.class, "HelloWorldService");
+ String response = bpelService.hello("Luciano");
+ Assert.assertEquals("Hello Luciano", response);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/resources/greetings/greetings.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/resources/greetings/greetings.composite
new file mode 100644
index 0000000000..d3cfb80547
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/resources/greetings/greetings.composite
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://greetings"
+ xmlns:hw="http://greetings"
+ name="greetings">
+
+ <component name="GreetingsServiceComponent">
+ <implementation.java class="greetings.GreetingsServiceImpl" />
+ <service name="GreetingsService">
+ <interface.wsdl interface="http://greetings#wsdl.interface(Greetings)" />
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/resources/greetings/greetings.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/resources/greetings/greetings.wsdl
new file mode 100644
index 0000000000..b976a53970
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/resources/greetings/greetings.wsdl
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions name="greetings"
+ targetNamespace="http://greetings"
+ xmlns:tns="http://greetings"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://greetings" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="greetings">
+ <complexType>
+ <sequence>
+ <element name="greetings" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="greetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="greetingsResponse" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="GreetingsRequest">
+ <wsdl:part element="tns:greetings" name="request"/>
+ </wsdl:message>
+
+ <wsdl:message name="GreetingsResponse">
+ <wsdl:part element="tns:greetingsResponse" name="response"/>
+ </wsdl:message>
+
+ <wsdl:portType name="Greetings">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:GreetingsRequest" name="GreetingsRequest"/>
+ <wsdl:output message="tns:GreetingsResponse" name="GreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="GreetingsSoapBinding" type="tns:Greetings">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="GreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="GreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="GreetingsService">
+ <wsdl:port name="GreetingsSoapPort" binding="tns:GreetingsSoapBinding">
+ <wsdlsoap:address location="http://localhost:8085/ode/processes/greetings"/>
+ </wsdl:port>
+ </wsdl:service>
+
+ <plnk:partnerLinkType name="GreetingsPartnerLinkType">
+ <plnk:role name="Provider" portType="tns:Greetings"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.bpel b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.bpel
new file mode 100644
index 0000000000..c0317687df
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.bpel
@@ -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.
+ -->
+<process name="HelloWorld"
+ targetNamespace="http://helloworld"
+ xmlns="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
+ xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
+ xmlns:tns="http://helloworld"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:helloworld="http://helloworld"
+ xmlns:greetings="http://greetings"
+ queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+ expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0" xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+
+ <import location="helloworld.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"
+ namespace="http://helloworld"/>
+
+ <import location="../greetings/greetings.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"
+ namespace="http://greetings"/>
+
+ <partnerLinks>
+ <partnerLink name="helloPartnerLink" partnerLinkType="helloworld:HelloPartnerLinkType" myRole="me" />
+ <partnerLink name="greetingsPartnerLink" partnerLinkType="greetings:GreetingsPartnerLinkType" partnerRole="Provider" initializePartnerRole="yes" />
+ </partnerLinks>
+
+ <variables>
+ <variable name="helloMessage" messageType="helloworld:HelloMessage"/>
+ <variable name="helloMessageResponse" messageType="helloworld:HelloMessageResponse"/>
+ <variable name="greetingsRequest" messageType="greetings:GreetingsRequest"/>
+ <variable name="greetingsResponse" messageType="greetings:GreetingsResponse"/>
+ </variables>
+
+ <sequence>
+ <receive
+ name="start"
+ createInstance="yes"
+ operation="hello"
+ variable="helloMessage"
+ partnerLink="helloPartnerLink"
+ portType="helloworld:HelloWorld" />
+
+ <assign name="assignToGreetingsRequest">
+ <copy>
+ <from>$helloMessage.TestPart</from>
+ <to>$greetingsRequest.request</to>
+ </copy>
+ </assign>
+
+ <invoke name="invokeGreetings"
+ operation="getGreetings"
+ inputVariable="greetingsRequest"
+ outputVariable="greetingsResponse"
+ partnerLink="greetingsPartnerLink"
+ portType="greetings:Greetings" />
+
+ <assign name="assignToHelloResponse">
+ <copy>
+ <from>$greetingsResponse.parameters/greetings:GreetingsResponse</from>
+ <to>$helloMessageResponse.TestPart</to>
+ </copy>
+ </assign>
+
+ <reply name="end"
+ operation="hello"
+ partnerLink="helloPartnerLink"
+ portType="helloworld:HelloWorld"
+ variable="helloMessageResponse"/>
+ </sequence>
+</process>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.composite
new file mode 100644
index 0000000000..ef66d28bb9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.composite
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://bpel"
+ xmlns:hns="http://helloworld"
+ name="helloworld">
+
+ <component name="HelloWorldService">
+ <implementation.bpel process="hns:HelloWorld"/>
+ <reference name="greetingsPartnerLink" target="GreetingsServiceComponent"/>
+ </component>
+
+ <component name="GreetingsServiceComponent">
+ <implementation.java class="greetings.GreetingsServiceImpl" />
+ <service name="GreetingsService">
+ <interface.wsdl interface="http://greetings#wsdl.interface(Greetings)" />
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.wsdl
new file mode 100644
index 0000000000..541a713112
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/resources/helloworld/helloworld.wsdl
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<wsdl:definitions name="helloworld"
+ targetNamespace="http://helloworld"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://helloworld"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
+ xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified"
+ targetNamespace="http://helloworld"
+ xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="hello">
+ <complexType>
+ <sequence>
+ <element name="message" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="helloResponse">
+ <complexType>
+ <sequence>
+ <element name="messageResponse" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="HelloMessage">
+ <wsdl:part element="tns:hello" name="TestPart"/>
+ </wsdl:message>
+
+ <wsdl:message name="HelloMessageResponse">
+ <wsdl:part element="tns:helloResponse" name="TestResponse"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="hello">
+ <wsdl:input message="tns:HelloMessage" name="TestIn"/>
+ <wsdl:output message="tns:HelloMessageResponse" name="TestOut"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+
+ <wsdl:binding name="HelloSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="hello">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="TestIn">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="TestOut">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port name="HelloSoapPort" binding="tns:HelloSoapBinding">
+ <soap:address location="http://localhost:8085/ode/processes/helloWorld"/>
+ </wsdl:port>
+ </wsdl:service>
+
+ <plnk:partnerLinkType name="HelloPartnerLinkType">
+ <plnk:role name="me" portType="tns:HelloWorld"/>
+ <plnk:role name="you" portType="tns:HelloWorld"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/resources/log4j.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/resources/log4j.properties
new file mode 100644
index 0000000000..4e13380e0b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-reference/src/test/resources/log4j.properties
@@ -0,0 +1,36 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Set root logger level to WARN and its only appender to CONSOLE
+log4j.rootLogger=OFF, CONSOLE
+
+# log4j properties to work with commandline tools.
+log4j.category.org.mortbay=OFF
+log4j.category.org.hibernate.type=OFF
+log4j.category.org.objectweb=OFF
+log4j.category.org.apache.ode.axis2=OFF
+log4j.category.org.apache.ode.bpel.engine=OFF
+log4j.category.org.apache.ode.daohib.bpel.CorrelatorDaoImpl=OFF
+log4j.category.org.apache.ode.bpel.epr=OFF
+log4j.category.org.apache.tuscany.sca.implementation.bpel=DEBUG
+log4j.category.org.apache.tuscany.sca.implementation.bpel.ode=DEBUG
+log4j.category.org.apache.tuscany.sca.implementation.bpel.provider=DEBUG
+
+# Console appender
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=[%p] - %C{1}.%M(%L) | %m%n
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-ws/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-ws/pom.xml
new file mode 100644
index 0000000000..44d918e7bd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-ws/pom.xml
@@ -0,0 +1,179 @@
+<?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-bpel</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-bpel-helloworld-ws
+ </artifactId>
+ <name>Apache Tuscany SCA iTest BPEL HelloWorld Over Web Services</name>
+
+ <repositories>
+ <repository>
+ <id>apache.incubator</id>
+ <url>http://people.apache.org/repo/m2-incubating-repository
+ </url>
+ </repository>
+ </repositories>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0.1</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-bpel-runtime</artifactId>
+ <version>2.0.1</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>2.8.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-jetty</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <!-- http://jira.codehaus.org/browse/SUREFIRE-322 -->
+ <version>2.3.1</version>
+ <configuration>
+ <useFile>false</useFile>
+ <trimStackTrace>false</trimStackTrace>
+ <useSystemClassLoader>true</useSystemClassLoader>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin
+ </artifactId>
+ <executions>
+ <execution>
+ <id>unpack</id>
+ <phase>test-compile</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.apache.ode</groupId>
+ <artifactId>ode-dao-jpa-ojpa-derby
+ </artifactId>
+ <version>1.1</version>
+ <type>zip</type>
+ <overWrite>true</overWrite>
+ <outputDirectory>${project.build.directory}/test-classes/
+ </outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.tuscany.sdo</groupId>
+ <artifactId>tuscany-sdo-plugin</artifactId>
+ <version>1.1.1</version>
+ <executions>
+ <execution>
+ <id>generate-bpel-helloworld</id>
+ <phase>generate-sources</phase>
+ <configuration>
+ <schemaFile>
+ ${basedir}/src/test/resources/helloworld/helloworld.wsdl
+ </schemaFile>
+ <targetDirectory>${basedir}/target/wsdl2java-source
+ </targetDirectory>
+ <prefix>HelloWorld</prefix>
+ <noNotification>true</noNotification>
+ <noContainer>true</noContainer>
+ <noUnsettable>true</noUnsettable>
+ </configuration>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-maven-wsdl2java
+ </artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <configuration>
+ <wsdlFiles>
+ <wsdlFile>
+ <fileName>
+ ${basedir}/src/test/resources/helloworld/helloworld.wsdl
+ </fileName>
+ </wsdlFile>
+ </wsdlFiles>
+ </configuration>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-ws/src/test/java/helloworld/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-ws/src/test/java/helloworld/HelloWorld.java
new file mode 100644
index 0000000000..0999e97065
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-ws/src/test/java/helloworld/HelloWorld.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld;
+
+import org.apache.tuscany.implementation.bpel.example.helloworld.HelloPortType;
+import org.oasisopen.sca.annotation.Reference;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class HelloWorld {
+ private HelloPortType helloService;
+
+ public HelloWorld() {
+ super();
+ }
+
+ @Reference
+ public void setHelloService(HelloPortType helloService){
+ this.helloService = helloService;
+ }
+
+ public String hello(String hello) throws java.rmi.RemoteException {
+ System.out.println(">>> Invoking helloService.hello with : " + hello);
+ return this.helloService.hello(hello);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-ws/src/test/java/helloworld/HelloWorldTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-ws/src/test/java/helloworld/HelloWorldTestCase.java
new file mode 100644
index 0000000000..315591fb98
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-ws/src/test/java/helloworld/HelloWorldTestCase.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld;
+
+import java.io.IOException;
+import java.net.Socket;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.implementation.bpel.example.helloworld.HelloPortType;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+
+/**
+ * Tests the BPEL Helloworld Service
+ *
+ * @version $Rev$ $Date$
+ */
+public class HelloWorldTestCase {
+
+ private Node node;
+
+ /**
+ * @throws java.lang.Exception
+ */
+ @BeforeClass
+ protected void setUp() throws Exception {
+ String location = ContributionLocationHelper.getContributionLocation("helloworld/helloworld.composite");
+ node = NodeFactory.newInstance().createNode("CallBackApiTest.composite", new Contribution("c1", location));
+ node.start();
+ }
+
+ /**
+ * @throws java.lang.Exception
+ */
+ @AfterClass
+ protected void tearDown() throws Exception {
+ node.stop();
+ }
+
+ public void testPing() throws IOException {
+ new Socket("127.0.0.1", 8085);
+ }
+
+ public void testServiceInvocation() throws Exception {
+ HelloPortType bpelService = node.getService(HelloPortType.class, "BPELHelloWorldServiceComponent");
+ String response = bpelService.hello("Hello");
+ Assert.assertEquals("Hello World", response);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.bpel b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.bpel
new file mode 100644
index 0000000000..8cf91adc2c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.bpel
@@ -0,0 +1,66 @@
+<!--
+ ~ 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.
+ -->
+<process name="HelloWorld"
+ targetNamespace="http://tuscany.apache.org/implementation/bpel/example/helloworld"
+ xmlns="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
+ xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
+ xmlns:tns="http://tuscany.apache.org/implementation/bpel/example/helloworld"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:test="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl"
+ queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+ expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
+
+ <import location="helloworld.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"
+ namespace="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl"/>
+
+ <partnerLinks>
+ <partnerLink name="helloPartnerLink" partnerLinkType="test:HelloPartnerLinkType" myRole="me" />
+ </partnerLinks>
+
+ <variables>
+ <variable name="helloMessage" messageType="test:HelloMessage"/>
+ <variable name="tmpVar" type="xsd:string"/>
+ </variables>
+
+ <sequence>
+ <receive
+ name="start"
+ partnerLink="helloPartnerLink"
+ portType="test:HelloPortType"
+ operation="hello"
+ variable="helloMessage"
+ createInstance="yes"/>
+
+ <assign name="assign1">
+ <copy>
+ <from variable="helloMessage" part="TestPart"/>
+ <to variable="tmpVar"/>
+ </copy>
+ <copy>
+ <from>concat($tmpVar,' World')</from>
+ <to variable="helloMessage" part="TestPart"/>
+ </copy>
+ </assign>
+ <reply name="end"
+ partnerLink="helloPartnerLink"
+ portType="test:HelloPortType"
+ operation="hello"
+ variable="helloMessage"/>
+ </sequence>
+</process>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.composite
new file mode 100644
index 0000000000..e606e6dd52
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.composite
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://bpel"
+ xmlns:hns="http://tuscany.apache.org/implementation/bpel/example/helloworld"
+ name="helloworld">
+
+ <component name="BPELHelloWorldServiceComponent">
+ <implementation.bpel process="hns:HelloWorld"/>
+ <service name="helloPartnerLink">
+ <interface.wsdl interface="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl#wsdl.interface(HelloPortType)" />
+ <binding.ws uri="http://localhost:8085/HelloPartnerLink" wsdlElement="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl#wsdl.service(HelloService)"/>
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.wsdl
new file mode 100644
index 0000000000..610bda3cc4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-ws/src/test/resources/helloworld/helloworld.wsdl
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<wsdl:definitions name="helloworld"
+ targetNamespace="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
+ xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified"
+ targetNamespace="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl"
+ xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="hello">
+ <complexType>
+ <sequence>
+ <element name="message" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="HelloMessage">
+ <wsdl:part element="tns:hello" name="TestPart"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloPortType">
+ <wsdl:operation name="hello">
+ <wsdl:input message="tns:HelloMessage" name="TestIn"/>
+ <wsdl:output message="tns:HelloMessage" name="TestOut"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+
+ <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="hello">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="TestIn">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="TestOut">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="HelloService">
+ <wsdl:port name="HelloPort" binding="tns:HelloSoapBinding">
+ <soap:address location="http://localhost:8085/ode/processes/helloWorld"/>
+ </wsdl:port>
+ </wsdl:service>
+
+ <plnk:partnerLinkType name="HelloPartnerLinkType">
+ <plnk:role name="me" portType="tns:HelloPortType"/>
+ <plnk:role name="you" portType="tns:HelloPortType"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-ws/src/test/resources/log4j.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-ws/src/test/resources/log4j.properties
new file mode 100644
index 0000000000..37f66e4189
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld-ws/src/test/resources/log4j.properties
@@ -0,0 +1,36 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Set root logger level to WARN and its only appender to CONSOLE
+log4j.rootLogger=OFF, CONSOLE
+
+# log4j properties to work with commandline tools.
+log4j.category.org.mortbay=OFF
+log4j.category.org.hibernate.type=OFF
+log4j.category.org.objectweb=OFF
+log4j.category.org.apache.ode.axis2=OFF
+log4j.category.org.apache.ode.bpel.engine=OFF
+log4j.category.org.apache.ode.daohib.bpel.CorrelatorDaoImpl=OFF
+log4j.category.org.apache.ode.bpel.epr=OFF
+log4j.category.org.apache.tuscany.sca.implementation.bpel=DEBUG
+log4j.category.org.apache.tuscany.sca.implementation.bpel.ode=DEBUG
+log4j.category.org.apache.tuscany.sca.implementation.bpel.provider=DEBUG
+
+# Console appender
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=[%p] - %C{1}.%M(%L) | %m%n
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld/pom.xml
new file mode 100644
index 0000000000..3c12e0d868
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld/pom.xml
@@ -0,0 +1,208 @@
+<?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-bpel</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-bpel-helloworld</artifactId>
+ <name>Apache Tuscany SCA iTest BPEL HelloWorld</name>
+
+ <repositories>
+ <repository>
+ <id>apache.incubator</id>
+ <url>http://people.apache.org/repo/m2-incubating-repository
+ </url>
+ </repository>
+ </repositories>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-bpel-runtime</artifactId>
+ <version>2.0.1</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <!-- http://jira.codehaus.org/browse/SUREFIRE-322 -->
+ <version>2.3.1</version>
+ <configuration>
+ <useFile>false</useFile>
+ <trimStackTrace>false</trimStackTrace>
+ <useSystemClassLoader>true</useSystemClassLoader>
+ <argLine>-Djava.endorsed.dirs=target/endorsed</argLine>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>unpack</id>
+ <phase>test-compile</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.apache.ode</groupId>
+ <artifactId>ode-dao-jpa-ojpa-derby</artifactId>
+ <version>1.1</version>
+ <type>zip</type>
+ <overWrite>true</overWrite>
+ <outputDirectory>${project.build.directory}/test-classes/</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.0</version>
+ <executions>
+ <execution>
+ <id>add-test-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>
+ <configuration>
+ <target>2.1</target>
+ </configuration>
+ <executions>
+ <execution>
+ <id>wsimport</id>
+ <phase>generate-test-sources</phase>
+ <goals>
+ <goal>wsimport</goal>
+ </goals>
+ <configuration>
+ <packageName>org.apache.tuscany.implementation.bpel.example.helloworld</packageName>
+ <wsdlDirectory>${basedir}/src/test/resources/helloworld/</wsdlDirectory>
+ <wsdlFiles>
+ <wsdlFile>helloworld.wsdl</wsdlFile>
+ </wsdlFiles>
+ <sourceDestDir>${project.build.directory}/jaxws-source</sourceDestDir>
+ <verbose>false</verbose>
+ <xnocompile>true</xnocompile>
+ </configuration>
+ </execution>
+
+ <!--
+ <execution>
+ <id>wsgen</id>
+ <phase>process-test-classes</phase>
+ <goals>
+ <goal>wsgen-test</goal>
+ </goals>
+ <configuration>
+ <sei>org.apache.tuscany.sca.interfacedef.java.jaxws.MyServiceImpl</sei>
+ <genWsdl>true</genWsdl>
+ <keep>true</keep>
+ <resourceDestDir>${project.build.directory}/jaxws-source</resourceDestDir>
+ <sourceDestDir>${project.build.directory}/jaxws-source</sourceDestDir>
+ </configuration>
+ </execution>
+ -->
+ </executions>
+
+ </plugin>
+
+ <!--
+ wsimport cannot handle WSDL files without a service/binding element.
+ CXF wsdl2java plugin does support that. I had to override the default
+ value of wsdlRoot/testWsdlRoot to a non-existent file to avoid NPE -->
+ <!--
+ <plugin>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-codegen-plugin</artifactId>
+ <version>2.1</version>
+ <executions>
+ <execution>
+ <id>generate-sources</id>
+ <phase>generate-sources</phase>
+
+ <configuration>
+ <sourceRoot>${basedir}/target/jaxws-source</sourceRoot>
+ <wsdlRoot>NONE</wsdlRoot>
+ <testWsdlRoot>NONE</testWsdlRoot>
+ <wsdlOptions>
+ <wsdlOption>
+ <wsdl>${basedir}/src/test/resources/wsdl/Stock.wsdl</wsdl>
+ <outputDir>${basedir}/target/jaxws-source</outputDir>
+ <packagenames>
+ <packagename>com.example.stock.cxf</packagename>
+ </packagenames>
+ </wsdlOption>
+ </wsdlOptions>
+ </configuration>
+ <goals>
+ <goal>wsdl2java</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ -->
+
+ </plugins>
+ </build>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld/src/test/java/helloworld/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld/src/test/java/helloworld/HelloWorld.java
new file mode 100644
index 0000000000..0999e97065
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld/src/test/java/helloworld/HelloWorld.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld;
+
+import org.apache.tuscany.implementation.bpel.example.helloworld.HelloPortType;
+import org.oasisopen.sca.annotation.Reference;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class HelloWorld {
+ private HelloPortType helloService;
+
+ public HelloWorld() {
+ super();
+ }
+
+ @Reference
+ public void setHelloService(HelloPortType helloService){
+ this.helloService = helloService;
+ }
+
+ public String hello(String hello) throws java.rmi.RemoteException {
+ System.out.println(">>> Invoking helloService.hello with : " + hello);
+ return this.helloService.hello(hello);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld/src/test/java/helloworld/HelloWorldTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld/src/test/java/helloworld/HelloWorldTestCase.java
new file mode 100644
index 0000000000..cbed39c295
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld/src/test/java/helloworld/HelloWorldTestCase.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.implementation.bpel.example.helloworld.HelloPortType;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * Tests the BPEL Helloworld Service
+ *
+ * @version $Rev$ $Date$
+ */
+@Ignore
+public class HelloWorldTestCase {
+
+ private static Node node;
+
+ /**
+ * @throws java.lang.Exception
+ */
+ @BeforeClass
+ public static void setUp() throws Exception {
+ String location = ContributionLocationHelper.getContributionLocation("helloworld/helloworld.composite");
+ node = NodeFactory.newInstance().createNode("helloworld/helloworld.composite", new Contribution("c1", location));
+ node.start();
+ }
+
+ /**
+ * @throws java.lang.Exception
+ */
+ @AfterClass
+ public static void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testServiceInvocation() throws Exception {
+ HelloPortType bpelService = node.getService(HelloPortType.class, "BPELHelloWorldService");
+ String response = bpelService.hello("Hello");
+ Assert.assertEquals("Hello World", response);
+ }
+
+ @Test
+ public void testReferenceInvocation() throws Exception {
+ HelloWorld bpelService = node.getService(HelloWorld.class, "BPELHelloWorld");
+ String response = bpelService.hello("Hello");
+ Assert.assertEquals("Hello World", response);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.bpel b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.bpel
new file mode 100644
index 0000000000..156e32e9ee
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.bpel
@@ -0,0 +1,78 @@
+<!--
+ ~ 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.
+ -->
+<process name="HelloWorld"
+ targetNamespace="http://tuscany.apache.org/implementation/bpel/example/helloworld"
+ xmlns="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
+ xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
+ xmlns:tns="http://tuscany.apache.org/implementation/bpel/example/helloworld"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:test="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl"
+ queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+ expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0" xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+
+ <import location="helloworld.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"
+ namespace="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl"/>
+
+ <partnerLinks>
+ <partnerLink name="helloPartnerLink" partnerLinkType="test:HelloPartnerLinkType" myRole="me" />
+ </partnerLinks>
+
+ <variables>
+ <variable name="helloMessage" messageType="test:HelloMessage"/>
+ <variable name="helloMessageResponse" messageType="test:HelloMessageResponse"/>
+ <variable name="tmpVar" type="xsd:string"/>
+ </variables>
+
+ <sequence>
+ <receive
+ name="start"
+ partnerLink="helloPartnerLink"
+ portType="test:HelloPortType"
+ operation="hello"
+ variable="helloMessage"
+ createInstance="yes"/>
+
+ <assign name="assign1">
+ <copy>
+ <from>concat($helloMessage.TestPart/test:message/text(), ' World')</from>
+ <to variable="tmpVar"/>
+ </copy>
+ <!-- Initialize the response -->
+ <copy>
+ <from>
+ <literal>
+ <test:helloResponse>
+ <test:messageResponse>Dummy</test:messageResponse>
+ </test:helloResponse>
+ </literal>
+ </from>
+ <to variable="helloMessageResponse" part="TestResponse"/>
+ </copy>
+ <copy>
+ <from variable="tmpVar"/>
+ <to>$helloMessageResponse.TestResponse/test:messageResponse</to>
+ </copy>
+ </assign>
+ <reply name="end"
+ partnerLink="helloPartnerLink"
+ portType="test:HelloPortType"
+ operation="hello"
+ variable="helloMessageResponse"/>
+ </sequence>
+</process>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.composite
new file mode 100644
index 0000000000..96ec8b24b7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.composite
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://bpel"
+ xmlns:hns="http://tuscany.apache.org/implementation/bpel/example/helloworld"
+ name="helloworld">
+
+ <component name="BPELHelloWorld">
+ <implementation.java class="helloworld.HelloWorld"/>
+ <reference name="helloService" target="BPELHelloWorldService">
+ <!-- Workaround for databinding issue -->
+ <!-- interface.wsdl interface="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl#wsdl.interface(HelloPortType)" / -->
+ </reference>
+ </component>
+
+ <component name="BPELHelloWorldService">
+ <implementation.bpel process="hns:HelloWorld"/>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.wsdl
new file mode 100644
index 0000000000..c77318e8fd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld/src/test/resources/helloworld/helloworld.wsdl
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<wsdl:definitions name="helloworld"
+ targetNamespace="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
+ xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified"
+ targetNamespace="http://tuscany.apache.org/implementation/bpel/example/helloworld.wsdl"
+ xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="hello">
+ <complexType>
+ <sequence>
+ <element name="message" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="helloResponse">
+ <complexType>
+ <sequence>
+ <element name="messageResponse" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="HelloMessage">
+ <wsdl:part element="tns:hello" name="TestPart"/>
+ </wsdl:message>
+
+ <wsdl:message name="HelloMessageResponse">
+ <wsdl:part element="tns:helloResponse" name="TestResponse"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloPortType">
+ <wsdl:operation name="hello">
+ <wsdl:input message="tns:HelloMessage" name="TestIn"/>
+ <wsdl:output message="tns:HelloMessageResponse" name="TestOut"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+
+ <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="hello">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="TestIn">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="TestOut">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="HelloService">
+ <wsdl:port name="HelloPort" binding="tns:HelloSoapBinding">
+ <soap:address location="http://localhost:8085/ode/processes/helloWorld"/>
+ </wsdl:port>
+ </wsdl:service>
+
+ <plnk:partnerLinkType name="HelloPartnerLinkType">
+ <plnk:role name="me" portType="tns:HelloPortType"/>
+ <plnk:role name="you" portType="tns:HelloPortType"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld/src/test/resources/log4j.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld/src/test/resources/log4j.properties
new file mode 100644
index 0000000000..37f66e4189
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/helloworld/src/test/resources/log4j.properties
@@ -0,0 +1,36 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Set root logger level to WARN and its only appender to CONSOLE
+log4j.rootLogger=OFF, CONSOLE
+
+# log4j properties to work with commandline tools.
+log4j.category.org.mortbay=OFF
+log4j.category.org.hibernate.type=OFF
+log4j.category.org.objectweb=OFF
+log4j.category.org.apache.ode.axis2=OFF
+log4j.category.org.apache.ode.bpel.engine=OFF
+log4j.category.org.apache.ode.daohib.bpel.CorrelatorDaoImpl=OFF
+log4j.category.org.apache.ode.bpel.epr=OFF
+log4j.category.org.apache.tuscany.sca.implementation.bpel=DEBUG
+log4j.category.org.apache.tuscany.sca.implementation.bpel.ode=DEBUG
+log4j.category.org.apache.tuscany.sca.implementation.bpel.provider=DEBUG
+
+# Console appender
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=[%p] - %C{1}.%M(%L) | %m%n
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/pom.xml
new file mode 100644
index 0000000000..f677a5a9d5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/bpel/pom.xml
@@ -0,0 +1,39 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-bpel</artifactId>
+ <packaging>pom</packaging>
+ <name>Apache Tuscany SCA iTest BPEL Integration Tests</name>
+
+ <modules>
+ <module>helloworld</module>
+ <!--
+ <module>helloworld-reference</module>
+ <module>helloworld-ws</module>
+ -->
+ </modules>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/pom.xml
new file mode 100644
index 0000000000..cca8191179
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/pom.xml
@@ -0,0 +1,63 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-builder</artifactId>
+ <name>Apache Tuscany SCA iTest Builder</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.19</version>
+ </dependency>
+
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>2.9.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDImpl.java
new file mode 100644
index 0000000000..b0dc7a6389
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDImpl.java
@@ -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.itest.builder;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * Implementation class for ComponentD.
+ *
+ * @version $Rev$ $Date$
+ */
+@Service({Service3.class, Service3a.class})
+public class ComponentDImpl implements Service3, Service3a {
+
+ @Reference
+ protected Service3a reference3;
+
+ public String getGreetings(String name) {
+ return "Hello, " + name + "!";
+ }
+
+ public String getGreetings2(String name) {
+ return "Goodbye, " + name + "!";
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDReferenceMultiplicityImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDReferenceMultiplicityImpl.java
new file mode 100644
index 0000000000..bf73a64027
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentDReferenceMultiplicityImpl.java
@@ -0,0 +1,48 @@
+/*
+ * 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.itest.builder;
+
+import java.util.List;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * Implementation class for ComponentD.
+ *
+ * @version $Rev$ $Date$
+ */
+@Service({Service3.class, Service3a.class})
+public class ComponentDReferenceMultiplicityImpl implements Service3, Service3a {
+
+ @Reference
+ protected Service3a reference3;
+
+ @Reference
+ protected List<Service3> reference3a;
+
+ public String getGreetings(String name) {
+ return "Hello, " + name + "!";
+ }
+
+ public String getGreetings2(String name) {
+ return "Goodbye, " + name + "!";
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentEImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentEImpl.java
new file mode 100644
index 0000000000..6f36b1c55a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentEImpl.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.builder;
+
+import org.oasisopen.sca.annotation.Service;
+
+
+/**
+ * Implementation class for ComponentD.
+ *
+ * @version $Rev$ $Date$
+ */
+@Service({Service3.class})
+public class ComponentEImpl implements Service3 {
+
+
+ public String getGreetings(String name) {
+ return "Hello, " + name + " from ComponentE";
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentFImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentFImpl.java
new file mode 100644
index 0000000000..8c5c5de208
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/ComponentFImpl.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.builder;
+
+import org.oasisopen.sca.annotation.Service;
+
+
+/**
+ * Implementation class for ComponentD.
+ *
+ * @version $Rev$ $Date$
+ */
+@Service({Service3.class})
+public class ComponentFImpl implements Service3 {
+
+
+ public String getGreetings(String name) {
+ return "Hello, " + name + " from ComponentF";
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/Service3.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/Service3.java
new file mode 100644
index 0000000000..f4b8d2cf39
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/Service3.java
@@ -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.itest.builder;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+
+/**
+ * Interface for Service3 in ComponentD.
+ *
+ * @version $Rev$ $Date$
+ */
+@Remotable
+public interface Service3 {
+
+ String getGreetings(String name);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/Service3a.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/Service3a.java
new file mode 100644
index 0000000000..299f7606e3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/java/org/apache/tuscany/sca/itest/builder/Service3a.java
@@ -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.itest.builder;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+
+/**
+ * Interface for Service3a in ComponentD.
+ *
+ * @version $Rev$ $Date$
+ */
+@Remotable
+public interface Service3a {
+
+ String getGreetings2(String name);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario1/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario1/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..7fabed9436
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario1/META-INF/sca-contribution.xml
@@ -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:ns1="http://scenario1">
+ <deployable composite="ns1:CompositeA" />
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario1/scenario1.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario1/scenario1.composite
new file mode 100644
index 0000000000..286e53539f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario1/scenario1.composite
@@ -0,0 +1,45 @@
+<?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"
+ targetNamespace="http://scenario1"
+ xmlns:tns="http://scenario1"
+ name="CompositeA">
+
+ <service name="Service1" promote="ComponentB/Service2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <binding.ws />
+ </service>
+ <reference name="reference1" promote="ComponentB/reference2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+
+ <component name="ComponentB">
+ <implementation.composite name="tns:CompositeC" />
+ <service name="Service2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service2a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario1/scenario1a.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario1/scenario1a.composite
new file mode 100644
index 0000000000..2bdfc19c3c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario1/scenario1a.composite
@@ -0,0 +1,47 @@
+<?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"
+ targetNamespace="http://scenario1"
+ xmlns:tns="http://scenario1"
+ name="CompositeC">
+
+ <service name="Service2" promote="ComponentD/Service3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service2a" promote="ComponentD/Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference2" promote="ComponentD/reference3" multiplicity="1..1">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+
+ <component name="ComponentD">
+ <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDImpl"/>
+ <service name="Service3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario10/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario10/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ac01b3c687
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario10/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario10"
+ xmlns:ns10="http://scenario10">
+ <deployable composite="ns10:CompositeA" />
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario10/scenario10.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario10/scenario10.composite
new file mode 100644
index 0000000000..2d127a7bec
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario10/scenario10.composite
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario10"
+ xmlns:tns="http://scenario10"
+ name="CompositeA">
+
+ <service name="Service1" promote="ComponentB/Service2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference1" promote="ComponentB/reference2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ <reference name="reference1a" promote="ComponentB/reference2a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+
+ <component name="ComponentB">
+ <implementation.composite name="tns:CompositeC" />
+ <service name="Service2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service2a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <binding.ws uri="http://foo.com/bar" />
+ </service>
+ <reference name="reference2" target="ComponentB/Service2a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <binding.ws />
+ </reference>
+ <reference name="reference2a" target="ComponentF">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <interface.wsdl interface="http://scenarios#wsdl.interface(Service3)" />
+ <binding.ws />
+ </reference>
+ </component>
+
+ <component name="ComponentF">
+ <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentEImpl"/>
+ <service name="Service3">
+ <binding.sca />
+ <binding.ws />
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario10/scenario10a.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario10/scenario10a.composite
new file mode 100644
index 0000000000..0fda11482b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario10/scenario10a.composite
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario10"
+ xmlns:tns="http://scenario10"
+ name="CompositeC">
+
+ <service name="Service2" promote="ComponentD/Service3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service2a" promote="ComponentD/Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference2" promote="ComponentD/reference3" multiplicity="1..1">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ <reference name="reference2a" promote="ComponentD/reference3a" multiplicity="1..1">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+
+ <component name="ComponentD">
+ <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDReferenceMultiplicityImpl"/>
+ <service name="Service3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference3" target="ComponentD/Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ <reference name="reference3a" target="ComponentE">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ </component>
+
+ <component name="ComponentE">
+ <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentEImpl"/>
+ <service name="Service3">
+ <binding.sca />
+ <binding.ws />
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario10/service3.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario10/service3.wsdl
new file mode 100644
index 0000000000..2477e23dc6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario10/service3.wsdl
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions name="Service3Service"
+ targetNamespace="http://scenarios"
+ xmlns:tns="http://scenarios"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+
+ <wsdl:types>
+ <xs:schema attributeFormDefault="qualified"
+ elementFormDefault="unqualified"
+ targetNamespace="http://scenarios"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="getGreetings">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsResponse">
+ <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="getGreetings">
+ <wsdl:part name="getGreetings" element="tns:getGreetings" />
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part name="getGreetingsResponse" element="tns:getGreetingsResponse" />
+ </wsdl:message>
+
+ <wsdl:portType name="Service3">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetings" />
+ <wsdl:output message="tns:getGreetingsResponse" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario11/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario11/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..8b82b43c68
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario11/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario11"
+ xmlns:ns11="http://scenario11">
+ <deployable composite="ns11:CompositeA" />
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario11/scenario11.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario11/scenario11.composite
new file mode 100644
index 0000000000..2f5ca96d07
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario11/scenario11.composite
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario11"
+ xmlns:tns="http://scenario11"
+ name="CompositeA">
+
+ <service name="Service1" promote="ComponentB/Service2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference1" promote="ComponentB/reference2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ <reference name="reference1a" promote="ComponentB/reference2a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+
+ <component name="ComponentB">
+ <implementation.composite name="tns:CompositeC" />
+ <service name="Service2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service2a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <binding.ws uri="http://foo.com/bar" />
+ </service>
+ <reference name="reference2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ <reference name="reference2a" target="ComponentF">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ </component>
+
+ <component name="ComponentF">
+ <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentEImpl"/>
+ <service name="Service3">
+ <binding.sca />
+ <binding.ws />
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario11/scenario11a.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario11/scenario11a.composite
new file mode 100644
index 0000000000..1831d97ea7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario11/scenario11a.composite
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario11"
+ xmlns:tns="http://scenario11"
+ name="CompositeC">
+
+ <service name="Service2" promote="ComponentD/Service3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service2a" promote="ComponentD/Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference2" promote="ComponentD/reference3" target="ComponentB/Service2a" multiplicity="1..1">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <binding.ws />
+ </reference>
+ <reference name="reference2a" promote="ComponentD/reference3a" multiplicity="1..1">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <interface.wsdl interface="http://scenarios#wsdl.interface(Service3)" />
+ <binding.ws />
+ </reference>
+
+ <component name="ComponentD">
+ <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDReferenceMultiplicityImpl"/>
+ <service name="Service3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference3" target="ComponentD/Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ <reference name="reference3a" target="ComponentE">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ </component>
+
+ <component name="ComponentE">
+ <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentEImpl"/>
+ <service name="Service3">
+ <binding.sca />
+ <binding.ws />
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario11/service3.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario11/service3.wsdl
new file mode 100644
index 0000000000..2477e23dc6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario11/service3.wsdl
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions name="Service3Service"
+ targetNamespace="http://scenarios"
+ xmlns:tns="http://scenarios"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+
+ <wsdl:types>
+ <xs:schema attributeFormDefault="qualified"
+ elementFormDefault="unqualified"
+ targetNamespace="http://scenarios"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="getGreetings">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsResponse">
+ <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="getGreetings">
+ <wsdl:part name="getGreetings" element="tns:getGreetings" />
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part name="getGreetingsResponse" element="tns:getGreetingsResponse" />
+ </wsdl:message>
+
+ <wsdl:portType name="Service3">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetings" />
+ <wsdl:output message="tns:getGreetingsResponse" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario12/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario12/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..4028098023
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario12/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario12"
+ xmlns:ns12="http://scenario12">
+ <deployable composite="ns12:CompositeA" />
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario12/scenario12.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario12/scenario12.composite
new file mode 100644
index 0000000000..23799f8487
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario12/scenario12.composite
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario12"
+ xmlns:tns="http://scenario12"
+ name="CompositeA">
+
+ <service name="Service1" promote="ComponentB/Service2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference1" promote="ComponentB/reference2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ <reference name="reference1a" promote="ComponentB/reference2a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+
+ <component name="ComponentB">
+ <implementation.composite name="tns:CompositeC" />
+ <service name="Service2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service2a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ <reference name="reference2a" target="ComponentF">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ </component>
+
+ <component name="ComponentF">
+ <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentEImpl"/>
+ <service name="Service3">
+ <binding.sca />
+ <binding.ws />
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario12/scenario12a.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario12/scenario12a.composite
new file mode 100644
index 0000000000..7982a9b2d7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario12/scenario12a.composite
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario12"
+ xmlns:tns="http://scenario12"
+ name="CompositeC">
+
+ <service name="Service2" promote="ComponentD/Service3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service2a" promote="ComponentD/Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference2" promote="ComponentD/reference3" multiplicity="1..1">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ <reference name="reference2a" promote="ComponentD/reference3a" multiplicity="1..1">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+
+ <component name="ComponentD">
+ <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDReferenceMultiplicityImpl"/>
+ <service name="Service3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <binding.ws uri="http://foo.com/bar" />
+ </service>
+ <reference name="reference3" target="ComponentD/Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <binding.ws/>
+ </reference>
+ <reference name="reference3a" target="ComponentE">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <binding.ws />
+ </reference>
+ </component>
+
+ <component name="ComponentE">
+ <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentEImpl"/>
+ <service name="Service3">
+ <binding.sca />
+ <binding.ws />
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario13/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario13/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..1da59d5f04
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario13/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario13"
+ xmlns:ns13="http://scenario13">
+ <deployable composite="ns13:CompositeA" />
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario13/scenario13.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario13/scenario13.composite
new file mode 100644
index 0000000000..631e38855f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario13/scenario13.composite
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario13"
+ xmlns:tns="http://scenario13"
+ name="CompositeA">
+
+ <service name="Service1" promote="ComponentB/Service2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference1" promote="ComponentB/reference2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ <reference name="reference1a" promote="ComponentB/reference2a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+
+ <component name="ComponentB">
+ <implementation.composite name="tns:CompositeC" />
+ <service name="Service2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service2a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ <reference name="reference2a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ </component>
+
+ <component name="ComponentF">
+ <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentEImpl"/>
+ <service name="Service3">
+ <binding.sca />
+ <binding.ws />
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario13/scenario13a.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario13/scenario13a.composite
new file mode 100644
index 0000000000..a6e31ea5e2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario13/scenario13a.composite
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario13"
+ xmlns:tns="http://scenario13"
+ name="CompositeC">
+
+ <service name="Service2" promote="ComponentD/Service3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service2a" promote="ComponentD/Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference2" promote="ComponentD/reference3" multiplicity="1..1">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ <reference name="reference2a" promote="ComponentD/reference3a" multiplicity="1..1">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+
+ <component name="ComponentD">
+ <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDReferenceMultiplicityImpl"/>
+ <service name="Service3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <binding.ws uri="http://foo.com/bar" />
+ </service>
+ <reference name="reference3" target="ComponentD/Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <binding.ws/>
+ </reference>
+ <reference name="reference3a" target="ComponentE">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <binding.ws />
+ </reference>
+ </component>
+
+ <component name="ComponentE">
+ <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentEImpl"/>
+ <service name="Service3">
+ <binding.sca />
+ <binding.ws />
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario2/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario2/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..b51ef11b05
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario2/META-INF/sca-contribution.xml
@@ -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:ns2="http://scenario2">
+ <deployable composite="ns2:CompositeA" />
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario2/scenario2.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario2/scenario2.composite
new file mode 100644
index 0000000000..2fa559e1ed
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario2/scenario2.composite
@@ -0,0 +1,45 @@
+<?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"
+ targetNamespace="http://scenario2"
+ xmlns:tns="http://scenario2"
+ name="CompositeA">
+
+ <service name="Service1" promote="ComponentB/Service2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference1" promote="ComponentB/reference2" multiplicity="1..1">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+
+ <component name="ComponentB">
+ <implementation.composite name="tns:CompositeC" />
+ <service name="Service2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <binding.ws />
+ </service>
+ <service name="Service2a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario2/scenario2a.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario2/scenario2a.composite
new file mode 100644
index 0000000000..9fd3df07e8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario2/scenario2a.composite
@@ -0,0 +1,47 @@
+<?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"
+ targetNamespace="http://scenario2"
+ xmlns:tns="http://scenario2"
+ name="CompositeC">
+
+ <service name="Service2" promote="ComponentD/Service3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service2a" promote="ComponentD/Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference2" promote="ComponentD/reference3" multiplicity="1..1">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+
+ <component name="ComponentD">
+ <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDImpl"/>
+ <service name="Service3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference3" >
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario3/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario3/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..22950dfe03
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario3/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario3"
+ xmlns:ns3="http://scenario3">
+ <deployable composite="ns3:CompositeA" />
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario3/scenario3.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario3/scenario3.composite
new file mode 100644
index 0000000000..84f42c60fc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario3/scenario3.composite
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario3"
+ xmlns:tns="http://scenario3"
+ name="CompositeA">
+
+ <service name="Service1" promote="ComponentB/Service2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference1" promote="ComponentB/reference2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+
+ <component name="ComponentB">
+ <implementation.composite name="tns:CompositeC" />
+ <service name="Service2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service2a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario3/scenario3a.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario3/scenario3a.composite
new file mode 100644
index 0000000000..89fa0619e4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario3/scenario3a.composite
@@ -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://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario3"
+ xmlns:tns="http://scenario3"
+ name="CompositeC">
+
+ <service name="Service2" promote="ComponentD/Service3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <binding.ws />
+ </service>
+ <service name="Service2a" promote="ComponentD/Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference2" promote="ComponentD/reference3" multiplicity="1..1">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+
+ <component name="ComponentD">
+ <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDImpl"/>
+ <service name="Service3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario4/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario4/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..a17e27c9d8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario4/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario4"
+ xmlns:ns4="http://scenario4">
+ <deployable composite="ns4:CompositeA" />
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario4/scenario4.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario4/scenario4.composite
new file mode 100644
index 0000000000..a0bdb0197d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario4/scenario4.composite
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario4"
+ xmlns:tns="http://scenario4"
+ name="CompositeA">
+
+ <service name="Service1" promote="ComponentB/Service2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference1" promote="ComponentB/reference2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+
+ <component name="ComponentB">
+ <implementation.composite name="tns:CompositeC" />
+ <service name="Service2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service2a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario4/scenario4a.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario4/scenario4a.composite
new file mode 100644
index 0000000000..fbf1b1a893
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario4/scenario4a.composite
@@ -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://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario4"
+ xmlns:tns="http://scenario4"
+ name="CompositeC">
+
+ <service name="Service2" promote="ComponentD/Service3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service2a" promote="ComponentD/Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference2" promote="ComponentD/reference3" multiplicity="1..1">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+
+ <component name="ComponentD">
+ <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDImpl"/>
+ <service name="Service3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <binding.ws />
+ </service>
+ <service name="Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario5/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario5/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..83a232db6e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario5/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario5"
+ xmlns:ns5="http://scenario5">
+ <deployable composite="ns5:CompositeA" />
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario5/scenario5.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario5/scenario5.composite
new file mode 100644
index 0000000000..2326afd2f2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario5/scenario5.composite
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario5"
+ xmlns:tns="http://scenario5"
+ name="CompositeA">
+
+ <service name="Service1" promote="ComponentB/Service2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference1" promote="ComponentB/reference2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <interface.wsdl interface="http://scenarios#wsdl.interface(Service3a)" />
+ <binding.ws uri="http://foo.com/bar" />
+ </reference>
+
+ <component name="ComponentB">
+ <implementation.composite name="tns:CompositeC" />
+ <service name="Service2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service2a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario5/scenario5a.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario5/scenario5a.composite
new file mode 100644
index 0000000000..802d82b0f3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario5/scenario5a.composite
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario5"
+ xmlns:tns="http://scenario5"
+ name="CompositeC">
+
+ <service name="Service2" promote="ComponentD/Service3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service2a" promote="ComponentD/Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference2" promote="ComponentD/reference3" multiplicity="1..1">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+
+ <component name="ComponentD">
+ <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDImpl"/>
+ <service name="Service3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario5/scenarios.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario5/scenarios.wsdl
new file mode 100644
index 0000000000..5cda7327dd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario5/scenarios.wsdl
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions name="Service3Service"
+ targetNamespace="http://scenarios"
+ xmlns:tns="http://scenarios"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+
+ <wsdl:types>
+ <xs:schema attributeFormDefault="qualified"
+ elementFormDefault="unqualified"
+ targetNamespace="http://scenarios"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="getGreetings2">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetings2Response">
+ <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="getGreetings2">
+ <wsdl:part name="getGreetings2" element="tns:getGreetings2" />
+ </wsdl:message>
+
+ <wsdl:message name="getGreetings2Response">
+ <wsdl:part name="getGreetings2Response" element="tns:getGreetings2Response" />
+ </wsdl:message>
+
+ <wsdl:portType name="Service3a">
+ <wsdl:operation name="getGreetings2">
+ <wsdl:input message="tns:getGreetings2" />
+ <wsdl:output message="tns:getGreetings2Response" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario6/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario6/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..fb477d3e62
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario6/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://scenario6"
+ xmlns:ns6="http://scenario6">
+ <deployable composite="ns6:CompositeA" />
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario6/scenario6.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario6/scenario6.composite
new file mode 100644
index 0000000000..dadfc7eb82
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario6/scenario6.composite
@@ -0,0 +1,47 @@
+<?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"
+ targetNamespace="http://scenario6"
+ xmlns:tns="http://scenario6"
+ name="CompositeA">
+
+ <service name="Service1" promote="ComponentB/Service2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference1" promote="ComponentB/reference2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+
+ <component name="ComponentB">
+ <implementation.composite name="tns:CompositeC" />
+ <service name="Service2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service2a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <binding.ws uri="http://foo.com/bar" />
+ </service>
+ <reference name="reference2" target="ComponentB/Service2a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <interface.wsdl interface="http://scenarios#wsdl.interface(Service3a)" />
+ <binding.ws />
+ </reference>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario6/scenario6a.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario6/scenario6a.composite
new file mode 100644
index 0000000000..0c94b2bf06
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario6/scenario6a.composite
@@ -0,0 +1,47 @@
+<?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"
+ targetNamespace="http://scenario6"
+ xmlns:tns="http://scenario6"
+ name="CompositeC">
+
+ <service name="Service2" promote="ComponentD/Service3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service2a" promote="ComponentD/Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference2" promote="ComponentD/reference3" multiplicity="1..1">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+
+ <component name="ComponentD">
+ <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDImpl"/>
+ <service name="Service3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario6/scenarios.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario6/scenarios.wsdl
new file mode 100644
index 0000000000..5cda7327dd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario6/scenarios.wsdl
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions name="Service3Service"
+ targetNamespace="http://scenarios"
+ xmlns:tns="http://scenarios"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+
+ <wsdl:types>
+ <xs:schema attributeFormDefault="qualified"
+ elementFormDefault="unqualified"
+ targetNamespace="http://scenarios"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="getGreetings2">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetings2Response">
+ <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="getGreetings2">
+ <wsdl:part name="getGreetings2" element="tns:getGreetings2" />
+ </wsdl:message>
+
+ <wsdl:message name="getGreetings2Response">
+ <wsdl:part name="getGreetings2Response" element="tns:getGreetings2Response" />
+ </wsdl:message>
+
+ <wsdl:portType name="Service3a">
+ <wsdl:operation name="getGreetings2">
+ <wsdl:input message="tns:getGreetings2" />
+ <wsdl:output message="tns:getGreetings2Response" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario7/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario7/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ede31d6bee
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario7/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario7"
+ xmlns:ns7="http://scenario7">
+ <deployable composite="ns7:CompositeA" />
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario7/scenario7.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario7/scenario7.composite
new file mode 100644
index 0000000000..e1d2e0cefe
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario7/scenario7.composite
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario7"
+ xmlns:tns="http://scenario7"
+ name="CompositeA">
+
+ <service name="Service1" promote="ComponentB/Service2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference1" promote="ComponentB/reference2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+
+ <component name="ComponentB">
+ <implementation.composite name="tns:CompositeC" />
+ <service name="Service2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service2a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <binding.ws uri="http://foo.com/bar" />
+ </service>
+ <reference name="reference2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario7/scenario7a.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario7/scenario7a.composite
new file mode 100644
index 0000000000..76892f1515
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario7/scenario7a.composite
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario7"
+ xmlns:tns="http://scenario7"
+ name="CompositeC">
+
+ <service name="Service2" promote="ComponentD/Service3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service2a" promote="ComponentD/Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference2" promote="ComponentD/reference3" target="ComponentB/Service2a" multiplicity="1..1">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <interface.wsdl interface="http://scenarios#wsdl.interface(Service3a)" />
+ <binding.ws />
+ </reference>
+
+ <component name="ComponentD">
+ <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDImpl"/>
+ <service name="Service3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario7/scenarios.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario7/scenarios.wsdl
new file mode 100644
index 0000000000..5cda7327dd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario7/scenarios.wsdl
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions name="Service3Service"
+ targetNamespace="http://scenarios"
+ xmlns:tns="http://scenarios"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+
+ <wsdl:types>
+ <xs:schema attributeFormDefault="qualified"
+ elementFormDefault="unqualified"
+ targetNamespace="http://scenarios"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="getGreetings2">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetings2Response">
+ <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="getGreetings2">
+ <wsdl:part name="getGreetings2" element="tns:getGreetings2" />
+ </wsdl:message>
+
+ <wsdl:message name="getGreetings2Response">
+ <wsdl:part name="getGreetings2Response" element="tns:getGreetings2Response" />
+ </wsdl:message>
+
+ <wsdl:portType name="Service3a">
+ <wsdl:operation name="getGreetings2">
+ <wsdl:input message="tns:getGreetings2" />
+ <wsdl:output message="tns:getGreetings2Response" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario8/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario8/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..7bb9e694a3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario8/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario8"
+ xmlns:ns8="http://scenario8">
+ <deployable composite="ns8:CompositeA" />
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario8/scenario8.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario8/scenario8.composite
new file mode 100644
index 0000000000..467b7f57fa
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario8/scenario8.composite
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario8"
+ xmlns:tns="http://scenario8"
+ name="CompositeA">
+
+ <service name="Service1" promote="ComponentB/Service2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference1" promote="ComponentB/reference2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+
+ <component name="ComponentB">
+ <implementation.composite name="tns:CompositeC" />
+ <service name="Service2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service2a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario8/scenario8a.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario8/scenario8a.composite
new file mode 100644
index 0000000000..86cf093f94
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario8/scenario8a.composite
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario8"
+ xmlns:tns="http://scenario8"
+ name="CompositeC">
+
+ <service name="Service2" promote="ComponentD/Service3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service2a" promote="ComponentD/Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference2" promote="ComponentD/reference3" multiplicity="1..1">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+
+ <component name="ComponentD">
+ <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDImpl"/>
+ <service name="Service3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <binding.ws uri="http://foo.com/bar" />
+ </service>
+ <reference name="reference3" target="ComponentD/Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <interface.wsdl interface="http://scenarios#wsdl.interface(Service3a)" />
+ <binding.ws />
+ </reference>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario8/scenarios.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario8/scenarios.wsdl
new file mode 100644
index 0000000000..5cda7327dd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario8/scenarios.wsdl
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions name="Service3Service"
+ targetNamespace="http://scenarios"
+ xmlns:tns="http://scenarios"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+
+ <wsdl:types>
+ <xs:schema attributeFormDefault="qualified"
+ elementFormDefault="unqualified"
+ targetNamespace="http://scenarios"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="getGreetings2">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0" nillable="true" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetings2Response">
+ <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="getGreetings2">
+ <wsdl:part name="getGreetings2" element="tns:getGreetings2" />
+ </wsdl:message>
+
+ <wsdl:message name="getGreetings2Response">
+ <wsdl:part name="getGreetings2Response" element="tns:getGreetings2Response" />
+ </wsdl:message>
+
+ <wsdl:portType name="Service3a">
+ <wsdl:operation name="getGreetings2">
+ <wsdl:input message="tns:getGreetings2" />
+ <wsdl:output message="tns:getGreetings2Response" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario9/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario9/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..b6ec160506
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario9/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario9"
+ xmlns:ns9="http://scenario9">
+ <deployable composite="ns9:CompositeA" />
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario9/scenario9.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario9/scenario9.composite
new file mode 100644
index 0000000000..83584ed482
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario9/scenario9.composite
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario9"
+ xmlns:tns="http://scenario9"
+ name="CompositeA">
+
+ <service name="Service1" promote="ComponentB/Service2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference1" promote="ComponentB/reference2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <binding.ws uri="http://foo.com/bar"/>
+ </reference>
+ <reference name="reference1a" promote="ComponentB/reference2a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ <binding.ws uri="http://foo.com/bar"/>
+ </reference>
+
+ <component name="ComponentB">
+ <implementation.composite name="tns:CompositeC" />
+ <service name="Service2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service2a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference2">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ <reference name="reference2a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ </component>
+
+ <component name="ComponentF">
+ <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentEImpl"/>
+ <service name="Service3">
+ <binding.sca />
+ <binding.ws />
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario9/scenario9a.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario9/scenario9a.composite
new file mode 100644
index 0000000000..2861974c98
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/main/resources/scenario9/scenario9a.composite
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://scenario9"
+ xmlns:tns="http://scenario9"
+ name="CompositeC">
+
+ <service name="Service2" promote="ComponentD/Service3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service2a" promote="ComponentD/Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference2" promote="ComponentD/reference3" multiplicity="1..1">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ <reference name="reference2a" promote="ComponentD/reference3a" multiplicity="1..1">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+
+ <component name="ComponentD">
+ <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDReferenceMultiplicityImpl"/>
+ <service name="Service3">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <service name="Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </service>
+ <reference name="reference3" target="ComponentD/Service3a">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ <reference name="reference3a" target="ComponentE">
+ <!-- bindings and/or interfaces may or may not be specified explicitly here -->
+ </reference>
+ </component>
+
+ <component name="ComponentE">
+ <implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentEImpl"/>
+ <service name="Service3">
+ <binding.sca />
+ <binding.ws />
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java
new file mode 100644
index 0000000000..e499e06948
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java
@@ -0,0 +1,814 @@
+/*
+ * 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.itest.builder;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.xml.namespace.QName;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.assembly.Component;
+import org.apache.tuscany.sca.assembly.ComponentService;
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Load and build some composites and inspect the results.
+ *
+ * @version $Rev$ $Date$
+ */
+public class BuilderTestCase {
+ private CustomCompositeBuilder customBuilder;
+
+ @Before
+ public void setUp() throws Exception {
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ /* OASIS doesn't take notice of top level composite services
+ *
+ // Scenario 1: <binding.ws> on outer composite service CompositeA/Service1
+ @Ignore
+ @Test
+ public void testScenario1() throws Exception {
+ System.out.println("====>Running testScenario1");
+ customBuilder = new CustomCompositeBuilder(false);
+ customBuilder.loadContribution("scenario1.composite", "TestContribution", "src/main/resources/scenario1/");
+ //TestUtils.printResults(customBuilder);
+ TestUtils.checkProblems(customBuilder);
+ checkScenario1Results(false);
+ }
+
+ @Ignore
+ @Test
+ public void testScenario1NonWiring() throws Exception {
+ System.out.println("====>Running testScenario1NonWiring");
+ customBuilder = new CustomCompositeBuilder(true);
+ customBuilder.loadContribution("scenario1.composite", "TestContribution", "src/main/resources/scenario1/");
+ //TestUtils.printResults(customBuilder);
+ TestUtils.checkProblems(customBuilder);
+ checkScenario1Results(true);
+ }
+
+ private void checkScenario1Results(boolean nonWiring) {
+ Composite domainComposite = customBuilder.getDomainComposite();
+
+ Component componentD = TestUtils.getComponent(domainComposite, "ComponentD");
+ if (!nonWiring) {
+ // Should create component service $promoted$Service1 on innermost component
+ // ComponentD, with <binding.ws> and uri="/Service1"
+ // No other services on ComponentD should have <binding.ws>
+ WebServiceBinding wsBinding = null;
+ for (ComponentService service : componentD.getServices()) {
+ WebServiceBinding wsb = service.getBinding(WebServiceBinding.class);
+ if ("$promoted$Service1".equals(service.getName())) {
+ wsBinding = wsb;
+ } else {
+ assert wsb == null;
+ }
+ }
+ assert "/Service1".equals(wsBinding.getURI());
+
+ // Should create WSDL document for ComponentD/$promoted$Service1 with endpoint uri="/Service1"
+ Definition def = wsBinding.getWSDLDocument();
+ javax.wsdl.Service svc = def.getService(new QName("http://builder.itest.sca.tuscany.apache.org/", "Service3Service"));
+ Port port = svc.getPort("Service3Port");
+ assert "/Service1".equals(TestUtils.getPortAddress(port));
+ } else {
+ // Should not create component service $promoted$Service1 on innermost component ComponentD
+ // No component services on ComponentD should have <binding.ws>
+ for (ComponentService service : componentD.getServices()) {
+ assert !"$promoted$Service1".equals(service.getName());
+ assert service.getBinding(WebServiceBinding.class) == null;
+ }
+ }
+
+ // No services on ComponentB should have <binding.ws>
+ Component componentB = TestUtils.getComponent(domainComposite, "ComponentB");
+ for (ComponentService service : componentB.getServices()) {
+ assert service.getBinding(WebServiceBinding.class) == null;
+ }
+
+ // No services on CompositeC should have <binding.ws>
+ Composite compositeC = TestUtils.getComposite(domainComposite, new QName("http://scenario1", "CompositeC"));
+ for (Service service : compositeC.getServices()) {
+ assert service.getBinding(WebServiceBinding.class) == null;
+ }
+
+ if (nonWiring) {
+ // Should not add a WSDL document to domain composite service Service1
+ WebServiceBinding wsBinding = null;
+ for (Service service : domainComposite.getServices()) {
+ if ("Service1".equals(service.getName())) {
+ wsBinding = service.getBinding(WebServiceBinding.class);
+ }
+ }
+ assert wsBinding.getWSDLDocument() == null;
+ }
+
+ String expectedEndpoints = "Component - ComponentB\n" +
+ "Service - Service2\n" +
+ "Endpoint - Service2\n" +
+ "Service - Service2a\n" +
+ "Endpoint - Service2a\n" +
+ "Reference - reference2\n" +
+ "Component - ComponentB has composite impl\n" +
+ " Component - ComponentD\n" +
+ " Service - Service3\n" +
+ " Endpoint - Service3\n" +
+ " Service - Service3a\n" +
+ " Endpoint - Service3a\n" +
+ " Reference - reference3";
+
+ String actualEndpoints = TestUtils.printEndpoints(domainComposite);
+ System.out.println(actualEndpoints);
+
+ Assert.assertEquals(expectedEndpoints, actualEndpoints);
+ }
+*/
+
+ // Scenario 2: <binding.ws> on outer component service ComponentB/Service2
+ @Test
+ public void testScenario2() throws Exception {
+ System.out.println("====>Running testScenario2");
+ customBuilder = new CustomCompositeBuilder(false);
+ customBuilder.loadContribution("scenario2.composite", "TestContribution", "src/main/resources/scenario2/");
+ //TestUtils.printResults(customBuilder);
+ TestUtils.checkProblems(customBuilder);
+ checkScenario2and3Results("http://scenario2", false);
+ }
+
+ public void testScenario2NonWiring() throws Exception {
+ System.out.println("====>Running testScenario2NonWiring");
+ customBuilder = new CustomCompositeBuilder(true);
+ customBuilder.loadContribution("scenario2.composite", "TestContribution", "src/main/resources/scenario2/");
+ //TestUtils.printResults(customBuilder);
+ TestUtils.checkProblems(customBuilder);
+ checkScenario2and3Results("http://scenario2", true);
+ }
+
+ private void checkScenario2and3Results(String namespace, boolean nonWiring) {
+ Composite domainComposite = customBuilder.getDomainComposite();
+
+ // Test that endpoint structure matches expected
+ String structure = TestUtils.printStructure(domainComposite, "");
+ System.out.println(structure);
+
+ String expectedStructure = "Component URI - ComponentB\n" +
+ " Component URI - ComponentB/ComponentD\n" +
+ " Endpoint: URI = ComponentB/ComponentD#service-binding(Service3/Service3) org.apache.tuscany.sca.assembly.impl.SCABindingImpl\n" +
+ " Endpoint: URI = ComponentB/ComponentD#service-binding(Service3a/Service3a) org.apache.tuscany.sca.assembly.impl.SCABindingImpl\n" +
+ "Endpoint: URI = ComponentB#service-binding(Service2/Service2) org.apache.tuscany.sca.binding.ws.impl.WebServiceBindingImpl\n" +
+ "Endpoint: URI = ComponentB#service-binding(Service2a/Service3a) org.apache.tuscany.sca.assembly.impl.SCABindingImpl\n";
+
+ Assert.assertEquals(expectedStructure, structure);
+
+ // Test that generated WSDL matches expected
+ // Should create WSDL document for ComponentB/Service2 with endpoint uri="/ComponentB/Service2"
+ // No other services on ComponentB should have <binding.ws>
+ Component componentB = TestUtils.getComponent(domainComposite, "ComponentB");
+ WebServiceBinding wsBinding = null;
+
+ for (ComponentService service : componentB.getServices()) {
+ WebServiceBinding wsb = service.getBinding(WebServiceBinding.class);
+ if ("Service2".equals(service.getName())) {
+ wsBinding = wsb;
+ } else {
+ assert wsb == null;
+ }
+ }
+
+ Definition def = wsBinding.getGeneratedWSDLDocument();
+ TestUtils.writeWSDL(def);
+
+ javax.wsdl.Service svc = def.getService(new QName("http://builder.itest.sca.tuscany.apache.org/", "ComponentB_Service2"));
+ Port port = svc.getPort("Service2SOAP11Port");
+ Assert.assertEquals("/ComponentB/Service2",TestUtils.getPortAddress(port));
+
+ }
+/*
+ // Scenario 3: <binding.ws> on inner composite service CompositeC/Service2
+ public void testScenario3() throws Exception {
+ System.out.println("====>Running testScenario3");
+ customBuilder = new CustomCompositeBuilder(false);
+ customBuilder.loadContribution("scenario3.composite", "TestContribution", "src/main/resources/scenario3/");
+ //TestUtils.printResults(customBuilder);
+ TestUtils.checkProblems(customBuilder);
+ checkScenario2and3Results("http://scenario3", false);
+ }
+
+ public void testScenario3NonWiring() throws Exception {
+ System.out.println("====>Running testScenario3NonWiring");
+ customBuilder = new CustomCompositeBuilder(true);
+ customBuilder.loadContribution("scenario3.composite", "TestContribution", "src/main/resources/scenario3/");
+ //TestUtils.printResults(customBuilder);
+ TestUtils.checkProblems(customBuilder);
+ checkScenario2and3Results("http://scenario3", true);
+ }
+
+ // Scenario 4: <binding.ws> on inner component service ComponentD/Service3
+ public void testScenario4() throws Exception {
+ System.out.println("====>Running testScenario4");
+ customBuilder = new CustomCompositeBuilder(false);
+ customBuilder.loadContribution("scenario4.composite", "TestContribution", "src/main/resources/scenario4/");
+ //TestUtils.printResults(customBuilder);
+ TestUtils.checkProblems(customBuilder);
+ checkScenario4Results(false);
+ }
+
+ public void testScenario4NonWiring() throws Exception {
+ System.out.println("====>Running testScenario4NonWiring");
+ customBuilder = new CustomCompositeBuilder(true);
+ customBuilder.loadContribution("scenario4.composite", "TestContribution", "src/main/resources/scenario4/");
+ //TestUtils.printResults(customBuilder);
+ TestUtils.checkProblems(customBuilder);
+ checkScenario4Results(true);
+ }
+
+ private void checkScenario4Results(boolean nonWiring) {
+ Composite domainComposite = customBuilder.getDomainComposite();
+
+ // Should create WSDL document for ComponentD/Service3 with endpoint uri="/ComponentD/Service3"
+ Component componentD = TestUtils.getComponent(domainComposite, "ComponentD");
+ WebServiceBinding wsBinding = null;
+ for (ComponentService service : componentD.getServices()) {
+ if ("Service3".equals(service.getName())) {
+ wsBinding = service.getBinding(WebServiceBinding.class);
+ }
+ }
+ Definition def = wsBinding.getWSDLDocument();
+ javax.wsdl.Service svc = def.getService(new QName("http://builder.itest.sca.tuscany.apache.org/", "Service3Service"));
+ Port port = svc.getPort("Service3Port");
+ assert "/ComponentB/ComponentD/Service3".equals(TestUtils.getPortAddress(port));
+
+ // Should add <binding.ws> to inner composite service CompositeC/Service2
+ // No other services on CompositeC should have <binding.ws>
+ Composite compositeC = TestUtils.getComposite(domainComposite, new QName("http://scenario4", "CompositeC"));
+ wsBinding = null;
+ for (Service service : compositeC.getServices()) {
+ WebServiceBinding wsb = service.getBinding(WebServiceBinding.class);
+ if ("Service2".equals(service.getName())) {
+ wsBinding = wsb;
+ } else {
+ assert wsb == null;
+ }
+ }
+ assert "/ComponentB/Service2".equals(wsBinding.getURI());
+
+ // Should add <binding.ws> to outer component service ComponentB/Service2
+ // Should create WSDL document for ComponentB/Service2 with endpoint uri="/ComponentB/Service2"
+ // No other services on ComponentB should have <binding.ws>
+ Component componentB = TestUtils.getComponent(domainComposite, "ComponentB");
+ wsBinding = null;
+ for (ComponentService service : componentB.getServices()) {
+ WebServiceBinding wsb = service.getBinding(WebServiceBinding.class);
+ if ("Service2".equals(service.getName())) {
+ wsBinding = wsb;
+ } else {
+ assert wsb == null;
+ }
+ }
+ assert "/ComponentB/Service2".equals(wsBinding.getURI());
+ def = wsBinding.getWSDLDocument();
+ svc = def.getService(new QName("http://builder.itest.sca.tuscany.apache.org/", "Service3Service"));
+ port = svc.getPort("Service3Port");
+ assert "/ComponentB/Service2".equals(TestUtils.getPortAddress(port));
+
+ if (!nonWiring) {
+ // Should create component service $promoted$ComponentB$slash$Service2 on innermost component
+ // ComponentD, with <binding.ws> and uri="/ComponentB/Service2"
+ wsBinding = null;
+ for (ComponentService service : componentD.getServices()) {
+ if ("$promoted$ComponentB$slash$Service2".equals(service.getName())) {
+ wsBinding = service.getBinding(WebServiceBinding.class);
+ }
+ }
+ assert "/ComponentB/Service2".equals(wsBinding.getURI());
+
+ // Should create WSDL document for ComponentD/$promoted$ComponentB$slash$Service2 with endpoint uri="/ComponentB/Service2"
+ def = wsBinding.getWSDLDocument();
+ svc = def.getService(new QName("http://builder.itest.sca.tuscany.apache.org/", "Service3Service"));
+ port = svc.getPort("Service3Port");
+ assert "/ComponentB/Service2".equals(TestUtils.getPortAddress(port));
+ } else {
+ // Should not create component service $promoted$ComponentB$slash$Service2 on innermost component ComponentD
+ for (ComponentService service : componentD.getServices()) {
+ assert !"$promoted$ComponentB$slash$Service2".equals(service.getName());
+ }
+ }
+
+ // Should add <binding.ws> to outer composite service CompositeA/Service1
+ wsBinding = null;
+ for (Service service : domainComposite.getServices()) {
+ if ("Service1".equals(service.getName())) {
+ wsBinding = service.getBinding(WebServiceBinding.class);
+ }
+ }
+ assert wsBinding != null;
+ if (nonWiring) {
+ // Should not add a WSDL document to domain composite service Service1
+ assert wsBinding.getWSDLDocument() == null;
+ }
+
+ if (!nonWiring) {
+ // Should create component service $promoted$Service1 on innermost component
+ // ComponentD, with <binding.ws> and uri="/Service1"
+ wsBinding = null;
+ for (ComponentService service : componentD.getServices()) {
+ if ("$promoted$Service1".equals(service.getName())) {
+ wsBinding = service.getBinding(WebServiceBinding.class);
+ }
+ }
+ assert "/Service1".equals(wsBinding.getURI());
+
+ // Should create WSDL document for ComponentD/$promoted$Service1 with endpoint uri="/Service1"
+ def = wsBinding.getWSDLDocument();
+ svc = def.getService(new QName("http://builder.itest.sca.tuscany.apache.org/", "Service3Service"));
+ port = svc.getPort("Service3Port");
+ assert "/Service1".equals(TestUtils.getPortAddress(port));
+ } else {
+ // Should not create component service $promoted$.Service1 on innermost component ComponentD
+ for (ComponentService service : componentD.getServices()) {
+ assert !"$promoted$Service1".equals(service.getName());
+ }
+ }
+
+ // No services on ComponentD should have <binding.ws>, except for Service3,
+ // $promoted$.Service1 and $promoted$.ComponentB.Service2
+ for (ComponentService service : componentD.getServices()) {
+ if (!"Service3".equals(service.getName()) &&
+ !"$promoted$Service1".equals(service.getName()) &&
+ !"$promoted$ComponentB$slash$Service2".equals(service.getName())) {
+ assert service.getBinding(WebServiceBinding.class) == null;
+ }
+ }
+ }
+
+ // Scenario 5: <binding.ws> and <interface.wsdl> on outer composite reference CompositeA/reference1
+ @Test
+ public void testScenario5() throws Exception {
+ System.out.println("====>Running testScenario5");
+ customBuilder = new CustomCompositeBuilder(false);
+ customBuilder.loadContribution("scenario5.composite", "TestContribution", "src/main/resources/scenario5/");
+ //TestUtils.printResults(customBuilder);
+ TestUtils.checkProblems(customBuilder);
+ checkScenario5Results(false);
+ }
+
+ @Test
+ public void testScenario5NonWiring() throws Exception {
+ System.out.println("====>Running testScenario5NonWiring");
+ customBuilder = new CustomCompositeBuilder(true);
+ customBuilder.loadContribution("scenario5.composite", "TestContribution", "src/main/resources/scenario5/");
+ //TestUtils.printResults(customBuilder);
+ TestUtils.checkProblems(customBuilder);
+ checkScenario5Results(true);
+ }
+
+ private void checkScenario5Results(boolean nonWiring) {
+ Composite domainComposite = customBuilder.getDomainComposite();
+
+ // Should not add <binding.ws> to any outer component references
+ Component componentB = TestUtils.getComponent(domainComposite, "ComponentB");
+ for (ComponentReference reference : componentB.getReferences()) {
+ assert reference.getBinding(WebServiceBinding.class) == null;
+ }
+
+ Definition def;
+ javax.wsdl.Service svc;
+ Port port;
+ WebServiceBinding wsBinding;
+ Component componentD = TestUtils.getComponent(domainComposite, "ComponentD");
+ if (!nonWiring) {
+ // Should add <binding.ws> to inner component reference ComponentD/reference3 with uri="http://foo.com/bar"
+ // Should set <interface.wsdl> on inner component reference ComponentD/reference3
+ wsBinding = null;
+ for (ComponentReference reference : componentD.getReferences()) {
+ if ("reference3".equals(reference.getName())) {
+ wsBinding = reference.getBinding(WebServiceBinding.class);
+ assert reference.getInterfaceContract(wsBinding) instanceof WSDLInterfaceContract;
+ }
+ }
+ assert "http://foo.com/bar".equals(wsBinding.getURI());
+
+ // Should create WSDL document for ComponentD/reference3 with endpoint uri="http://foo.com/bar"
+ def = wsBinding.getWSDLDocument();
+ svc = def.getService(new QName("http://scenarios/ComponentD/reference3", "Service3aService"));
+ port = svc.getPort("Service3aPort");
+ assert "http://foo.com/bar".equals(TestUtils.getPortAddress(port));
+ } else {
+ // Should not add <binding.ws> to any inner component references
+ for (ComponentReference reference : componentD.getReferences()) {
+ assert reference.getBinding(WebServiceBinding.class) == null;
+ }
+ }
+
+ // Should not add <binding.ws> or <interface.wsdl> to inner composite reference CompositeC/reference2
+ Composite compositeC = TestUtils.getComposite(domainComposite, new QName("http://scenario5", "CompositeC"));
+ for (Reference reference : compositeC.getReferences()) {
+ assert reference.getBinding(WebServiceBinding.class) == null;
+ assert reference.getInterfaceContract() instanceof JavaInterfaceContract;
+ }
+
+ String expectedEndpoints = "Component - ComponentB\n" +
+ "Service - Service2\n" +
+ "Endpoint - Service2\n" +
+ "Service - Service2a\n" +
+ "Endpoint - Service2a\n" +
+ "Reference - reference2\n" +
+ "Component - ComponentB has composite impl\n" +
+ " Component - ComponentD\n" +
+ " Service - Service3\n" +
+ " Endpoint - Service3\n" +
+ " Service - Service3a\n" +
+ " Endpoint - Service3a\n" +
+ " Reference - reference3";
+
+ String actualEndpoints = TestUtils.printEndpoints(domainComposite);
+ System.out.println(actualEndpoints);
+
+ Assert.assertEquals(expectedEndpoints, actualEndpoints);
+ }
+
+
+ // Scenario 6: <binding.ws> and <interface.wsdl> on outer component reference ComponentB/reference2
+ @Ignore
+ @Test
+ public void testScenario6() throws Exception {
+ System.out.println("====>Running testScenario6");
+ customBuilder = new CustomCompositeBuilder(false);
+ customBuilder.loadContribution("scenario6.composite", "TestContribution", "src/main/resources/scenario6/");
+ //TestUtils.printResults(customBuilder);
+ TestUtils.checkProblems(customBuilder);
+ checkScenario6and7Results("http://scenario6", false);
+ }
+
+ @Ignore
+ @Test
+ public void testScenario6NonWiring() throws Exception {
+ System.out.println("====>Running testScenario6NonWiring");
+ customBuilder = new CustomCompositeBuilder(true);
+ customBuilder.loadContribution("scenario6.composite", "TestContribution", "src/main/resources/scenario6/");
+ //TestUtils.printResults(customBuilder);
+ TestUtils.checkProblems(customBuilder);
+ checkScenario6and7Results("http://scenario6", true);
+ }
+
+ private void checkScenario6and7Results(String namespace, boolean nonWiring) {
+ Composite domainComposite = customBuilder.getDomainComposite();
+
+ // Should remove target= on ComponentB/reference2 (for Scenario 6) or
+ // CompositeC/reference2 (for Scenario 7), and add uri="http://foo.com/bar"
+ // to the <binding.ws> element on ComponentB/reference2
+ // For nonWiring, ComponentB/reference2 should have target=
+ // and no uri= should be added
+ Component componentB = TestUtils.getComponent(domainComposite, "ComponentB");
+ WebServiceBinding wsBinding = null;
+ for (ComponentReference reference : componentB.getReferences()) {
+ if ("reference2".equals(reference.getName())) {
+ if (!nonWiring) {
+ assert reference.getTargets().size() == 0;
+ } else {
+ assert reference.getTargets().size() == 1;
+ }
+ wsBinding = reference.getBinding(WebServiceBinding.class);
+ }
+ }
+ if (!nonWiring) {
+ assert "http://foo.com/bar".equals(wsBinding.getURI());
+ } else {
+ assert wsBinding.getURI() == null;
+ }
+
+ Definition def;
+ javax.wsdl.Service svc;
+ Port port;
+ if (!nonWiring) {
+ // Should create WSDL document for ComponentB/reference2 with endpoint uri="http://foo.com/bar"
+ def = wsBinding.getWSDLDocument();
+ svc = def.getService(new QName("http://scenarios/ComponentB/reference2", "Service3aService"));
+ port = svc.getPort("Service3aPort");
+ assert "http://foo.com/bar".equals(TestUtils.getPortAddress(port));
+ }
+
+ Component componentD = TestUtils.getComponent(domainComposite, "ComponentD");
+ if (!nonWiring) {
+ // Should add <binding.ws> to inner component reference ComponentD/reference3 with uri="http://foo.com/bar"
+ // Should set <interface.wsdl> on inner component reference ComponentD/reference3
+ wsBinding = null;
+ for (ComponentReference reference : componentD.getReferences()) {
+ if ("reference3".equals(reference.getName())) {
+ wsBinding = reference.getBinding(WebServiceBinding.class);
+ assert reference.getBindings().size() == 1;
+ assert reference.getInterfaceContract(wsBinding) instanceof WSDLInterfaceContract;
+ }
+ }
+ assert "http://foo.com/bar".equals(wsBinding.getURI());
+
+ // Should create WSDL document for ComponentD/reference3 with endpoint uri="http://foo.com/bar"
+ def = wsBinding.getWSDLDocument();
+ svc = def.getService(new QName("http://scenarios/ComponentB/reference2", "Service3aService"));
+ port = svc.getPort("Service3aPort");
+ assert "http://foo.com/bar".equals(TestUtils.getPortAddress(port));
+ } else {
+ // Should not add <binding.ws> to any inner component references
+ for (ComponentReference reference : componentD.getReferences()) {
+ assert reference.getBinding(WebServiceBinding.class) == null;
+ }
+ }
+
+ // No references on CompositeC should have <binding.ws> or <interface.wsdl>, except for
+ // reference2 in Scenario 7
+ Composite compositeC = TestUtils.getComposite(domainComposite, new QName(namespace, "CompositeC"));
+ for (Reference reference : compositeC.getReferences()) {
+ if ("http://scenario7".equals(namespace) && "reference2".equals(reference.getName())) {
+ assert reference.getBinding(WebServiceBinding.class)!= null;
+ assert reference.getInterfaceContract() instanceof WSDLInterfaceContract;
+ } else {
+ assert reference.getBinding(WebServiceBinding.class) == null;
+ assert reference.getInterfaceContract() instanceof JavaInterfaceContract;
+ }
+ }
+
+ // Should add <binding.ws> and <interface.wsdl> to outer composite reference CompositeA/reference1
+ wsBinding = null;
+ for (Reference reference : domainComposite.getReferences()) {
+ if ("reference1".equals(reference.getName())) {
+ wsBinding = reference.getBinding(WebServiceBinding.class);
+ assert reference.getInterfaceContract() instanceof WSDLInterfaceContract;
+ }
+ }
+ assert wsBinding.getURI() == null;
+
+ // Should not add a WSDL document to domain composite reference reference1
+ assert wsBinding.getWSDLDocument() == null;
+
+ String expectedEndpoints = "Component - ComponentB\n" +
+ "Service - Service2\n" +
+ "Endpoint - Service2\n" +
+ "Service - Service2a\n" +
+ "Endpoint - Service2a\n" +
+ "Reference - reference2\n" +
+ "Component - ComponentB has composite impl\n" +
+ " Component - ComponentD\n" +
+ " Service - Service3\n" +
+ " Endpoint - Service3\n" +
+ " Service - Service3a\n" +
+ " Endpoint - Service3a\n" +
+ " Reference - reference3";
+
+ String actualEndpoints = TestUtils.printEndpoints(domainComposite);
+ System.out.println(actualEndpoints);
+
+ Assert.assertEquals(expectedEndpoints, actualEndpoints);
+ }
+
+ // Scenario 7: <binding.ws> and <interface.wsdl> on inner composite reference CompositeC/reference2
+ public void testScenario7() throws Exception {
+ System.out.println("====>Running testScenario7");
+ customBuilder = new CustomCompositeBuilder(false);
+ customBuilder.loadContribution("scenario7.composite", "TestContribution", "src/main/resources/scenario7/");
+ //TestUtils.printResults(customBuilder);
+ TestUtils.checkProblems(customBuilder);
+ checkScenario6and7Results("http://scenario7", false);
+ }
+
+ public void testScenario7NonWiring() throws Exception {
+ System.out.println("====>Running testScenario7NonWiring");
+ customBuilder = new CustomCompositeBuilder(true);
+ customBuilder.loadContribution("scenario7.composite", "TestContribution", "src/main/resources/scenario7/");
+ //TestUtils.printResults(customBuilder);
+ TestUtils.checkProblems(customBuilder);
+ checkScenario6and7Results("http://scenario7", true);
+ }
+
+ // Scenario 8: <binding.ws> and <interface.wsdl> on inner component reference ComponentD/reference3
+ public void testScenario8() throws Exception {
+ System.out.println("====>Running testScenario8");
+ customBuilder = new CustomCompositeBuilder(false);
+ customBuilder.loadContribution("scenario8.composite", "TestContribution", "src/main/resources/scenario8/");
+ //TestUtils.printResults(customBuilder);
+ TestUtils.checkProblems(customBuilder);
+ checkScenario8Results(false);
+ }
+
+ public void testScenario8NonWiring() throws Exception {
+ System.out.println("====>Running testScenario8NonWiring");
+ customBuilder = new CustomCompositeBuilder(true);
+ customBuilder.loadContribution("scenario8.composite", "TestContribution", "src/main/resources/scenario8/");
+ //TestUtils.printResults(customBuilder);
+ TestUtils.checkProblems(customBuilder);
+ checkScenario8Results(true);
+ }
+
+ private void checkScenario8Results(boolean nonWiring) {
+ Composite domainComposite = customBuilder.getDomainComposite();
+
+ // Should replace target= on ComponentD/reference3 by uri="http://foo.com/bar" on <binding.ws>
+ // For nonWiring, the original target= is preserved and there is no uri=
+ Component componentD = TestUtils.getComponent(domainComposite, "ComponentD");
+ WebServiceBinding wsBinding = null;
+ for (ComponentReference reference : componentD.getReferences()) {
+ if ("reference3".equals(reference.getName())) {
+ if (!nonWiring) {
+ assert reference.getTargets().size() == 0;
+ } else {
+ assert reference.getTargets().size() == 1;
+ }
+ wsBinding = reference.getBinding(WebServiceBinding.class);
+ }
+ }
+ if (!nonWiring) {
+ assert "http://foo.com/bar".equals(wsBinding.getURI());
+ } else {
+ assert wsBinding.getURI() == null;
+ }
+
+ Definition def;
+ javax.wsdl.Service svc;
+ Port port;
+ if (!nonWiring) {
+ // Should create WSDL document for ComponentD/reference3 with endpoint uri="http://foo.com/bar"
+ def = wsBinding.getWSDLDocument();
+ svc = def.getService(new QName("http://scenarios/ComponentD/reference3", "Service3aService"));
+ port = svc.getPort("Service3aPort");
+ assert "http://foo.com/bar".equals(TestUtils.getPortAddress(port));
+ }
+
+ // Should add <binding.ws> and <interface.wsdl> to inner composite reference CompositeC/reference2
+ Composite compositeC = TestUtils.getComposite(domainComposite, new QName("http://scenario8", "CompositeC"));
+ wsBinding = null;
+ for (Reference reference : compositeC.getReferences()) {
+ if ("reference2".equals(reference.getName())) {
+ wsBinding = reference.getBinding(WebServiceBinding.class);
+ assert reference.getInterfaceContract() instanceof WSDLInterfaceContract;
+ }
+ }
+ assert wsBinding.getURI() == null;
+
+ // Should add <binding.ws> and <interface.wsdl> to outer component reference ComponentB/reference2
+ Component componentB = TestUtils.getComponent(domainComposite, "ComponentB");
+ wsBinding = null;
+ for (ComponentReference reference : componentB.getReferences()) {
+ if ("reference2".equals(reference.getName())) {
+ wsBinding = reference.getBinding(WebServiceBinding.class);
+ assert reference.getInterfaceContract() instanceof WSDLInterfaceContract;
+ }
+ }
+ assert wsBinding.getURI() == null;
+
+ // Should add <binding.ws> and <interface.wsdl> to outer composite reference CompositeA/reference1
+ wsBinding = null;
+ for (Reference reference : domainComposite.getReferences()) {
+ if ("reference1".equals(reference.getName())) {
+ wsBinding = reference.getBinding(WebServiceBinding.class);
+ assert reference.getInterfaceContract() instanceof WSDLInterfaceContract;
+ }
+ }
+ assert wsBinding.getURI() == null;
+
+ // Should not add a WSDL document to domain composite reference reference1
+ assert wsBinding.getWSDLDocument() == null;
+ }
+
+ // Scenario 9: target in reference CDR3A and binding.ws uri= at CAR1A
+ public void testScenario9() throws Exception {
+ System.out.println("====>Running testScenario9");
+ customBuilder = new CustomCompositeBuilder(false);
+ customBuilder.loadContribution("scenario9.composite", "TestContribution", "src/main/resources/scenario9/");
+ //TestUtils.printResults(customBuilder);
+ TestUtils.checkProblems(customBuilder);
+ checkScenario9Results();
+ }
+
+ private void checkScenario9Results() {
+ Composite domainComposite = customBuilder.getDomainComposite();
+
+ Component componentD = TestUtils.getComponent(domainComposite, "ComponentD");
+ ComponentReference componentRef = null;
+ for (ComponentReference reference : componentD.getReferences()) {
+ if ("reference3a".equals(reference.getName())) {
+ componentRef = reference;
+ assertTrue(reference.getBindings().size() == 2);
+ assertTrue(reference.getBindings().get(0) instanceof SCABinding);
+ assertTrue(reference.getBindings().get(1) instanceof WebServiceBinding);
+ }
+ }
+ assertTrue(componentRef != null);
+ }
+
+ // Scenario 10: targets in references CBR2A and CDR3A and binding.ws at CBR2A
+ public void testScenario10() throws Exception {
+ System.out.println("====>Running testScenario10");
+ customBuilder = new CustomCompositeBuilder(false);
+ customBuilder.loadContribution("scenario10.composite", "TestContribution", "src/main/resources/scenario10/");
+ //TestUtils.printResults(customBuilder);
+ TestUtils.checkProblems(customBuilder);
+ checkScenario10And11Results();
+ }
+
+ // Scenario 11: targets in references CBR2A and CDR3A and binding.ws at CCR2A
+ public void testScenario11() throws Exception {
+ System.out.println("====>Running testScenario11");
+ customBuilder = new CustomCompositeBuilder(false);
+ customBuilder.loadContribution("scenario11.composite", "TestContribution", "src/main/resources/scenario11/");
+ //TestUtils.printResults(customBuilder);
+ TestUtils.checkProblems(customBuilder);
+ checkScenario10And11Results();
+ }
+
+ private void checkScenario10And11Results() {
+ Composite domainComposite = customBuilder.getDomainComposite();
+
+ Component componentD = TestUtils.getComponent(domainComposite, "ComponentD");
+ ComponentReference componentRef = null;
+ for (ComponentReference reference : componentD.getReferences()) {
+ if ("reference3a".equals(reference.getName())) {
+ componentRef = reference;
+ assertTrue(reference.getBindings().size() == 2);
+ Binding binding1 = reference.getBindings().get(0);
+ assertTrue(binding1 instanceof SCABinding);
+ assertTrue(reference.getInterfaceContract(binding1) instanceof JavaInterfaceContract);
+ Binding binding2 = reference.getBindings().get(1);
+ assertTrue(binding2 instanceof WebServiceBinding);
+ assertTrue(reference.getInterfaceContract(binding2) instanceof WSDLInterfaceContract);
+ }
+ }
+ assertTrue(componentRef != null);
+ }
+
+ // Scenario 12: targets in references CBR2A and CDR3A and binding.ws at CDR3A
+ public void testScenario12() throws Exception {
+ System.out.println("====>Running testScenario12");
+ customBuilder = new CustomCompositeBuilder(false);
+ customBuilder.loadContribution("scenario12.composite", "TestContribution", "src/main/resources/scenario12/");
+ //TestUtils.printResults(customBuilder);
+ TestUtils.checkProblems(customBuilder);
+ checkScenario12Results();
+ }
+
+ private void checkScenario12Results() {
+ Composite domainComposite = customBuilder.getDomainComposite();
+
+ Component componentD = TestUtils.getComponent(domainComposite, "ComponentD");
+ ComponentReference componentRef = null;
+ for (ComponentReference reference : componentD.getReferences()) {
+ if ("reference3a".equals(reference.getName())) {
+ componentRef = reference;
+ assertTrue(reference.getBindings().size() == 2);
+ assertTrue(reference.getBindings().get(0) instanceof WebServiceBinding);
+ assertTrue(reference.getBindings().get(1) instanceof WebServiceBinding);
+ }
+ }
+ assertTrue(componentRef != null);
+ }
+
+ // Scenario 13: target in reference CDR3A
+ public void testScenario13() throws Exception {
+ System.out.println("====>Running testScenario13");
+ customBuilder = new CustomCompositeBuilder(false);
+ customBuilder.loadContribution("scenario13.composite", "TestContribution", "src/main/resources/scenario13/");
+ //TestUtils.printResults(customBuilder);
+ TestUtils.checkProblems(customBuilder);
+ checkScenario13Results();
+ }
+
+ private void checkScenario13Results() {
+ Composite domainComposite = customBuilder.getDomainComposite();
+
+ Component componentD = TestUtils.getComponent(domainComposite, "ComponentD");
+ ComponentReference componentRef = null;
+ for (ComponentReference reference : componentD.getReferences()) {
+ if ("reference3a".equals(reference.getName())) {
+ componentRef = reference;
+ assertTrue(reference.getBindings().size() == 1);
+ assertTrue(reference.getBindings().get(0) instanceof WebServiceBinding);
+ }
+ }
+ assertTrue(componentRef != null);
+ }
+*/
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CustomCompositeBuilder.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CustomCompositeBuilder.java
new file mode 100644
index 0000000000..897cd21e8a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CustomCompositeBuilder.java
@@ -0,0 +1,99 @@
+/*
+ * 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.itest.builder;
+
+import javax.xml.stream.XMLOutputFactory;
+
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
+import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.UtilityExtensionPoint;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.MonitorFactory;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+import org.apache.tuscany.sca.runtime.CompositeActivator;
+
+
+public class CustomCompositeBuilder {
+
+ private boolean nonWiring;
+ private Node node;
+ private ExtensionPointRegistry extensionPoints;
+ private Monitor monitor;
+ private StAXArtifactProcessor<Composite> compositeProcessor;
+
+ public CustomCompositeBuilder(boolean nonWiring) {
+ this.nonWiring = nonWiring;
+ }
+
+ public void loadContribution(String compositeURL, String sourceURI, String sourceURL) throws Exception {
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(compositeURL, new Contribution(sourceURI, sourceURL));
+ node.start();
+
+ // get some things out of the extension registry
+ extensionPoints = ((NodeImpl)node).getExtensionPointRegistry();
+
+ UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class);
+ MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
+ monitor = monitorFactory.createMonitor();
+
+ StAXArtifactProcessorExtensionPoint xmlProcessors = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
+ compositeProcessor = xmlProcessors.getProcessor(Composite.class);
+
+ CompositeActivator compositeActivator = utilities.getUtility(CompositeActivator.class);
+ }
+
+ /**
+ * Returns the delegating model processor.
+ * @return the delegating model processor
+ */
+ public StAXArtifactProcessor<Object> getModelProcessor() {
+ return null;//compositeProcessor;
+ }
+
+ /**
+ * Returns the XML output factory.
+ * @return the XML output factory
+ */
+ public XMLOutputFactory getOutputFactory() {
+ return null; //outputFactory;
+ }
+
+ /**
+ * Returns the domain composite.
+ * @return the domain composite model object
+ */
+ public Composite getDomainComposite() {
+ return (Composite) ((NodeImpl)node).getDomainComposite();
+ }
+
+ /**
+ * Returns the monitor.
+ * @return the monitor instance
+ */
+ public Monitor getMonitor() {
+ return monitor;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/TestUtils.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/TestUtils.java
new file mode 100644
index 0000000000..9a5aa5582d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/TestUtils.java
@@ -0,0 +1,319 @@
+/*
+ * 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.itest.builder;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.wsdl.WSDLException;
+import javax.wsdl.extensions.soap.SOAPAddress;
+import javax.wsdl.extensions.soap12.SOAP12Address;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLWriter;
+import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.tuscany.sca.assembly.Binding;
+import org.apache.tuscany.sca.assembly.Component;
+import org.apache.tuscany.sca.assembly.ComponentReference;
+import org.apache.tuscany.sca.assembly.ComponentService;
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.assembly.Contract;
+import org.apache.tuscany.sca.assembly.Endpoint;
+import org.apache.tuscany.sca.assembly.EndpointReference;
+import org.apache.tuscany.sca.assembly.Implementation;
+import org.apache.tuscany.sca.assembly.Reference;
+import org.apache.tuscany.sca.assembly.Service;
+import org.apache.tuscany.sca.assembly.impl.EndpointImpl;
+import org.apache.tuscany.sca.assembly.impl.EndpointReferenceImpl;
+import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
+import org.apache.tuscany.sca.contribution.processor.ProcessorContext;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.xml.serialize.OutputFormat;
+import org.apache.xml.serialize.XMLSerializer;
+import org.w3c.dom.Document;
+
+/**
+ * Static utility methods for use by test cases.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TestUtils {
+
+ protected static void checkProblems(CustomCompositeBuilder customBuilder) throws Exception {
+ boolean problems = false;
+ for (Problem problem : customBuilder.getMonitor().getProblems()) {
+ if (problem.getCause() != null) {
+ problem.getCause().printStackTrace();
+ }
+ if (problem.getSeverity() == Problem.Severity.ERROR){
+ problems = true;
+ }
+ }
+ assert !problems;
+ }
+
+ protected static String getPortAddress(Port port) {
+ Object ext = port.getExtensibilityElements().get(0);
+ String returnAddress = null;
+ if (ext instanceof SOAPAddress) {
+ returnAddress = ((SOAPAddress)ext).getLocationURI();
+ }
+ if (ext instanceof SOAP12Address) {
+ returnAddress = ((SOAP12Address)ext).getLocationURI();
+ }
+
+ returnAddress = returnAddress.substring(returnAddress.indexOf("//") + 2);
+ returnAddress = returnAddress.substring(returnAddress.indexOf("/"));
+
+ return returnAddress;
+ }
+
+ protected static Component getComponent(Composite composite, String name) {
+ for (Component component : composite.getComponents()) {
+ if (name.equals(component.getName())) {
+ return component;
+ }
+ // process implementation composites recursively
+ Implementation impl = component.getImplementation();
+ if (impl instanceof Composite) {
+ Component comp = getComponent((Composite)impl, name);
+ if (comp != null) {
+ return comp;
+ }
+ }
+ }
+ return null;
+ }
+
+ protected static Composite getComposite(Composite composite, QName name) {
+ if (name.equals(composite.getName())) {
+ return composite;
+ }
+ for (Component component : composite.getComponents()) {
+ // process implementation composites recursively
+ Implementation impl = component.getImplementation();
+ if (impl instanceof Composite) {
+ Composite comp = getComposite((Composite)impl, name);
+ if (comp != null) {
+ return comp;
+ }
+ }
+ }
+ return null;
+ }
+
+ protected static void printResults(CustomCompositeBuilder customBuilder) throws Exception {
+ for (Problem problem : customBuilder.getMonitor().getProblems()) {
+ if (problem.getCause() != null) {
+ problem.getCause().printStackTrace();
+ }
+ }
+ Composite domainComposite = customBuilder.getDomainComposite();
+ printComposite(domainComposite, customBuilder);
+ }
+
+ private static void printComposite(Composite composite, CustomCompositeBuilder customBuilder) throws Exception {
+ // process implementation composites recursively
+ for (Component component : composite.getComponents()) {
+ Implementation implementation = component.getImplementation();
+ if (implementation instanceof Composite) {
+ printComposite((Composite)implementation, customBuilder);
+ }
+ }
+
+ // write out the SCDL
+ writeSCDL(composite, customBuilder);
+
+ // find all the component service and reference bindings
+ for (Component component : composite.getComponents()) {
+ for (ComponentService componentService : component.getServices()) {
+ for (Binding binding : componentService.getBindings()) {
+ if (binding instanceof WebServiceBinding) {
+ writeWSDL(component, componentService, ((WebServiceBinding)binding).getGeneratedWSDLDocument());
+ }
+ }
+ }
+ for (ComponentReference componentReference : component.getReferences()) {
+ for (Binding binding : componentReference.getBindings()) {
+ if (binding instanceof WebServiceBinding) {
+ writeWSDL(component, componentReference, ((WebServiceBinding)binding).getGeneratedWSDLDocument());
+ }
+ }
+ }
+ }
+
+ // find all the composite service and reference bindings
+ for (Service service : composite.getServices()) {
+ for (Binding binding : service.getBindings()) {
+ if (binding instanceof WebServiceBinding) {
+ writeWSDL(null, service, ((WebServiceBinding)binding).getGeneratedWSDLDocument());
+ }
+ }
+ }
+ for (Reference reference : composite.getReferences()) {
+ for (Binding binding : reference.getBindings()) {
+ if (binding instanceof WebServiceBinding) {
+ writeWSDL(null, reference, ((WebServiceBinding)binding).getGeneratedWSDLDocument());
+ }
+ }
+ }
+ }
+
+ private static void writeSCDL(Composite composite, CustomCompositeBuilder customBuilder) throws Exception {
+ // Print out a composite
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ XMLStreamWriter writer = customBuilder.getOutputFactory().createXMLStreamWriter(bos);
+ customBuilder.getModelProcessor().write(composite, writer, new ProcessorContext());
+
+ // Parse and write again to pretty format it
+ DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ Document document = documentBuilder.parse(new ByteArrayInputStream(bos.toByteArray()));
+ OutputFormat format = new OutputFormat();
+ format.setIndenting(true);
+ format.setIndent(2);
+ XMLSerializer serializer = new XMLSerializer(System.out, format);
+ System.out.println("-->Runtime SCDL model for composite " + composite.getName());
+ serializer.serialize(document);
+ }
+
+ private static void writeWSDL(Component component, Contract contract, Definition definition) {
+ if (definition == null) {
+ System.out.println("-->No generated WSDL for " + (component != null ? component.getName() : "") + "/" + contract.getName());
+ } else {
+ try {
+ System.out.println("-->Generated WSDL for " + (component != null ? component.getName() : "") + "/" + contract.getName());
+ WSDLWriter writer = WSDLFactory.newInstance().newWSDLWriter();
+ writer.writeWSDL(definition, System.out);
+ } catch (WSDLException e) {
+ // ignore
+ }
+ }
+ }
+
+ protected static void writeWSDL(Definition definition) {
+ try {
+ WSDLWriter writer = WSDLFactory.newInstance().newWSDLWriter();
+ writer.writeWSDL(definition, System.out);
+ } catch (WSDLException e) {
+ // ignore
+ }
+ }
+
+ protected static String printStructure(Composite composite, String indent){
+ String structure = "";
+ for (Component component : composite.getComponents()){
+ structure += indent + "Component URI - " + component.getURI() + "\n";
+
+ // recurse for composite implementations
+ Implementation implementation = component.getImplementation();
+ if (implementation instanceof Composite) {
+ structure += printStructure((Composite)implementation, indent + " ");
+ }
+
+ for (Service service : component.getServices()){
+ for (Endpoint endpoint : service.getEndpoints()){
+ structure += indent + ((EndpointImpl)endpoint).toStringWithoutHash() + " " + endpoint.getBinding().getClass().getName() + "\n";
+ }
+ }
+ for (Reference reference : component.getReferences()){
+ for (EndpointReference endpointReference : reference.getEndpointReferences()){
+ structure += indent + ((EndpointReferenceImpl)endpointReference).toStringWithoutHash() + " " + endpointReference.getBinding().getClass().getName() + "\n";
+ }
+ }
+ }
+ return structure;
+ }
+/*
+ protected static String printEndpoints(Composite composite){
+ return printEndpoints(composite, "");
+ }
+
+ protected static String printEndpoints(Composite composite, String indent){
+
+ String buffer = "";
+
+ for (Component component : composite.getComponents()) {
+ buffer += indent + "Component - " + component.getName() + "\n";
+
+ // print component service endpoints
+ for (ComponentService componentService : component.getServices()) {
+ buffer += indent + "Service - " + componentService.getName() + "\n";
+ for (Endpoint endpoint : componentService.getEndpoints()) {
+ if (endpoint.getBinding() != null){
+ buffer += printEndpoint(endpoint, indent);
+ }
+ }
+ }
+
+ for (ComponentReference componentReference : component.getReferences()) {
+ buffer += indent + "Reference - " + componentReference.getName() + "\n";
+ for (EndpointReference endpointReference : componentReference.getEndpointReferences()) {
+ buffer += printEndpointReference(endpointReference, indent);
+ }
+ }
+
+ // process implementation composites recursively
+ Implementation implementation = component.getImplementation();
+ if (implementation instanceof Composite) {
+ buffer += indent + "Component - " + component.getName() + " has composite impl" + "\n";
+ buffer += printEndpoints((Composite)implementation, indent + " ");
+ }
+ }
+
+ return buffer;
+ }
+
+ protected static String printEndpoint(Endpoint endpoint, String indent){
+ String buffer = "";
+
+ buffer += indent + " Endpoint - Component: " + endpoint.getComponent().getName() +"\n";
+ buffer += indent + " Service: " + endpoint.getService().getName() +"\n";
+ buffer += indent + " Binding: " + endpoint.getBinding().getName() +"\n";
+
+ return buffer;
+ }
+
+ protected static String printEndpointReference(EndpointReference endpointReference, String indent){
+ String buffer = "";
+
+ buffer += indent + " EndpointReference - Component: " + endpointReference.getComponent().getName() +"\n";
+ buffer += indent + " Reference: " + endpointReference.getReference().getName() +"\n";
+ if (endpointReference.getTargetEndpoint() != null){
+ buffer += indent + " Wired: " +"\n";
+ buffer += indent + " Target: " + endpointReference.getTargetEndpoint().getComponent().getName()+"\n";
+ if (endpointReference.getTargetEndpoint() != null &&
+ endpointReference.getTargetEndpoint().isUnresolved() == false){
+ buffer += indent + " Binding: " + endpointReference.getBinding().getName() +"\n";
+ buffer += indent + " TargetEndpoint: " + endpointReference.getTargetEndpoint().getBinding().getName()+"\n";
+ } else {
+ buffer += indent + " Unresolved: " +"\n";
+ }
+ } else {
+ buffer += indent + " NonWired: " +"\n";
+ }
+
+ return buffer;
+ }
+*/
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/pom.xml
new file mode 100644
index 0000000000..2b063c02f6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/pom.xml
@@ -0,0 +1,45 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-callback-api</artifactId>
+ <name>Apache Tuscany SCA iTest Callback API</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ </dependencies>
+
+ <properties>
+ <was.ant.script>${basedir}/../build-was-integration.xml</was.ant.script>
+ <was.python.script>${basedir}/../wasAdmin.py</was.python.script>
+ </properties>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiCallBack.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiCallBack.java
new file mode 100644
index 0000000000..b013462f9f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiCallBack.java
@@ -0,0 +1,38 @@
+/*
+ * 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.test;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+/**
+ *
+ */
+public interface CallBackApiCallBack {
+ /**
+ * This function is defined in CallBackApiClientImpl
+ */
+ void callBackMessage(String aString);
+
+ /**
+ * This function is defined in CallBackApiClientImpl
+ */
+ void callBackIncrement(String aString);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClient.java
new file mode 100644
index 0000000000..252e4dc45f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClient.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.test;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface CallBackApiClient {
+ /**
+ * This function is defined in CallBackApiClientImpl
+ */
+ void run();
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClientImpl.java
new file mode 100644
index 0000000000..d883dc2d6f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClientImpl.java
@@ -0,0 +1,201 @@
+/*
+ * 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.test;
+
+import org.junit.Assert;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(CallBackApiClient.class)
+public class CallBackApiClientImpl implements CallBackApiClient, CallBackApiCallBack {
+
+ @Reference
+ protected CallBackApiService aCallBackService;
+
+ private static String returnMessage = null;
+ private static int callBackCount = 0;
+ private static Object monitor = new Object();
+
+ /**
+ * This test calls function test 3a,3a1,3b,3c
+ */
+ public void run() {
+
+ // This tests basic callback patterns.
+
+ // Test3a is the basic callback where the target calls back prior to
+ // returning to the client.
+ test3a();
+
+ test3a1();
+
+ // Test3b is where the target does not call back to the client.
+ test3b();
+
+ // Test3c is where the target calls back multiple times to the client.
+ test3c();
+ }
+
+ /**
+ * This test is the basic callback where the target calls back prior to returning to the client.
+ */
+
+ private void test3a() {
+ aCallBackService.knockKnock("Knock Knock");
+ int count = 0;
+
+ //
+ // If we can't get a response in 30 seconds consider this a failure
+ //
+
+ synchronized (monitor) {
+ while (returnMessage == null && count++ < 30) {
+ try {
+ monitor.wait(1000L);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ Assert.assertEquals("CallBackApiITest - test3a", "Who's There", this.getReturnMessage());
+
+ }
+
+ /**
+ * This test is the basic callback where the target calls back prior to returning to the client.
+ */
+ private void test3a1() {
+ aCallBackService.knockKnockByRef("Knock Knock");
+ int count = 0;
+
+ //
+ // If we can't get a response in 30 seconds consider this a failure
+ //
+
+ synchronized (monitor) {
+ while (returnMessage == null && count++ < 30) {
+ try {
+ monitor.wait(1000L);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ Assert.assertEquals("CallBackApiITest - test3a", "Who's There", this.getReturnMessage());
+
+ }
+
+ /**
+ * This test is the basic callback where the target does not call back to the client
+ */
+ private void test3b() {
+ aCallBackService.noCallBack("No Reply Desired");
+ Assert.assertEquals("CallBackApiITest - test3b", 1, 1);
+ }
+
+ /**
+ * This test is the basic callback where the target calls back multiple times to the client
+ */
+
+ private void test3c() {
+ aCallBackService.multiCallBack("Call me back 3 times");
+ int count = 0;
+
+ //
+ // If we can't get a response in 30 seconds consider this a failure
+ //
+
+ synchronized (monitor) {
+ while (this.getCallBackCount() < 3 && count++ < 30) {
+ try {
+ monitor.wait(1000L);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ Assert.assertEquals("CallBackApiITest - test3c", 3, this.getCallBackCount());
+ }
+
+ /**
+ * This function returns a string
+ *
+ * @param void
+ * @return String result string
+ */
+
+ public String getReturnMessage() {
+ return returnMessage;
+ }
+
+ /**
+ * This function set the returnMessage string
+ *
+ * @param String
+ */
+ public void setReturnMessage(String aReturnMessage) {
+ returnMessage = aReturnMessage;
+ }
+
+ /**
+ * This function returns the callBackCount variable
+ *
+ * @return Integer callBackCount variable
+ */
+ public int getCallBackCount() {
+ return callBackCount;
+ }
+
+ /**
+ * This function increments callBackCount variable by 1
+ */
+ public void incrementCallBackCount() {
+ callBackCount++;
+ }
+
+ /**
+ * This function prints a message synched with setReturnMessage function
+ *
+ * @param String
+ */
+ public void callBackMessage(String aString) {
+ System.out.println("Entering callback callBackMessage: " + aString);
+ synchronized (monitor) {
+ this.setReturnMessage(aString);
+ monitor.notify();
+ }
+ }
+
+ /**
+ * This function prints a message synched with incrementCallBackCount function
+ *
+ * @param String
+ */
+ public void callBackIncrement(String aString) {
+ System.out.println("Entering callback increment: " + aString);
+ synchronized (monitor) {
+ this.incrementCallBackCount();
+ monitor.notify();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiService.java
new file mode 100644
index 0000000000..afb7c45e2c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiService.java
@@ -0,0 +1,50 @@
+/*
+ * 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.test;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+@Callback(CallBackApiCallBack.class)
+/**
+ *
+ */
+public interface CallBackApiService {
+ /**
+ * This function is defined in CallBackApiServiceImpl
+ */
+ void knockKnock(String aString);
+
+ /**
+ * This function is defined in CallBackApiServiceImpl
+ */
+ void knockKnockByRef(String aString);
+
+ /**
+ * This function is defined in CallBackApiServiceImpl
+ */
+ void noCallBack(String aString);
+
+ /**
+ * This function is defined in CallBackApiServiceImpl
+ */
+ void multiCallBack(String aString);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiServiceImpl.java
new file mode 100644
index 0000000000..44f57b4316
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiServiceImpl.java
@@ -0,0 +1,113 @@
+/*
+ * 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.test;
+
+import org.oasisopen.sca.ComponentContext;
+import org.oasisopen.sca.RequestContext;
+import org.oasisopen.sca.ServiceReference;
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Context;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(CallBackApiService.class)
+public class CallBackApiServiceImpl implements CallBackApiService {
+
+ @Context
+ protected ComponentContext componentContext;
+ /**
+ * Object of CallBackApiCallBack class
+ */
+ private CallBackApiCallBack callback;
+
+ @Callback
+ protected ServiceReference<CallBackApiCallBack> callbackRef;
+
+ /**
+ * This function get an object of CallBackApiServiceImpl by calling getCallBackInterface function and calls the
+ * callBackMessage function.
+ *
+ * @param aString String passed by a function call
+ */
+
+ public void knockKnock(String aString) {
+
+ System.out.println("CallBackApiServiceImpl message received: " + aString);
+ callback = this.getCallBackInterface();
+ callback.callBackMessage("Who's There");
+ System.out.println("CallBackApiServiceImpl response sent");
+ }
+
+ /**
+ * This function calls the callBackMessage function. <br>
+ * The reference to this function is received from Call back reference to the class CallBackApiService.
+ *
+ * @param aString String passed by a function call
+ */
+ public void knockKnockByRef(String aString) {
+
+ System.out.println("CallBackApiServiceImpl message received: " + aString);
+ callbackRef.getService().callBackMessage("Who's There");
+ System.out.println("CallBackApiServiceImpl response sent");
+ }
+
+ /**
+ * This function get an object of CallBackApiServiceImpl by calling getCallBackInterface function. <br>
+ * This function then places multiple callBack using the callbackIncrement function defined in
+ * callBack.ApiServiceImpl
+ *
+ * @param aString String passed by a function call
+ */
+ public void multiCallBack(String aString) {
+
+ callback = this.getCallBackInterface();
+
+ System.out.println("CallBackApiServiceImpl message received: " + aString);
+ callback.callBackIncrement("Who's There 1");
+ System.out.println("CallBackApiServiceImpl response sent");
+ callback.callBackIncrement("Who's There 2");
+ System.out.println("CallBackApiServiceImpl response sent");
+ callback.callBackIncrement("Who's There 3");
+ System.out.println("CallBackApiServiceImpl response sent");
+ }
+
+ /**
+ * This function does not callBack any function.
+ *
+ * @param aString String passed by a function call
+ */
+ public void noCallBack(String aString) {
+ System.out.println("CallBackApiServiceImpl message received: " + aString);
+ }
+
+ /**
+ * This function get an object of CallBackApiServiceImpl from the present componentContext
+ *
+ * @param void
+ */
+ private CallBackApiCallBack getCallBackInterface() {
+ System.out.println("CallBackApiServiceImpl getting request context");
+ RequestContext rc = componentContext.getRequestContext();
+ System.out.println("CallBackApiServiceImpl getting callback from request context");
+ callback = rc.getCallback();
+ System.out.println("CallBackApiServiceImpl returning callback");
+ return callback;
+
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/main/resources/CallBackApiTest.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/main/resources/CallBackApiTest.composite
new file mode 100644
index 0000000000..a67233665c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/main/resources/CallBackApiTest.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://callback"
+ name="CallBackApiTest">
+
+ <component name="CallBackApiClient">
+ <implementation.java class="org.apache.tuscany.sca.test.CallBackApiClientImpl"/>
+ <reference name="aCallBackService" target="CallBackApiService"/>
+ </component>
+
+ <component name="CallBackApiService">
+ <implementation.java class="org.apache.tuscany.sca.test.CallBackApiServiceImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..b1a01e9f7b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/main/resources/META-INF/sca-contribution.xml
@@ -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:t="http://callback">
+ <deployable composite="t:CallBackApiTest" />
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/test/java/org/apache/tuscany/sca/test/CallBackApiTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/test/java/org/apache/tuscany/sca/test/CallBackApiTestCase.java
new file mode 100644
index 0000000000..75fab95efb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-api/src/test/java/org/apache/tuscany/sca/test/CallBackApiTestCase.java
@@ -0,0 +1,70 @@
+/*
+ * 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.test;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class CallBackApiTestCase {
+
+ private static Node node;
+ private CallBackApiClient aCallBackClient;
+
+ /**
+ * This function uses the Instance of CallBackApiClient.class <br>
+ * This function calls the run function defined in the CallBackApiClinet Interface <br>
+ * which in turn executes the following test cases. <br>
+ * 1. Basic callback patterns <br>
+ * 2. Test in which the target does not call back to the client <br>
+ * 3. Test in which the target calls back multiple times to the client.
+ */
+ @Test
+ public void testCallBackBasic() {
+ aCallBackClient = node.getService(CallBackApiClient.class, "CallBackApiClient");
+ aCallBackClient.run();
+ }
+
+ /**
+ * This function creates the Node instance and gets an Instance of CallBackApiClient.class
+ */
+
+ @BeforeClass
+ public static void setUp() throws Exception {
+ if (node == null) {
+ String location = ContributionLocationHelper.getContributionLocation("CallBackApiTest.composite");
+ node = NodeFactory.newInstance().createNode("CallBackApiTest.composite", new Contribution("c1", location));
+ node.start();
+ }
+ }
+
+ /**
+ * This function destroys the Node instance that was created in setUp()
+ */
+
+ @AfterClass
+ public static void tearDown() throws Exception {
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/pom.xml
new file mode 100644
index 0000000000..a59d4ff6c1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/pom.xml
@@ -0,0 +1,45 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-callback-basic</artifactId>
+ <name>Apache Tuscany SCA iTest Callback Basic</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ </dependencies>
+
+ <properties>
+ <was.ant.script>${basedir}/../build-was-integration.xml</was.ant.script>
+ <was.python.script>${basedir}/../wasAdmin.py</was.python.script>
+ </properties>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java
new file mode 100644
index 0000000000..291a72b9d6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.test;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+/**
+ *
+ */
+public interface CallBackBasicCallBack {
+
+ void callBackMessage(String aString);
+
+ void callBackIncrement(String aString);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java
new file mode 100644
index 0000000000..19f366c423
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java
@@ -0,0 +1,28 @@
+/*
+ * 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.test;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface CallBackBasicClient {
+
+ void run();
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java
new file mode 100644
index 0000000000..4bb6b29a8d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java
@@ -0,0 +1,129 @@
+/*
+ * 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.test;
+
+import org.junit.Assert;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(CallBackBasicClient.class)
+public class CallBackBasicClientImpl implements CallBackBasicClient, CallBackBasicCallBack {
+
+ @Reference
+ protected CallBackBasicService aCallBackService;
+ private static String returnMessage = null;
+ private static int callBackCount = 0;
+ private static Object monitor = new Object();
+
+ public void run() {
+
+ // This tests basic callback patterns.
+
+ // Test1 is the basic callback where the target calls back prior to
+ // returning to the client.
+ test1a();
+
+ // Test2 is where the target does not call back to the client.
+ test1b();
+
+ // Test3 is where the target calls back multiple times to the client.
+ test1c();
+ }
+
+ private void test1a() {
+ aCallBackService.knockKnock("Knock Knock");
+ int count = 0;
+
+ //
+ // If we can't get a response in 30 seconds consider this a failure
+ //
+
+ synchronized (monitor) {
+ while (returnMessage == null && count++ < 30) {
+ try {
+ monitor.wait(1000L);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ Assert.assertEquals("CallBackBasicITest - test1a", "Who's There", this.getReturnMessage());
+
+ }
+
+ private void test1b() {
+ aCallBackService.noCallBack("No Reply Desired");
+ Assert.assertEquals("CallBackBasicITest - test1b", 1, 1);
+ }
+
+ private void test1c() {
+ aCallBackService.multiCallBack("Call me back 3 times");
+ int count = 0;
+
+ //
+ // If we can't get a response in 30 seconds consider this a failure
+ //
+
+ synchronized (monitor) {
+ while (this.getCallBackCount() < 3 && count++ < 30) {
+ try {
+ monitor.wait(1000L);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ Assert.assertEquals("CallBackBasicITest - test1c", 3, this.getCallBackCount());
+ }
+
+ public String getReturnMessage() {
+ return returnMessage;
+ }
+
+ public void setReturnMessage(String aReturnMessage) {
+ returnMessage = aReturnMessage;
+ }
+
+ public int getCallBackCount() {
+ return callBackCount;
+ }
+
+ public void incrementCallBackCount() {
+ callBackCount++;
+ }
+
+ public void callBackMessage(String aString) {
+ System.out.println("Entering callback callBackMessage: " + aString);
+ synchronized (monitor) {
+ this.setReturnMessage(aString);
+ monitor.notify();
+ }
+ }
+
+ public void callBackIncrement(String aString) {
+ System.out.println("Entering callback increment: " + aString);
+ synchronized (monitor) {
+ this.incrementCallBackCount();
+ monitor.notify();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java
new file mode 100644
index 0000000000..5396879e83
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.test;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+@Callback(CallBackBasicCallBack.class)
+/**
+ *
+ */
+public interface CallBackBasicService {
+
+ void knockKnock(String aString);
+
+ void noCallBack(String aString);
+
+ void multiCallBack(String aString);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java
new file mode 100644
index 0000000000..07010f61e1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java
@@ -0,0 +1,56 @@
+/*
+ * 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.test;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(CallBackBasicService.class)
+public class CallBackBasicServiceImpl implements CallBackBasicService {
+
+ @Callback
+ protected CallBackBasicCallBack callback;
+
+ public void knockKnock(String aString) {
+
+ System.out.println("CallBackBasicServiceImpl message received: " + aString);
+ callback.callBackMessage("Who's There");
+ System.out.println("CallBackBasicServiceImpl response sent");
+
+ }
+
+ public void multiCallBack(String aString) {
+
+ System.out.println("CallBackBasicServiceImpl message received: " + aString);
+ callback.callBackIncrement("Who's There 1");
+ System.out.println("CallBackBasicServiceImpl response sent");
+ callback.callBackIncrement("Who's There 2");
+ System.out.println("CallBackBasicServiceImpl response sent");
+ callback.callBackIncrement("Who's There 3");
+ System.out.println("CallBackBasicServiceImpl response sent");
+
+ }
+
+ public void noCallBack(String aString) {
+
+ System.out.println("CallBackBasicServiceImpl message received: " + aString);
+ // System.out.println("CallBackBasicServiceImpl No response desired");
+
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/main/resources/CallBackBasicTest.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/main/resources/CallBackBasicTest.composite
new file mode 100644
index 0000000000..5339e9952e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/main/resources/CallBackBasicTest.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://callback"
+ name="CallBackBasicTest">
+
+ <component name="CallBackBasicClient">
+ <implementation.java class="org.apache.tuscany.sca.test.CallBackBasicClientImpl"/>
+ <reference name="aCallBackService" target="CallBackBasicService"/>
+ </component>
+
+ <component name="CallBackBasicService">
+ <implementation.java class="org.apache.tuscany.sca.test.CallBackBasicServiceImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..d36d7478e2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/main/resources/META-INF/sca-contribution.xml
@@ -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:t="http://callback">
+ <deployable composite="t:CallBackBasicTest" />
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java
new file mode 100644
index 0000000000..43b812faed
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-basic/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java
@@ -0,0 +1,56 @@
+/*
+ * 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.test;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+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;
+
+public class CallBackBasicTestCase {
+
+ private static Node node;
+ private CallBackBasicClient aCallBackClient;
+
+ @Test
+ public void testCallBackBasic() {
+ aCallBackClient.run();
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ if (node == null) {
+ String location = ContributionLocationHelper.getContributionLocation("CallBackBasicTest.composite");
+ node = NodeFactory.newInstance().createNode("CallBackBasicTest.composite", new Contribution("c1", location));
+ node.start();
+ }
+
+ aCallBackClient = node.getService(CallBackBasicClient.class, "CallBackBasicClient");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/pom.xml
new file mode 100644
index 0000000000..1289f9b8df
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/pom.xml
@@ -0,0 +1,40 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-callback-complex-type</artifactId>
+ <name>Apache Tuscany SCA iTest Callback Complex Type</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeCallBack.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeCallBack.java
new file mode 100644
index 0000000000..627d37e27d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeCallBack.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.test;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+/**
+ *
+ */
+public interface CallBackCTypeCallBack {
+
+ void callBackMessage(String aString);
+
+ void callBackIncrement(String aString);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClient.java
new file mode 100644
index 0000000000..966ad17b9a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClient.java
@@ -0,0 +1,28 @@
+/*
+ * 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.test;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface CallBackCTypeClient {
+
+ void run();
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClientImpl.java
new file mode 100644
index 0000000000..d2dc0add75
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClientImpl.java
@@ -0,0 +1,138 @@
+/*
+ * 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.test;
+
+import org.junit.Assert;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(CallBackCTypeClient.class)
+public class CallBackCTypeClientImpl implements CallBackCTypeClient, CallBackCTypeCallBack {
+
+ @Reference
+ protected CallBackCTypeService aCallBackService;
+ private static String returnMessage = null;
+ private static int callBackCount = 0;
+ private static Object monitor = new Object();
+
+ public CallBackCTypeClientImpl() {
+ }
+
+ public void run() {
+
+ // This test is the same as the Basic Callback except it uses a
+ // componentType side file.
+ // This test currently fails because the integration test environment
+ // does not properly copy
+ // the componentType files to the target folder. This is documented in
+ // Tuscany-967.
+
+ // Test12a is the basic callback where the target calls back prior to
+ // returning to the client.
+ test12a();
+
+ // Test12b is where the target does not call back to the client.
+ test12b();
+
+ // Test12c is where the target calls back multiple times to the client.
+ test12c();
+
+ }
+
+ private void test12a() {
+ aCallBackService.knockKnock("Knock Knock");
+ int count = 0;
+
+ //
+ // If we can't get a response in 30 seconds consider this a failure
+ //
+
+ synchronized (monitor) {
+ while (returnMessage == null && count++ < 30) {
+ try {
+ monitor.wait(1000L);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ Assert.assertEquals("CallBackBasicITest - test12a -", "Who's There", this.getReturnMessage());
+
+ }
+
+ private void test12b() {
+ aCallBackService.noCallBack("No Reply Desired");
+ Assert.assertEquals("CallBackBasicITest - test12b -", 1, 1);
+ }
+
+ private void test12c() {
+ aCallBackService.multiCallBack("Call me back 3 times");
+ int count = 0;
+
+ //
+ // If we can't get a response in 30 seconds consider this a failure
+ //
+
+ synchronized (monitor) {
+ while (this.getCallBackCount() < 3 && count++ < 30) {
+ try {
+ monitor.wait(1000L);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ Assert.assertEquals("CallBackBasicITest - test12c -", 3, this.getCallBackCount());
+ }
+
+ public String getReturnMessage() {
+ return returnMessage;
+ }
+
+ public void setReturnMessage(String aReturnMessage) {
+ returnMessage = aReturnMessage;
+ }
+
+ public int getCallBackCount() {
+ return callBackCount;
+ }
+
+ public void incrementCallBackCount() {
+ callBackCount++;
+ }
+
+ public void callBackMessage(String aString) {
+ System.out.println("Entering callback callBackMessage: " + aString);
+ synchronized (monitor) {
+ this.setReturnMessage(aString);
+ monitor.notify();
+ }
+ }
+
+ public void callBackIncrement(String aString) {
+ System.out.println("Entering callback increment: " + aString);
+ synchronized (monitor) {
+ this.incrementCallBackCount();
+ monitor.notify();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeService.java
new file mode 100644
index 0000000000..32ab1bdd3e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeService.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.test;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+@Callback(CallBackCTypeCallBack.class)
+/**
+ *
+ */
+public interface CallBackCTypeService {
+
+ void knockKnock(String aString);
+
+ void noCallBack(String aString);
+
+ void multiCallBack(String aString);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.java
new file mode 100644
index 0000000000..f7a1a195ed
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.java
@@ -0,0 +1,59 @@
+/*
+ * 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.test;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(CallBackCTypeService.class)
+public class CallBackCTypeServiceImpl implements CallBackCTypeService {
+
+ @Callback
+ protected CallBackCTypeCallBack callback;
+
+ public CallBackCTypeServiceImpl() {
+ }
+
+ public void knockKnock(String aString) {
+
+ System.out.println("CallBackCTypeServiceImpl message received: " + aString);
+ callback.callBackMessage("Who's There");
+ System.out.println("CallBackCTypeServiceImpl response sent");
+
+ }
+
+ public void multiCallBack(String aString) {
+
+ System.out.println("CallBackCTypeServiceImpl message received: " + aString);
+ callback.callBackIncrement("Who's There 1");
+ System.out.println("CallBackCTypeServiceImpl response sent");
+ callback.callBackIncrement("Who's There 2");
+ System.out.println("CallBackCTypeServiceImpl response sent");
+ callback.callBackIncrement("Who's There 3");
+ System.out.println("CallBackCTypeServiceImpl response sent");
+
+ }
+
+ public void noCallBack(String aString) {
+
+ System.out.println("CallBackCTypeServiceImpl message received: " + aString);
+ System.out.println("CallBackCTypeServiceImpl No response desired");
+
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/main/resources/CallBackCTypeClient.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/main/resources/CallBackCTypeClient.composite
new file mode 100644
index 0000000000..9730c294d6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/main/resources/CallBackCTypeClient.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://callback"
+ name="CallBackCTypeTest">
+
+ <component name="CallBackCTypeClient">
+ <implementation.java class="org.apache.tuscany.sca.test.CallBackCTypeClientImpl"/>
+ <reference name="aCallBackService" target="CallBackCTypeService"/>
+ </component>
+
+ <component name="CallBackCTypeService">
+ <implementation.java class="org.apache.tuscany.sca.test.CallBackCTypeServiceImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/main/resources/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.componentType b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/main/resources/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.componentType
new file mode 100644
index 0000000000..11e748675d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/main/resources/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.componentType
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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.
+-->
+<componentType xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" >
+
+ <service name="CallBackCTypeService">
+ <interface.java interface="org.apache.tuscany.sca.test.CallBackCTypeService"
+ callbackInterface="org.apache.tuscany.sca.test.CallBackCTypeCallBack"/>
+ </service>
+
+</componentType>
+ \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/test/java/org/apache/tuscany/sca/test/CallBackCTypeTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/test/java/org/apache/tuscany/sca/test/CallBackCTypeTestCase.java
new file mode 100644
index 0000000000..dde489d766
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-complex-type/src/test/java/org/apache/tuscany/sca/test/CallBackCTypeTestCase.java
@@ -0,0 +1,54 @@
+/*
+ * 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.test;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+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;
+
+public class CallBackCTypeTestCase {
+
+ private Node node;
+ private CallBackCTypeClient aCallBackClient;
+
+ @Test
+ public void testCallBackBasic() {
+ aCallBackClient.run();
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ String location = ContributionLocationHelper.getContributionLocation("CallBackCTypeClient.composite");
+ node =
+ NodeFactory.newInstance().createNode("CallBackCTypeClient.composite", new Contribution("c1", location))
+ .start();
+
+ aCallBackClient = node.getService(CallBackCTypeClient.class, "CallBackCTypeClient");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/pom.xml
new file mode 100644
index 0000000000..45e38ac480
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/pom.xml
@@ -0,0 +1,39 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-callback-multiple-wires</artifactId>
+ <name>Apache Tuscany SCA iTest Callback With Mutiple Wires</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClient.java
new file mode 100644
index 0000000000..7c80d222fc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClient.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.test.callback;
+
+/**
+ * The client interface
+ */
+public interface MyClient {
+
+ void aClientMethod();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl1.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl1.java
new file mode 100644
index 0000000000..c3ea6c3032
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl1.java
@@ -0,0 +1,49 @@
+/*
+ * 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.test.callback;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Scope;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * Demonstrates a component-to-component callback invocation
+ */
+@Service(MyClient.class)
+@Scope("COMPOSITE")
+public class MyClientImpl1 implements MyClient, MyServiceCallback {
+
+ private MyService myService;
+ static String result;
+
+ @Reference
+ public void setMyService(MyService myService) {
+ this.myService = myService;
+ }
+
+ public void aClientMethod() {
+ myService.someMethod("-> someMethod1");
+ }
+
+ public void receiveResult(String result) {
+ System.out.println("Work thread " + Thread.currentThread());
+ System.out.println("Result in client1: " + result);
+ MyClientImpl1.result = result;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl2.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl2.java
new file mode 100644
index 0000000000..84ca158c97
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl2.java
@@ -0,0 +1,49 @@
+/*
+ * 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.test.callback;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Scope;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * Demonstrates a component-to-component callback invocation
+ */
+@Service(MyClient.class)
+@Scope("COMPOSITE")
+public class MyClientImpl2 implements MyClient, MyServiceCallback {
+
+ private MyService myService;
+ static String result;
+
+ @Reference
+ public void setMyService(MyService myService) {
+ this.myService = myService;
+ }
+
+ public void aClientMethod() {
+ myService.someMethod("-> someMethod2");
+ }
+
+ public void receiveResult(String result) {
+ System.out.println("Work thread " + Thread.currentThread());
+ System.out.println("Result in client2: " + result);
+ MyClientImpl2.result = result;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyService.java
new file mode 100644
index 0000000000..66758a1e73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyService.java
@@ -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.test.callback;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.OneWay;
+
+/**
+ * This service that will be invoked in a non-blocking fashion
+ */
+@Callback(MyServiceCallback.class)
+public interface MyService {
+
+ @OneWay
+ void someMethod(String arg);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceCallback.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceCallback.java
new file mode 100644
index 0000000000..f198efae51
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceCallback.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.test.callback;
+
+/**
+ * The callback interface for {@link MyService}.
+ */
+public interface MyServiceCallback {
+
+ void receiveResult(String result);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceImpl.java
new file mode 100644
index 0000000000..150937dfc5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceImpl.java
@@ -0,0 +1,50 @@
+/*
+ * 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.test.callback;
+
+import org.oasisopen.sca.RequestContext;
+import org.oasisopen.sca.annotation.Context;
+import org.oasisopen.sca.annotation.Scope;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements MyService and uses a callback.
+ *
+ * In this scenario, we explore using the RequestContext to retrieve the callBack reference
+ * as @Callback injection is not performed for composite-scoped implementations (see JavaCAA Section 7.2.5)
+ *
+ * Changing the service implementation to be @Scope("STATELESS") would make plain @Callback injection work
+ */
+@Service(MyService.class)
+@Scope("COMPOSITE")
+public class MyServiceImpl implements MyService {
+
+ @Context
+ protected RequestContext requestContext;
+
+ public void someMethod(String arg) {
+ // invoke the callback
+ try {
+ MyServiceCallback myServiceCallback = requestContext.getCallback();
+ myServiceCallback.receiveResult(arg + " -> receiveResult");
+ } catch (RuntimeException e) {
+ System.out.println("RuntimeException invoking receiveResult: " + e.toString());
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/main/resources/CallbackMultiWireTest.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/main/resources/CallbackMultiWireTest.composite
new file mode 100644
index 0000000000..9fe62ac671
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/main/resources/CallbackMultiWireTest.composite
@@ -0,0 +1,38 @@
+<?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"
+ targetNamespace="http://callback"
+ name="CallbackMultiWireTest">
+
+ <component name="MyClientComponent1">
+ <implementation.java class="org.apache.tuscany.sca.test.callback.MyClientImpl1"/>
+ <reference name="myService" target="MyServiceComponent"/>
+ </component>
+
+ <component name="MyClientComponent2">
+ <implementation.java class="org.apache.tuscany.sca.test.callback.MyClientImpl2"/>
+ <reference name="myService" target="MyServiceComponent"/>
+ </component>
+
+ <component name="MyServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.test.callback.MyServiceImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/test/java/org/apache/tuscany/sca/test/callback/CallbackMultiWireTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/test/java/org/apache/tuscany/sca/test/callback/CallbackMultiWireTestCase.java
new file mode 100644
index 0000000000..bd3cce74b4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-multiple-wires/src/test/java/org/apache/tuscany/sca/test/callback/CallbackMultiWireTestCase.java
@@ -0,0 +1,64 @@
+/*
+ * 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.test.callback;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+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;
+
+/**
+ * A TestCase that demonstrates resolving the client service and initiating the callback sequence
+ */
+public class CallbackMultiWireTestCase {
+
+ private Node node;
+ private MyClient myClient1;
+ private MyClient myClient2;
+
+ @Before
+ public void setUp() throws Exception {
+ String location = ContributionLocationHelper.getContributionLocation("CallbackMultiWireTest.composite");
+ node = NodeFactory.newInstance().createNode("CallbackMultiWireTest.composite", new Contribution("c1", location));
+ node.start();
+ myClient1 = node.getService(MyClient.class, "MyClientComponent1");
+ myClient2 = node.getService(MyClient.class, "MyClientComponent2");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void test() throws Exception {
+ System.out.println("Main thread " + Thread.currentThread());
+ myClient1.aClientMethod();
+ myClient2.aClientMethod();
+ System.out.println("Sleeping ...");
+ Thread.sleep(300);
+ assertEquals("-> someMethod1 -> receiveResult", MyClientImpl1.result);
+ assertEquals("-> someMethod2 -> receiveResult", MyClientImpl2.result);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/pom.xml
new file mode 100644
index 0000000000..e6ada6029a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/pom.xml
@@ -0,0 +1,39 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-callback-separatethread</artifactId>
+ <name>Apache Tuscany SCA iTest Callback Using Separate Thread</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadClient.java
new file mode 100644
index 0000000000..dc66003604
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadClient.java
@@ -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.itest;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the client interface for the call backs in a separate thread tests
+ */
+@Remotable
+public interface CallBackSeparateThreadClient {
+
+ /**
+ * This tests call back patterns using separate threads.
+ */
+ void runTests();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadClientImpl.java
new file mode 100644
index 0000000000..f03144db8a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadClientImpl.java
@@ -0,0 +1,186 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.junit.Assert;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This is the client implementation for the call backs in a separate thread tests
+ */
+@Service(CallBackSeparateThreadClient.class)
+public class CallBackSeparateThreadClientImpl implements CallBackSeparateThreadClient, EventProcessorCallBack {
+ /**
+ * Max time to wait to receive events. If not all the events are received then timeout.
+ */
+ private static final int TIMEOUT = 30 * 1000;
+
+ /**
+ * Counts the number of fast call backs.
+ */
+ private static final AtomicInteger FAST_CALLBACK_COUNT = new AtomicInteger();
+
+ /**
+ * Counts the number of slow call backs.
+ */
+ private static final AtomicInteger SLOW_CALLBACK_COUNT = new AtomicInteger();
+
+ /**
+ * This is our injected reference to the EventProcessorService
+ */
+ @Reference
+ protected EventProcessorService aCallBackService;
+
+ /**
+ * This tests call back patterns using separate threads.
+ */
+ public void runTests() {
+ try {
+ // Register for fast call back
+ registerForFastCallback();
+
+ // Wait for a few fast call backs
+ System.out.println("Waiting for some fast call backs");
+ waitForSomeFastCallbacks();
+
+ try {
+ // Register for slow call back
+ registerForSlowCallback();
+
+ // Wait for a few fast call backs
+ System.out.println("Waiting for some fast calls");
+ waitForSomeFastCallbacks();
+
+ // Wait for a few slow call backs
+ System.out.println("Waiting for some slow calls");
+ waitForSomeSlowCallbacks();
+ } finally {
+ unregisterForSlowCallback();
+ }
+
+ System.out.println("Done");
+ } finally {
+ unregisterForFastCallback();
+ }
+ }
+
+ /**
+ * Waits for some fast call backs to be fired
+ */
+ private void waitForSomeFastCallbacks() {
+ // Reset the fast call back count
+ FAST_CALLBACK_COUNT.set(0);
+
+ // Wait until we have 10 fast call backs or timeout occurs
+ final long start = System.currentTimeMillis();
+ do {
+ if (FAST_CALLBACK_COUNT.get() >= 10) {
+ System.out.println("Received enough fast notifications");
+ return;
+ }
+
+ try {
+ Thread.sleep(5);
+ } catch (InterruptedException e) {
+ Assert.fail("Unexpeceted exception " + e);
+ }
+ } while (System.currentTimeMillis() - start < TIMEOUT);
+
+ // If we get to here then we did not receive enough events
+ Assert.fail("Did not receive enough fast events");
+ }
+
+ /**
+ * Waits for some slow call backs to be fired
+ */
+ private void waitForSomeSlowCallbacks() {
+ // Reset the slow call back count
+ SLOW_CALLBACK_COUNT.set(0);
+
+ // Wait until we have 4 slow call backs or timeout
+ final long start = System.currentTimeMillis();
+ do {
+ if (SLOW_CALLBACK_COUNT.get() >= 4) {
+ System.out.println("Received enough slow notifications");
+ return;
+ }
+
+ try {
+ Thread.sleep(5);
+ } catch (InterruptedException e) {
+ Assert.fail("Unexpeceted exception " + e);
+ }
+ } while (System.currentTimeMillis() - start < TIMEOUT);
+
+ // If we get to here then we did not receive enough events
+ Assert.fail("Did not receive enough slow events");
+ }
+
+ /**
+ * Register to receive fast call backs
+ */
+ private void registerForFastCallback() {
+ aCallBackService.registerForEvent("FAST");
+ }
+
+ /**
+ * Register to receive slow call backs
+ */
+ private void registerForSlowCallback() {
+ aCallBackService.registerForEvent("SLOW");
+ }
+
+ /**
+ * Unregister to receive fast call backs
+ */
+ private void unregisterForFastCallback() {
+ aCallBackService.unregisterForEvent("FAST");
+ }
+
+ /**
+ * Unregister to receive slow call backs
+ */
+ private void unregisterForSlowCallback() {
+ aCallBackService.unregisterForEvent("SLOW");
+ }
+
+ /**
+ * Method that is called when an Event is delivered.
+ *
+ * @param aEventName The name of the Event
+ * @param aEventData The Event data
+ */
+ public void eventNotification(String aEventName, Object aEventData) {
+ // System.out.println("Received Event : " + aEventName + " " + aEventData);
+
+ if (aEventName.equals("FAST")) {
+ final int newValue = FAST_CALLBACK_COUNT.incrementAndGet();
+ //System.out.println("Received total of " + newValue + " fast call backs");
+ } else if (aEventName.equals("SLOW")) {
+ final int newValue = SLOW_CALLBACK_COUNT.incrementAndGet();
+ //System.out.println("Received total of " + newValue + " slow call backs");
+ } else {
+ System.out.println("Unknown event type of " + aEventName);
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorCallBack.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorCallBack.java
new file mode 100644
index 0000000000..137ea6a658
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorCallBack.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * The call back interface for the EventProcessorService that is implemented
+ * by the client to receive event notifications
+ */
+@Remotable
+public interface EventProcessorCallBack {
+ /**
+ * Call back notifying client of an Event
+ *
+ * @param aEventName The name of the Event
+ * @param aEventData The data for the Event
+ */
+ void eventNotification(String aEventName, Object aEventData);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorService.java
new file mode 100644
index 0000000000..4bf05fc925
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorService.java
@@ -0,0 +1,45 @@
+/*
+ * 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.itest;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * Sample Event Processor Service
+ */
+@Callback(EventProcessorCallBack.class)
+@Remotable
+public interface EventProcessorService {
+
+ /**
+ * Registers the client to receive notifications for the specified event
+ *
+ * @param aEventName The name of the Event to register
+ */
+ void registerForEvent(String aEventName);
+
+ /**
+ * Unregisters the client so it no longer receives notifications for the specified event
+ *
+ * @param aEventName The name of the Event to unregister
+ */
+ void unregisterForEvent(String aEventName);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorServiceImpl.java
new file mode 100644
index 0000000000..0805b96875
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/src/main/java/org/apache/tuscany/sca/itest/EventProcessorServiceImpl.java
@@ -0,0 +1,217 @@
+/*
+ * 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.itest;
+
+import java.util.Map;
+import java.util.Timer;
+import java.util.TimerTask;
+import java.util.UUID;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.oasisopen.sca.ComponentContext;
+import org.oasisopen.sca.RequestContext;
+import org.oasisopen.sca.ServiceReference;
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Context;
+import org.oasisopen.sca.annotation.Destroy;
+import org.oasisopen.sca.annotation.Scope;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * Sample Event Processor Service Implementation
+ */
+@Service(EventProcessorService.class)
+@Scope("COMPOSITE")
+public class EventProcessorServiceImpl implements EventProcessorService {
+
+ /**
+ * Reference to the callback
+ *
+ * **NB** This test makes the *DANGEROUS* assumption that there is only one client to
+ * this component and thus only one callback location. For a "real" COMPOSITE component,
+ * each client would need to be uniquely identified - this would need to be done using something
+ * like an ID on the service methods, which could be set by the client and used to identify
+ * a "session"
+ */
+ private ServiceReference<EventProcessorCallBack> clientCallback = null;
+
+ /**
+ * Component context (injected)
+ */
+ @Context
+ protected ComponentContext componentContext;
+
+ /**
+ * This map contains the call backs for each of the registered Event names
+ */
+ private final Map<String, ServiceReference<EventProcessorCallBack>> eventListeners;
+
+ /**
+ * The list of all Event Generators we create
+ */
+ private final EventGenerator[] allEventGenerators;
+
+ /**
+ * Constructor. Starts the Event Generators
+ */
+ public EventProcessorServiceImpl() {
+ eventListeners = new ConcurrentHashMap<String, ServiceReference<EventProcessorCallBack>>();
+
+ // We will simulate an Event generator
+ allEventGenerators = new EventGenerator[2];
+ allEventGenerators[0] = new EventGenerator("FAST", 10); // Generate the FAST event every 10ms
+ allEventGenerators[1] = new EventGenerator("SLOW", 50); // Generate the SLOW event every 50ms
+ }
+
+ /**
+ * Registers the client to receive notifications for the specified event
+ *
+ * @param aEventName The name of the Event to register
+ */
+ public void registerForEvent(String aEventName) {
+ // Register for the Event
+ eventListeners.put(aEventName, getClientCallback());
+
+ // Send the "register" started event to the client
+ receiveEvent(aEventName, "SameThread: Registered to receive notifications for " + aEventName);
+ }
+
+ private ServiceReference<EventProcessorCallBack> getClientCallback() {
+ if(clientCallback == null) {
+ RequestContext requestContext = componentContext.getRequestContext();
+ clientCallback = requestContext.getCallbackReference();
+ }
+ return clientCallback;
+ } // end method getClientCallback
+
+ /**
+ * Unregisters the client so it no longer receives notifications for the specified event
+ *
+ * @param aEventName The name of the Event to unregister
+ */
+ public void unregisterForEvent(String aEventName) {
+ // Send the "register" started event to the client
+ receiveEvent(aEventName, "SameThread: Unregister from receiving notifications for " + aEventName);
+
+ eventListeners.remove(aEventName);
+ }
+
+ /**
+ * This method is called whenever the EventProcessorService receives an Event
+ *
+ * @param aEventName The name of the Event received
+ * @param aEventData The Event data
+ */
+ private void receiveEvent(String aEventName, Object aEventData) {
+ // Get the listener for the Event
+ final ServiceReference<EventProcessorCallBack> callback = eventListeners.get(aEventName);
+ if (callback == null) {
+ //System.out.println("No registered listeners for " + aEventName);
+ return;
+ }
+
+ // Trigger the call back
+ // System.out.println("Notifying " + callback + " of event " + aEventName);
+ callback.getService().eventNotification(aEventName, aEventData);
+ // System.out.println("Done notify " + callback + " of event " + aEventName);
+ }
+
+ /**
+ * Shuts down the Event Processor
+ */
+ @Destroy
+ public void shutdown() {
+ System.out.println("Shutting down the EventProcessor");
+
+ // Clear list of call back locations as we don't want to send any more notifications
+ eventListeners.clear();
+
+ // Stop the Event Generators
+ for (EventGenerator generator : allEventGenerators) {
+ generator.stop();
+ }
+ }
+
+ /**
+ * Utility class for generating Events
+ */
+ private final class EventGenerator {
+ /**
+ * The Timer we are using to generate the events
+ */
+ private final Timer timer = new Timer();
+
+ /**
+ * Lock object to ensure that we can cancel the timer cleanly.
+ */
+ private final Object lock = new Object();
+
+ /**
+ * Constructor
+ *
+ * @param aEventName The name of the Event to generate
+ * @param frequencyInMilliseconds How frequently we should generate the Events
+ */
+ private EventGenerator(String aEventName, int frequencyInMilliseconds) {
+ timer.schedule(new EventGeneratorTimerTask(aEventName),
+ frequencyInMilliseconds,
+ frequencyInMilliseconds);
+ }
+
+ /**
+ * Stop this Event Generator
+ */
+ private void stop() {
+ synchronized (lock) {
+ timer.cancel();
+ }
+ }
+
+ /**
+ * The TimerTask that is invoked by the Timer for the EventGenerator
+ */
+ private final class EventGeneratorTimerTask extends TimerTask {
+ /**
+ * The name of the Event we should generate
+ */
+ private final String eventName;
+
+ /**
+ * Constructor
+ *
+ * @param aEventName The name of the Event we should generate
+ */
+ private EventGeneratorTimerTask(String aEventName) {
+ eventName = aEventName;
+ }
+
+ /**
+ * Timer calls this method and it will generate an Event
+ */
+
+ public void run() {
+ synchronized(lock) {
+ // System.out.println("Generating new event " + eventName);
+ receiveEvent(eventName, "Separate Thread Notification: " + UUID.randomUUID().toString());
+ }
+ }
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/src/main/resources/CallBackSeparateThreadTest.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/src/main/resources/CallBackSeparateThreadTest.composite
new file mode 100644
index 0000000000..b10f3bc771
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/src/main/resources/CallBackSeparateThreadTest.composite
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" targetNamespace="http://callback" name="CallBackSeparateThreadTest">
+
+ <component name="CallBackSeparateThreadClient">
+ <implementation.java class="org.apache.tuscany.sca.itest.CallBackSeparateThreadClientImpl"/>
+ <reference name="aCallBackService" target="EventProcessorService"/>
+ </component>
+
+ <component name="EventProcessorService">
+ <implementation.java class="org.apache.tuscany.sca.itest.EventProcessorServiceImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/src/test/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/src/test/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadTestCase.java
new file mode 100644
index 0000000000..c216cab1be
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-separatethread/src/test/java/org/apache/tuscany/sca/itest/CallBackSeparateThreadTestCase.java
@@ -0,0 +1,73 @@
+/*
+ * 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.itest;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+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;
+
+/**
+ * This test case will attempt to trigger a call back using a separate thread
+ */
+public class CallBackSeparateThreadTestCase {
+
+ /**
+ * The Node we are using
+ */
+ private Node node;
+
+ /**
+ * The client the tests should use
+ */
+ private CallBackSeparateThreadClient aCallBackClient;
+
+ /**
+ * Run the call back in separate thread tests
+ */
+ @Test
+ public void testCallBackSeparateThread() {
+ aCallBackClient.runTests();
+ }
+
+ /**
+ * Load the Call back in separate thread composite and look up the client.
+ */
+
+ @Before
+ public void setUp() throws Exception {
+ String location = ContributionLocationHelper.getContributionLocation("CallBackSeparateThreadTest.composite");
+ node = NodeFactory.newInstance().createNode("CallBackSeparateThreadTest.composite", new Contribution("c1", location));
+ node.start();
+ aCallBackClient = node.getService(CallBackSeparateThreadClient.class, "CallBackSeparateThreadClient");
+ }
+
+ /**
+ * Shutdown the SCA node
+ */
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/pom.xml
new file mode 100644
index 0000000000..2f0d8a565f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/pom.xml
@@ -0,0 +1,56 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-callback-two-composites</artifactId>
+ <name>Apache Tuscany SCA iTest Callback Two Composites</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.19</version>
+ </dependency>
+ </dependencies>
+
+ <properties>
+ <was.ant.script>${basedir}/../build-was-integration.xml</was.ant.script>
+ <was.python.script>${basedir}/../wasAdmin.py</was.python.script>
+ </properties>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java
new file mode 100644
index 0000000000..291a72b9d6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.test;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+/**
+ *
+ */
+public interface CallBackBasicCallBack {
+
+ void callBackMessage(String aString);
+
+ void callBackIncrement(String aString);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java
new file mode 100644
index 0000000000..19f366c423
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java
@@ -0,0 +1,28 @@
+/*
+ * 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.test;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface CallBackBasicClient {
+
+ void run();
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java
new file mode 100644
index 0000000000..4bb6b29a8d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java
@@ -0,0 +1,129 @@
+/*
+ * 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.test;
+
+import org.junit.Assert;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(CallBackBasicClient.class)
+public class CallBackBasicClientImpl implements CallBackBasicClient, CallBackBasicCallBack {
+
+ @Reference
+ protected CallBackBasicService aCallBackService;
+ private static String returnMessage = null;
+ private static int callBackCount = 0;
+ private static Object monitor = new Object();
+
+ public void run() {
+
+ // This tests basic callback patterns.
+
+ // Test1 is the basic callback where the target calls back prior to
+ // returning to the client.
+ test1a();
+
+ // Test2 is where the target does not call back to the client.
+ test1b();
+
+ // Test3 is where the target calls back multiple times to the client.
+ test1c();
+ }
+
+ private void test1a() {
+ aCallBackService.knockKnock("Knock Knock");
+ int count = 0;
+
+ //
+ // If we can't get a response in 30 seconds consider this a failure
+ //
+
+ synchronized (monitor) {
+ while (returnMessage == null && count++ < 30) {
+ try {
+ monitor.wait(1000L);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ Assert.assertEquals("CallBackBasicITest - test1a", "Who's There", this.getReturnMessage());
+
+ }
+
+ private void test1b() {
+ aCallBackService.noCallBack("No Reply Desired");
+ Assert.assertEquals("CallBackBasicITest - test1b", 1, 1);
+ }
+
+ private void test1c() {
+ aCallBackService.multiCallBack("Call me back 3 times");
+ int count = 0;
+
+ //
+ // If we can't get a response in 30 seconds consider this a failure
+ //
+
+ synchronized (monitor) {
+ while (this.getCallBackCount() < 3 && count++ < 30) {
+ try {
+ monitor.wait(1000L);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ Assert.assertEquals("CallBackBasicITest - test1c", 3, this.getCallBackCount());
+ }
+
+ public String getReturnMessage() {
+ return returnMessage;
+ }
+
+ public void setReturnMessage(String aReturnMessage) {
+ returnMessage = aReturnMessage;
+ }
+
+ public int getCallBackCount() {
+ return callBackCount;
+ }
+
+ public void incrementCallBackCount() {
+ callBackCount++;
+ }
+
+ public void callBackMessage(String aString) {
+ System.out.println("Entering callback callBackMessage: " + aString);
+ synchronized (monitor) {
+ this.setReturnMessage(aString);
+ monitor.notify();
+ }
+ }
+
+ public void callBackIncrement(String aString) {
+ System.out.println("Entering callback increment: " + aString);
+ synchronized (monitor) {
+ this.incrementCallBackCount();
+ monitor.notify();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java
new file mode 100644
index 0000000000..5396879e83
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.test;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+@Callback(CallBackBasicCallBack.class)
+/**
+ *
+ */
+public interface CallBackBasicService {
+
+ void knockKnock(String aString);
+
+ void noCallBack(String aString);
+
+ void multiCallBack(String aString);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java
new file mode 100644
index 0000000000..07010f61e1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java
@@ -0,0 +1,56 @@
+/*
+ * 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.test;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(CallBackBasicService.class)
+public class CallBackBasicServiceImpl implements CallBackBasicService {
+
+ @Callback
+ protected CallBackBasicCallBack callback;
+
+ public void knockKnock(String aString) {
+
+ System.out.println("CallBackBasicServiceImpl message received: " + aString);
+ callback.callBackMessage("Who's There");
+ System.out.println("CallBackBasicServiceImpl response sent");
+
+ }
+
+ public void multiCallBack(String aString) {
+
+ System.out.println("CallBackBasicServiceImpl message received: " + aString);
+ callback.callBackIncrement("Who's There 1");
+ System.out.println("CallBackBasicServiceImpl response sent");
+ callback.callBackIncrement("Who's There 2");
+ System.out.println("CallBackBasicServiceImpl response sent");
+ callback.callBackIncrement("Who's There 3");
+ System.out.println("CallBackBasicServiceImpl response sent");
+
+ }
+
+ public void noCallBack(String aString) {
+
+ System.out.println("CallBackBasicServiceImpl message received: " + aString);
+ // System.out.println("CallBackBasicServiceImpl No response desired");
+
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/resources/CallBackReference.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/resources/CallBackReference.composite
new file mode 100644
index 0000000000..477ef7391f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/resources/CallBackReference.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://callback"
+ name="CallBackReferenceTest">
+
+ <component name="CallBackBasicClient">
+ <implementation.java class="org.apache.tuscany.sca.test.CallBackBasicClientImpl"/>
+ <reference name="aCallBackService" target="CallBackBasicService">
+ <callback>
+ <binding.ws uri="http://localhost:8084/aCallBackService"/>
+ </callback>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/resources/CallBackService.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/resources/CallBackService.composite
new file mode 100644
index 0000000000..c3f0f5bc81
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/resources/CallBackService.composite
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://callback"
+ name="CallBackServiceTest">
+
+ <component name="CallBackBasicService">
+ <implementation.java class="org.apache.tuscany.sca.test.CallBackBasicServiceImpl"/>
+ <service name="CallBackBasicService">
+ <binding.ws uri="http://localhost:8085/CallBackBasicService"/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..11d737e701
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:t="http://callback">
+ <deployable composite="t:CallBackReferenceTest" />
+ <deployable composite="t:CallBackServiceTest" />
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/test/java/org/apache/tuscany/sca/test/CallBackTwoCompositesTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/test/java/org/apache/tuscany/sca/test/CallBackTwoCompositesTestCase.java
new file mode 100644
index 0000000000..92fc8f4bef
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-composites/src/test/java/org/apache/tuscany/sca/test/CallBackTwoCompositesTestCase.java
@@ -0,0 +1,56 @@
+/*
+ * 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.test;
+
+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;
+
+public class CallBackTwoCompositesTestCase {
+
+ private static Node node;
+ private CallBackBasicClient aCallBackClient;
+
+ @Before
+ public void setUp() throws Exception {
+ try {
+ node = NodeFactory.newInstance().createNode(new Contribution("c1", "./target/classes"));
+ node.start();
+
+ aCallBackClient = node.getService(CallBackBasicClient.class, "CallBackBasicClient");
+ } catch (Exception ex){
+ ex.printStackTrace();
+ }
+ }
+
+ @Test
+ public void testCallBackBasic() {
+ aCallBackClient.run();
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/pom.xml
new file mode 100644
index 0000000000..ac41e7dffa
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/pom.xml
@@ -0,0 +1,83 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-callback-two-nodes</artifactId>
+ <name>Apache Tuscany SCA iTest Callback Two Nodes</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-domain-hazelcast</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.19</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-domain-hazelcast</artifactId>
+ <version>2.0.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>wstx-asl</artifactId>
+ <version>3.2.9</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>stax</groupId>
+ <artifactId>stax-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ </dependencies>
+
+ <properties>
+ <was.ant.script>${basedir}/../build-was-integration.xml</was.ant.script>
+ <was.python.script>${basedir}/../wasAdmin.py</was.python.script>
+ </properties>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java
new file mode 100644
index 0000000000..291a72b9d6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.test;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+/**
+ *
+ */
+public interface CallBackBasicCallBack {
+
+ void callBackMessage(String aString);
+
+ void callBackIncrement(String aString);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java
new file mode 100644
index 0000000000..19f366c423
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java
@@ -0,0 +1,28 @@
+/*
+ * 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.test;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface CallBackBasicClient {
+
+ void run();
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java
new file mode 100644
index 0000000000..198635dede
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java
@@ -0,0 +1,131 @@
+/*
+ * 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.test;
+
+import org.junit.Assert;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(CallBackBasicClient.class)
+public class CallBackBasicClientImpl implements CallBackBasicClient, CallBackBasicCallBack {
+
+ @Reference
+ protected CallBackBasicService aCallBackService;
+ private static String returnMessage = null;
+ private static int callBackCount = 0;
+ private static Object monitor = new Object();
+
+ public void run() {
+
+ // This tests basic callback patterns.
+
+ callBackCount = 0; // reset static incase theres multiple runs
+
+ // Test1 is the basic callback where the target calls back prior to
+ // returning to the client.
+ test1a();
+
+ // Test2 is where the target does not call back to the client.
+ test1b();
+
+ // Test3 is where the target calls back multiple times to the client.
+ test1c();
+ }
+
+ private void test1a() {
+ aCallBackService.knockKnock("Knock Knock");
+ int count = 0;
+
+ //
+ // If we can't get a response in 30 seconds consider this a failure
+ //
+
+ synchronized (monitor) {
+ while (returnMessage == null && count++ < 30) {
+ try {
+ monitor.wait(1000L);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ Assert.assertEquals("CallBackBasicITest - test1a", "Who's There", this.getReturnMessage());
+
+ }
+
+ private void test1b() {
+ aCallBackService.noCallBack("No Reply Desired");
+ Assert.assertEquals("CallBackBasicITest - test1b", 1, 1);
+ }
+
+ private void test1c() {
+ aCallBackService.multiCallBack("Call me back 3 times");
+ int count = 0;
+
+ //
+ // If we can't get a response in 30 seconds consider this a failure
+ //
+
+ synchronized (monitor) {
+ while (this.getCallBackCount() < 3 && count++ < 30) {
+ try {
+ monitor.wait(1000L);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ Assert.assertEquals("CallBackBasicITest - test1c", 3, this.getCallBackCount());
+ }
+
+ public String getReturnMessage() {
+ return returnMessage;
+ }
+
+ public void setReturnMessage(String aReturnMessage) {
+ returnMessage = aReturnMessage;
+ }
+
+ public int getCallBackCount() {
+ return callBackCount;
+ }
+
+ public void incrementCallBackCount() {
+ callBackCount++;
+ }
+
+ public void callBackMessage(String aString) {
+ System.out.println("Entering callback callBackMessage: " + aString);
+ synchronized (monitor) {
+ this.setReturnMessage(aString);
+ monitor.notify();
+ }
+ }
+
+ public void callBackIncrement(String aString) {
+ System.out.println("Entering callback increment: " + aString);
+ synchronized (monitor) {
+ this.incrementCallBackCount();
+ monitor.notify();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java
new file mode 100644
index 0000000000..5396879e83
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.test;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+@Callback(CallBackBasicCallBack.class)
+/**
+ *
+ */
+public interface CallBackBasicService {
+
+ void knockKnock(String aString);
+
+ void noCallBack(String aString);
+
+ void multiCallBack(String aString);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java
new file mode 100644
index 0000000000..07010f61e1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java
@@ -0,0 +1,56 @@
+/*
+ * 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.test;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(CallBackBasicService.class)
+public class CallBackBasicServiceImpl implements CallBackBasicService {
+
+ @Callback
+ protected CallBackBasicCallBack callback;
+
+ public void knockKnock(String aString) {
+
+ System.out.println("CallBackBasicServiceImpl message received: " + aString);
+ callback.callBackMessage("Who's There");
+ System.out.println("CallBackBasicServiceImpl response sent");
+
+ }
+
+ public void multiCallBack(String aString) {
+
+ System.out.println("CallBackBasicServiceImpl message received: " + aString);
+ callback.callBackIncrement("Who's There 1");
+ System.out.println("CallBackBasicServiceImpl response sent");
+ callback.callBackIncrement("Who's There 2");
+ System.out.println("CallBackBasicServiceImpl response sent");
+ callback.callBackIncrement("Who's There 3");
+ System.out.println("CallBackBasicServiceImpl response sent");
+
+ }
+
+ public void noCallBack(String aString) {
+
+ System.out.println("CallBackBasicServiceImpl message received: " + aString);
+ // System.out.println("CallBackBasicServiceImpl No response desired");
+
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/BSCACallBackReference.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/BSCACallBackReference.composite
new file mode 100644
index 0000000000..113c650a2f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/BSCACallBackReference.composite
@@ -0,0 +1,29 @@
+<?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"
+ targetNamespace="http://callback"
+ name="BSCACallBackReferenceTest">
+
+ <component name="CallBackBasicClient">
+ <implementation.java class="org.apache.tuscany.sca.test.CallBackBasicClientImpl"/>
+ <reference name="aCallBackService" target="CallBackBasicService" />
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/BSCACallBackService.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/BSCACallBackService.composite
new file mode 100644
index 0000000000..02ea7ce0ef
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/BSCACallBackService.composite
@@ -0,0 +1,28 @@
+<?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"
+ targetNamespace="http://callback"
+ name="BSCACallBackServiceTest">
+
+ <component name="CallBackBasicService">
+ <implementation.java class="org.apache.tuscany.sca.test.CallBackBasicServiceImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/BWSCallBackReference.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/BWSCallBackReference.composite
new file mode 100644
index 0000000000..1d377e1026
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/BWSCallBackReference.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://callback"
+ name="BWSCallBackReferenceTest">
+
+ <component name="CallBackBasicClient">
+ <implementation.java class="org.apache.tuscany.sca.test.CallBackBasicClientImpl"/>
+ <reference name="aCallBackService" target="CallBackBasicService">
+ <callback>
+ <binding.ws />
+ </callback>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/BWSCallBackService.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/BWSCallBackService.composite
new file mode 100644
index 0000000000..d7a5941305
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/BWSCallBackService.composite
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://callback"
+ name="BWSCallBackServiceTest">
+
+ <component name="CallBackBasicService">
+ <implementation.java class="org.apache.tuscany.sca.test.CallBackBasicServiceImpl"/>
+ <service name="CallBackBasicService">
+ <binding.ws />
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/BWSURICallBackReference.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/BWSURICallBackReference.composite
new file mode 100644
index 0000000000..d6e4c3d7bf
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/BWSURICallBackReference.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://callback"
+ name="BWSURICallBackReferenceTest">
+
+ <component name="CallBackBasicClient">
+ <implementation.java class="org.apache.tuscany.sca.test.CallBackBasicClientImpl"/>
+ <reference name="aCallBackService" target="CallBackBasicService">
+ <callback>
+ <binding.ws uri="http://localhost:8087/foo"/>
+ </callback>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/CallBackReference.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/CallBackReference.composite
new file mode 100644
index 0000000000..477ef7391f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/CallBackReference.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://callback"
+ name="CallBackReferenceTest">
+
+ <component name="CallBackBasicClient">
+ <implementation.java class="org.apache.tuscany.sca.test.CallBackBasicClientImpl"/>
+ <reference name="aCallBackService" target="CallBackBasicService">
+ <callback>
+ <binding.ws uri="http://localhost:8084/aCallBackService"/>
+ </callback>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/CallBackService.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/CallBackService.composite
new file mode 100644
index 0000000000..c3f0f5bc81
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/CallBackService.composite
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://callback"
+ name="CallBackServiceTest">
+
+ <component name="CallBackBasicService">
+ <implementation.java class="org.apache.tuscany.sca.test.CallBackBasicServiceImpl"/>
+ <service name="CallBackBasicService">
+ <binding.ws uri="http://localhost:8085/CallBackBasicService"/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..efef032b8f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:t="http://callback">
+ <deployable composite="t:CallBackTwoNodesReferenceTest" />
+ <deployable composite="t:CallBackTwoNodesServiceTest" />
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/test/java/org/apache/tuscany/sca/test/CallBackTwoNodesHzBSCAWSTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/test/java/org/apache/tuscany/sca/test/CallBackTwoNodesHzBSCAWSTestCase.java
new file mode 100644
index 0000000000..3be076758d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/test/java/org/apache/tuscany/sca/test/CallBackTwoNodesHzBSCAWSTestCase.java
@@ -0,0 +1,60 @@
+/*
+ * 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.test;
+
+import java.net.URI;
+
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.apache.tuscany.sca.http.jetty.JettyServer;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class CallBackTwoNodesHzBSCAWSTestCase {
+
+ private org.apache.tuscany.sca.Node serviceNode;
+ private org.apache.tuscany.sca.Node clientNode;
+
+ @Before
+ public void setUp() throws Exception {
+
+ System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding", "http://docs.oasis-open.org/ns/opencsa/sca/200912#binding.ws");
+
+ JettyServer.portDefault = 8089;
+ serviceNode = TuscanyRuntime.runComposite(URI.create("uri:CallBackTwoNodesHzTestCase"), "BSCACallBackService.composite", "target/classes");
+
+ JettyServer.portDefault = 8088;
+ clientNode = TuscanyRuntime.runComposite(URI.create("uri:CallBackTwoNodesHzTestCase"), "BSCACallBackReference.composite", "target/classes");
+ }
+
+ @Test
+ public void testCallBackTwoNodes() throws NoSuchServiceException {
+ CallBackBasicClient aCallBackClient = clientNode.getService(CallBackBasicClient.class, "CallBackBasicClient");
+ aCallBackClient.run();
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ if (clientNode != null) clientNode.stop();
+ if (serviceNode != null) serviceNode.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/test/java/org/apache/tuscany/sca/test/CallBackTwoNodesHzBWSTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/test/java/org/apache/tuscany/sca/test/CallBackTwoNodesHzBWSTestCase.java
new file mode 100644
index 0000000000..3b2435279c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/test/java/org/apache/tuscany/sca/test/CallBackTwoNodesHzBWSTestCase.java
@@ -0,0 +1,58 @@
+/*
+ * 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.test;
+
+import java.net.URI;
+
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.apache.tuscany.sca.http.jetty.JettyServer;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class CallBackTwoNodesHzBWSTestCase {
+
+ private org.apache.tuscany.sca.Node serviceNode;
+ private org.apache.tuscany.sca.Node clientNode;
+
+ @Before
+ public void setUp() throws Exception {
+
+ JettyServer.portDefault = 8089;
+ serviceNode = TuscanyRuntime.runComposite(URI.create("uri:CallBackTwoNodesHzTestCase"), "BWSCallBackService.composite", "target/classes");
+
+ JettyServer.portDefault = 8088;
+ clientNode = TuscanyRuntime.runComposite(URI.create("uri:CallBackTwoNodesHzTestCase"), "BWSCallBackReference.composite", "target/classes");
+ }
+
+ @Test
+ public void testCallBackTwoNodes() throws NoSuchServiceException {
+ CallBackBasicClient aCallBackClient = clientNode.getService(CallBackBasicClient.class, "CallBackBasicClient");
+ aCallBackClient.run();
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ if (clientNode != null) clientNode.stop();
+ if (serviceNode != null) serviceNode.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/test/java/org/apache/tuscany/sca/test/CallBackTwoNodesHzBWSURITestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/test/java/org/apache/tuscany/sca/test/CallBackTwoNodesHzBWSURITestCase.java
new file mode 100644
index 0000000000..9ab50c197a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/test/java/org/apache/tuscany/sca/test/CallBackTwoNodesHzBWSURITestCase.java
@@ -0,0 +1,54 @@
+/*
+ * 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.test;
+
+import java.net.URI;
+
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class CallBackTwoNodesHzBWSURITestCase {
+
+ private org.apache.tuscany.sca.Node serviceNode;
+ private org.apache.tuscany.sca.Node clientNode;
+
+ @Before
+ public void setUp() throws Exception {
+
+ serviceNode = TuscanyRuntime.runComposite(URI.create("uri:CallBackTwoNodesHzTestCase"), "BWSCallBackService.composite", "target/classes");
+ clientNode = TuscanyRuntime.runComposite(URI.create("uri:CallBackTwoNodesHzTestCase"), "BWSURICallBackReference.composite", "target/classes");
+ }
+
+ @Test
+ public void testCallBackTwoNodes() throws NoSuchServiceException {
+ CallBackBasicClient aCallBackClient = clientNode.getService(CallBackBasicClient.class, "CallBackBasicClient");
+ aCallBackClient.run();
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ if (clientNode != null) clientNode.stop();
+ if (serviceNode != null) serviceNode.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/test/java/org/apache/tuscany/sca/test/CallBackTwoNodesHzTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/test/java/org/apache/tuscany/sca/test/CallBackTwoNodesHzTestCase.java
new file mode 100644
index 0000000000..c611bdd401
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/test/java/org/apache/tuscany/sca/test/CallBackTwoNodesHzTestCase.java
@@ -0,0 +1,58 @@
+/*
+ * 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.test;
+
+import java.net.URI;
+
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+@Ignore
+public class CallBackTwoNodesHzTestCase {
+
+ private org.apache.tuscany.sca.Node serviceNode;
+ private org.apache.tuscany.sca.Node clientNode;
+
+ @Before
+ public void setUp() throws Exception {
+
+ System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding", "http://docs.oasis-open.org/ns/opencsa/sca/200912#binding.ws");
+
+ serviceNode = TuscanyRuntime.runComposite(URI.create("uri:CallBackTwoNodesHzTestCase"), "CallBackService.composite", "target/classes");
+ clientNode = TuscanyRuntime.runComposite(URI.create("uri:CallBackTwoNodesHzTestCase"), "CallBackReference.composite", "target/classes");
+ }
+
+ @Test
+ public void testCallBackTwoNodes() throws NoSuchServiceException {
+ CallBackBasicClient aCallBackClient = clientNode.getService(CallBackBasicClient.class, "CallBackBasicClient");
+ aCallBackClient.run();
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ if (clientNode != null) clientNode.stop();
+ if (serviceNode != null) serviceNode.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/test/java/org/apache/tuscany/sca/test/CallBackTwoNodesTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/test/java/org/apache/tuscany/sca/test/CallBackTwoNodesTestCase.java
new file mode 100644
index 0000000000..196ae6d4f9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/callback-two-nodes/src/test/java/org/apache/tuscany/sca/test/CallBackTwoNodesTestCase.java
@@ -0,0 +1,77 @@
+/*
+ * 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.test;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.configuration.NodeConfiguration;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class CallBackTwoNodesTestCase {
+
+ private static Node node1;
+ private static Node node2;
+ private CallBackBasicClient aCallBackClient;
+
+ @Before
+ public void setUp() throws Exception {
+ try {
+ NodeFactory factory = NodeFactory.getInstance();
+
+ NodeConfiguration configuration = factory.createNodeConfiguration();
+ configuration.setDomainURI("tuscany:default");
+ configuration.setURI("node1");
+ configuration.addContribution("c1", "./target/classes");
+ configuration.addDeploymentComposite("c1","CallBackService.composite");
+
+ //node1 = factory.createNode("CallBackService.composite", new Contribution("c1", "./target/classes"));
+ node1 = factory.createNode(configuration);
+ node1.start();
+
+ configuration = factory.createNodeConfiguration();
+ configuration.setDomainURI("tuscany:default");
+ configuration.setURI("node2");
+ configuration.addContribution("c1", "./target/classes");
+ configuration.addDeploymentComposite("c1","CallBackReference.composite");
+
+ //node2 = factory.newInstance().createNode("CallBackReference.composite", new Contribution("c1", "./target/classes"));
+ node2 = factory.createNode(configuration);
+ node2.start();
+
+ aCallBackClient = node2.getService(CallBackBasicClient.class, "CallBackBasicClient");
+ } catch (Exception ex){
+ ex.printStackTrace();
+ }
+ }
+
+ @Test
+ public void testCallBackTwoNodes() {
+ aCallBackClient.run();
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node2.stop();
+ node1.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/pom.xml
new file mode 100644
index 0000000000..115b56deb7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/pom.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-component-type</artifactId>
+ <name>Apache Tuscany SCA iTest Component Type</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ </dependencies>
+</project>
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/AddService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/AddService.java
new file mode 100644
index 0000000000..dd7ecb827d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/AddService.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * The Add service interface
+ */
+@Remotable
+public interface AddService {
+
+ double add(double n1, double n2);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/AddServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/AddServiceImpl.java
new file mode 100644
index 0000000000..8b6fe066a6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/AddServiceImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+/**
+ * An implementation of the Add service
+ */
+public class AddServiceImpl implements AddService {
+
+ public double add(double n1, double n2) {
+ return n1 + n2;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/CalculatorClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/CalculatorClient.java
new file mode 100644
index 0000000000..6f978bd9be
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/CalculatorClient.java
@@ -0,0 +1,49 @@
+/*
+ * 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 calculator;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+/**
+ * This client program shows how to create an SCA runtime, start it,
+ * and locate and invoke a SCA component
+ */
+public class CalculatorClient {
+ public static void main(String[] args) throws Exception {
+
+ String location = ContributionLocationHelper.getContributionLocation("Calculator.composite");
+ Node node = NodeFactory.newInstance().createNode("Calculator.composite", new Contribution("c1", location));
+ node.start();
+
+ CalculatorService calculatorService =
+ node.getService(CalculatorService.class, "CalculatorServiceComponent/CalculatorService");
+
+ // Calculate
+ System.out.println("3 + 2=" + calculatorService.add(3, 2));
+ System.out.println("3 - 2=" + calculatorService.subtract(3, 2));
+ System.out.println("3 * 2=" + calculatorService.multiply(3, 2));
+ System.out.println("3 / 2=" + calculatorService.divide(3, 2));
+
+ node.stop();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/CalculatorService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/CalculatorService.java
new file mode 100644
index 0000000000..c89043276e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/CalculatorService.java
@@ -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 calculator;
+
+/**
+ * The Calculator service interface.
+ */
+public interface CalculatorService {
+
+ double add(double n1, double n2);
+
+ double subtract(double n1, double n2);
+
+ double multiply(double n1, double n2);
+
+ double divide(double n1, double n2);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/CalculatorServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/CalculatorServiceImpl.java
new file mode 100644
index 0000000000..1209ac128a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/CalculatorServiceImpl.java
@@ -0,0 +1,63 @@
+/*
+ * 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 calculator;
+
+/**
+ * An implementation of the Calculator service.
+ */
+public class CalculatorServiceImpl implements CalculatorService {
+
+ private AddService addService;
+ private SubtractService subtractService;
+ private MultiplyService multiplyService;
+ private DivideService divideService;
+
+ public void setAddService(AddService addService) {
+ this.addService = addService;
+ }
+
+ public void setSubtractService(SubtractService subtractService) {
+ this.subtractService = subtractService;
+ }
+
+ public void setDivideService(DivideService divideService) {
+ this.divideService = divideService;
+ }
+
+ public void setMultiplyService(MultiplyService multiplyService) {
+ this.multiplyService = multiplyService;
+ }
+
+ public double add(double n1, double n2) {
+ return addService.add(n1, n2);
+ }
+
+ public double subtract(double n1, double n2) {
+ return subtractService.subtract(n1, n2);
+ }
+
+ public double multiply(double n1, double n2) {
+ return multiplyService.multiply(n1, n2);
+ }
+
+ public double divide(double n1, double n2) {
+ return divideService.divide(n1, n2);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/DivideService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/DivideService.java
new file mode 100644
index 0000000000..30d248208b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/DivideService.java
@@ -0,0 +1,28 @@
+/*
+ * 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 calculator;
+
+/**
+ * The divide service interface
+ */
+public interface DivideService {
+
+ double divide(double n1, double n2);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/DivideServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/DivideServiceImpl.java
new file mode 100644
index 0000000000..f7ac0b7287
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/DivideServiceImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+/**
+ * An implementation of the Divide service.
+ */
+public class DivideServiceImpl implements DivideService {
+
+ public double divide(double n1, double n2) {
+ return n1 / n2;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/MultiplyService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/MultiplyService.java
new file mode 100644
index 0000000000..5290605938
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/MultiplyService.java
@@ -0,0 +1,28 @@
+/*
+ * 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 calculator;
+
+/**
+ * The interface for the multiply service
+ */
+public interface MultiplyService {
+
+ double multiply(double n1, double n2);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/MultiplyServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/MultiplyServiceImpl.java
new file mode 100644
index 0000000000..b7dca792b2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/MultiplyServiceImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+/**
+ * An implementation of the Multiply service.
+ */
+public class MultiplyServiceImpl implements MultiplyService {
+
+ public double multiply(double n1, double n2) {
+ return n1 * n2;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/SubtractService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/SubtractService.java
new file mode 100644
index 0000000000..bf0d1882b6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/SubtractService.java
@@ -0,0 +1,28 @@
+/*
+ * 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 calculator;
+
+/**
+ * The interface for the multiply service
+ */
+public interface SubtractService {
+
+ double subtract(double n1, double n2);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/SubtractServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/SubtractServiceImpl.java
new file mode 100644
index 0000000000..77b128ab8d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/java/calculator/SubtractServiceImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+/**
+ * An implementation of the subtract service.
+ */
+public class SubtractServiceImpl implements SubtractService {
+
+ public double subtract(double n1, double n2) {
+ return n1 - n2;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/resources/Calculator.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/resources/Calculator.composite
new file mode 100644
index 0000000000..fc08333544
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/resources/Calculator.composite
@@ -0,0 +1,49 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="Calculator">
+
+ <component name="CalculatorServiceComponent">
+ <implementation.java class="calculator.CalculatorServiceImpl"/>
+ <reference name="addService" target="AddServiceComponent/AddService"/>
+ <reference name="subtractService" target="SubtractServiceComponent/SubtractService"/>
+ <reference name="multiplyService" target="MultiplyServiceComponent/MultiplyService"/>
+ <reference name="divideService" target="DivideServiceComponent/DivideService"/>
+ </component>
+
+ <component name="AddServiceComponent">
+ <implementation.java class="calculator.AddServiceImpl"/>
+ </component>
+
+ <component name="SubtractServiceComponent">
+ <implementation.java class="calculator.SubtractServiceImpl"/>
+ </component>
+
+ <component name="MultiplyServiceComponent">
+ <implementation.java class="calculator.MultiplyServiceImpl"/>
+ </component>
+
+ <component name="DivideServiceComponent">
+ <implementation.java class="calculator.DivideServiceImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/resources/calculator/AddServiceImpl.componentType b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/resources/calculator/AddServiceImpl.componentType
new file mode 100644
index 0000000000..a6babbfc2f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/resources/calculator/AddServiceImpl.componentType
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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.
+-->
+<componentType xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912">
+
+ <service name="AddService">
+ <interface.java interface="calculator.AddService"/>
+ </service>
+
+</componentType>
+ \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/resources/calculator/CalculatorServiceImpl.componentType b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/resources/calculator/CalculatorServiceImpl.componentType
new file mode 100644
index 0000000000..b3a4ac83e9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/resources/calculator/CalculatorServiceImpl.componentType
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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.
+-->
+<componentType xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912">
+
+ <service name="CalculatorService">
+ <interface.java interface="calculator.CalculatorService"/>
+ </service>
+
+ <reference name="addService">
+ <interface.java interface="calculator.AddService"/>
+ </reference>
+
+ <reference name="subtractService">
+ <interface.java interface="calculator.SubtractService"/>
+ </reference>
+
+ <reference name="multiplyService">
+ <interface.java interface="calculator.MultiplyService"/>
+ </reference>
+
+ <reference name="divideService">
+ <interface.java interface="calculator.DivideService"/>
+ </reference>
+
+</componentType>
+ \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/resources/calculator/DivideServiceImpl.componentType b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/resources/calculator/DivideServiceImpl.componentType
new file mode 100644
index 0000000000..9238359f76
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/resources/calculator/DivideServiceImpl.componentType
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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.
+-->
+<componentType xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912">
+
+ <service name="DivideService">
+ <interface.java interface="calculator.DivideService"/>
+ </service>
+
+</componentType>
+ \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/resources/calculator/MultiplyServiceImpl.componentType b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/resources/calculator/MultiplyServiceImpl.componentType
new file mode 100644
index 0000000000..2fadb54bf1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/resources/calculator/MultiplyServiceImpl.componentType
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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.
+-->
+<componentType xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912">
+
+ <service name="MultiplyService">
+ <interface.java interface="calculator.MultiplyService"/>
+ </service>
+
+</componentType>
+ \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/resources/calculator/SubtractServiceImpl.componentType b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/resources/calculator/SubtractServiceImpl.componentType
new file mode 100644
index 0000000000..6ca2df2928
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/main/resources/calculator/SubtractServiceImpl.componentType
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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.
+-->
+<componentType xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912">
+
+ <service name="SubtractService">
+ <interface.java interface="calculator.SubtractService"/>
+ </service>
+
+</componentType>
+ \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/test/java/calculator/CalculatorTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/test/java/calculator/CalculatorTestCase.java
new file mode 100644
index 0000000000..ac3ccc3d08
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/component-type/src/test/java/calculator/CalculatorTestCase.java
@@ -0,0 +1,60 @@
+/*
+ * 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 calculator;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+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;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class CalculatorTestCase {
+
+ private CalculatorService calculatorService;
+ private Node node;
+
+ @Before
+ public void setUp() throws Exception {
+ String location = ContributionLocationHelper.getContributionLocation("Calculator.composite");
+ node = NodeFactory.newInstance().createNode("Calculator.composite", new Contribution("c1", location));
+ node.start();
+ calculatorService = node.getService(CalculatorService.class, "CalculatorServiceComponent/CalculatorService");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testCalculator() throws Exception {
+ // Calculate
+ /*
+ assertEquals(calculatorService.add(3, 2), 5.0, 0.0);
+ assertEquals(calculatorService.subtract(3, 2), 1.0, 0.0);
+ assertEquals(calculatorService.multiply(3, 2), 6.0, 0.0);
+ assertEquals(calculatorService.divide(3, 2), 1.5, 0.0);
+ */
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/context/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/context/pom.xml
new file mode 100644
index 0000000000..bb962f2361
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/context/pom.xml
@@ -0,0 +1,63 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-context</artifactId>
+ <name>Apache Tuscany SCA iTest Context</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <version>2.0.1</version>
+ <type>pom</type>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-jsonp-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.19</version>
+ </dependency>
+
+ </dependencies>
+ <build>
+ <plugins>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/context/src/main/java/itest/helloworld/ApplicationContext.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/context/src/main/java/itest/helloworld/ApplicationContext.java
new file mode 100644
index 0000000000..9ddda2e244
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/context/src/main/java/itest/helloworld/ApplicationContext.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package itest.helloworld;
+
+public class ApplicationContext {
+
+ private String someString;
+
+ public void setSomeString(String someString) {
+ this.someString = someString;
+ }
+
+ public String getSomeString() {
+ return someString;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/context/src/main/java/itest/helloworld/Helloworld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/context/src/main/java/itest/helloworld/Helloworld.java
new file mode 100644
index 0000000000..5c101ce832
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/context/src/main/java/itest/helloworld/Helloworld.java
@@ -0,0 +1,28 @@
+/*
+ * 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 itest.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface Helloworld {
+
+ String sayHello(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/context/src/main/java/itest/helloworld/HelloworldClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/context/src/main/java/itest/helloworld/HelloworldClientImpl.java
new file mode 100644
index 0000000000..0ae95d8404
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/context/src/main/java/itest/helloworld/HelloworldClientImpl.java
@@ -0,0 +1,45 @@
+/*
+ * 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 itest.helloworld;
+
+import org.oasisopen.sca.ComponentContext;
+import org.oasisopen.sca.RequestContext;
+import org.oasisopen.sca.annotation.Context;
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloworldClientImpl implements Helloworld{
+
+ @Context
+ protected ComponentContext componentContext;
+
+ @Context
+ protected RequestContext requestContext;
+
+ @Context ApplicationContext applicationContext;
+
+ @Reference
+ public Helloworld ref;
+
+ @Override
+ public String sayHello(String name) {
+ return ref.sayHello(name);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/context/src/main/java/itest/helloworld/HelloworldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/context/src/main/java/itest/helloworld/HelloworldServiceImpl.java
new file mode 100644
index 0000000000..8cb65789a1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/context/src/main/java/itest/helloworld/HelloworldServiceImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package itest.helloworld;
+
+public class HelloworldServiceImpl implements Helloworld {
+
+ @Override
+ public String sayHello(String name) {
+
+ return "Hello " + name;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/context/src/main/resources/context.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/context/src/main/resources/context.composite
new file mode 100644
index 0000000000..d29c636f77
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/context/src/main/resources/context.composite
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://Scopes"
+ name="mappertest">
+
+ <component name="Client1">
+ <implementation.java class="itest.helloworld.HelloworldClientImpl"/>
+ <reference name="ref" target="Service1" />
+ </component>
+
+ <component name="Service1">
+ <implementation.java class="itest.helloworld.HelloworldServiceImpl"/>
+ </component>
+
+ <component name="Client2">
+ <implementation.java class="itest.helloworld.HelloworldClientImpl"/>
+ <reference name="ref" target="Service2" />
+ </component>
+
+ <component name="Service2">
+ <implementation.java class="itest.helloworld.HelloworldServiceImpl"/>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/context/src/test/java/itest/helloworld/ContextTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/context/src/test/java/itest/helloworld/ContextTestCase.java
new file mode 100644
index 0000000000..3ba3caf7bc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/context/src/test/java/itest/helloworld/ContextTestCase.java
@@ -0,0 +1,54 @@
+/*
+ * 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 itest.helloworld;
+
+import java.io.IOException;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ContextTestCase {
+
+ static {
+ org.apache.tuscany.sca.http.jetty.JettyServer.portDefault = 8085;
+ }
+
+ Node node;
+
+ @Test
+ public void testContext() throws IOException, InterruptedException {
+ node = NodeFactory.getInstance().createNode("context.composite", new String[]{"target/classes"}) ;
+ node.start();
+
+ // test the service invocations work
+ Helloworld helloworld = node.getService(Helloworld.class, "Client1");
+ Assert.assertEquals("Hello Petra", helloworld.sayHello("Petra"));
+
+ // helloworld = node.getService(Helloworld.class, "Client2");
+ // Assert.assertEquals("Hello Petra", helloworld.sayHello("Petra"));
+ }
+
+ @After
+ public void shutdown() throws InterruptedException {
+ node.stop();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-app/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-app/pom.xml
new file mode 100644
index 0000000000..b90c052bce
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-app/pom.xml
@@ -0,0 +1,109 @@
+<?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>contribution-doc-lit-disablewrapped</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>disablewrapped-app</artifactId>
+ <name>Apache Tuscany SCA iTest SCA Contribution Doc Lit Disable Wrapped App</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</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>wsimport1</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>wsimport</goal>
+ </goals>
+ <configuration>
+ <packageName>org.apache.tuscany.sca.binding.sca.jaxb.iface</packageName>
+ <wsdlDirectory>${basedir}/target/classes</wsdlDirectory>
+ <wsdlFiles>
+ <wsdlFile>disablewrapped.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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-app/src/main/java/org/apache/tuscany/sca/binding/sca/DisableWrappedImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-app/src/main/java/org/apache/tuscany/sca/binding/sca/DisableWrappedImpl.java
new file mode 100644
index 0000000000..7435695fb6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-app/src/main/java/org/apache/tuscany/sca/binding/sca/DisableWrappedImpl.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.sca;
+
+
+import org.apache.tuscany.sca.binding.sca.jaxb.iface.*;
+import org.oasisopen.sca.annotation.Service;
+
+
+@Service(GuessAndGreetDisableWrapped.class)
+
+public class DisableWrappedImpl implements GuessAndGreetDisableWrapped {
+
+ public SendGuessAndNameResponse sendGuessAndName(SendGuessAndName request)
+ throws WayTooLowFaultMsg, IncorrectGuessFaultMsg, GameOverFaultMsg, WayTooHighFaultMsg, OneTwoThreeFaultMsg
+ {
+
+ int guess = request.getGuess();
+ String name = request.getName();
+ Person inPerson = request.getPerson();
+
+ if (guess == 0) {
+
+ org.apache.tuscany.sca.binding.sca.jaxb.iface.ObjectFactory factory = new org.apache.tuscany.sca.binding.sca.jaxb.iface.ObjectFactory();
+ IncorrectGuessFault faultBean = factory.createIncorrectGuessFault();
+ //set values for exception
+ faultBean.setGuess(guess);
+ String hint = "Try non-zero";
+ faultBean.setHint(hint);
+ IncorrectGuessFaultMsg exc = new IncorrectGuessFaultMsg("Exc from GuessAndGreetImpl", faultBean);
+ throw exc;
+ }
+
+ //magic # is correct, return a person object.
+ org.apache.tuscany.sca.binding.sca.jaxb.iface.ObjectFactory personFactory = new org.apache.tuscany.sca.binding.sca.jaxb.iface.ObjectFactory();
+ Person person = personFactory.createPerson();
+
+ String[] names = name.split(" ");
+ person.setFirstName(names[0]);
+ if (names.length < 2){
+ person.setLastName("Doe");
+ } else {
+ person.setLastName(names[1]);
+ }
+ person.setGreeting("Winner!");
+ person.setChild(inPerson);
+
+ org.apache.tuscany.sca.binding.sca.jaxb.iface.ObjectFactory wrapperFactory = new org.apache.tuscany.sca.binding.sca.jaxb.iface.ObjectFactory();
+
+ SendGuessAndNameResponse response = wrapperFactory.createSendGuessAndNameResponse();
+ response.setPerson(person);
+ return response;
+ }
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-app/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-app/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..1f9eecccde
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-app/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:itest="http://www.tuscany.apache.org/itests/binding/sca/jaxb">
+ <deployable composite="itest:DisableWrapped"/>
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-app/src/main/resources/disablewrapped.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-app/src/main/resources/disablewrapped.wsdl
new file mode 100644
index 0000000000..d96b7f9bcd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-app/src/main/resources/disablewrapped.wsdl
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+
+<wsdl:definitions targetNamespace="http://test.sca.soafp/jaxb/disablewrapped" xmlns:tns="http://test.sca.soafp/jaxb/disablewrapped" xmlns:gng="http://test.sca.soafp/jaxb" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ name="DisableWrapped">
+
+ <jaxws:bindings>
+ <!-- Non-wrapped by virtue of the fact that wrappering has been disabled -->
+ <jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle>
+ </jaxws:bindings>
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://test.sca.soafp/jaxb/disablewrapped" jaxb:version="2.0" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <annotation>
+ <appinfo>
+ <jaxb:schemaBindings>
+ <jaxb:package name="org.apache.tuscany.sca.binding.sca.jaxb.iface"/>
+ </jaxb:schemaBindings>
+ </appinfo>
+ </annotation>
+
+ <import namespace="http://test.sca.soafp/jaxb" schemaLocation="guessAndGreet.xsd"/>
+
+ <element name="sendGuessAndName">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ <element name="guess" type="xsd:int"/>
+ <element name="person" minOccurs="0" type="gng:Person"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="sendGuessAndNameResponse">
+ <complexType>
+ <sequence>
+ <element name="person" type="gng:Person"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="sendGuessAndNameRequest">
+ <wsdl:part element="tns:sendGuessAndName" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="sendGuessAndNameResponse">
+ <wsdl:part element="tns:sendGuessAndNameResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="wayTooLowFaultMsg">
+ <wsdl:part element="gng:wayTooLowFault" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="oneTwoThreeFaultMsg">
+ <wsdl:part element="gng:oneTwoThreeFault" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="wayTooHighFaultMsg">
+ <wsdl:part element="gng:wayTooHighFault" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="incorrectGuessFaultMsg">
+ <wsdl:part element="gng:incorrectGuessFault" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="gameOverFaultMsg">
+ <wsdl:part element="gng:GameOverFault" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="GuessAndGreetDisableWrapped">
+ <wsdl:operation name="sendGuessAndName">
+ <wsdl:input message="tns:sendGuessAndNameRequest" name="sendGuessAndNameRequest"/>
+ <wsdl:output message="tns:sendGuessAndNameResponse" name="sendGuessAndNameResponse"/>
+ <wsdl:fault message="tns:wayTooLowFaultMsg" name="wayTooLowFaultMsg"/>
+ <wsdl:fault message="tns:wayTooHighFaultMsg" name="wayTooHighFaultMsg"/>
+ <wsdl:fault message="tns:oneTwoThreeFaultMsg" name="oneTwoThreeFaultMsg"/>
+ <wsdl:fault message="tns:incorrectGuessFaultMsg" name="incorrectGuessFaultMsg"/>
+ <wsdl:fault message="tns:gameOverFaultMsg" name="gameOverFaultMsg"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="GuessAndGreetSoapBinding" type="tns:GuessAndGreetDisableWrapped">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="sendGuessAndName">
+ <wsdlsoap:operation soapAction="urn:sendGuessAndName"/>
+ <wsdl:input name="sendGuessAndNameRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="sendGuessAndNameResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="wayTooLowFaultMsg">
+ <wsdlsoap:fault use="literal" name="wayTooLowFaultMsg"/>
+ </wsdl:fault>
+ <wsdl:fault name="wayTooHighFaultMsg">
+ <wsdlsoap:fault use="literal" name="wayTooHighFaultMsg"/>
+ </wsdl:fault>
+ <wsdl:fault name="oneTwoThreeFaultMsg">
+ <wsdlsoap:fault use="literal" name="oneTwoThreeFaultMsg"/>
+ </wsdl:fault>
+ <wsdl:fault name="incorrectGuessFaultMsg">
+ <wsdlsoap:fault use="literal" name="incorrectGuessFaultMsg"/>
+ </wsdl:fault>
+ <wsdl:fault name="gameOverFaultMsg">
+ <wsdlsoap:fault use="literal" name="gameOverFaultMsg"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="GuessAndGreetService">
+ <wsdl:port binding="tns:GuessAndGreetSoapBinding" name="GuessAndGreetSoapPort">
+ <wsdlsoap:address location=""/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-app/src/main/resources/guessAndGreet.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-app/src/main/resources/guessAndGreet.xsd
new file mode 100644
index 0000000000..a0a2b236df
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-app/src/main/resources/guessAndGreet.xsd
@@ -0,0 +1,91 @@
+<?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.
+-->
+<schema elementFormDefault="qualified" targetNamespace="http://test.sca.soafp/jaxb" xmlns:tns="http://test.sca.soafp/jaxb" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xsd="http://www.w3.org/2001/XMLSchema" jaxb:version="2.0" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <annotation>
+ <appinfo>
+ <jaxb:schemaBindings>
+ <jaxb:package name="test.soafp.jaxb.types"/>
+ </jaxb:schemaBindings>
+ </appinfo>
+ </annotation>
+
+ <complexType name="Person">
+ <sequence>
+ <element name="firstName" type="string"/>
+ <element name="lastName" type="string"/>
+ <element name="greeting" type="string"/>
+ <element name="child" minOccurs="0" type="tns:Person"/>
+ </sequence>
+ </complexType>
+
+ <!-- 1. Fault of named, complex type -->
+ <element name="incorrectGuessFault" type="tns:IncorrectGuessFault"/>
+ <complexType name="IncorrectGuessFault">
+ <sequence>
+ <element name="guess" type="xsd:int"/>
+ <element name="hint" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+ <!-- 2. Fault of named, simple (built-in) type -->
+ <element name="wayTooHighFault" type="xsd:integer"/>
+
+ <!-- 3. Fault of anonymous, simple user-defined type -->
+ <element name="wayTooLowFault">
+ <simpleType>
+ <!-- Error code RC, so -200 < RC < -100 -->
+ <restriction base="xsd:int">
+ <minInclusive value="-200"/>
+ <maxInclusive value="-100"/>
+ </restriction>
+ </simpleType>
+ </element>
+
+ <!-- 4. Fault of named, simple user-defined type -->
+ <element name="oneTwoThreeFault" type="tns:OneTwoThreeType"/>
+ <simpleType name="OneTwoThreeType">
+ <!-- Want to see what happens when I violate the enum restriction
+ <annotation><appinfo>
+ <jaxb:typesafeEnumClass name="OneTwoThreeType">
+ <jaxb:typesafeEnumMember name="ONE" value="1"/>
+ <jaxb:typesafeEnumMember name="TWO" value="2"/>
+ <jaxb:typesafeEnumMember name="THREE" value="3"/>
+ </jaxb:typesafeEnumClass>
+ </appinfo></annotation>
+ -->
+ <restriction base="xsd:integer">
+ <enumeration value="1"/>
+ <enumeration value="2"/>
+ <enumeration value="3"/>
+ </restriction>
+ </simpleType>
+
+ <!-- 5. Fault of anonymous, complex type -->
+ <!-- Easier to work across SDO/JAXB if we start with capital letter in elem name -->
+ <element name="GameOverFault">
+ <complexType>
+ <sequence>
+ <element name="guess" type="xsd:int"/>
+ <element name="correct" type="xsd:integer"/>
+ </sequence>
+ </complexType>
+ </element>
+</schema>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-app/src/main/resources/jaxbService.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-app/src/main/resources/jaxbService.composite
new file mode 100644
index 0000000000..7a799b7ac0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-app/src/main/resources/jaxbService.composite
@@ -0,0 +1,35 @@
+<?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"
+ targetNamespace="http://www.tuscany.apache.org/itests/binding/sca/jaxb"
+ xmlns:tns="http://www.tuscany.apache.org/itests/binding/sca/jaxb"
+ xmlns:sca="http://www.ibm.com/xmlns/prod/websphere/sca/1.0/2007/06"
+ name="DisableWrapped">
+
+ <component name="GuessAndGreetComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.DisableWrappedImpl"/>
+
+ <service name="GuessAndGreetDisableWrapped">
+ <interface.wsdl interface="http://test.sca.soafp/jaxb/disablewrapped#wsdl.interface(GuessAndGreetDisableWrapped)" />
+ <binding.sca/>
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-test/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-test/pom.xml
new file mode 100644
index 0000000000..8d805f2e6c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-test/pom.xml
@@ -0,0 +1,109 @@
+<?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>contribution-doc-lit-disablewrapped</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>disablewrapped-test</artifactId>
+ <name>Apache Tuscany SCA iTest SCA Contribution Doc Lit Disable Wrapped Test</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</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>wsimport1</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>wsimport</goal>
+ </goals>
+ <configuration>
+ <packageName>org.apache.tuscany.sca.binding.sca.jaxb.iface</packageName>
+ <wsdlDirectory>${basedir}/target/classes</wsdlDirectory>
+ <wsdlFiles>
+ <wsdlFile>disablewrapped.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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-test/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-test/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..1f9eecccde
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-test/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:itest="http://www.tuscany.apache.org/itests/binding/sca/jaxb">
+ <deployable composite="itest:DisableWrapped"/>
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-test/src/main/resources/disablewrapped.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-test/src/main/resources/disablewrapped.wsdl
new file mode 100644
index 0000000000..d96b7f9bcd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-test/src/main/resources/disablewrapped.wsdl
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+
+<wsdl:definitions targetNamespace="http://test.sca.soafp/jaxb/disablewrapped" xmlns:tns="http://test.sca.soafp/jaxb/disablewrapped" xmlns:gng="http://test.sca.soafp/jaxb" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ name="DisableWrapped">
+
+ <jaxws:bindings>
+ <!-- Non-wrapped by virtue of the fact that wrappering has been disabled -->
+ <jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle>
+ </jaxws:bindings>
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://test.sca.soafp/jaxb/disablewrapped" jaxb:version="2.0" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <annotation>
+ <appinfo>
+ <jaxb:schemaBindings>
+ <jaxb:package name="org.apache.tuscany.sca.binding.sca.jaxb.iface"/>
+ </jaxb:schemaBindings>
+ </appinfo>
+ </annotation>
+
+ <import namespace="http://test.sca.soafp/jaxb" schemaLocation="guessAndGreet.xsd"/>
+
+ <element name="sendGuessAndName">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ <element name="guess" type="xsd:int"/>
+ <element name="person" minOccurs="0" type="gng:Person"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="sendGuessAndNameResponse">
+ <complexType>
+ <sequence>
+ <element name="person" type="gng:Person"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="sendGuessAndNameRequest">
+ <wsdl:part element="tns:sendGuessAndName" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="sendGuessAndNameResponse">
+ <wsdl:part element="tns:sendGuessAndNameResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="wayTooLowFaultMsg">
+ <wsdl:part element="gng:wayTooLowFault" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="oneTwoThreeFaultMsg">
+ <wsdl:part element="gng:oneTwoThreeFault" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="wayTooHighFaultMsg">
+ <wsdl:part element="gng:wayTooHighFault" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="incorrectGuessFaultMsg">
+ <wsdl:part element="gng:incorrectGuessFault" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="gameOverFaultMsg">
+ <wsdl:part element="gng:GameOverFault" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="GuessAndGreetDisableWrapped">
+ <wsdl:operation name="sendGuessAndName">
+ <wsdl:input message="tns:sendGuessAndNameRequest" name="sendGuessAndNameRequest"/>
+ <wsdl:output message="tns:sendGuessAndNameResponse" name="sendGuessAndNameResponse"/>
+ <wsdl:fault message="tns:wayTooLowFaultMsg" name="wayTooLowFaultMsg"/>
+ <wsdl:fault message="tns:wayTooHighFaultMsg" name="wayTooHighFaultMsg"/>
+ <wsdl:fault message="tns:oneTwoThreeFaultMsg" name="oneTwoThreeFaultMsg"/>
+ <wsdl:fault message="tns:incorrectGuessFaultMsg" name="incorrectGuessFaultMsg"/>
+ <wsdl:fault message="tns:gameOverFaultMsg" name="gameOverFaultMsg"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="GuessAndGreetSoapBinding" type="tns:GuessAndGreetDisableWrapped">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="sendGuessAndName">
+ <wsdlsoap:operation soapAction="urn:sendGuessAndName"/>
+ <wsdl:input name="sendGuessAndNameRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="sendGuessAndNameResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="wayTooLowFaultMsg">
+ <wsdlsoap:fault use="literal" name="wayTooLowFaultMsg"/>
+ </wsdl:fault>
+ <wsdl:fault name="wayTooHighFaultMsg">
+ <wsdlsoap:fault use="literal" name="wayTooHighFaultMsg"/>
+ </wsdl:fault>
+ <wsdl:fault name="oneTwoThreeFaultMsg">
+ <wsdlsoap:fault use="literal" name="oneTwoThreeFaultMsg"/>
+ </wsdl:fault>
+ <wsdl:fault name="incorrectGuessFaultMsg">
+ <wsdlsoap:fault use="literal" name="incorrectGuessFaultMsg"/>
+ </wsdl:fault>
+ <wsdl:fault name="gameOverFaultMsg">
+ <wsdlsoap:fault use="literal" name="gameOverFaultMsg"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="GuessAndGreetService">
+ <wsdl:port binding="tns:GuessAndGreetSoapBinding" name="GuessAndGreetSoapPort">
+ <wsdlsoap:address location=""/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-test/src/main/resources/guessAndGreet.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-test/src/main/resources/guessAndGreet.xsd
new file mode 100644
index 0000000000..a0a2b236df
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-test/src/main/resources/guessAndGreet.xsd
@@ -0,0 +1,91 @@
+<?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.
+-->
+<schema elementFormDefault="qualified" targetNamespace="http://test.sca.soafp/jaxb" xmlns:tns="http://test.sca.soafp/jaxb" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xsd="http://www.w3.org/2001/XMLSchema" jaxb:version="2.0" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <annotation>
+ <appinfo>
+ <jaxb:schemaBindings>
+ <jaxb:package name="test.soafp.jaxb.types"/>
+ </jaxb:schemaBindings>
+ </appinfo>
+ </annotation>
+
+ <complexType name="Person">
+ <sequence>
+ <element name="firstName" type="string"/>
+ <element name="lastName" type="string"/>
+ <element name="greeting" type="string"/>
+ <element name="child" minOccurs="0" type="tns:Person"/>
+ </sequence>
+ </complexType>
+
+ <!-- 1. Fault of named, complex type -->
+ <element name="incorrectGuessFault" type="tns:IncorrectGuessFault"/>
+ <complexType name="IncorrectGuessFault">
+ <sequence>
+ <element name="guess" type="xsd:int"/>
+ <element name="hint" type="xsd:string"/>
+ </sequence>
+ </complexType>
+
+ <!-- 2. Fault of named, simple (built-in) type -->
+ <element name="wayTooHighFault" type="xsd:integer"/>
+
+ <!-- 3. Fault of anonymous, simple user-defined type -->
+ <element name="wayTooLowFault">
+ <simpleType>
+ <!-- Error code RC, so -200 < RC < -100 -->
+ <restriction base="xsd:int">
+ <minInclusive value="-200"/>
+ <maxInclusive value="-100"/>
+ </restriction>
+ </simpleType>
+ </element>
+
+ <!-- 4. Fault of named, simple user-defined type -->
+ <element name="oneTwoThreeFault" type="tns:OneTwoThreeType"/>
+ <simpleType name="OneTwoThreeType">
+ <!-- Want to see what happens when I violate the enum restriction
+ <annotation><appinfo>
+ <jaxb:typesafeEnumClass name="OneTwoThreeType">
+ <jaxb:typesafeEnumMember name="ONE" value="1"/>
+ <jaxb:typesafeEnumMember name="TWO" value="2"/>
+ <jaxb:typesafeEnumMember name="THREE" value="3"/>
+ </jaxb:typesafeEnumClass>
+ </appinfo></annotation>
+ -->
+ <restriction base="xsd:integer">
+ <enumeration value="1"/>
+ <enumeration value="2"/>
+ <enumeration value="3"/>
+ </restriction>
+ </simpleType>
+
+ <!-- 5. Fault of anonymous, complex type -->
+ <!-- Easier to work across SDO/JAXB if we start with capital letter in elem name -->
+ <element name="GameOverFault">
+ <complexType>
+ <sequence>
+ <element name="guess" type="xsd:int"/>
+ <element name="correct" type="xsd:integer"/>
+ </sequence>
+ </complexType>
+ </element>
+</schema>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-test/src/main/resources/jaxbService.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-test/src/main/resources/jaxbService.composite
new file mode 100644
index 0000000000..7a799b7ac0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-test/src/main/resources/jaxbService.composite
@@ -0,0 +1,35 @@
+<?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"
+ targetNamespace="http://www.tuscany.apache.org/itests/binding/sca/jaxb"
+ xmlns:tns="http://www.tuscany.apache.org/itests/binding/sca/jaxb"
+ xmlns:sca="http://www.ibm.com/xmlns/prod/websphere/sca/1.0/2007/06"
+ name="DisableWrapped">
+
+ <component name="GuessAndGreetComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.DisableWrappedImpl"/>
+
+ <service name="GuessAndGreetDisableWrapped">
+ <interface.wsdl interface="http://test.sca.soafp/jaxb/disablewrapped#wsdl.interface(GuessAndGreetDisableWrapped)" />
+ <binding.sca/>
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-test/src/test/java/org/apache/tuscany/sca/binding/sca/launcher/base/DocLitDisableWrappedTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-test/src/test/java/org/apache/tuscany/sca/binding/sca/launcher/base/DocLitDisableWrappedTestCase.java
new file mode 100644
index 0000000000..320af5103d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/disablewrapped-test/src/test/java/org/apache/tuscany/sca/binding/sca/launcher/base/DocLitDisableWrappedTestCase.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.launcher.base;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.net.URI;
+
+import org.apache.tuscany.sca.binding.sca.jaxb.iface.GuessAndGreetDisableWrapped;
+import org.apache.tuscany.sca.binding.sca.jaxb.iface.GuessAndGreetService;
+import org.apache.tuscany.sca.binding.sca.jaxb.iface.SendGuessAndName;
+import org.apache.tuscany.sca.binding.sca.jaxb.iface.SendGuessAndNameResponse;
+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;
+import org.oasisopen.sca.client.SCAClientFactory;
+
+public class DocLitDisableWrappedTestCase {
+
+ private Node node;
+
+ @Before
+ public void setUp() throws Exception {
+ // Start the SCA contribution
+ node = NodeFactory.newInstance().createNode(new Contribution("doc-lit-disablewrapped", "../disablewrapped-app/target/disablewrapped-app.jar"));
+ node.start();
+ }
+
+/*
+ @Test
+ public void testWait() throws Exception {
+ System.out.println("Press a key");
+ System.in.read();
+ }
+*/
+
+ @Ignore
+ @Test
+ public void testGetGreetings() throws Exception {
+ GuessAndGreetDisableWrapped service = SCAClientFactory.newInstance(URI.create("default")).getService(GuessAndGreetDisableWrapped.class, "GuessAndGreetComponent");
+ SendGuessAndName parameters = new SendGuessAndName();
+
+ parameters.setGuess(1);
+ parameters.setName("Petra");
+ parameters.setPerson(null);
+
+ SendGuessAndNameResponse response = service.sendGuessAndName(parameters);
+
+ assertEquals("Petra", response.getPerson().getFirstName());
+ assertEquals("Winnder!", response.getPerson().getGreeting());
+ assertEquals(null, response.getPerson().getChild());
+ }
+
+ @Ignore
+ @Test
+ public void testGetGreetingsComplex() throws Exception {
+ GuessAndGreetDisableWrapped service = SCAClientFactory.newInstance(URI.create("default")).getService(GuessAndGreetDisableWrapped.class, "GuessAndGreetComponent");
+
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/pom.xml
new file mode 100644
index 0000000000..8dd1f494e6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-doc-lit-disablewrapped/pom.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <packaging>pom</packaging>
+ <artifactId>contribution-doc-lit-disablewrapped</artifactId>
+ <name>Apache Tuscany SCA iTest SCA JAXB Disable Wrapped</name>
+
+ <modules>
+ <module>disablewrapped-app</module>
+ <module>disablewrapped-test</module>
+ </modules>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/pom.xml
new file mode 100644
index 0000000000..796c18210b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/pom.xml
@@ -0,0 +1,39 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-contribution-folder</artifactId>
+ <name>Apache Tuscany SCA iTest Contribution Folder</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/src/test/java/calculator/CalculatorService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/src/test/java/calculator/CalculatorService.java
new file mode 100644
index 0000000000..b4c677b371
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/src/test/java/calculator/CalculatorService.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package calculator;
+
+public interface CalculatorService {
+ double add(double n1, double n2);
+
+ double subtract(double n1, double n2);
+
+ double multiply(double n1, double n2);
+
+ double divide(double n1, double n2);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/src/test/java/test/ContributionFolderTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/src/test/java/test/ContributionFolderTestCase.java
new file mode 100644
index 0000000000..ef2a43c766
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/src/test/java/test/ContributionFolderTestCase.java
@@ -0,0 +1,55 @@
+/*
+ * 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 test;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+import calculator.CalculatorService;
+
+/**
+ * Test SCADomain.newInstance and invocation of a service.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ContributionFolderTestCase extends TestCase {
+
+ private Node node;
+
+ @Override
+ protected void setUp() throws Exception {
+ node = NodeFactory.newInstance().createNode(new Contribution("foo", "src/test/resources/repository"));
+ node.start();
+ }
+
+ public void testInvoke() throws Exception {
+ CalculatorService service = node.getService(CalculatorService.class, "CalculatorServiceComponent");
+ assertEquals(3.0, service.add(1, 2));
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/src/test/resources/repository/folderWithJars/Calculator.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/src/test/resources/repository/folderWithJars/Calculator.composite
new file mode 100644
index 0000000000..05bea57944
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/src/test/resources/repository/folderWithJars/Calculator.composite
@@ -0,0 +1,49 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="Calculator">
+
+ <component name="CalculatorServiceComponent">
+ <implementation.java class="calculator.CalculatorServiceImpl"/>
+ <reference name="addService" target="AddServiceComponent" />
+ <reference name="subtractService" target="SubtractServiceComponent" />
+ <reference name="multiplyService" target="MultiplyServiceComponent" />
+ <reference name="divideService" target="DivideServiceComponent" />
+ </component>
+
+ <component name="AddServiceComponent">
+ <implementation.java class="calculator.AddServiceImpl"/>
+ </component>
+
+ <component name="SubtractServiceComponent">
+ <implementation.java class="calculator.SubtractServiceImpl"/>
+ </component>
+
+ <component name="MultiplyServiceComponent">
+ <implementation.java class="calculator.MultiplyServiceImpl"/>
+ </component>
+
+ <component name="DivideServiceComponent">
+ <implementation.java class="calculator.DivideServiceImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/src/test/resources/repository/folderWithJars/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/src/test/resources/repository/folderWithJars/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..8d6012e5c4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/src/test/resources/repository/folderWithJars/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:Calculator"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/src/test/resources/repository/folderWithJars/service.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/src/test/resources/repository/folderWithJars/service.jar
new file mode 100644
index 0000000000..fe264693fe
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/src/test/resources/repository/folderWithJars/service.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/src/test/resources/repository/folderWithJars/serviceImpl.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/src/test/resources/repository/folderWithJars/serviceImpl.jar
new file mode 100644
index 0000000000..d5dfb647d3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/src/test/resources/repository/folderWithJars/serviceImpl.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/src/test/resources/repository3/contribution.zip b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/src/test/resources/repository3/contribution.zip
new file mode 100644
index 0000000000..b293aa4bcc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-folder/src/test/resources/repository3/contribution.zip
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-composite/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-composite/pom.xml
new file mode 100644
index 0000000000..842a7ca47a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-composite/pom.xml
@@ -0,0 +1,67 @@
+<?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>tuscany-itest</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-contribution-export-composite</artifactId>
+ <name>Apache Tuscany SCA iTest Contribution Export</name>
+
+<dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-embedded</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-tomcat</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-composite/src/main/java/hello/Hello.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-composite/src/main/java/hello/Hello.java
new file mode 100644
index 0000000000..669821261c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-composite/src/main/java/hello/Hello.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package hello;
+
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * This is the business interface of the Hello service.
+ */
+@Remotable
+public interface Hello {
+
+ public String getGreetings(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-composite/src/main/java/hello/HelloImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-composite/src/main/java/hello/HelloImpl.java
new file mode 100644
index 0000000000..ff9f6e75f3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-composite/src/main/java/hello/HelloImpl.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package hello;
+
+import org.osoa.sca.annotations.Service;
+
+/**
+ * This class implements the HelloWorld service.
+ */
+@Service(Hello.class)
+public class HelloImpl implements Hello {
+
+ public String getGreetings(String name) {
+ return "Hello " + name;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-composite/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-composite/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..bea6f39932
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-composite/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://hello"
+ xmlns:hello="http://hello">
+ <deployable composite="hello:hello"/>
+ <export namespace="http://hello"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-composite/src/main/resources/hello.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-composite/src/main/resources/hello.composite
new file mode 100644
index 0000000000..aeeab337fa
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-composite/src/main/resources/hello.composite
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://hello"
+ xmlns:hello="http://hello"
+ name="hello">
+
+ <service name="HelloService" promote="HelloServiceComponent"/>
+
+ <component name="HelloServiceComponent">
+ <implementation.java class="hello.HelloImpl" />
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-composite/src/test/java/org/apache/tuscany/sca/test/contribution/HelloTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-composite/src/test/java/org/apache/tuscany/sca/test/contribution/HelloTestCase.java
new file mode 100644
index 0000000000..44614f243a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-composite/src/test/java/org/apache/tuscany/sca/test/contribution/HelloTestCase.java
@@ -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.
+ */
+package org.apache.tuscany.sca.test.contribution;
+
+import hello.Hello;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.contribution.Contribution;
+import org.apache.tuscany.sca.contribution.service.ContributionService;
+import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain;
+
+/**
+ * Tests that the helloworld server is available
+ */
+public class HelloTestCase extends TestCase {
+ private ClassLoader cl;
+ private EmbeddedSCADomain domain;
+
+ @Override
+ protected void setUp() throws Exception {
+ // Create a test embedded SCA domain
+ cl = getClass().getClassLoader();
+ domain = new EmbeddedSCADomain(cl, "http://localhost");
+
+ // Start the domain
+ domain.start();
+
+ // Contribute the SCA contribution
+ ContributionService contributionService = domain.getContributionService();
+
+ URL helloURL = getContributionURL(Hello.class);
+
+ // File helloContrib = new File("./target/classes/");
+ // URL helloURL = helloContrib.toURL();
+ Contribution consumerContribution =
+ contributionService.contribute("http://import-export/hello", helloURL, false);
+ Composite consumerComposite = consumerContribution.getDeployables().get(0);
+ domain.getDomainComposite().getIncludes().add(consumerComposite);
+ domain.buildComposite(consumerComposite);
+
+ // Start Components from my composite
+ domain.getCompositeActivator().activate(consumerComposite);
+ domain.getCompositeActivator().start(consumerComposite);
+ }
+
+ private URL getContributionURL(Class<?> cls) throws MalformedURLException {
+ String flag = "/" + cls.getName().replace('.', '/') + ".class";
+ URL url = cls.getResource(flag);
+ String root = url.toExternalForm();
+ root = root.substring(0, root.length() - flag.length() + 1);
+ if (root.startsWith("jar:") && root.endsWith("!/")) {
+ root = root.substring(4, root.length() - 2);
+ }
+ url = new URL(root);
+ return url;
+ }
+
+ public void testHello() throws IOException {
+ Hello hello = domain.getService(Hello.class, "HelloServiceComponent");
+ assertNotNull(hello);
+ assertEquals(hello.getGreetings("lresende"), "Hello lresende");
+ }
+
+ @Override
+ public void tearDown() throws Exception {
+ domain.close();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-java/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-java/pom.xml
new file mode 100644
index 0000000000..a863a7843f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-java/pom.xml
@@ -0,0 +1,67 @@
+<?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>tuscany-itest</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-contribution-export-java</artifactId>
+ <name>Apache Tuscany SCA iTest Contribution Java Export</name>
+
+<dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-embedded</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-tomcat</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-java/src/main/java/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-java/src/main/java/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..268d90e910
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-java/src/main/java/helloworld/HelloWorldService.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package helloworld;
+
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+ public String getGreetings(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-java/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-java/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..7e11adcec7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-java/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://helloworld"
+ xmlns:helloworld="http://helloworld">
+ <export.java package="helloworld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-java/src/main/resources/helloworld/HelloWorldImpl.componentType b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-java/src/main/resources/helloworld/HelloWorldImpl.componentType
new file mode 100644
index 0000000000..5a14b41650
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-java/src/main/resources/helloworld/HelloWorldImpl.componentType
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <service name="HelloWorldService">
+ <interface.java interface="helloworld.HelloWorldService" />
+ </service>
+
+</componentType>
+ \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-resource/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-resource/pom.xml
new file mode 100644
index 0000000000..d8133c4acc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-resource/pom.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-itest</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-contribution-export-resource</artifactId>
+ <name>Apache Tuscany SCA iTest Contribution Resource Export</name>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-resource/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-resource/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..f11eacb416
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-resource/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://store"
+ xmlns:helloworld="http://store">
+ <export.resource uri="ufservices/store.html"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-resource/src/main/resources/ufservices/store.html b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-resource/src/main/resources/ufservices/store.html
new file mode 100644
index 0000000000..1ff281373a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-resource/src/main/resources/ufservices/store.html
@@ -0,0 +1,27 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<html>
+<head>
+<title>Store</TITLE>
+</head>
+
+<body>
+<h1>Sample Store Page</h1>
+</body>
+</html>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-wsdl/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-wsdl/pom.xml
new file mode 100644
index 0000000000..7c504aee50
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-wsdl/pom.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-itest</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-contribution-export-wsdl</artifactId>
+ <name>Apache Tuscany SCA iTest Contribution WSDL Export</name>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-wsdl/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-wsdl/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..8254b667f2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-wsdl/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://helloworld"
+ xmlns:helloworld="http://helloworld">
+ <export namespace="http://helloworld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.wsdl
new file mode 100644
index 0000000000..0172fb2c7c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.wsdl
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+
+<wsdl:definitions targetNamespace="http://helloworld"
+ xmlns:tns="http://helloworld"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld">
+
+ <wsdl:types>
+ <schema xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns2="http://helloworld2"
+ targetNamespace="http://helloworld"
+ elementFormDefault="qualified">
+
+ <xsd:import namespace="http://helloworld2" schemaLocation="helloworld.xsd" />
+
+ <element name="getGreetings" type="tns2:getGreetingsType"/>
+ <element name="getGreetingsResponse" type="tns2:getGreetingsResponseType"/>
+
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
+ <wsdlsoap:address location="http://localhost:8085/HelloWorldServiceComponent"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.xsd
new file mode 100644
index 0000000000..d49e2ead99
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.xsd
@@ -0,0 +1,35 @@
+<?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.
+-->
+<schema targetNamespace="http://helloworld2"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:ns="http://helloworld2">
+
+ <complexType name="getGreetingsType">
+ <sequence>
+ <element name="name" type="string"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="getGreetingsResponseType">
+ <sequence>
+ <element name="getGreetingsReturn" type="string"/>
+ </sequence>
+ </complexType>
+</schema> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/pom.xml
new file mode 100644
index 0000000000..7fdc6b68e4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/pom.xml
@@ -0,0 +1,73 @@
+<?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>tuscany-itest</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-contribution-import-composite</artifactId>
+ <name>Apache Tuscany SCA iTest Contribution Import</name>
+
+<dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-contribution-export-composite</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-embedded</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-tomcat</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldImpl.java
new file mode 100644
index 0000000000..c062afaed0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldImpl.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package helloworld;
+
+import hello.Hello;
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+/**
+ * This class implements the HelloWorld service.
+ */
+@Service(HelloWorldService.class)
+public class HelloWorldImpl implements HelloWorldService {
+ @Reference
+ protected Hello helloServiceRef;
+
+ public String getGreetings(String name) {
+ return helloServiceRef.getGreetings(name);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldServer.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldServer.java
new file mode 100644
index 0000000000..e03ed4dc25
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldServer.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package helloworld;
+
+import java.io.IOException;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+/**
+ * This server program shows how to create an SCA runtime, and start it which
+ * activates the helloworld Web service endpoint.
+ */
+public class HelloWorldServer {
+
+ public static void main(String[] args) {
+
+ SCADomain scaDomain = SCADomain.newInstance("helloworldws.composite");
+
+ try {
+ System.out.println("HelloWorld server started (press enter to shutdown)");
+ System.in.read();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ scaDomain.close();
+ System.out.println("HelloWorld server stopped");
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..268d90e910
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldService.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package helloworld;
+
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+ public String getGreetings(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..130aa91093
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://helloworld"
+ xmlns:helloworld="http://helloworld"
+ xmlns:hello="http://hello">
+ <deployable composite="helloworld:helloworldws"/>
+ <import namespace="http://hello"/>
+ <!-- import namespace="http://hello" location="http://import-export/contrib-composite"/ -->
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/main/resources/helloworld.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/main/resources/helloworld.wsdl
new file mode 100644
index 0000000000..0172fb2c7c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/main/resources/helloworld.wsdl
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+
+<wsdl:definitions targetNamespace="http://helloworld"
+ xmlns:tns="http://helloworld"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld">
+
+ <wsdl:types>
+ <schema xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns2="http://helloworld2"
+ targetNamespace="http://helloworld"
+ elementFormDefault="qualified">
+
+ <xsd:import namespace="http://helloworld2" schemaLocation="helloworld.xsd" />
+
+ <element name="getGreetings" type="tns2:getGreetingsType"/>
+ <element name="getGreetingsResponse" type="tns2:getGreetingsResponseType"/>
+
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
+ <wsdlsoap:address location="http://localhost:8085/HelloWorldServiceComponent"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/main/resources/helloworld.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/main/resources/helloworld.xsd
new file mode 100644
index 0000000000..d49e2ead99
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/main/resources/helloworld.xsd
@@ -0,0 +1,35 @@
+<?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.
+-->
+<schema targetNamespace="http://helloworld2"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:ns="http://helloworld2">
+
+ <complexType name="getGreetingsType">
+ <sequence>
+ <element name="name" type="string"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="getGreetingsResponseType">
+ <sequence>
+ <element name="getGreetingsReturn" type="string"/>
+ </sequence>
+ </complexType>
+</schema> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/main/resources/helloworldws.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/main/resources/helloworldws.composite
new file mode 100644
index 0000000000..44ceba1240
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/main/resources/helloworldws.composite
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://helloworld"
+ xmlns:helloworld="http://helloworld"
+ xmlns:hello="http://hello"
+ name="helloworldws">
+
+ <component name="SourceHelloServiceComponent">
+ <implementation.composite name="hello:hello"/>
+ </component>
+
+ <component name="HelloWorldServiceComponent">
+ <service name="HelloWorldService">
+ <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" />
+ <binding.ws uri="http://localhost:8085/HelloWorldService"/>
+ </service>
+ <implementation.java class="helloworld.HelloWorldImpl" />
+ <reference name="helloServiceRef" target="SourceHelloServiceComponent/HelloService"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/test/java/org/apache/tuscany/test/contribution/HelloWorldServerTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/test/java/org/apache/tuscany/test/contribution/HelloWorldServerTestCase.java
new file mode 100644
index 0000000000..3cc6784eca
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-composite/src/test/java/org/apache/tuscany/test/contribution/HelloWorldServerTestCase.java
@@ -0,0 +1,126 @@
+/*
+ * 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.test.contribution;
+
+import hello.Hello;
+import helloworld.HelloWorldService;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.Socket;
+import java.net.URL;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.contribution.Contribution;
+import org.apache.tuscany.sca.contribution.service.ContributionService;
+import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain;
+
+/**
+ * Tests that the helloworld server is available
+ */
+public class HelloWorldServerTestCase extends TestCase {
+ private ClassLoader cl;
+ private EmbeddedSCADomain domain;
+ private Contribution helloWorldContribution;
+ private Contribution compositeContribution;
+
+ @Override
+ protected void setUp() throws Exception {
+ //Create a test embedded SCA domain
+ cl = getClass().getClassLoader();
+ domain = new EmbeddedSCADomain(cl, "http://localhost");
+
+ //Start the domain
+ domain.start();
+
+ // Contribute the SCA contribution
+ ContributionService contributionService = domain.getContributionService();
+
+ // File compositeContribLocation = new File("../export-composite/target/classes");
+ // URL compositeContribURL = compositeContribLocation.toURL();
+ URL compositeContribURL = getContributionURL(Hello.class);
+ compositeContribution =
+ contributionService.contribute("http://import-export/export-composite", compositeContribURL, false);
+ for (Composite deployable : compositeContribution.getDeployables()) {
+ domain.getDomainComposite().getIncludes().add(deployable);
+ domain.buildComposite(deployable);
+ }
+
+// File helloWorldContribLocation = new File("./target/classes/");
+// URL helloWorldContribURL = helloWorldContribLocation.toURL();
+ URL helloWorldContribURL = getContributionURL(HelloWorldService.class);
+ helloWorldContribution =
+ contributionService.contribute("http://import-export/helloworld", helloWorldContribURL, false);
+ for (Composite deployable : helloWorldContribution.getDeployables()) {
+ domain.getDomainComposite().getIncludes().add(deployable);
+ domain.buildComposite(deployable);
+ }
+
+ // Start Components from my composite
+ for (Composite deployable : helloWorldContribution.getDeployables()) {
+ domain.getCompositeActivator().activate(deployable);
+ domain.getCompositeActivator().start(deployable);
+ }
+ }
+
+ private URL getContributionURL(Class<?> cls) throws MalformedURLException {
+ String flag = "/" + cls.getName().replace('.', '/') + ".class";
+ URL url = cls.getResource(flag);
+ String root = url.toExternalForm();
+ root = root.substring(0, root.length() - flag.length() + 1);
+ if (root.startsWith("jar:") && root.endsWith("!/")) {
+ root = root.substring(4, root.length() - 2);
+ }
+ url = new URL(root);
+ return url;
+ }
+
+ public void testPing() throws IOException {
+ new Socket("127.0.0.1", 8085);
+ }
+
+ public void testServiceCall() throws IOException {
+ HelloWorldService helloWorldService =
+ domain.getService(HelloWorldService.class, "HelloWorldServiceComponent/HelloWorldService");
+ assertNotNull(helloWorldService);
+
+ assertEquals("Hello Smith", helloWorldService.getGreetings("Smith"));
+ }
+
+ @Override
+ public void tearDown() throws Exception {
+ ContributionService contributionService = domain.getContributionService();
+
+ // Remove the contribution from the in-memory repository
+ contributionService.remove("http://import-export/helloworld");
+ contributionService.remove("http://import-export/export-composite");
+
+ //Stop Components from my composite
+ for (Composite deployable : helloWorldContribution.getDeployables()) {
+ domain.getCompositeActivator().stop(deployable);
+ domain.getCompositeActivator().deactivate(deployable);
+ }
+
+ domain.stop();
+ domain.close();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-java/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-java/pom.xml
new file mode 100644
index 0000000000..a0fac8b806
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-java/pom.xml
@@ -0,0 +1,73 @@
+<?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>tuscany-itest</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-contribution-import-java</artifactId>
+ <name>Apache Tuscany SCA iTest Contribution Java Import</name>
+
+<dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-contribution-export-java</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-embedded</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-tomcat</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-java/src/main/java/helloworld/HelloWorldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-java/src/main/java/helloworld/HelloWorldImpl.java
new file mode 100644
index 0000000000..0de3c70303
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-java/src/main/java/helloworld/HelloWorldImpl.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package helloworld;
+
+import org.osoa.sca.annotations.Service;
+
+/**
+ * This class implements the HelloWorld service.
+ */
+@Service(HelloWorldService.class)
+public class HelloWorldImpl implements HelloWorldService {
+
+ public String getGreetings(String name) {
+ return "Hello " + name;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-java/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-java/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..224e2c4d79
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-java/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://helloworld"
+ xmlns:helloworld="http://helloworld">
+ <deployable composite="helloworld:helloworldws"/>
+ <import.java package="helloworld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-java/src/main/resources/helloworldws.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-java/src/main/resources/helloworldws.composite
new file mode 100644
index 0000000000..a53117e72f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-java/src/main/resources/helloworldws.composite
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://helloworld"
+ xmlns:helloworld="http://helloworld"
+ name="helloworldws">
+
+ <component name="HelloWorldServiceComponent">
+ <implementation.java class="helloworld.HelloWorldImpl" />
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-java/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-java/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java
new file mode 100644
index 0000000000..9bc94525e0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-java/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java
@@ -0,0 +1,127 @@
+/*
+ * 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.test.contribution;
+
+import helloworld.HelloWorldImpl;
+import helloworld.HelloWorldService;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.contribution.Contribution;
+import org.apache.tuscany.sca.contribution.service.ContributionService;
+import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain;
+
+/**
+ * Tests that the helloworld server is available
+ */
+public class HelloWorldServerTestCase extends TestCase {
+ private ClassLoader cl;
+ private EmbeddedSCADomain domain;
+ private Contribution helloWorldContribution;
+ private Contribution javaContribution;
+
+ @Override
+ protected void setUp() throws Exception {
+ //Create a test embedded SCA domain
+ cl = getClass().getClassLoader();
+ domain = new EmbeddedSCADomain(cl, "http://localhost");
+
+ //Start the domain
+ domain.start();
+
+ // Contribute the SCA contribution
+ ContributionService contributionService = domain.getContributionService();
+
+ //File javaContribLocation = new File("../export-java/target/classes");
+ //URL javaContribURL = javaContribLocation.toURL();
+ URL javaContribURL = getContributionURL(HelloWorldService.class);
+ javaContribution = contributionService.contribute("http://import-export/export-java", javaContribURL, false);
+ for (Composite deployable : javaContribution.getDeployables()) {
+ domain.getDomainComposite().getIncludes().add(deployable);
+ domain.buildComposite(deployable);
+ }
+
+ //File helloWorldContribLocation = new File("./target/classes/");
+ //URL helloWorldContribURL = helloWorldContribLocation.toURL();
+ URL helloWorldContribURL = getContributionURL(HelloWorldImpl.class);
+ helloWorldContribution = contributionService.contribute("http://import-export/helloworld", helloWorldContribURL, false);
+ for (Composite deployable : helloWorldContribution.getDeployables()) {
+ domain.getDomainComposite().getIncludes().add(deployable);
+ domain.buildComposite(deployable);
+ }
+
+ // Start Components from my composite
+ for (Composite deployable : helloWorldContribution.getDeployables()) {
+ domain.getCompositeActivator().activate(deployable);
+ domain.getCompositeActivator().start(deployable);
+ }
+ }
+
+ private URL getContributionURL(Class<?> cls) throws MalformedURLException {
+ String flag = "/" + cls.getName().replace('.', '/') + ".class";
+ URL url = cls.getResource(flag);
+ String root = url.toExternalForm();
+ root = root.substring(0, root.length() - flag.length() + 1);
+ if (root.startsWith("jar:") && root.endsWith("!/")) {
+ root = root.substring(4, root.length() - 2);
+ }
+ url = new URL(root);
+ return url;
+ }
+
+ public void testPing() throws IOException {
+ HelloWorldService helloWorldService =
+ domain.getService(HelloWorldService.class, "HelloWorldServiceComponent/HelloWorldService");
+ assertNotNull(helloWorldService);
+ assertEquals("Hello test", helloWorldService.getGreetings("test"));
+ }
+
+ public void testServiceCall() throws IOException {
+ HelloWorldService helloWorldService =
+ domain.getService(HelloWorldService.class, "HelloWorldServiceComponent/HelloWorldService");
+ assertNotNull(helloWorldService);
+
+ assertEquals("Hello Smith", helloWorldService.getGreetings("Smith"));
+ }
+
+ @Override
+ public void tearDown() throws Exception {
+ ContributionService contributionService = domain.getContributionService();
+
+ // Remove the contribution from the in-memory repository
+ contributionService.remove("http://import-export/helloworld");
+ contributionService.remove("http://import-export/export-java");
+
+ // Stop Components from my composite
+ for (Composite deployable : helloWorldContribution.getDeployables()) {
+ domain.getCompositeActivator().stop(deployable);
+ domain.getCompositeActivator().deactivate(deployable);
+ }
+
+ domain.stop();
+
+ domain.close();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-resource/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-resource/pom.xml
new file mode 100644
index 0000000000..2cf8245ccb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-resource/pom.xml
@@ -0,0 +1,102 @@
+<?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>tuscany-itest</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-contribution-import-resource</artifactId>
+ <name>Apache Tuscany SCA iTest Contribution Resource Import</name>
+
+<dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-contribution-export-resource</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-embedded</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-http</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-http-runtime</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-resource-runtime</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-contribution-resource</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-tomcat</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-resource/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-resource/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ac6d7becb3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-resource/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://store"
+ xmlns:store="http://store">
+ <deployable composite="store:store"/>
+ <import.resource uri="ufservices/store.html"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-resource/src/main/resources/store.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-resource/src/main/resources/store.composite
new file mode 100644
index 0000000000..bb5a7b764f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-resource/src/main/resources/store.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
+ targetNamespace="http://store"
+ xmlns:helloworld="http://store"
+ name="store">
+
+ <component name="store">
+ <tuscany:implementation.resource location="ufservices/store.html"/>
+ <service name="Resource">
+ <tuscany:binding.http uri="http://127.0.0.1:8085"/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-resource/src/test/java/org/apache/tuscany/sca/test/contribution/StoreTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-resource/src/test/java/org/apache/tuscany/sca/test/contribution/StoreTestCase.java
new file mode 100644
index 0000000000..1b7542b7d9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-resource/src/test/java/org/apache/tuscany/sca/test/contribution/StoreTestCase.java
@@ -0,0 +1,129 @@
+/*
+ * 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.test.contribution;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.Socket;
+import java.net.URL;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.contribution.Contribution;
+import org.apache.tuscany.sca.contribution.service.ContributionService;
+import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain;
+
+/**
+ * Tests that the helloworld server is available
+ */
+public class StoreTestCase extends TestCase {
+ private ClassLoader cl;
+ private EmbeddedSCADomain domain;
+ private Contribution storeContribution;
+ private Contribution resourceContribution;
+
+ @Override
+ protected void setUp() throws Exception {
+ //Create a test embedded SCA domain
+ cl = getClass().getClassLoader();
+ domain = new EmbeddedSCADomain(cl, "http://localhost");
+
+ //Start the domain
+ domain.start();
+
+ // Contribute the SCA contribution
+ ContributionService contributionService = domain.getContributionService();
+
+ URL javaContribURL = getContributionURL(cl, "ufservices/store.html");
+ resourceContribution = contributionService.contribute("http://import-export/export-resource", javaContribURL, false);
+ for (Composite deployable : resourceContribution.getDeployables()) {
+ domain.getDomainComposite().getIncludes().add(deployable);
+ domain.buildComposite(deployable);
+ }
+
+ URL storeContributionURL = getContributionURL(cl, "store.composite");
+
+ storeContribution =
+ contributionService.contribute("http://import-export/store", storeContributionURL, false);
+ for (Composite deployable : storeContribution.getDeployables()) {
+ domain.getDomainComposite().getIncludes().add(deployable);
+ domain.buildComposite(deployable);
+ }
+
+ // Start Components from my composite
+ for (Composite deployable : storeContribution.getDeployables()) {
+ domain.getCompositeActivator().activate(deployable);
+ domain.getCompositeActivator().start(deployable);
+ }
+ }
+
+ public void testPing() throws IOException {
+ new Socket("127.0.0.1", 8085);
+ }
+
+
+ @Override
+ public void tearDown() throws Exception {
+ ContributionService contributionService = domain.getContributionService();
+
+ // Remove the contribution from the in-memory repository
+ contributionService.remove("http://import-export/store");
+ contributionService.remove("http://import-export/export-resource");
+
+ // Stop Components from my composite
+ for (Composite deployable : storeContribution.getDeployables()) {
+ domain.getCompositeActivator().stop(deployable);
+ domain.getCompositeActivator().deactivate(deployable);
+ }
+
+ domain.stop();
+
+ domain.close();
+ }
+
+
+ /**
+ * Utility methods
+ */
+
+
+ private URL getContributionURL(ClassLoader cl, Class<?> cls) throws MalformedURLException {
+ String flag = "/" + cls.getName().replace('.', '/') + ".class";
+ URL url = cl.getResource(flag);
+ String root = url.toExternalForm();
+ root = root.substring(0, root.length() - flag.length() + 1);
+ if (root.startsWith("jar:") && root.endsWith("!/")) {
+ root = root.substring(4, root.length() - 2);
+ }
+ url = new URL(root);
+ return url;
+ }
+
+ private URL getContributionURL(ClassLoader cl, String uri) throws MalformedURLException {
+ URL url = cl.getResource(uri);
+ String root = url.toExternalForm();
+ root = root.substring(0, root.length() - uri.length());
+ if (root.startsWith("jar:") && root.endsWith("!/")) {
+ root = root.substring(4, root.length() - 2);
+ }
+ url = new URL(root);
+ return url;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-wsdl/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-wsdl/pom.xml
new file mode 100644
index 0000000000..a0d1b7d215
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-wsdl/pom.xml
@@ -0,0 +1,73 @@
+<?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>tuscany-itest</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-contribution-import-wsdl</artifactId>
+ <name>Apache Tuscany SCA iTest Contribution WSDL Import</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-contribution-export-wsdl</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-embedded</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-tomcat</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldImpl.java
new file mode 100644
index 0000000000..0de3c70303
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldImpl.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package helloworld;
+
+import org.osoa.sca.annotations.Service;
+
+/**
+ * This class implements the HelloWorld service.
+ */
+@Service(HelloWorldService.class)
+public class HelloWorldImpl implements HelloWorldService {
+
+ public String getGreetings(String name) {
+ return "Hello " + name;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldServer.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldServer.java
new file mode 100644
index 0000000000..e03ed4dc25
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldServer.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package helloworld;
+
+import java.io.IOException;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+/**
+ * This server program shows how to create an SCA runtime, and start it which
+ * activates the helloworld Web service endpoint.
+ */
+public class HelloWorldServer {
+
+ public static void main(String[] args) {
+
+ SCADomain scaDomain = SCADomain.newInstance("helloworldws.composite");
+
+ try {
+ System.out.println("HelloWorld server started (press enter to shutdown)");
+ System.in.read();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ scaDomain.close();
+ System.out.println("HelloWorld server stopped");
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..268d90e910
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldService.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package helloworld;
+
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+ public String getGreetings(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-wsdl/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-wsdl/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..a47b9a71e9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-wsdl/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://helloworld"
+ xmlns:helloworld="http://helloworld">
+ <deployable composite="helloworld:helloworldws"/>
+ <import namespace="http://helloworld" location="http://import-export/export-wsdl"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-wsdl/src/main/resources/helloworldws.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-wsdl/src/main/resources/helloworldws.composite
new file mode 100644
index 0000000000..76ccf71fb8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-wsdl/src/main/resources/helloworldws.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://helloworld"
+ xmlns:hw="http://helloworld"
+ name="helloworldws">
+
+ <component name="HelloWorldServiceComponent">
+ <service name="HelloWorldService">
+ <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" />
+ <binding.ws uri="http://localhost:8085/HelloWorldService"/>
+ </service>
+ <implementation.java class="helloworld.HelloWorldImpl" />
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-wsdl/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-wsdl/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java
new file mode 100644
index 0000000000..66227eacaa
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/import-wsdl/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java
@@ -0,0 +1,137 @@
+/*
+ * 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.test.contribution;
+
+import helloworld.HelloWorldService;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.Socket;
+import java.net.URL;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.contribution.Contribution;
+import org.apache.tuscany.sca.contribution.service.ContributionService;
+import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain;
+
+/**
+ * Tests that the helloworld server is available
+ */
+public class HelloWorldServerTestCase extends TestCase {
+ private ClassLoader cl;
+ private EmbeddedSCADomain domain;
+ private Contribution wsdlContribution;
+ private Contribution consumerContribution;
+
+ @Override
+ protected void setUp() throws Exception {
+ // Create a test embedded SCA domain
+ cl = getClass().getClassLoader();
+ domain = new EmbeddedSCADomain(cl, "http://localhost");
+
+ //Start the domain
+ domain.start();
+
+ // Contribute the SCA contribution
+ ContributionService contributionService = domain.getContributionService();
+
+ // File wsdlContribLocation = new File("../export-wsdl/target/classes");
+ // URL wsdlContribURL = wsdlContribLocation.toURL();
+ URL wsdlContribURL = getContributionURL(getClass().getClassLoader(), "helloworld.wsdl");
+ wsdlContribution = contributionService.contribute("http://import-export/export-wsdl", wsdlContribURL, false);
+ for (Composite deployable : wsdlContribution.getDeployables()) {
+ domain.getDomainComposite().getIncludes().add(deployable);
+ domain.buildComposite(deployable);
+ }
+
+ // File helloWorldContribLocation = new File("./target/classes/");
+ // URL helloWorldContribURL = helloWorldContribLocation.toURL();
+ URL helloWorldContribURL = getContributionURL(HelloWorldService.class);
+ consumerContribution =
+ contributionService.contribute("http://import-export/helloworld", helloWorldContribURL, false);
+ for (Composite deployable : consumerContribution.getDeployables()) {
+ domain.getDomainComposite().getIncludes().add(deployable);
+ domain.buildComposite(deployable);
+ }
+
+ // Start Components from my composite
+ for (Composite deployable : consumerContribution.getDeployables()) {
+ domain.getCompositeActivator().activate(deployable);
+ domain.getCompositeActivator().start(deployable);
+ }
+ }
+
+ public void testPing() throws IOException {
+ new Socket("127.0.0.1", 8085);
+ }
+
+ private URL getContributionURL(Class<?> cls) throws MalformedURLException {
+ String flag = "/" + cls.getName().replace('.', '/') + ".class";
+ URL url = cls.getResource(flag);
+ String root = url.toExternalForm();
+ root = root.substring(0, root.length() - flag.length() + 1);
+ if (root.startsWith("jar:") && root.endsWith("!/")) {
+ root = root.substring(4, root.length() - 2);
+ }
+ url = new URL(root);
+ return url;
+ }
+
+ private URL getContributionURL(ClassLoader cl, String flag) throws MalformedURLException {
+ URL url = cl.getResource(flag);
+ String root = url.toExternalForm();
+ root = root.substring(0, root.length() - flag.length());
+ if (root.startsWith("jar:") && root.endsWith("!/")) {
+ root = root.substring(4, root.length() - 2);
+ }
+ url = new URL(root);
+ // System.out.println(url);
+ return url;
+ }
+
+ public void testServiceCall() throws IOException {
+ HelloWorldService helloWorldService =
+ domain.getService(HelloWorldService.class, "HelloWorldServiceComponent/HelloWorldService");
+ assertNotNull(helloWorldService);
+
+ assertEquals("Hello Smith", helloWorldService.getGreetings("Smith"));
+ }
+
+ @Override
+ public void tearDown() throws Exception {
+ ContributionService contributionService = domain.getContributionService();
+
+ // Remove the contribution from the in-memory repository
+ contributionService.remove("http://import-export/helloworld");
+ contributionService.remove("http://import-export/export-wsdl");
+
+ // Stop Components from my composite
+ for (Composite deployable : consumerContribution.getDeployables()) {
+ domain.getCompositeActivator().stop(deployable);
+ domain.getCompositeActivator().deactivate(deployable);
+ }
+
+ domain.stop();
+
+ domain.close();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/pom.xml
new file mode 100644
index 0000000000..ee7813c577
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-import-export/pom.xml
@@ -0,0 +1,50 @@
+<?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>tuscany-itest</artifactId>
+ <version>1.6-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-contribution-import-export</artifactId>
+ <packaging>pom</packaging>
+ <name>Apache Tuscany SCA Contribution Import/Export Integration Tests</name>
+
+ <modules>
+ <module>export-composite</module>
+ <module>export-java</module>
+ <module>export-resource</module>
+ <module>export-wsdl</module>
+ <module>import-composite</module>
+ <module>import-java</module>
+ <module>import-resource</module>
+ <module>import-wsdl</module>
+ </modules>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-zip/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-zip/pom.xml
new file mode 100644
index 0000000000..47bb226f8e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-zip/pom.xml
@@ -0,0 +1,39 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-contribution-zip</artifactId>
+ <name>Apache Tuscany SCA iTest Contribution ZIP</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-zip/src/test/java/calculator/CalculatorService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-zip/src/test/java/calculator/CalculatorService.java
new file mode 100644
index 0000000000..b4c677b371
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-zip/src/test/java/calculator/CalculatorService.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package calculator;
+
+public interface CalculatorService {
+ double add(double n1, double n2);
+
+ double subtract(double n1, double n2);
+
+ double multiply(double n1, double n2);
+
+ double divide(double n1, double n2);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-zip/src/test/java/org/apache/tuscany/sca/contribution/zip/ContributionZIPTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-zip/src/test/java/org/apache/tuscany/sca/contribution/zip/ContributionZIPTestCase.java
new file mode 100644
index 0000000000..303e2a6d9a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-zip/src/test/java/org/apache/tuscany/sca/contribution/zip/ContributionZIPTestCase.java
@@ -0,0 +1,56 @@
+/*
+ * 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.contribution.zip;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+import calculator.CalculatorService;
+
+/**
+ * Test SCADomain.newInstance and invocation of a service.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ContributionZIPTestCase extends TestCase {
+
+ private Node node;
+
+ @Override
+ protected void setUp() throws Exception {
+ node =
+ NodeFactory.newInstance().createNode(new Contribution("foo",
+ "src/test/resources/repository/contribution.zip"));
+ node.start();
+ }
+
+ public void testInvoke() throws Exception {
+ CalculatorService service = node.getService(CalculatorService.class, "CalculatorServiceComponent");
+ assertEquals(3.0, service.add(1, 2));
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-zip/src/test/resources/repository/contribution.zip b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-zip/src/test/resources/repository/contribution.zip
new file mode 100644
index 0000000000..25476c2206
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/contribution-zip/src/test/resources/repository/contribution.zip
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/pom.xml
new file mode 100644
index 0000000000..f2d8783cc0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/pom.xml
@@ -0,0 +1,144 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-corba-binding</artifactId>
+ <name>Apache Tuscany SCA CORBA Binding Integration Tests</name>
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0.1</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-corba-runtime</artifactId>
+ <version>2.0.1</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-corba-jse</artifactId>
+ <version>2.0.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-corba-jse-tns</artifactId>
+ <version>2.0.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-sca-runtime</artifactId>
+ <version>2.0.1</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-databinding-axiom</artifactId>
+ <version>2.0.1</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-databinding-sdo</artifactId>
+ <version>2.0.1</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.5</version>
+ <scope>compile</scope>
+ </dependency>
+
+ </dependencies>
+ <build>
+ <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/sdo-source</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.tuscany.sdo</groupId>
+ <artifactId>tuscany-sdo-plugin</artifactId>
+ <version>1.1.1</version>
+ <executions>
+ <execution>
+ <id>generate-scenariofour-sdo</id>
+ <phase>generate-sources</phase>
+ <configuration>
+ <schemaFile>
+ ${basedir}/src/test/resources/scenariofour.xsd
+ </schemaFile>
+ <javaPackage>
+ org.apache.tuscany.sca.test.corba.scenariofour
+ </javaPackage>
+ <prefix>ScenarioFour</prefix>
+ <noNotification>true</noNotification>
+ <noContainer>true</noContainer>
+ <noUnsettable>true</noUnsettable>
+ </configuration>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/ScenarioFiveTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/ScenarioFiveTestCase.java
new file mode 100644
index 0000000000..6c362b0062
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/ScenarioFiveTestCase.java
@@ -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.test.corba;
+
+import static org.junit.Assert.fail;
+
+import org.apache.tuscany.sca.host.corba.jse.tns.TnsDefaultCorbaHost;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.test.corba.types.ScenarioFive;
+import org.apache.tuscany.sca.test.corba.types.ScenarioFiveComponent;
+import org.junit.Test;
+
+/**
+ * @version $Rev$ $Date$
+ * Tests usage of TNS JSE Corba host
+ */
+public class ScenarioFiveTestCase {
+
+ @Test
+ public void test_providedNameServer() {
+ TestCorbaHost.setCorbaHost(new TnsDefaultCorbaHost());
+ try {
+ // just make sure we can obtain and use the reference with success
+ Node node = NodeFactory.getInstance().createNode("ScenarioFive.composite", getClass().getClassLoader()).start();
+ ScenarioFive scenarioFive =
+ node.getService(ScenarioFiveComponent.class, "ScenarioFive").getScenarioFive();
+ scenarioFive.doNothing();
+ node.stop();
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/ScenarioFourTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/ScenarioFourTestCase.java
new file mode 100644
index 0000000000..da4644057e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/ScenarioFourTestCase.java
@@ -0,0 +1,153 @@
+/*
+ * 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.test.corba;
+
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.host.corba.jse.DefaultCorbaHost;
+import org.apache.tuscany.sca.host.corba.naming.TransientNameServer;
+import org.apache.tuscany.sca.host.corba.naming.TransientNameService;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.test.corba.scenariofour.ScenarioFourFactory;
+import org.apache.tuscany.sca.test.corba.scenariofour.ScenarioFourSdo;
+import org.apache.tuscany.sca.test.corba.types.ScenarioFour;
+import org.apache.tuscany.sca.test.corba.types.ScenarioFourComponent;
+import org.apache.tuscany.sca.test.corba.types.ScenarioFourException;
+import org.apache.tuscany.sca.test.corba.types.ScenarioFourStruct;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * @version $Rev$ $Date$
+ * Tests SCA default binding over CORBA binding
+ */
+public class ScenarioFourTestCase {
+
+ // note that those values are also used in resources/*.composite file
+ private static Node node;
+ private static ScenarioFourComponent scenarioFourComponent;
+ private static ScenarioFour scenarioFour;
+ private static TransientNameServer server;
+ private static final int ORB_INITIAL_PORT = 5080;
+
+ /**
+ * Initial configuration
+ */
+ @BeforeClass
+ public static void setUp() {
+ System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding", "{http://tuscany.apache.org/xmlns/sca/1.1}binding.corba");
+ TestCorbaHost.setCorbaHost(new DefaultCorbaHost());
+ try {
+ server = new TransientNameServer("localhost", ORB_INITIAL_PORT, TransientNameService.DEFAULT_SERVICE_NAME);
+ Thread t = server.start();
+ if (t == null) {
+ Assert.fail("The naming server cannot be started");
+ }
+ // obtain node
+ node = NodeFactory.getInstance().createNode("ScenarioFour.composite", TestCorbaHost.class.getClassLoader()).start();
+ scenarioFourComponent = node.getService(ScenarioFourComponent.class, "ScenarioFour");
+ scenarioFour = scenarioFourComponent.getScenarioFour();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Test cleanup
+ */
+ @AfterClass
+ public static void tearDown() {
+ server.stop();
+ node.stop();
+ System.clearProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding");
+ }
+
+ /**
+ * General tests for passing JAXB objects
+ */
+ @Test
+ public void test_generalJAXB() {
+ try {
+ ScenarioFourStruct input = new ScenarioFourStruct();
+ input.field1 = "Test";
+ input.field2 = 1;
+ input.field3 = new double[1];
+ ScenarioFourStruct output = scenarioFour.setStruct(input);
+ assertTrue(input.equals(output));
+ } catch (Exception e) {
+ e.printStackTrace();
+ Assert.fail(e.getMessage());
+ }
+ }
+
+ /**
+ * Test for JAXB exceptions
+ */
+ @Test
+ public void test_exceptionsJAXB() {
+ try {
+ scenarioFour.exceptionTest();
+ fail();
+ } catch (ScenarioFourException e) {
+ assertTrue(ScenarioFourException.DEFAULT_CONTENT.equals(e.getContent()));
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ /**
+ * General test for passing SDO objects
+ */
+ @Test
+ public void test_generalSDO() {
+ try {
+ ScenarioFourSdo scenarioFourSdo = ScenarioFourFactory.INSTANCE.createScenarioFourSdo();
+ scenarioFourSdo.setMessage("Test1");
+ scenarioFourSdo.setSymbol("Test2");
+ ScenarioFourSdo result = scenarioFour.passScenarioFourStruct(scenarioFourSdo);
+ assertTrue(scenarioFourSdo.getMessage().equals(result.getMessage()) && scenarioFourSdo.getSymbol()
+ .equals(result.getSymbol()));
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ /**
+ * Tests reusing local name server with multiple bindings
+ */
+ @Test
+ public void test_nameServerReuse() {
+ try {
+ ScenarioFour scenarioFour =
+ node.getService(ScenarioFourComponent.class, "ScenarioFourReuse").getScenarioFour();
+ ScenarioFourStruct struct = new ScenarioFourStruct();
+ scenarioFour.setStruct(struct);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/ScenarioOneTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/ScenarioOneTestCase.java
new file mode 100644
index 0000000000..4b58fab1f0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/ScenarioOneTestCase.java
@@ -0,0 +1,373 @@
+/*
+ * 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.test.corba;
+
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.host.corba.jse.DefaultCorbaHost;
+import org.apache.tuscany.sca.host.corba.naming.TransientNameServer;
+import org.apache.tuscany.sca.host.corba.naming.TransientNameService;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.test.corba.generated.Color;
+import org.apache.tuscany.sca.test.corba.generated.InnerStruct;
+import org.apache.tuscany.sca.test.corba.generated.RichStruct;
+import org.apache.tuscany.sca.test.corba.generated.ScenarioOne;
+import org.apache.tuscany.sca.test.corba.generated.ScenarioOneHelper;
+import org.apache.tuscany.sca.test.corba.generated.ScenarioOneOperations;
+import org.apache.tuscany.sca.test.corba.generated.UnexpectedException;
+import org.apache.tuscany.sca.test.corba.generated.WrongColor;
+import org.apache.tuscany.sca.test.corba.types.ScenarioOneServant;
+import org.apache.tuscany.sca.test.corba.types.TColor;
+import org.apache.tuscany.sca.test.corba.types.TInnerStruct;
+import org.apache.tuscany.sca.test.corba.types.TRichStruct;
+import org.apache.tuscany.sca.test.corba.types.TScenarioOne;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.omg.CORBA.ORB;
+import org.omg.CosNaming.NameComponent;
+import org.omg.CosNaming.NamingContext;
+import org.omg.CosNaming.NamingContextHelper;
+
+/**
+ * @version $Rev$ $Date$
+ * This test class contains three main tests:<br>
+ * 1. Tuscany is being used as a consumer of some non-Tuscany CORBA service<br>
+ * 2. Tuscany is being used as a service provider, which will be consumed by
+ * non-Tuscany CORBA client<br>
+ * 3. Tuscany is being used as a service provider, which will be consumed by
+ * Tuscany client<br>
+ * But that's not all, there are some other variations. Tuscany CORBA binding
+ * supports using Java interface generated by IDLJ, also it supports interfaces
+ * provided by user - I combined those cases in each test.<br>
+ */
+public class ScenarioOneTestCase {
+
+ // note that those values are also used in resources/*.composite file
+ private static int ORB_INITIAL_PORT = 5060;
+ private static String SERVICE_NAME = "ScenarioOne";
+
+ private static Node node;
+
+ private static TransientNameServer server;
+ private static ORB orb;
+
+ /**
+ * Sets up name service, creates and registers traditional CORBA service,
+ * obtains SCADomain
+ */
+ @BeforeClass
+ public static void setUp() {
+ TestCorbaHost.setCorbaHost(new DefaultCorbaHost());
+ try {
+ try {
+ server =
+ new TransientNameServer("localhost", ORB_INITIAL_PORT, TransientNameService.DEFAULT_SERVICE_NAME);
+ Thread t = server.start();
+ if (t == null) {
+ Assert.fail("The naming server cannot be started");
+ }
+ orb = server.getORB();
+ } catch (Throwable e) {
+ e.printStackTrace();
+ Assert.fail(e.getMessage());
+ }
+ org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
+ NamingContext ncRef = NamingContextHelper.narrow(objRef);
+ NameComponent nc = new NameComponent(SERVICE_NAME, "");
+ NameComponent path[] = {nc};
+ ScenarioOne scenarioOne = new ScenarioOneServant();
+ ncRef.rebind(path, scenarioOne);
+ // obtain node
+ node = NodeFactory.getInstance().createNode("ScenarioOne.composite", TestCorbaHost.class.getClassLoader()).start();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Kills previously spawned name service.
+ */
+ @AfterClass
+ public static void tearDown() {
+ server.stop();
+ node.stop();
+ }
+
+ /**
+ * Creates nicely filled structure for user provided interface.
+ *
+ * @return
+ */
+ private static TRichStruct getTRichStruct() {
+ int[][] intArr = new int[][] { {1, 2}, {3, 4}};
+ TInnerStruct innerStruct = new TInnerStruct(intArr, "Test", TColor.green);
+ String[] strSeq = {"i", "Test"};
+ return new TRichStruct(innerStruct, strSeq, 1);
+
+ }
+
+ /**
+ * Creates nicely filled structure for generated interface.
+ *
+ * @return
+ */
+ private static RichStruct getRichStruct() {
+ int[][] intArr = new int[][] { {1, 2}, {3, 4}};
+ InnerStruct innerStruct2 = new InnerStruct(intArr, "Test", Color.green);
+ String[] strSeq = {"i", "Test"};
+ return new RichStruct(innerStruct2, strSeq, 1);
+ }
+
+ /**
+ * Compares String arrays
+ *
+ * @param arg1
+ * @param arg2
+ * @return
+ */
+ private boolean areSrringArraysEqual(String[] arg1, String[] arg2) {
+ try {
+ for (int i = 0; i < arg1.length; i++) {
+ if (!arg1[i].equals(arg2[i])) {
+ return false;
+ }
+ }
+ } catch (Exception e) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Compares two dimensional int arrays
+ *
+ * @param arg1
+ * @param arg2
+ * @return
+ */
+ private boolean areTwoDimIntArraysEqual(int[][] arg1, int[][] arg2) {
+ try {
+ for (int i = 0; i < arg1.length; i++) {
+ for (int j = 0; j < arg1[i].length; j++) {
+ if (arg1[i][j] != arg2[i][j]) {
+ return false;
+ }
+ }
+ }
+ } catch (Exception e) {
+ return false;
+ }
+ return true;
+ }
+
+ private boolean equalTo(TInnerStruct arg1, TInnerStruct arg2) {
+ return (arg1.color.value() == arg2.color.value() && arg1.stringField.equals(arg2.stringField) && areTwoDimIntArraysEqual(arg1.twoDimLongSequence,
+ arg2.twoDimLongSequence));
+ }
+
+ private boolean equalTo(InnerStruct arg1, InnerStruct arg2) {
+ return (arg1.color.value() == arg2.color.value() && arg1.stringField.equals(arg2.stringField) && areTwoDimIntArraysEqual(arg1.twoDimLongSequence,
+ arg2.twoDimLongSequence));
+ }
+
+ private boolean equalTo(TRichStruct arg1, TRichStruct arg2) {
+ return (equalTo(arg1.innerStruct, arg2.innerStruct) && arg2.longField == arg1.longField && areSrringArraysEqual(arg1.stringSequence,
+ arg2.stringSequence));
+ }
+
+ private boolean equalTo(RichStruct arg1, RichStruct arg2) {
+ return (equalTo(arg1.innerStruct, arg2.innerStruct) && arg2.longField == arg1.longField && areSrringArraysEqual(arg1.stringSequence,
+ arg2.stringSequence));
+ }
+
+ /**
+ * Helper method used several times for various components. Executes several
+ * tests using Tuscany reference binding. This helper uses generated Java
+ * interface.
+ *
+ * @param componentName
+ */
+ private void testClientUsingGeneratedInterface(String componentName) {
+ ScenarioOneOperations component = node.getService(ScenarioOneOperations.class, componentName);
+ RichStruct richStruct = getRichStruct();
+
+ try {
+ RichStruct result = component.setRichStruct(richStruct);
+ assertTrue(equalTo(result, richStruct));
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+
+ try {
+ richStruct.longField = 0;
+ component.setRichStruct(richStruct);
+ fail();
+ } catch (Exception e) {
+ assertTrue(e instanceof UnexpectedException);
+ }
+
+ try {
+ richStruct.longField = 1;
+ richStruct.innerStruct.color = Color.red;
+ component.setRichStruct(richStruct);
+ } catch (Exception e) {
+ assertTrue(e instanceof WrongColor);
+ }
+ }
+
+ /**
+ * Helper method used several times for various components. Executes several
+ * tests using Tuscany reference binding. This helper uses user provided
+ * Java interface.
+ *
+ * @param componentName
+ */
+ private void testClientUsingUserProvidedInterface(String componentName) {
+ TScenarioOne component = node.getService(TScenarioOne.class, componentName);
+ TRichStruct tRichStruct = getTRichStruct();
+
+ try {
+ TRichStruct result = component.setRichStruct(tRichStruct);
+ assertTrue(equalTo(result, tRichStruct));
+ } catch (Exception e) {
+ fail();
+ }
+
+ try {
+ tRichStruct.longField = 0;
+ component.setRichStruct(tRichStruct);
+ fail();
+ } catch (Exception e) {
+ assertTrue(e instanceof UnexpectedException);
+ }
+
+ try {
+ tRichStruct.longField = 1;
+ tRichStruct.innerStruct.color = TColor.red;
+ component.setRichStruct(tRichStruct);
+ } catch (Exception e) {
+ assertTrue(e instanceof WrongColor);
+ }
+ }
+
+ public void testServiceUsingGeneratedClient(String serviceName) {
+ try {
+ org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
+ NamingContext ncRef = NamingContextHelper.narrow(objRef);
+ NameComponent nc = new NameComponent(serviceName, "");
+ NameComponent path[] = {nc};
+ ScenarioOne so = ScenarioOneHelper.narrow(ncRef.resolve(path));
+
+ RichStruct richStruct = getRichStruct();
+ RichStruct result = so.setRichStruct(richStruct);
+ assertTrue(equalTo(result, richStruct));
+
+ try {
+ richStruct.innerStruct.color = Color.red;
+ result = so.setRichStruct(richStruct);
+ fail();
+ } catch (Exception e) {
+ assertTrue(e instanceof WrongColor);
+ }
+
+ try {
+ richStruct.innerStruct.color = Color.green;
+ richStruct.longField = 0;
+ result = so.setRichStruct(richStruct);
+ fail();
+ } catch (Exception e) {
+ assertTrue(e instanceof UnexpectedException);
+ }
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ /**
+ * Service is exposed in traditional way (using CORBA API from JDK).
+ * Reference is obtained from Tuscany.
+ */
+ @Test
+ public void test_TraditionalService_TuscanyClient() {
+
+ // Client is using user provided interface
+ testClientUsingUserProvidedInterface("ScenarioOne");
+
+ // Client is using generated interface
+ testClientUsingGeneratedInterface("ScenarioOneGenerated");
+ }
+
+ /**
+ * Service is exposed by Tuscany. Reference is obtained in traditional way.
+ * (using CORBA API from JDK)
+ *
+ * @throws Exception
+ */
+ @Test
+ public void test_TuscanyService_TraditionalClient() throws Exception {
+
+ // tests service which uses user provided interface
+ testServiceUsingGeneratedClient("ScenarioOneTuscany");
+
+ // tests service which uses generated interface
+ testServiceUsingGeneratedClient("ScenarioOneTuscanyGenerated");
+ }
+
+ /**
+ * Service is exposed by Tuscany. Reference is obtained from Tuscany. There
+ * are 4 combinations (basing on if we are using generated or user provided
+ * interfaces, both on service and reference side).
+ */
+ @Test
+ public void test_TuscanyService_TuscanyClient() {
+
+ // Client is using user provided interface, service is using user
+ // provided interface.
+ testClientUsingUserProvidedInterface("TU2TS1");
+
+ // Client is using user provided interface, service is using generated
+ // interface.
+ testClientUsingUserProvidedInterface("TU2TS2");
+
+ // Client is using generated interface, service is using user provided
+ // interface.
+ testClientUsingGeneratedInterface("TG2TS1");
+
+ // Client is using generated interface, service is using generated
+ // interface.
+ testClientUsingGeneratedInterface("TG2TS2");
+ }
+
+ /**
+ * Tests using reference obtained by corbaname URI
+ */
+ @Test
+ public void test_serviceAndReferenceByURI() {
+ testClientUsingUserProvidedInterface("UriBinding");
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/ScenarioSixTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/ScenarioSixTestCase.java
new file mode 100644
index 0000000000..3d3efb9c29
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/ScenarioSixTestCase.java
@@ -0,0 +1,230 @@
+/*
+ * 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.test.corba;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.host.corba.jse.DefaultCorbaHost;
+import org.apache.tuscany.sca.host.corba.naming.TransientNameServer;
+import org.apache.tuscany.sca.host.corba.naming.TransientNameService;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct;
+import org.apache.tuscany.sca.test.corba.generated.InnerUnion;
+import org.apache.tuscany.sca.test.corba.generated.RichUnion;
+import org.apache.tuscany.sca.test.corba.generated.ScenarioSix;
+import org.apache.tuscany.sca.test.corba.generated.ScenarioSixHelper;
+import org.apache.tuscany.sca.test.corba.types.ScenarioSixServant;
+import org.apache.tuscany.sca.test.corba.types.TAnnotatedStruct;
+import org.apache.tuscany.sca.test.corba.types.TInnerUnion;
+import org.apache.tuscany.sca.test.corba.types.TRichUnion;
+import org.apache.tuscany.sca.test.corba.types.TScenarioSix;
+import org.apache.tuscany.sca.test.corba.types.TScenarioSixComponent;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.omg.CORBA.ORB;
+import org.omg.CosNaming.NameComponent;
+import org.omg.CosNaming.NamingContext;
+import org.omg.CosNaming.NamingContextHelper;
+
+/**
+ * Tests using enhanced Java interfaces (annotations)
+ *
+ * @version $Rev$ $Date$
+ */
+public class ScenarioSixTestCase {
+
+ // note that those values are also used in resources/*.composite file
+ private static int ORB_INITIAL_PORT = 5050;
+ private static String SERVICE_NAME = "ScenarioSix";
+ private static String TUSCANY_SERVICE_NAME = "ScenarioSixTuscany";
+
+ private static Node node;
+
+ private static TransientNameServer server;
+ private static ORB orb;
+
+ /**
+ * Sets up name service, creates and registers traditional CORBA service,
+ * obtains SCADomain
+ */
+ @BeforeClass
+ public static void setUp() {
+ TestCorbaHost.setCorbaHost(new DefaultCorbaHost());
+ try {
+ try {
+ server =
+ new TransientNameServer("localhost", ORB_INITIAL_PORT, TransientNameService.DEFAULT_SERVICE_NAME);
+ Thread t = server.start();
+ if (t == null) {
+ Assert.fail("The naming server cannot be started");
+ }
+ orb = server.getORB();
+ } catch (Throwable e) {
+ e.printStackTrace();
+ Assert.fail(e.getMessage());
+ }
+ org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
+ NamingContext ncRef = NamingContextHelper.narrow(objRef);
+ NameComponent nc = new NameComponent(SERVICE_NAME, "");
+ NameComponent path[] = {nc};
+ ScenarioSix scenarioSix = new ScenarioSixServant();
+ ncRef.rebind(path, scenarioSix);
+ // obtain node
+ node = NodeFactory.getInstance().createNode("ScenarioSix.composite", TestCorbaHost.class.getClassLoader()).start();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Kills previously spawned name service.
+ */
+ @AfterClass
+ public static void tearDown() {
+ server.stop();
+ node.stop();
+ }
+
+ private boolean areArraysEqual(String[][] arr1, String[][] arr2) {
+ for (int i = 0; i < arr1.length; i++) {
+ for (int j = 0; j < arr1[i].length; j++) {
+ if (!arr1[i][j].equals(arr2[i][j])) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ private String[][] getStringArray() {
+ String[][] result = { {"Hello", "World"}, {"Hi", "Again"}};
+ return result;
+ }
+
+ /**
+ * Tests passing arrays. Tuscany acts as a client, servant object is served
+ * in a traditional way
+ */
+ @Test
+ public void test_arraysPassing_tuscanyAsClient() {
+ try {
+ TScenarioSix ref = node.getService(TScenarioSixComponent.class, "ScenarioSix").getScenarioSix();
+ String[][] arrayArg = getStringArray();
+ String[][] arrayRes = ref.passStringArray(arrayArg);
+ assertTrue(areArraysEqual(arrayArg, arrayRes));
+ TAnnotatedStruct structArg = new TAnnotatedStruct();
+ structArg.stringArray = getStringArray();
+ TAnnotatedStruct structRes = ref.passAnnotatedStruct(structArg);
+ assertTrue(areArraysEqual(structArg.stringArray, structRes.stringArray));
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ /**
+ * Tests passing arrays. Servant object is served by Tuscany and it is
+ * accessed by traditional Corba client
+ */
+ @Test
+ public void test_arraysPassing_tuscanyAsService() {
+ try {
+ org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
+ NamingContext ncRef = NamingContextHelper.narrow(objRef);
+ NameComponent nc = new NameComponent(TUSCANY_SERVICE_NAME, "");
+ NameComponent path[] = {nc};
+ ScenarioSix ref = ScenarioSixHelper.narrow(ncRef.resolve(path));
+ String[][] stringArg = getStringArray();
+ String[][] stringRes = ref.passStringArray(stringArg);
+ assertTrue(areArraysEqual(stringArg, stringRes));
+ AnnotatedStruct structArg = new AnnotatedStruct();
+ structArg.stringArray = getStringArray();
+ AnnotatedStruct structRes = ref.passAnnotatedStruct(structArg);
+ assertTrue(areArraysEqual(structArg.stringArray, structRes.stringArray));
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ /**
+ * Tests passing unions. Tuscany acts as a client, servant object is served
+ * in a traditional way
+ */
+ @Test
+ public void test_unionsPassing_tuscanyAsClient() {
+ try {
+ TScenarioSix ref = node.getService(TScenarioSixComponent.class, "ScenarioSix").getScenarioSix();
+ TRichUnion arg = new TRichUnion();
+ TInnerUnion inner = new TInnerUnion();
+ inner.setY(10f);
+ arg.setIu(inner);
+ TRichUnion result = ref.passRichUnion(arg);
+ assertEquals(arg.getIu().getY(), result.getIu().getY(), 0.0f);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ try {
+ TScenarioSix ref = node.getService(TScenarioSixComponent.class, "ScenarioSix").getScenarioSix();
+ TRichUnion arg = new TRichUnion();
+ arg.setY(15f);
+ TRichUnion result = ref.passRichUnion(arg);
+ assertEquals(arg.getY(), result.getY(), 0.0f);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ /**
+ * Tests passing unions. Servant object is served by Tuscany and it is
+ * accessed by traditional Corba client
+ */
+ @Test
+ public void test_unionsPassing_tuscanyAsService() {
+ try {
+ org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
+ NamingContext ncRef = NamingContextHelper.narrow(objRef);
+ NameComponent nc = new NameComponent(TUSCANY_SERVICE_NAME, "");
+ NameComponent path[] = {nc};
+ ScenarioSix ref = ScenarioSixHelper.narrow(ncRef.resolve(path));
+ RichUnion arg = new RichUnion();
+ InnerUnion inner = new InnerUnion();
+ inner.y(20f);
+ arg.iu(inner);
+ RichUnion result = ref.passRichUnion(arg);
+ assertEquals(arg.iu().y(), result.iu().y(), 0.0f);
+ arg = new RichUnion();
+ arg.y(15f);
+ result = ref.passRichUnion(arg);
+ assertEquals(arg.y(), result.y(), 0.0f);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/ScenarioThreeTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/ScenarioThreeTestCase.java
new file mode 100644
index 0000000000..0190df2d1c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/ScenarioThreeTestCase.java
@@ -0,0 +1,132 @@
+/*
+ * 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.test.corba;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.host.corba.jse.DefaultCorbaHost;
+import org.apache.tuscany.sca.host.corba.naming.TransientNameServer;
+import org.apache.tuscany.sca.host.corba.naming.TransientNameService;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.test.corba.types.TScenarioThree;
+import org.apache.tuscany.sca.test.corba.types.TScenarioThreeComponent;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * @version $Rev$ $Date$
+ * Tests various mapping scenarios.
+ */
+public class ScenarioThreeTestCase {
+
+ // note that those values are also used in resources/*.composite file
+ private static int ORB_INITIAL_PORT = 5060;
+ private static Node node;
+ private static TransientNameServer server;
+
+ /**
+ * Sets up name service, creates and registers traditional CORBA service,
+ * obtains SCADomain
+ */
+ @BeforeClass
+ public static void setUp() {
+ TestCorbaHost.setCorbaHost(new DefaultCorbaHost());
+ try {
+ try {
+ server =
+ new TransientNameServer("localhost", ORB_INITIAL_PORT, TransientNameService.DEFAULT_SERVICE_NAME);
+ Thread t = server.start();
+ if (t == null) {
+ Assert.fail("The naming server cannot be started");
+ }
+ } catch (Throwable e) {
+ e.printStackTrace();
+ Assert.fail(e.getMessage());
+ }
+ // obtain node
+ node = NodeFactory.getInstance().createNode("ScenarioThree.composite", TestCorbaHost.class.getClassLoader()).start();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Kills previously spawned name service.
+ */
+ @AfterClass
+ public static void tearDown() {
+ server.stop();
+ node.stop();
+ }
+
+ /**
+ * Tests mapping for getters and setters
+ */
+ @Test
+ public void test_getterSetter() {
+ try {
+ TScenarioThree ref =
+ node.getService(TScenarioThreeComponent.class, "ScenarioThreeReference").getScenarioThree();
+ ref.getIntField();
+ ref.setIntField(1);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ /**
+ * Tests mapping the same operation names but with different cases
+ */
+ @Test
+ public void test_nameCase() {
+ try {
+ TScenarioThree ref =
+ node.getService(TScenarioThreeComponent.class, "ScenarioThreeReference").getScenarioThree();
+ assertEquals(0, ref.caseDifferent());
+ assertEquals(1, ref.CaseDifferent());
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ /**
+ * Tests mappings for operations with overloaded names
+ */
+ @Test
+ public void test_overloadedNames() {
+ try {
+ TScenarioThree ref =
+ node.getService(TScenarioThreeComponent.class, "ScenarioThreeReference").getScenarioThree();
+ ref.overloadedName();
+ ref.overloadedName("");
+ ref.overloadedName("", 0);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/ScenarioTwoTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/ScenarioTwoTestCase.java
new file mode 100644
index 0000000000..af2c9ea711
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/ScenarioTwoTestCase.java
@@ -0,0 +1,141 @@
+/*
+ * 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.test.corba;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.host.corba.jse.DefaultCorbaHost;
+import org.apache.tuscany.sca.host.corba.naming.TransientNameServer;
+import org.apache.tuscany.sca.host.corba.naming.TransientNameService;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.test.corba.generated.ScenarioTwo;
+import org.apache.tuscany.sca.test.corba.generated.ScenarioTwoHelper;
+import org.apache.tuscany.sca.test.corba.types.ScenarioTwoServant;
+import org.apache.tuscany.sca.test.corba.types.TScenarioTwo;
+import org.apache.tuscany.sca.test.corba.types.TScenarioTwoComponent;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.omg.CORBA.ORB;
+import org.omg.CosNaming.NameComponent;
+import org.omg.CosNaming.NamingContext;
+import org.omg.CosNaming.NamingContextHelper;
+
+/**
+ * @version $Rev$ $Date$
+ * Tests attribute get/set mapping using cooperation between traditional CORBA
+ * and Tuscany CORBA
+ */
+public class ScenarioTwoTestCase {
+
+ // note that those values are also used in resources/*.composite file
+ private static int ORB_INITIAL_PORT = 5060;
+
+ private static Node node;
+
+ private static TransientNameServer server;
+ private static ORB orb;
+ private static String TUSCANY_SERVICE_NAME = "ScenarioTwo";
+ private static String GENERATED_SERVICE_NAME = "ScenarioTwoGenerated";
+
+ /**
+ * Sets up name service, creates and registers traditional CORBA service,
+ * obtains SCADomain
+ */
+ @BeforeClass
+ public static void setUp() {
+ TestCorbaHost.setCorbaHost(new DefaultCorbaHost());
+ try {
+ try {
+ server =
+ new TransientNameServer("localhost", ORB_INITIAL_PORT, TransientNameService.DEFAULT_SERVICE_NAME);
+ Thread t = server.start();
+ if (t == null) {
+ Assert.fail("The naming server cannot be started");
+ }
+ orb = server.getORB();
+ org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
+ NamingContext ncRef = NamingContextHelper.narrow(objRef);
+ NameComponent nc = new NameComponent(GENERATED_SERVICE_NAME, "");
+ NameComponent path[] = {nc};
+ ScenarioTwo scenarioTwo = new ScenarioTwoServant();
+ ncRef.rebind(path, scenarioTwo);
+ } catch (Throwable e) {
+ e.printStackTrace();
+ Assert.fail(e.getMessage());
+ }
+ // obtain node
+ node = NodeFactory.getInstance().createNode("ScenarioTwo.composite", TestCorbaHost.class.getClassLoader()).start();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Kills previously spawned name service.
+ */
+ @AfterClass
+ public static void tearDown() {
+ server.stop();
+ node.stop();
+ }
+
+ /**
+ * Tests using objects attribute (which is server in traditional way) by
+ * Tuscany CORBA binding
+ */
+ @Test
+ public void test_tuscanyGetSetAttribute() {
+ try {
+ TScenarioTwo ref = node.getService(TScenarioTwoComponent.class, "ScenarioTwo").getScenarioTwo();
+ String strVal = "Whatever";
+ ref.setStringField(strVal);
+ assertEquals(strVal, ref.getStringField());
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ /**
+ * Tests using objects attribute (which is served by Tuscany) in traditional
+ * way (by idlj generated code)
+ */
+ @Test
+ public void test_getneratedGetSetAttribute() {
+ try {
+ orb = server.getORB();
+ org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
+ NamingContext ncRef = NamingContextHelper.narrow(objRef);
+ NameComponent nc = new NameComponent(TUSCANY_SERVICE_NAME, "");
+ NameComponent path[] = {nc};
+ ScenarioTwo st = ScenarioTwoHelper.narrow(ncRef.resolve(path));
+ st.stringField("");
+ assertEquals("", st.stringField());
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/TestCorbaHost.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/TestCorbaHost.java
new file mode 100644
index 0000000000..bd1ce8cb49
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/TestCorbaHost.java
@@ -0,0 +1,56 @@
+/*
+ * 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.test.corba;
+
+import org.apache.tuscany.sca.host.corba.CorbaHost;
+import org.apache.tuscany.sca.host.corba.CorbaHostException;
+import org.apache.tuscany.sca.host.corba.jse.DefaultCorbaHost;
+import org.omg.CORBA.Object;
+
+/**
+ * @version $Rev$ $Date$
+ * Mock Corba host which proxies to configured Corba host
+ */
+public class TestCorbaHost implements CorbaHost {
+
+ private static CorbaHost corbaHost = new DefaultCorbaHost();
+
+ /**
+ * Configures environment to use given Corba host
+ *
+ * @param corbaHost Corba host to use
+ */
+ public static void setCorbaHost(CorbaHost corbaHost) {
+ TestCorbaHost.corbaHost = corbaHost;
+ }
+
+ public Object lookup(String arg0) throws CorbaHostException {
+ return TestCorbaHost.corbaHost.lookup(arg0);
+ }
+
+ public void registerServant(String arg0, Object arg1) throws CorbaHostException {
+ TestCorbaHost.corbaHost.registerServant(arg0, arg1);
+ }
+
+ public void unregisterServant(String arg0) throws CorbaHostException {
+ TestCorbaHost.corbaHost.unregisterServant(arg0);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/TestCorbaHostModuleActivator.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/TestCorbaHostModuleActivator.java
new file mode 100644
index 0000000000..3639ba812d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/TestCorbaHostModuleActivator.java
@@ -0,0 +1,50 @@
+/*
+ * 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.test.corba;
+
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.ModuleActivator;
+import org.apache.tuscany.sca.host.corba.CorbaHostExtensionPoint;
+
+/**
+ * @version $Rev$ $Date$
+ * Registers TestCorbaHost as a Corba host extension.
+ */
+public class TestCorbaHostModuleActivator implements ModuleActivator {
+ private ExtensionPointRegistry registry;
+
+ /**
+ *
+ */
+ public TestCorbaHostModuleActivator(ExtensionPointRegistry registry) {
+ super();
+ this.registry = registry;
+ }
+
+ public void start() {
+ CorbaHostExtensionPoint chep = registry.getExtensionPoint(CorbaHostExtensionPoint.class);
+ chep.getCorbaHosts().add(0, new TestCorbaHost());
+ }
+
+ public void stop() {
+
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/AnnotatedStruct.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/AnnotatedStruct.java
new file mode 100644
index 0000000000..abcec43d0e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/AnnotatedStruct.java
@@ -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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/AnnotatedStruct.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* sobota, 16 sierpieñ 2008 15:31:35 CEST
+*/
+
+public final class AnnotatedStruct implements org.omg.CORBA.portable.IDLEntity
+{
+ public String stringArray[][] = null;
+
+ public AnnotatedStruct ()
+ {
+ } // ctor
+
+ public AnnotatedStruct (String[][] _stringArray)
+ {
+ stringArray = _stringArray;
+ } // ctor
+
+} // class AnnotatedStruct
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/AnnotatedStructHelper.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/AnnotatedStructHelper.java
new file mode 100644
index 0000000000..171a7919a2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/AnnotatedStructHelper.java
@@ -0,0 +1,97 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/AnnotatedStructHelper.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* sobota, 16 sierpieñ 2008 15:31:35 CEST
+*/
+
+abstract public class AnnotatedStructHelper
+{
+ private static String _id = "IDL:org/apache/tuscany/sca/test/corba/generated/AnnotatedStruct/AnnotatedStruct:1.0";
+
+ public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct that)
+ {
+ org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
+ a.type (type ());
+ write (out, that);
+ a.read_value (out.create_input_stream (), type ());
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct extract (org.omg.CORBA.Any a)
+ {
+ return read (a.create_input_stream ());
+ }
+
+ private static org.omg.CORBA.TypeCode __typeCode = null;
+ private static boolean __active = false;
+ synchronized public static org.omg.CORBA.TypeCode type ()
+ {
+ if (__typeCode == null)
+ {
+ synchronized (org.omg.CORBA.TypeCode.class)
+ {
+ if (__typeCode == null)
+ {
+ if (__active)
+ {
+ return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
+ }
+ __active = true;
+ org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [1];
+ org.omg.CORBA.TypeCode _tcOf_members0 = null;
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().create_array_tc (2, _tcOf_members0 );
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().create_array_tc (2, _tcOf_members0 );
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.test.corba.generated.StringArrayHelper.id (), "StringArray", _tcOf_members0);
+ _members0[0] = new org.omg.CORBA.StructMember (
+ "stringArray",
+ _tcOf_members0,
+ null);
+ __typeCode = org.omg.CORBA.ORB.init ().create_struct_tc (org.apache.tuscany.sca.test.corba.generated.AnnotatedStructHelper.id (), "AnnotatedStruct", _members0);
+ __active = false;
+ }
+ }
+ }
+ return __typeCode;
+ }
+
+ public static String id ()
+ {
+ return _id;
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct read (org.omg.CORBA.portable.InputStream istream)
+ {
+ org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct value = new org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct ();
+ value.stringArray = org.apache.tuscany.sca.test.corba.generated.StringArrayHelper.read (istream);
+ return value;
+ }
+
+ public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct value)
+ {
+ org.apache.tuscany.sca.test.corba.generated.StringArrayHelper.write (ostream, value.stringArray);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/AnnotatedStructHolder.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/AnnotatedStructHolder.java
new file mode 100644
index 0000000000..5f2dc56033
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/AnnotatedStructHolder.java
@@ -0,0 +1,57 @@
+/*
+ * 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.test.corba.generated;
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/AnnotatedStructHolder.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* sobota, 16 sierpieñ 2008 15:31:35 CEST
+*/
+
+public final class AnnotatedStructHolder implements org.omg.CORBA.portable.Streamable
+{
+ public org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct value = null;
+
+ public AnnotatedStructHolder ()
+ {
+ }
+
+ public AnnotatedStructHolder (org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct initialValue)
+ {
+ value = initialValue;
+ }
+
+ public void _read (org.omg.CORBA.portable.InputStream i)
+ {
+ value = org.apache.tuscany.sca.test.corba.generated.AnnotatedStructHelper.read (i);
+ }
+
+ public void _write (org.omg.CORBA.portable.OutputStream o)
+ {
+ org.apache.tuscany.sca.test.corba.generated.AnnotatedStructHelper.write (o, value);
+ }
+
+ public org.omg.CORBA.TypeCode _type ()
+ {
+ return org.apache.tuscany.sca.test.corba.generated.AnnotatedStructHelper.type ();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/Color.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/Color.java
new file mode 100644
index 0000000000..24a628d406
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/Color.java
@@ -0,0 +1,61 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/Color.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* pi±tek, 27 czerwiec 2008 20:40:03 CEST
+*/
+
+public class Color implements org.omg.CORBA.portable.IDLEntity
+{
+ private int __value;
+ private static int __size = 3;
+ private static org.apache.tuscany.sca.test.corba.generated.Color[] __array = new org.apache.tuscany.sca.test.corba.generated.Color [__size];
+
+ public static final int _red = 0;
+ public static final org.apache.tuscany.sca.test.corba.generated.Color red = new org.apache.tuscany.sca.test.corba.generated.Color(_red);
+ public static final int _yellow = 1;
+ public static final org.apache.tuscany.sca.test.corba.generated.Color yellow = new org.apache.tuscany.sca.test.corba.generated.Color(_yellow);
+ public static final int _green = 2;
+ public static final org.apache.tuscany.sca.test.corba.generated.Color green = new org.apache.tuscany.sca.test.corba.generated.Color(_green);
+
+ public int value ()
+ {
+ return __value;
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.Color from_int (int value)
+ {
+ if (value >= 0 && value < __size)
+ return __array[value];
+ else
+ throw new org.omg.CORBA.BAD_PARAM ();
+ }
+
+ protected Color (int value)
+ {
+ __value = value;
+ __array[__value] = this;
+ }
+} // class Color
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ColorHelper.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ColorHelper.java
new file mode 100644
index 0000000000..da37f28e39
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ColorHelper.java
@@ -0,0 +1,72 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/ColorHelper.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* pi±tek, 27 czerwiec 2008 20:40:03 CEST
+*/
+
+abstract public class ColorHelper
+{
+ private static String _id = "IDL:org/apache/tuscany/sca/test/corba/generated/Color:1.0";
+
+ public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.test.corba.generated.Color that)
+ {
+ org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
+ a.type (type ());
+ write (out, that);
+ a.read_value (out.create_input_stream (), type ());
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.Color extract (org.omg.CORBA.Any a)
+ {
+ return read (a.create_input_stream ());
+ }
+
+ private static org.omg.CORBA.TypeCode __typeCode = null;
+ synchronized public static org.omg.CORBA.TypeCode type ()
+ {
+ if (__typeCode == null)
+ {
+ __typeCode = org.omg.CORBA.ORB.init ().create_enum_tc (org.apache.tuscany.sca.test.corba.generated.ColorHelper.id (), "Color", new String[] { "red", "yellow", "green"} );
+ }
+ return __typeCode;
+ }
+
+ public static String id ()
+ {
+ return _id;
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.Color read (org.omg.CORBA.portable.InputStream istream)
+ {
+ return org.apache.tuscany.sca.test.corba.generated.Color.from_int (istream.read_long ());
+ }
+
+ public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.test.corba.generated.Color value)
+ {
+ ostream.write_long (value.value ());
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ColorHolder.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ColorHolder.java
new file mode 100644
index 0000000000..7b2466f791
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ColorHolder.java
@@ -0,0 +1,57 @@
+/*
+ * 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.test.corba.generated;
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/ColorHolder.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* pi±tek, 27 czerwiec 2008 20:40:03 CEST
+*/
+
+public final class ColorHolder implements org.omg.CORBA.portable.Streamable
+{
+ public org.apache.tuscany.sca.test.corba.generated.Color value = null;
+
+ public ColorHolder ()
+ {
+ }
+
+ public ColorHolder (org.apache.tuscany.sca.test.corba.generated.Color initialValue)
+ {
+ value = initialValue;
+ }
+
+ public void _read (org.omg.CORBA.portable.InputStream i)
+ {
+ value = org.apache.tuscany.sca.test.corba.generated.ColorHelper.read (i);
+ }
+
+ public void _write (org.omg.CORBA.portable.OutputStream o)
+ {
+ org.apache.tuscany.sca.test.corba.generated.ColorHelper.write (o, value);
+ }
+
+ public org.omg.CORBA.TypeCode _type ()
+ {
+ return org.apache.tuscany.sca.test.corba.generated.ColorHelper.type ();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerStruct.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerStruct.java
new file mode 100644
index 0000000000..27052a1549
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerStruct.java
@@ -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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/InnerStruct.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* pi±tek, 27 czerwiec 2008 20:40:03 CEST
+*/
+
+public final class InnerStruct implements org.omg.CORBA.portable.IDLEntity
+{
+ public int twoDimLongSequence[][] = null;
+ public String stringField = null;
+ public org.apache.tuscany.sca.test.corba.generated.Color color = null;
+
+ public InnerStruct ()
+ {
+ } // ctor
+
+ public InnerStruct (int[][] _twoDimLongSequence, String _stringField, org.apache.tuscany.sca.test.corba.generated.Color _color)
+ {
+ twoDimLongSequence = _twoDimLongSequence;
+ stringField = _stringField;
+ color = _color;
+ } // ctor
+
+} // class InnerStruct
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerStructHelper.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerStructHelper.java
new file mode 100644
index 0000000000..57daa51f42
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerStructHelper.java
@@ -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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/InnerStructHelper.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* pi±tek, 27 czerwiec 2008 20:40:03 CEST
+*/
+
+abstract public class InnerStructHelper
+{
+ private static String _id = "IDL:org/apache/tuscany/sca/test/corba/generated/InnerStruct/InnerStruct:1.0";
+
+ public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.test.corba.generated.InnerStruct that)
+ {
+ org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
+ a.type (type ());
+ write (out, that);
+ a.read_value (out.create_input_stream (), type ());
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.InnerStruct extract (org.omg.CORBA.Any a)
+ {
+ return read (a.create_input_stream ());
+ }
+
+ private static org.omg.CORBA.TypeCode __typeCode = null;
+ private static boolean __active = false;
+ synchronized public static org.omg.CORBA.TypeCode type ()
+ {
+ if (__typeCode == null)
+ {
+ synchronized (org.omg.CORBA.TypeCode.class)
+ {
+ if (__typeCode == null)
+ {
+ if (__active)
+ {
+ return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
+ }
+ __active = true;
+ org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [3];
+ org.omg.CORBA.TypeCode _tcOf_members0 = null;
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().create_sequence_tc (0, _tcOf_members0);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.test.corba.generated.LongSequenceHelper.id (), "LongSequence", _tcOf_members0);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().create_sequence_tc (0, _tcOf_members0);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.test.corba.generated.TwoDimLongSequenceHelper.id (), "TwoDimLongSequence", _tcOf_members0);
+ _members0[0] = new org.omg.CORBA.StructMember (
+ "twoDimLongSequence",
+ _tcOf_members0,
+ null);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
+ _members0[1] = new org.omg.CORBA.StructMember (
+ "stringField",
+ _tcOf_members0,
+ null);
+ _tcOf_members0 = org.apache.tuscany.sca.test.corba.generated.ColorHelper.type ();
+ _members0[2] = new org.omg.CORBA.StructMember (
+ "color",
+ _tcOf_members0,
+ null);
+ __typeCode = org.omg.CORBA.ORB.init ().create_struct_tc (org.apache.tuscany.sca.test.corba.generated.InnerStructHelper.id (), "InnerStruct", _members0);
+ __active = false;
+ }
+ }
+ }
+ return __typeCode;
+ }
+
+ public static String id ()
+ {
+ return _id;
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.InnerStruct read (org.omg.CORBA.portable.InputStream istream)
+ {
+ org.apache.tuscany.sca.test.corba.generated.InnerStruct value = new org.apache.tuscany.sca.test.corba.generated.InnerStruct ();
+ value.twoDimLongSequence = org.apache.tuscany.sca.test.corba.generated.TwoDimLongSequenceHelper.read (istream);
+ value.stringField = istream.read_string ();
+ value.color = org.apache.tuscany.sca.test.corba.generated.ColorHelper.read (istream);
+ return value;
+ }
+
+ public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.test.corba.generated.InnerStruct value)
+ {
+ org.apache.tuscany.sca.test.corba.generated.TwoDimLongSequenceHelper.write (ostream, value.twoDimLongSequence);
+ ostream.write_string (value.stringField);
+ org.apache.tuscany.sca.test.corba.generated.ColorHelper.write (ostream, value.color);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerStructHolder.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerStructHolder.java
new file mode 100644
index 0000000000..88fef0b4fb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerStructHolder.java
@@ -0,0 +1,57 @@
+/*
+ * 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.test.corba.generated;
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/InnerStructHolder.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* pi±tek, 27 czerwiec 2008 20:40:03 CEST
+*/
+
+public final class InnerStructHolder implements org.omg.CORBA.portable.Streamable
+{
+ public org.apache.tuscany.sca.test.corba.generated.InnerStruct value = null;
+
+ public InnerStructHolder ()
+ {
+ }
+
+ public InnerStructHolder (org.apache.tuscany.sca.test.corba.generated.InnerStruct initialValue)
+ {
+ value = initialValue;
+ }
+
+ public void _read (org.omg.CORBA.portable.InputStream i)
+ {
+ value = org.apache.tuscany.sca.test.corba.generated.InnerStructHelper.read (i);
+ }
+
+ public void _write (org.omg.CORBA.portable.OutputStream o)
+ {
+ org.apache.tuscany.sca.test.corba.generated.InnerStructHelper.write (o, value);
+ }
+
+ public org.omg.CORBA.TypeCode _type ()
+ {
+ return org.apache.tuscany.sca.test.corba.generated.InnerStructHelper.type ();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerUnion.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerUnion.java
new file mode 100644
index 0000000000..c5d2aab203
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerUnion.java
@@ -0,0 +1,130 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/InnerUnion.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* niedziela, 17 sierpieñ 2008 19:07:14 CEST
+*/
+
+public final class InnerUnion implements org.omg.CORBA.portable.IDLEntity
+{
+ private int ___x;
+ private float ___y;
+ private int __discriminator;
+ private boolean __uninitialized = true;
+
+ public InnerUnion ()
+ {
+ }
+
+ public int discriminator ()
+ {
+ if (__uninitialized)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ return __discriminator;
+ }
+
+ public int x ()
+ {
+ if (__uninitialized)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ verifyx (__discriminator);
+ return ___x;
+ }
+
+ public void x (int value)
+ {
+ __discriminator = 1;
+ ___x = value;
+ __uninitialized = false;
+ }
+
+ public void x (int discriminator, int value)
+ {
+ verifyx (discriminator);
+ __discriminator = discriminator;
+ ___x = value;
+ __uninitialized = false;
+ }
+
+ private void verifyx (int discriminator)
+ {
+ if (discriminator != 1)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ }
+
+ public float y ()
+ {
+ if (__uninitialized)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ verifyy (__discriminator);
+ return ___y;
+ }
+
+ public void y (float value)
+ {
+ __discriminator = 2;
+ ___y = value;
+ __uninitialized = false;
+ }
+
+ public void y (int discriminator, float value)
+ {
+ verifyy (discriminator);
+ __discriminator = discriminator;
+ ___y = value;
+ __uninitialized = false;
+ }
+
+ private void verifyy (int discriminator)
+ {
+ if (discriminator != 2)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ }
+
+ public void _default ()
+ {
+ __discriminator = -2147483648;
+ __uninitialized = false;
+ }
+
+ public void _default (int discriminator)
+ {
+ verifyDefault( discriminator ) ;
+ __discriminator = discriminator ;
+ __uninitialized = false;
+ }
+
+ private void verifyDefault( int value )
+ {
+ switch (value) {
+ case 1:
+ case 2:
+ throw new org.omg.CORBA.BAD_OPERATION() ;
+
+ default:
+ return;
+ }
+ }
+
+} // class InnerUnion
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerUnionHelper.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerUnionHelper.java
new file mode 100644
index 0000000000..db57fc5cba
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerUnionHelper.java
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/InnerUnionHelper.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* niedziela, 17 sierpieñ 2008 19:07:14 CEST
+*/
+
+abstract public class InnerUnionHelper
+{
+ private static String _id = "IDL:org/apache/tuscany/sca/test/corba/generated/InnerUnion/InnerUnion:1.0";
+
+ public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.test.corba.generated.InnerUnion that)
+ {
+ org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
+ a.type (type ());
+ write (out, that);
+ a.read_value (out.create_input_stream (), type ());
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.InnerUnion extract (org.omg.CORBA.Any a)
+ {
+ return read (a.create_input_stream ());
+ }
+
+ private static org.omg.CORBA.TypeCode __typeCode = null;
+ synchronized public static org.omg.CORBA.TypeCode type ()
+ {
+ if (__typeCode == null)
+ {
+ org.omg.CORBA.TypeCode _disTypeCode0;
+ _disTypeCode0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
+ org.omg.CORBA.UnionMember[] _members0 = new org.omg.CORBA.UnionMember [2];
+ org.omg.CORBA.TypeCode _tcOf_members0;
+ org.omg.CORBA.Any _anyOf_members0;
+
+ // Branch for x (case label 1)
+ _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
+ _anyOf_members0.insert_long ((int)1);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
+ _members0[0] = new org.omg.CORBA.UnionMember (
+ "x",
+ _anyOf_members0,
+ _tcOf_members0,
+ null);
+
+ // Branch for y (case label 2)
+ _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
+ _anyOf_members0.insert_long ((int)2);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_float);
+ _members0[1] = new org.omg.CORBA.UnionMember (
+ "y",
+ _anyOf_members0,
+ _tcOf_members0,
+ null);
+ __typeCode = org.omg.CORBA.ORB.init ().create_union_tc (org.apache.tuscany.sca.test.corba.generated.InnerUnionHelper.id (), "InnerUnion", _disTypeCode0, _members0);
+ }
+ return __typeCode;
+ }
+
+ public static String id ()
+ {
+ return _id;
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.InnerUnion read (org.omg.CORBA.portable.InputStream istream)
+ {
+ org.apache.tuscany.sca.test.corba.generated.InnerUnion value = new org.apache.tuscany.sca.test.corba.generated.InnerUnion ();
+ int _dis0 = (int)0;
+ _dis0 = istream.read_long ();
+ switch (_dis0)
+ {
+ case 1:
+ int _x = (int)0;
+ _x = istream.read_long ();
+ value.x (_x);
+ break;
+ case 2:
+ float _y = (float)0;
+ _y = istream.read_float ();
+ value.y (_y);
+ break;
+ default:
+ value._default( _dis0 ) ;
+ break;
+ }
+ return value;
+ }
+
+ public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.test.corba.generated.InnerUnion value)
+ {
+ ostream.write_long (value.discriminator ());
+ switch (value.discriminator ())
+ {
+ case 1:
+ ostream.write_long (value.x ());
+ break;
+ case 2:
+ ostream.write_float (value.y ());
+ break;
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerUnionHolder.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerUnionHolder.java
new file mode 100644
index 0000000000..ec25e703c5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerUnionHolder.java
@@ -0,0 +1,56 @@
+/*
+ * 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.test.corba.generated;
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/InnerUnionHolder.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* niedziela, 17 sierpieñ 2008 19:07:14 CEST
+*/
+
+public final class InnerUnionHolder implements org.omg.CORBA.portable.Streamable
+{
+ public org.apache.tuscany.sca.test.corba.generated.InnerUnion value = null;
+
+ public InnerUnionHolder ()
+ {
+ }
+
+ public InnerUnionHolder (org.apache.tuscany.sca.test.corba.generated.InnerUnion initialValue)
+ {
+ value = initialValue;
+ }
+
+ public void _read (org.omg.CORBA.portable.InputStream i)
+ {
+ value = org.apache.tuscany.sca.test.corba.generated.InnerUnionHelper.read (i);
+ }
+
+ public void _write (org.omg.CORBA.portable.OutputStream o)
+ {
+ org.apache.tuscany.sca.test.corba.generated.InnerUnionHelper.write (o, value);
+ }
+
+ public org.omg.CORBA.TypeCode _type ()
+ {
+ return org.apache.tuscany.sca.test.corba.generated.InnerUnionHelper.type ();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/LongSequenceHelper.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/LongSequenceHelper.java
new file mode 100644
index 0000000000..940b391499
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/LongSequenceHelper.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/LongSequenceHelper.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* pi±tek, 27 czerwiec 2008 20:40:03 CEST
+*/
+
+abstract public class LongSequenceHelper
+{
+ private static String _id = "IDL:org/apache/tuscany/sca/test/corba/generated/LongSequence:1.0";
+
+ public static void insert (org.omg.CORBA.Any a, int[] that)
+ {
+ org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
+ a.type (type ());
+ write (out, that);
+ a.read_value (out.create_input_stream (), type ());
+ }
+
+ public static int[] extract (org.omg.CORBA.Any a)
+ {
+ return read (a.create_input_stream ());
+ }
+
+ private static org.omg.CORBA.TypeCode __typeCode = null;
+ synchronized public static org.omg.CORBA.TypeCode type ()
+ {
+ if (__typeCode == null)
+ {
+ __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
+ __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode);
+ __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.test.corba.generated.LongSequenceHelper.id (), "LongSequence", __typeCode);
+ }
+ return __typeCode;
+ }
+
+ public static String id ()
+ {
+ return _id;
+ }
+
+ public static int[] read (org.omg.CORBA.portable.InputStream istream)
+ {
+ int value[] = null;
+ int _len0 = istream.read_long ();
+ value = new int[_len0];
+ istream.read_long_array (value, 0, _len0);
+ return value;
+ }
+
+ public static void write (org.omg.CORBA.portable.OutputStream ostream, int[] value)
+ {
+ ostream.write_long (value.length);
+ ostream.write_long_array (value, 0, value.length);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/LongSequenceHolder.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/LongSequenceHolder.java
new file mode 100644
index 0000000000..63a11dc56a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/LongSequenceHolder.java
@@ -0,0 +1,58 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/LongSequenceHolder.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* pi±tek, 27 czerwiec 2008 20:40:03 CEST
+*/
+
+public final class LongSequenceHolder implements org.omg.CORBA.portable.Streamable
+{
+ public int value[] = null;
+
+ public LongSequenceHolder ()
+ {
+ }
+
+ public LongSequenceHolder (int[] initialValue)
+ {
+ value = initialValue;
+ }
+
+ public void _read (org.omg.CORBA.portable.InputStream i)
+ {
+ value = org.apache.tuscany.sca.test.corba.generated.LongSequenceHelper.read (i);
+ }
+
+ public void _write (org.omg.CORBA.portable.OutputStream o)
+ {
+ org.apache.tuscany.sca.test.corba.generated.LongSequenceHelper.write (o, value);
+ }
+
+ public org.omg.CORBA.TypeCode _type ()
+ {
+ return org.apache.tuscany.sca.test.corba.generated.LongSequenceHelper.type ();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichStruct.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichStruct.java
new file mode 100644
index 0000000000..8c0bfc9e39
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichStruct.java
@@ -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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/RichStruct.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* pi±tek, 27 czerwiec 2008 20:40:03 CEST
+*/
+
+public final class RichStruct implements org.omg.CORBA.portable.IDLEntity
+{
+ public org.apache.tuscany.sca.test.corba.generated.InnerStruct innerStruct = null;
+ public String stringSequence[] = null;
+ public int longField = (int)0;
+
+ public RichStruct ()
+ {
+ } // ctor
+
+ public RichStruct (org.apache.tuscany.sca.test.corba.generated.InnerStruct _innerStruct, String[] _stringSequence, int _longField)
+ {
+ innerStruct = _innerStruct;
+ stringSequence = _stringSequence;
+ longField = _longField;
+ } // ctor
+
+} // class RichStruct
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichStructHelper.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichStructHelper.java
new file mode 100644
index 0000000000..72ff55a711
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichStructHelper.java
@@ -0,0 +1,110 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/RichStructHelper.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* pi±tek, 27 czerwiec 2008 20:40:03 CEST
+*/
+
+abstract public class RichStructHelper
+{
+ private static String _id = "IDL:org/apache/tuscany/sca/test/corba/generated/RichStruct/RichStruct:1.0";
+
+ public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.test.corba.generated.RichStruct that)
+ {
+ org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
+ a.type (type ());
+ write (out, that);
+ a.read_value (out.create_input_stream (), type ());
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.RichStruct extract (org.omg.CORBA.Any a)
+ {
+ return read (a.create_input_stream ());
+ }
+
+ private static org.omg.CORBA.TypeCode __typeCode = null;
+ private static boolean __active = false;
+ synchronized public static org.omg.CORBA.TypeCode type ()
+ {
+ if (__typeCode == null)
+ {
+ synchronized (org.omg.CORBA.TypeCode.class)
+ {
+ if (__typeCode == null)
+ {
+ if (__active)
+ {
+ return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
+ }
+ __active = true;
+ org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [3];
+ org.omg.CORBA.TypeCode _tcOf_members0 = null;
+ _tcOf_members0 = org.apache.tuscany.sca.test.corba.generated.InnerStructHelper.type ();
+ _members0[0] = new org.omg.CORBA.StructMember (
+ "innerStruct",
+ _tcOf_members0,
+ null);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().create_sequence_tc (0, _tcOf_members0);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.test.corba.generated.StringSequenceHelper.id (), "StringSequence", _tcOf_members0);
+ _members0[1] = new org.omg.CORBA.StructMember (
+ "stringSequence",
+ _tcOf_members0,
+ null);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
+ _members0[2] = new org.omg.CORBA.StructMember (
+ "longField",
+ _tcOf_members0,
+ null);
+ __typeCode = org.omg.CORBA.ORB.init ().create_struct_tc (org.apache.tuscany.sca.test.corba.generated.RichStructHelper.id (), "RichStruct", _members0);
+ __active = false;
+ }
+ }
+ }
+ return __typeCode;
+ }
+
+ public static String id ()
+ {
+ return _id;
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.RichStruct read (org.omg.CORBA.portable.InputStream istream)
+ {
+ org.apache.tuscany.sca.test.corba.generated.RichStruct value = new org.apache.tuscany.sca.test.corba.generated.RichStruct ();
+ value.innerStruct = org.apache.tuscany.sca.test.corba.generated.InnerStructHelper.read (istream);
+ value.stringSequence = org.apache.tuscany.sca.test.corba.generated.StringSequenceHelper.read (istream);
+ value.longField = istream.read_long ();
+ return value;
+ }
+
+ public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.test.corba.generated.RichStruct value)
+ {
+ org.apache.tuscany.sca.test.corba.generated.InnerStructHelper.write (ostream, value.innerStruct);
+ org.apache.tuscany.sca.test.corba.generated.StringSequenceHelper.write (ostream, value.stringSequence);
+ ostream.write_long (value.longField);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichStructHolder.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichStructHolder.java
new file mode 100644
index 0000000000..8a063b8b9d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichStructHolder.java
@@ -0,0 +1,57 @@
+/*
+ * 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.test.corba.generated;
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/RichStructHolder.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* pi±tek, 27 czerwiec 2008 20:40:03 CEST
+*/
+
+public final class RichStructHolder implements org.omg.CORBA.portable.Streamable
+{
+ public org.apache.tuscany.sca.test.corba.generated.RichStruct value = null;
+
+ public RichStructHolder ()
+ {
+ }
+
+ public RichStructHolder (org.apache.tuscany.sca.test.corba.generated.RichStruct initialValue)
+ {
+ value = initialValue;
+ }
+
+ public void _read (org.omg.CORBA.portable.InputStream i)
+ {
+ value = org.apache.tuscany.sca.test.corba.generated.RichStructHelper.read (i);
+ }
+
+ public void _write (org.omg.CORBA.portable.OutputStream o)
+ {
+ org.apache.tuscany.sca.test.corba.generated.RichStructHelper.write (o, value);
+ }
+
+ public org.omg.CORBA.TypeCode _type ()
+ {
+ return org.apache.tuscany.sca.test.corba.generated.RichStructHelper.type ();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichUnion.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichUnion.java
new file mode 100644
index 0000000000..bc42d57ac3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichUnion.java
@@ -0,0 +1,195 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/RichUnion.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* niedziela, 17 sierpieñ 2008 19:07:14 CEST
+*/
+
+public final class RichUnion implements org.omg.CORBA.portable.IDLEntity
+{
+ private int ___x;
+ private float ___y;
+ private String ___z;
+ private org.apache.tuscany.sca.test.corba.generated.InnerUnion ___iu;
+ private boolean ___a;
+ private int __discriminator;
+ private boolean __uninitialized = true;
+
+ public RichUnion ()
+ {
+ }
+
+ public int discriminator ()
+ {
+ if (__uninitialized)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ return __discriminator;
+ }
+
+ public int x ()
+ {
+ if (__uninitialized)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ verifyx (__discriminator);
+ return ___x;
+ }
+
+ public void x (int value)
+ {
+ __discriminator = 1;
+ ___x = value;
+ __uninitialized = false;
+ }
+
+ public void x (int discriminator, int value)
+ {
+ verifyx (discriminator);
+ __discriminator = discriminator;
+ ___x = value;
+ __uninitialized = false;
+ }
+
+ private void verifyx (int discriminator)
+ {
+ if (discriminator != 1)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ }
+
+ public float y ()
+ {
+ if (__uninitialized)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ verifyy (__discriminator);
+ return ___y;
+ }
+
+ public void y (float value)
+ {
+ __discriminator = 2;
+ ___y = value;
+ __uninitialized = false;
+ }
+
+ public void y (int discriminator, float value)
+ {
+ verifyy (discriminator);
+ __discriminator = discriminator;
+ ___y = value;
+ __uninitialized = false;
+ }
+
+ private void verifyy (int discriminator)
+ {
+ if (discriminator != 2)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ }
+
+ public String z ()
+ {
+ if (__uninitialized)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ verifyz (__discriminator);
+ return ___z;
+ }
+
+ public void z (String value)
+ {
+ __discriminator = 3;
+ ___z = value;
+ __uninitialized = false;
+ }
+
+ public void z (int discriminator, String value)
+ {
+ verifyz (discriminator);
+ __discriminator = discriminator;
+ ___z = value;
+ __uninitialized = false;
+ }
+
+ private void verifyz (int discriminator)
+ {
+ if (discriminator != 3)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ }
+
+ public org.apache.tuscany.sca.test.corba.generated.InnerUnion iu ()
+ {
+ if (__uninitialized)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ verifyiu (__discriminator);
+ return ___iu;
+ }
+
+ public void iu (org.apache.tuscany.sca.test.corba.generated.InnerUnion value)
+ {
+ __discriminator = 4;
+ ___iu = value;
+ __uninitialized = false;
+ }
+
+ public void iu (int discriminator, org.apache.tuscany.sca.test.corba.generated.InnerUnion value)
+ {
+ verifyiu (discriminator);
+ __discriminator = discriminator;
+ ___iu = value;
+ __uninitialized = false;
+ }
+
+ private void verifyiu (int discriminator)
+ {
+ if (discriminator != 4)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ }
+
+ public boolean a ()
+ {
+ if (__uninitialized)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ verifya (__discriminator);
+ return ___a;
+ }
+
+ public void a (boolean value)
+ {
+ __discriminator = -2147483648;
+ ___a = value;
+ __uninitialized = false;
+ }
+
+ public void a (int discriminator, boolean value)
+ {
+ verifya (discriminator);
+ __discriminator = discriminator;
+ ___a = value;
+ __uninitialized = false;
+ }
+
+ private void verifya (int discriminator)
+ {
+ if (discriminator == 1 || discriminator == 2 || discriminator == 3 || discriminator == 4)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ }
+
+} // class RichUnion
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichUnionHelper.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichUnionHelper.java
new file mode 100644
index 0000000000..1cb1ed295e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichUnionHelper.java
@@ -0,0 +1,175 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/RichUnionHelper.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* niedziela, 17 sierpieñ 2008 19:07:14 CEST
+*/
+
+abstract public class RichUnionHelper
+{
+ private static String _id = "IDL:org/apache/tuscany/sca/test/corba/generated/RichUnion/RichUnion:1.0";
+
+ public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.test.corba.generated.RichUnion that)
+ {
+ org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
+ a.type (type ());
+ write (out, that);
+ a.read_value (out.create_input_stream (), type ());
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.RichUnion extract (org.omg.CORBA.Any a)
+ {
+ return read (a.create_input_stream ());
+ }
+
+ private static org.omg.CORBA.TypeCode __typeCode = null;
+ synchronized public static org.omg.CORBA.TypeCode type ()
+ {
+ if (__typeCode == null)
+ {
+ org.omg.CORBA.TypeCode _disTypeCode0;
+ _disTypeCode0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
+ org.omg.CORBA.UnionMember[] _members0 = new org.omg.CORBA.UnionMember [5];
+ org.omg.CORBA.TypeCode _tcOf_members0;
+ org.omg.CORBA.Any _anyOf_members0;
+
+ // Branch for x (case label 1)
+ _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
+ _anyOf_members0.insert_long ((int)1);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
+ _members0[0] = new org.omg.CORBA.UnionMember (
+ "x",
+ _anyOf_members0,
+ _tcOf_members0,
+ null);
+
+ // Branch for y (case label 2)
+ _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
+ _anyOf_members0.insert_long ((int)2);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_float);
+ _members0[1] = new org.omg.CORBA.UnionMember (
+ "y",
+ _anyOf_members0,
+ _tcOf_members0,
+ null);
+
+ // Branch for z (case label 3)
+ _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
+ _anyOf_members0.insert_long ((int)3);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
+ _members0[2] = new org.omg.CORBA.UnionMember (
+ "z",
+ _anyOf_members0,
+ _tcOf_members0,
+ null);
+
+ // Branch for iu (case label 4)
+ _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
+ _anyOf_members0.insert_long ((int)4);
+ _tcOf_members0 = org.apache.tuscany.sca.test.corba.generated.InnerUnionHelper.type ();
+ _members0[3] = new org.omg.CORBA.UnionMember (
+ "iu",
+ _anyOf_members0,
+ _tcOf_members0,
+ null);
+
+ // Branch for a (Default case)
+ _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
+ _anyOf_members0.insert_octet ((byte)0); // default member label
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_boolean);
+ _members0[4] = new org.omg.CORBA.UnionMember (
+ "a",
+ _anyOf_members0,
+ _tcOf_members0,
+ null);
+ __typeCode = org.omg.CORBA.ORB.init ().create_union_tc (org.apache.tuscany.sca.test.corba.generated.RichUnionHelper.id (), "RichUnion", _disTypeCode0, _members0);
+ }
+ return __typeCode;
+ }
+
+ public static String id ()
+ {
+ return _id;
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.RichUnion read (org.omg.CORBA.portable.InputStream istream)
+ {
+ org.apache.tuscany.sca.test.corba.generated.RichUnion value = new org.apache.tuscany.sca.test.corba.generated.RichUnion ();
+ int _dis0 = (int)0;
+ _dis0 = istream.read_long ();
+ switch (_dis0)
+ {
+ case 1:
+ int _x = (int)0;
+ _x = istream.read_long ();
+ value.x (_x);
+ break;
+ case 2:
+ float _y = (float)0;
+ _y = istream.read_float ();
+ value.y (_y);
+ break;
+ case 3:
+ String _z = null;
+ _z = istream.read_string ();
+ value.z (_z);
+ break;
+ case 4:
+ org.apache.tuscany.sca.test.corba.generated.InnerUnion _iu = null;
+ _iu = org.apache.tuscany.sca.test.corba.generated.InnerUnionHelper.read (istream);
+ value.iu (_iu);
+ break;
+ default:
+ boolean _a = false;
+ _a = istream.read_boolean ();
+ value.a (_dis0, _a);
+ break;
+ }
+ return value;
+ }
+
+ public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.test.corba.generated.RichUnion value)
+ {
+ ostream.write_long (value.discriminator ());
+ switch (value.discriminator ())
+ {
+ case 1:
+ ostream.write_long (value.x ());
+ break;
+ case 2:
+ ostream.write_float (value.y ());
+ break;
+ case 3:
+ ostream.write_string (value.z ());
+ break;
+ case 4:
+ org.apache.tuscany.sca.test.corba.generated.InnerUnionHelper.write (ostream, value.iu ());
+ break;
+ default:
+ ostream.write_boolean (value.a ());
+ break;
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichUnionHolder.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichUnionHolder.java
new file mode 100644
index 0000000000..e2221541c5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichUnionHolder.java
@@ -0,0 +1,56 @@
+/*
+ * 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.test.corba.generated;
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/RichUnionHolder.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* niedziela, 17 sierpieñ 2008 19:07:14 CEST
+*/
+
+public final class RichUnionHolder implements org.omg.CORBA.portable.Streamable
+{
+ public org.apache.tuscany.sca.test.corba.generated.RichUnion value = null;
+
+ public RichUnionHolder ()
+ {
+ }
+
+ public RichUnionHolder (org.apache.tuscany.sca.test.corba.generated.RichUnion initialValue)
+ {
+ value = initialValue;
+ }
+
+ public void _read (org.omg.CORBA.portable.InputStream i)
+ {
+ value = org.apache.tuscany.sca.test.corba.generated.RichUnionHelper.read (i);
+ }
+
+ public void _write (org.omg.CORBA.portable.OutputStream o)
+ {
+ org.apache.tuscany.sca.test.corba.generated.RichUnionHelper.write (o, value);
+ }
+
+ public org.omg.CORBA.TypeCode _type ()
+ {
+ return org.apache.tuscany.sca.test.corba.generated.RichUnionHelper.type ();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioOne.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioOne.java
new file mode 100644
index 0000000000..13f294b871
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioOne.java
@@ -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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/ScenarioOne.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* pi±tek, 27 czerwiec 2008 20:40:03 CEST
+*/
+
+public interface ScenarioOne extends ScenarioOneOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity
+{
+} // interface ScenarioOne
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioOneHelper.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioOneHelper.java
new file mode 100644
index 0000000000..66cc1d1e82
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioOneHelper.java
@@ -0,0 +1,104 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/ScenarioOneHelper.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* pi±tek, 27 czerwiec 2008 20:40:03 CEST
+*/
+
+abstract public class ScenarioOneHelper
+{
+ private static String _id = "IDL:org/apache/tuscany/sca/test/corba/generated/ScenarioOne:1.0";
+
+ public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.test.corba.generated.ScenarioOne that)
+ {
+ org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
+ a.type (type ());
+ write (out, that);
+ a.read_value (out.create_input_stream (), type ());
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.ScenarioOne extract (org.omg.CORBA.Any a)
+ {
+ return read (a.create_input_stream ());
+ }
+
+ private static org.omg.CORBA.TypeCode __typeCode = null;
+ synchronized public static org.omg.CORBA.TypeCode type ()
+ {
+ if (__typeCode == null)
+ {
+ __typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (org.apache.tuscany.sca.test.corba.generated.ScenarioOneHelper.id (), "ScenarioOne");
+ }
+ return __typeCode;
+ }
+
+ public static String id ()
+ {
+ return _id;
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.ScenarioOne read (org.omg.CORBA.portable.InputStream istream)
+ {
+ return narrow (istream.read_Object (_ScenarioOneStub.class));
+ }
+
+ public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.test.corba.generated.ScenarioOne value)
+ {
+ ostream.write_Object ((org.omg.CORBA.Object) value);
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.ScenarioOne narrow (org.omg.CORBA.Object obj)
+ {
+ if (obj == null)
+ return null;
+ else if (obj instanceof org.apache.tuscany.sca.test.corba.generated.ScenarioOne)
+ return (org.apache.tuscany.sca.test.corba.generated.ScenarioOne)obj;
+ else if (!obj._is_a (id ()))
+ throw new org.omg.CORBA.BAD_PARAM ();
+ else
+ {
+ org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate ();
+ org.apache.tuscany.sca.test.corba.generated._ScenarioOneStub stub = new org.apache.tuscany.sca.test.corba.generated._ScenarioOneStub ();
+ stub._set_delegate(delegate);
+ return stub;
+ }
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.ScenarioOne unchecked_narrow (org.omg.CORBA.Object obj)
+ {
+ if (obj == null)
+ return null;
+ else if (obj instanceof org.apache.tuscany.sca.test.corba.generated.ScenarioOne)
+ return (org.apache.tuscany.sca.test.corba.generated.ScenarioOne)obj;
+ else
+ {
+ org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate ();
+ org.apache.tuscany.sca.test.corba.generated._ScenarioOneStub stub = new org.apache.tuscany.sca.test.corba.generated._ScenarioOneStub ();
+ stub._set_delegate(delegate);
+ return stub;
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioOneHolder.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioOneHolder.java
new file mode 100644
index 0000000000..f14394b400
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioOneHolder.java
@@ -0,0 +1,57 @@
+/*
+ * 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.test.corba.generated;
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/ScenarioOneHolder.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* pi±tek, 27 czerwiec 2008 20:40:03 CEST
+*/
+
+public final class ScenarioOneHolder implements org.omg.CORBA.portable.Streamable
+{
+ public org.apache.tuscany.sca.test.corba.generated.ScenarioOne value = null;
+
+ public ScenarioOneHolder ()
+ {
+ }
+
+ public ScenarioOneHolder (org.apache.tuscany.sca.test.corba.generated.ScenarioOne initialValue)
+ {
+ value = initialValue;
+ }
+
+ public void _read (org.omg.CORBA.portable.InputStream i)
+ {
+ value = org.apache.tuscany.sca.test.corba.generated.ScenarioOneHelper.read (i);
+ }
+
+ public void _write (org.omg.CORBA.portable.OutputStream o)
+ {
+ org.apache.tuscany.sca.test.corba.generated.ScenarioOneHelper.write (o, value);
+ }
+
+ public org.omg.CORBA.TypeCode _type ()
+ {
+ return org.apache.tuscany.sca.test.corba.generated.ScenarioOneHelper.type ();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioOneOperations.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioOneOperations.java
new file mode 100644
index 0000000000..56388624d7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioOneOperations.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/ScenarioOneOperations.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* pi±tek, 27 czerwiec 2008 20:40:03 CEST
+*/
+
+public interface ScenarioOneOperations
+{
+ org.apache.tuscany.sca.test.corba.generated.RichStruct setRichStruct (org.apache.tuscany.sca.test.corba.generated.RichStruct richStruct) throws org.apache.tuscany.sca.test.corba.generated.WrongColor, org.apache.tuscany.sca.test.corba.generated.UnexpectedException;
+} // interface ScenarioOneOperations
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSix.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSix.java
new file mode 100644
index 0000000000..1897d0682c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSix.java
@@ -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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/ScenarioSix.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* sobota, 16 sierpieñ 2008 15:31:35 CEST
+*/
+
+public interface ScenarioSix extends ScenarioSixOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity
+{
+} // interface ScenarioSix
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSixHelper.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSixHelper.java
new file mode 100644
index 0000000000..c8c88ef91d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSixHelper.java
@@ -0,0 +1,104 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/ScenarioSixHelper.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* sobota, 16 sierpieñ 2008 15:31:35 CEST
+*/
+
+abstract public class ScenarioSixHelper
+{
+ private static String _id = "IDL:org/apache/tuscany/sca/test/corba/generated/ScenarioSix:1.0";
+
+ public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.test.corba.generated.ScenarioSix that)
+ {
+ org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
+ a.type (type ());
+ write (out, that);
+ a.read_value (out.create_input_stream (), type ());
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.ScenarioSix extract (org.omg.CORBA.Any a)
+ {
+ return read (a.create_input_stream ());
+ }
+
+ private static org.omg.CORBA.TypeCode __typeCode = null;
+ synchronized public static org.omg.CORBA.TypeCode type ()
+ {
+ if (__typeCode == null)
+ {
+ __typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (org.apache.tuscany.sca.test.corba.generated.ScenarioSixHelper.id (), "ScenarioSix");
+ }
+ return __typeCode;
+ }
+
+ public static String id ()
+ {
+ return _id;
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.ScenarioSix read (org.omg.CORBA.portable.InputStream istream)
+ {
+ return narrow (istream.read_Object (_ScenarioSixStub.class));
+ }
+
+ public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.test.corba.generated.ScenarioSix value)
+ {
+ ostream.write_Object ((org.omg.CORBA.Object) value);
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.ScenarioSix narrow (org.omg.CORBA.Object obj)
+ {
+ if (obj == null)
+ return null;
+ else if (obj instanceof org.apache.tuscany.sca.test.corba.generated.ScenarioSix)
+ return (org.apache.tuscany.sca.test.corba.generated.ScenarioSix)obj;
+ else if (!obj._is_a (id ()))
+ throw new org.omg.CORBA.BAD_PARAM ();
+ else
+ {
+ org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate ();
+ org.apache.tuscany.sca.test.corba.generated._ScenarioSixStub stub = new org.apache.tuscany.sca.test.corba.generated._ScenarioSixStub ();
+ stub._set_delegate(delegate);
+ return stub;
+ }
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.ScenarioSix unchecked_narrow (org.omg.CORBA.Object obj)
+ {
+ if (obj == null)
+ return null;
+ else if (obj instanceof org.apache.tuscany.sca.test.corba.generated.ScenarioSix)
+ return (org.apache.tuscany.sca.test.corba.generated.ScenarioSix)obj;
+ else
+ {
+ org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate ();
+ org.apache.tuscany.sca.test.corba.generated._ScenarioSixStub stub = new org.apache.tuscany.sca.test.corba.generated._ScenarioSixStub ();
+ stub._set_delegate(delegate);
+ return stub;
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSixHolder.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSixHolder.java
new file mode 100644
index 0000000000..5540b98c21
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSixHolder.java
@@ -0,0 +1,57 @@
+/*
+ * 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.test.corba.generated;
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/ScenarioSixHolder.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* sobota, 16 sierpieñ 2008 15:31:35 CEST
+*/
+
+public final class ScenarioSixHolder implements org.omg.CORBA.portable.Streamable
+{
+ public org.apache.tuscany.sca.test.corba.generated.ScenarioSix value = null;
+
+ public ScenarioSixHolder ()
+ {
+ }
+
+ public ScenarioSixHolder (org.apache.tuscany.sca.test.corba.generated.ScenarioSix initialValue)
+ {
+ value = initialValue;
+ }
+
+ public void _read (org.omg.CORBA.portable.InputStream i)
+ {
+ value = org.apache.tuscany.sca.test.corba.generated.ScenarioSixHelper.read (i);
+ }
+
+ public void _write (org.omg.CORBA.portable.OutputStream o)
+ {
+ org.apache.tuscany.sca.test.corba.generated.ScenarioSixHelper.write (o, value);
+ }
+
+ public org.omg.CORBA.TypeCode _type ()
+ {
+ return org.apache.tuscany.sca.test.corba.generated.ScenarioSixHelper.type ();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSixOperations.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSixOperations.java
new file mode 100644
index 0000000000..648144299c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSixOperations.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/ScenarioSixOperations.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* niedziela, 17 sierpieñ 2008 19:07:14 CEST
+*/
+
+public interface ScenarioSixOperations
+{
+ String[][] passStringArray (String[][] arg);
+ org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct passAnnotatedStruct (org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct arg);
+ org.apache.tuscany.sca.test.corba.generated.RichUnion passRichUnion (org.apache.tuscany.sca.test.corba.generated.RichUnion arg);
+} // interface ScenarioSixOperations
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioTwo.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioTwo.java
new file mode 100644
index 0000000000..b57e098a56
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioTwo.java
@@ -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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/ScenarioTwo.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* wtorek, 15 lipiec 2008 13:36:31 CEST
+*/
+
+
+// objects for ScenarioTwo
+public interface ScenarioTwo extends ScenarioTwoOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity
+{
+} // interface ScenarioTwo
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioTwoHelper.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioTwoHelper.java
new file mode 100644
index 0000000000..8ddfa10575
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioTwoHelper.java
@@ -0,0 +1,106 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/ScenarioTwoHelper.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* wtorek, 15 lipiec 2008 13:36:31 CEST
+*/
+
+
+// objects for ScenarioTwo
+abstract public class ScenarioTwoHelper
+{
+ private static String _id = "IDL:org/apache/tuscany/sca/test/corba/generated/ScenarioTwo:1.0";
+
+ public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.test.corba.generated.ScenarioTwo that)
+ {
+ org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
+ a.type (type ());
+ write (out, that);
+ a.read_value (out.create_input_stream (), type ());
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.ScenarioTwo extract (org.omg.CORBA.Any a)
+ {
+ return read (a.create_input_stream ());
+ }
+
+ private static org.omg.CORBA.TypeCode __typeCode = null;
+ synchronized public static org.omg.CORBA.TypeCode type ()
+ {
+ if (__typeCode == null)
+ {
+ __typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (org.apache.tuscany.sca.test.corba.generated.ScenarioTwoHelper.id (), "ScenarioTwo");
+ }
+ return __typeCode;
+ }
+
+ public static String id ()
+ {
+ return _id;
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.ScenarioTwo read (org.omg.CORBA.portable.InputStream istream)
+ {
+ return narrow (istream.read_Object (_ScenarioTwoStub.class));
+ }
+
+ public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.test.corba.generated.ScenarioTwo value)
+ {
+ ostream.write_Object ((org.omg.CORBA.Object) value);
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.ScenarioTwo narrow (org.omg.CORBA.Object obj)
+ {
+ if (obj == null)
+ return null;
+ else if (obj instanceof org.apache.tuscany.sca.test.corba.generated.ScenarioTwo)
+ return (org.apache.tuscany.sca.test.corba.generated.ScenarioTwo)obj;
+ else if (!obj._is_a (id ()))
+ throw new org.omg.CORBA.BAD_PARAM ();
+ else
+ {
+ org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate ();
+ org.apache.tuscany.sca.test.corba.generated._ScenarioTwoStub stub = new org.apache.tuscany.sca.test.corba.generated._ScenarioTwoStub ();
+ stub._set_delegate(delegate);
+ return stub;
+ }
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.ScenarioTwo unchecked_narrow (org.omg.CORBA.Object obj)
+ {
+ if (obj == null)
+ return null;
+ else if (obj instanceof org.apache.tuscany.sca.test.corba.generated.ScenarioTwo)
+ return (org.apache.tuscany.sca.test.corba.generated.ScenarioTwo)obj;
+ else
+ {
+ org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate ();
+ org.apache.tuscany.sca.test.corba.generated._ScenarioTwoStub stub = new org.apache.tuscany.sca.test.corba.generated._ScenarioTwoStub ();
+ stub._set_delegate(delegate);
+ return stub;
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioTwoHolder.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioTwoHolder.java
new file mode 100644
index 0000000000..9717629711
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioTwoHolder.java
@@ -0,0 +1,59 @@
+/*
+ * 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.test.corba.generated;
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/ScenarioTwoHolder.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* wtorek, 15 lipiec 2008 13:36:31 CEST
+*/
+
+
+// objects for ScenarioTwo
+public final class ScenarioTwoHolder implements org.omg.CORBA.portable.Streamable
+{
+ public org.apache.tuscany.sca.test.corba.generated.ScenarioTwo value = null;
+
+ public ScenarioTwoHolder ()
+ {
+ }
+
+ public ScenarioTwoHolder (org.apache.tuscany.sca.test.corba.generated.ScenarioTwo initialValue)
+ {
+ value = initialValue;
+ }
+
+ public void _read (org.omg.CORBA.portable.InputStream i)
+ {
+ value = org.apache.tuscany.sca.test.corba.generated.ScenarioTwoHelper.read (i);
+ }
+
+ public void _write (org.omg.CORBA.portable.OutputStream o)
+ {
+ org.apache.tuscany.sca.test.corba.generated.ScenarioTwoHelper.write (o, value);
+ }
+
+ public org.omg.CORBA.TypeCode _type ()
+ {
+ return org.apache.tuscany.sca.test.corba.generated.ScenarioTwoHelper.type ();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioTwoOperations.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioTwoOperations.java
new file mode 100644
index 0000000000..1247b4618d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioTwoOperations.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/ScenarioTwoOperations.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* wtorek, 15 lipiec 2008 13:36:31 CEST
+*/
+
+
+// objects for ScenarioTwo
+public interface ScenarioTwoOperations
+{
+ String stringField ();
+ void stringField (String newStringField);
+} // interface ScenarioTwoOperations
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/StringArrayHelper.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/StringArrayHelper.java
new file mode 100644
index 0000000000..f2cc3adad5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/StringArrayHelper.java
@@ -0,0 +1,95 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/StringArrayHelper.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* sobota, 16 sierpieñ 2008 15:31:35 CEST
+*/
+
+abstract public class StringArrayHelper
+{
+ private static String _id = "IDL:org/apache/tuscany/sca/test/corba/generated/StringArray:1.0";
+
+ public static void insert (org.omg.CORBA.Any a, String[][] that)
+ {
+ org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
+ a.type (type ());
+ write (out, that);
+ a.read_value (out.create_input_stream (), type ());
+ }
+
+ public static String[][] extract (org.omg.CORBA.Any a)
+ {
+ return read (a.create_input_stream ());
+ }
+
+ private static org.omg.CORBA.TypeCode __typeCode = null;
+ synchronized public static org.omg.CORBA.TypeCode type ()
+ {
+ if (__typeCode == null)
+ {
+ __typeCode = org.omg.CORBA.ORB.init ().create_string_tc (0);
+ __typeCode = org.omg.CORBA.ORB.init ().create_array_tc (2, __typeCode );
+ __typeCode = org.omg.CORBA.ORB.init ().create_array_tc (2, __typeCode );
+ __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.test.corba.generated.StringArrayHelper.id (), "StringArray", __typeCode);
+ }
+ return __typeCode;
+ }
+
+ public static String id ()
+ {
+ return _id;
+ }
+
+ public static String[][] read (org.omg.CORBA.portable.InputStream istream)
+ {
+ String value[][] = null;
+ value = new String[2][];
+ for (int _o0 = 0;_o0 < (2); ++_o0)
+ {
+ value[_o0] = new String[2];
+ for (int _o1 = 0;_o1 < (2); ++_o1)
+ {
+ value[_o0][_o1] = istream.read_string ();
+ }
+ }
+ return value;
+ }
+
+ public static void write (org.omg.CORBA.portable.OutputStream ostream, String[][] value)
+ {
+ if (value.length != (2))
+ throw new org.omg.CORBA.MARSHAL (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
+ for (int _i0 = 0;_i0 < (2); ++_i0)
+ {
+ if (value[_i0].length != (2))
+ throw new org.omg.CORBA.MARSHAL (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
+ for (int _i1 = 0;_i1 < (2); ++_i1)
+ {
+ ostream.write_string (value[_i0][_i1]);
+ }
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/StringArrayHolder.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/StringArrayHolder.java
new file mode 100644
index 0000000000..dbad550222
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/StringArrayHolder.java
@@ -0,0 +1,58 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/StringArrayHolder.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* sobota, 16 sierpieñ 2008 15:31:35 CEST
+*/
+
+public final class StringArrayHolder implements org.omg.CORBA.portable.Streamable
+{
+ public String value[][] = null;
+
+ public StringArrayHolder ()
+ {
+ }
+
+ public StringArrayHolder (String[][] initialValue)
+ {
+ value = initialValue;
+ }
+
+ public void _read (org.omg.CORBA.portable.InputStream i)
+ {
+ value = org.apache.tuscany.sca.test.corba.generated.StringArrayHelper.read (i);
+ }
+
+ public void _write (org.omg.CORBA.portable.OutputStream o)
+ {
+ org.apache.tuscany.sca.test.corba.generated.StringArrayHelper.write (o, value);
+ }
+
+ public org.omg.CORBA.TypeCode _type ()
+ {
+ return org.apache.tuscany.sca.test.corba.generated.StringArrayHelper.type ();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/StringSequenceHelper.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/StringSequenceHelper.java
new file mode 100644
index 0000000000..d29129236c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/StringSequenceHelper.java
@@ -0,0 +1,81 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/StringSequenceHelper.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* pi±tek, 27 czerwiec 2008 20:40:03 CEST
+*/
+
+abstract public class StringSequenceHelper
+{
+ private static String _id = "IDL:org/apache/tuscany/sca/test/corba/generated/StringSequence:1.0";
+
+ public static void insert (org.omg.CORBA.Any a, String[] that)
+ {
+ org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
+ a.type (type ());
+ write (out, that);
+ a.read_value (out.create_input_stream (), type ());
+ }
+
+ public static String[] extract (org.omg.CORBA.Any a)
+ {
+ return read (a.create_input_stream ());
+ }
+
+ private static org.omg.CORBA.TypeCode __typeCode = null;
+ synchronized public static org.omg.CORBA.TypeCode type ()
+ {
+ if (__typeCode == null)
+ {
+ __typeCode = org.omg.CORBA.ORB.init ().create_string_tc (0);
+ __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode);
+ __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.test.corba.generated.StringSequenceHelper.id (), "StringSequence", __typeCode);
+ }
+ return __typeCode;
+ }
+
+ public static String id ()
+ {
+ return _id;
+ }
+
+ public static String[] read (org.omg.CORBA.portable.InputStream istream)
+ {
+ String value[] = null;
+ int _len0 = istream.read_long ();
+ value = new String[_len0];
+ for (int _o1 = 0;_o1 < value.length; ++_o1)
+ value[_o1] = istream.read_string ();
+ return value;
+ }
+
+ public static void write (org.omg.CORBA.portable.OutputStream ostream, String[] value)
+ {
+ ostream.write_long (value.length);
+ for (int _i0 = 0;_i0 < value.length; ++_i0)
+ ostream.write_string (value[_i0]);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/StringSequenceHolder.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/StringSequenceHolder.java
new file mode 100644
index 0000000000..837ba04cea
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/StringSequenceHolder.java
@@ -0,0 +1,58 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/StringSequenceHolder.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* pi±tek, 27 czerwiec 2008 20:40:03 CEST
+*/
+
+public final class StringSequenceHolder implements org.omg.CORBA.portable.Streamable
+{
+ public String value[] = null;
+
+ public StringSequenceHolder ()
+ {
+ }
+
+ public StringSequenceHolder (String[] initialValue)
+ {
+ value = initialValue;
+ }
+
+ public void _read (org.omg.CORBA.portable.InputStream i)
+ {
+ value = org.apache.tuscany.sca.test.corba.generated.StringSequenceHelper.read (i);
+ }
+
+ public void _write (org.omg.CORBA.portable.OutputStream o)
+ {
+ org.apache.tuscany.sca.test.corba.generated.StringSequenceHelper.write (o, value);
+ }
+
+ public org.omg.CORBA.TypeCode _type ()
+ {
+ return org.apache.tuscany.sca.test.corba.generated.StringSequenceHelper.type ();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/TwoDimLongSequenceHelper.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/TwoDimLongSequenceHelper.java
new file mode 100644
index 0000000000..0b24056642
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/TwoDimLongSequenceHelper.java
@@ -0,0 +1,83 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/TwoDimLongSequenceHelper.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* pi±tek, 27 czerwiec 2008 20:40:03 CEST
+*/
+
+abstract public class TwoDimLongSequenceHelper
+{
+ private static String _id = "IDL:org/apache/tuscany/sca/test/corba/generated/TwoDimLongSequence:1.0";
+
+ public static void insert (org.omg.CORBA.Any a, int[][] that)
+ {
+ org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
+ a.type (type ());
+ write (out, that);
+ a.read_value (out.create_input_stream (), type ());
+ }
+
+ public static int[][] extract (org.omg.CORBA.Any a)
+ {
+ return read (a.create_input_stream ());
+ }
+
+ private static org.omg.CORBA.TypeCode __typeCode = null;
+ synchronized public static org.omg.CORBA.TypeCode type ()
+ {
+ if (__typeCode == null)
+ {
+ __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
+ __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode);
+ __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.test.corba.generated.LongSequenceHelper.id (), "LongSequence", __typeCode);
+ __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode);
+ __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.test.corba.generated.TwoDimLongSequenceHelper.id (), "TwoDimLongSequence", __typeCode);
+ }
+ return __typeCode;
+ }
+
+ public static String id ()
+ {
+ return _id;
+ }
+
+ public static int[][] read (org.omg.CORBA.portable.InputStream istream)
+ {
+ int value[][] = null;
+ int _len0 = istream.read_long ();
+ value = new int[_len0][];
+ for (int _o1 = 0;_o1 < value.length; ++_o1)
+ value[_o1] = org.apache.tuscany.sca.test.corba.generated.LongSequenceHelper.read (istream);
+ return value;
+ }
+
+ public static void write (org.omg.CORBA.portable.OutputStream ostream, int[][] value)
+ {
+ ostream.write_long (value.length);
+ for (int _i0 = 0;_i0 < value.length; ++_i0)
+ org.apache.tuscany.sca.test.corba.generated.LongSequenceHelper.write (ostream, value[_i0]);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/TwoDimLongSequenceHolder.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/TwoDimLongSequenceHolder.java
new file mode 100644
index 0000000000..e2ed1ab037
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/TwoDimLongSequenceHolder.java
@@ -0,0 +1,58 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/TwoDimLongSequenceHolder.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* pi±tek, 27 czerwiec 2008 20:40:03 CEST
+*/
+
+public final class TwoDimLongSequenceHolder implements org.omg.CORBA.portable.Streamable
+{
+ public int value[][] = null;
+
+ public TwoDimLongSequenceHolder ()
+ {
+ }
+
+ public TwoDimLongSequenceHolder (int[][] initialValue)
+ {
+ value = initialValue;
+ }
+
+ public void _read (org.omg.CORBA.portable.InputStream i)
+ {
+ value = org.apache.tuscany.sca.test.corba.generated.TwoDimLongSequenceHelper.read (i);
+ }
+
+ public void _write (org.omg.CORBA.portable.OutputStream o)
+ {
+ org.apache.tuscany.sca.test.corba.generated.TwoDimLongSequenceHelper.write (o, value);
+ }
+
+ public org.omg.CORBA.TypeCode _type ()
+ {
+ return org.apache.tuscany.sca.test.corba.generated.TwoDimLongSequenceHelper.type ();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/UnexpectedException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/UnexpectedException.java
new file mode 100644
index 0000000000..46888399ed
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/UnexpectedException.java
@@ -0,0 +1,52 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/UnexpectedException.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* pi±tek, 27 czerwiec 2008 20:40:03 CEST
+*/
+
+public final class UnexpectedException extends org.omg.CORBA.UserException
+{
+ public String info = null;
+
+ public UnexpectedException ()
+ {
+ super(UnexpectedExceptionHelper.id());
+ } // ctor
+
+ public UnexpectedException (String _info)
+ {
+ super(UnexpectedExceptionHelper.id());
+ info = _info;
+ } // ctor
+
+
+ public UnexpectedException (String $reason, String _info)
+ {
+ super(UnexpectedExceptionHelper.id() + " " + $reason);
+ info = _info;
+ } // ctor
+
+} // class UnexpectedException
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/UnexpectedExceptionHelper.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/UnexpectedExceptionHelper.java
new file mode 100644
index 0000000000..c276038050
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/UnexpectedExceptionHelper.java
@@ -0,0 +1,98 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/UnexpectedExceptionHelper.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* pi±tek, 27 czerwiec 2008 20:40:03 CEST
+*/
+
+abstract public class UnexpectedExceptionHelper
+{
+ private static String _id = "IDL:org/apache/tuscany/sca/test/corba/generated/UnexpectedException:1.0";
+
+ public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.test.corba.generated.UnexpectedException that)
+ {
+ org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
+ a.type (type ());
+ write (out, that);
+ a.read_value (out.create_input_stream (), type ());
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.UnexpectedException extract (org.omg.CORBA.Any a)
+ {
+ return read (a.create_input_stream ());
+ }
+
+ private static org.omg.CORBA.TypeCode __typeCode = null;
+ private static boolean __active = false;
+ synchronized public static org.omg.CORBA.TypeCode type ()
+ {
+ if (__typeCode == null)
+ {
+ synchronized (org.omg.CORBA.TypeCode.class)
+ {
+ if (__typeCode == null)
+ {
+ if (__active)
+ {
+ return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
+ }
+ __active = true;
+ org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [1];
+ org.omg.CORBA.TypeCode _tcOf_members0 = null;
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
+ _members0[0] = new org.omg.CORBA.StructMember (
+ "info",
+ _tcOf_members0,
+ null);
+ __typeCode = org.omg.CORBA.ORB.init ().create_exception_tc (org.apache.tuscany.sca.test.corba.generated.UnexpectedExceptionHelper.id (), "UnexpectedException", _members0);
+ __active = false;
+ }
+ }
+ }
+ return __typeCode;
+ }
+
+ public static String id ()
+ {
+ return _id;
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.UnexpectedException read (org.omg.CORBA.portable.InputStream istream)
+ {
+ org.apache.tuscany.sca.test.corba.generated.UnexpectedException value = new org.apache.tuscany.sca.test.corba.generated.UnexpectedException ();
+ // read and discard the repository ID
+ istream.read_string ();
+ value.info = istream.read_string ();
+ return value;
+ }
+
+ public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.test.corba.generated.UnexpectedException value)
+ {
+ // write the repository ID
+ ostream.write_string (id ());
+ ostream.write_string (value.info);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/UnexpectedExceptionHolder.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/UnexpectedExceptionHolder.java
new file mode 100644
index 0000000000..079a56b446
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/UnexpectedExceptionHolder.java
@@ -0,0 +1,57 @@
+/*
+ * 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.test.corba.generated;
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/UnexpectedExceptionHolder.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* pi±tek, 27 czerwiec 2008 20:40:03 CEST
+*/
+
+public final class UnexpectedExceptionHolder implements org.omg.CORBA.portable.Streamable
+{
+ public org.apache.tuscany.sca.test.corba.generated.UnexpectedException value = null;
+
+ public UnexpectedExceptionHolder ()
+ {
+ }
+
+ public UnexpectedExceptionHolder (org.apache.tuscany.sca.test.corba.generated.UnexpectedException initialValue)
+ {
+ value = initialValue;
+ }
+
+ public void _read (org.omg.CORBA.portable.InputStream i)
+ {
+ value = org.apache.tuscany.sca.test.corba.generated.UnexpectedExceptionHelper.read (i);
+ }
+
+ public void _write (org.omg.CORBA.portable.OutputStream o)
+ {
+ org.apache.tuscany.sca.test.corba.generated.UnexpectedExceptionHelper.write (o, value);
+ }
+
+ public org.omg.CORBA.TypeCode _type ()
+ {
+ return org.apache.tuscany.sca.test.corba.generated.UnexpectedExceptionHelper.type ();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/WrongColor.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/WrongColor.java
new file mode 100644
index 0000000000..0407184598
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/WrongColor.java
@@ -0,0 +1,55 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/WrongColor.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* pi±tek, 27 czerwiec 2008 20:40:03 CEST
+*/
+
+public final class WrongColor extends org.omg.CORBA.UserException
+{
+ public org.apache.tuscany.sca.test.corba.generated.Color givenColor = null;
+ public org.apache.tuscany.sca.test.corba.generated.Color correctColor = null;
+
+ public WrongColor ()
+ {
+ super(WrongColorHelper.id());
+ } // ctor
+
+ public WrongColor (org.apache.tuscany.sca.test.corba.generated.Color _givenColor, org.apache.tuscany.sca.test.corba.generated.Color _correctColor)
+ {
+ super(WrongColorHelper.id());
+ givenColor = _givenColor;
+ correctColor = _correctColor;
+ } // ctor
+
+
+ public WrongColor (String $reason, org.apache.tuscany.sca.test.corba.generated.Color _givenColor, org.apache.tuscany.sca.test.corba.generated.Color _correctColor)
+ {
+ super(WrongColorHelper.id() + " " + $reason);
+ givenColor = _givenColor;
+ correctColor = _correctColor;
+ } // ctor
+
+} // class WrongColor
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/WrongColorHelper.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/WrongColorHelper.java
new file mode 100644
index 0000000000..16e099cfa3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/WrongColorHelper.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/WrongColorHelper.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* pi±tek, 27 czerwiec 2008 20:40:03 CEST
+*/
+
+abstract public class WrongColorHelper
+{
+ private static String _id = "IDL:org/apache/tuscany/sca/test/corba/generated/WrongColor:1.0";
+
+ public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.test.corba.generated.WrongColor that)
+ {
+ org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
+ a.type (type ());
+ write (out, that);
+ a.read_value (out.create_input_stream (), type ());
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.WrongColor extract (org.omg.CORBA.Any a)
+ {
+ return read (a.create_input_stream ());
+ }
+
+ private static org.omg.CORBA.TypeCode __typeCode = null;
+ private static boolean __active = false;
+ synchronized public static org.omg.CORBA.TypeCode type ()
+ {
+ if (__typeCode == null)
+ {
+ synchronized (org.omg.CORBA.TypeCode.class)
+ {
+ if (__typeCode == null)
+ {
+ if (__active)
+ {
+ return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
+ }
+ __active = true;
+ org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [2];
+ org.omg.CORBA.TypeCode _tcOf_members0 = null;
+ _tcOf_members0 = org.apache.tuscany.sca.test.corba.generated.ColorHelper.type ();
+ _members0[0] = new org.omg.CORBA.StructMember (
+ "givenColor",
+ _tcOf_members0,
+ null);
+ _tcOf_members0 = org.apache.tuscany.sca.test.corba.generated.ColorHelper.type ();
+ _members0[1] = new org.omg.CORBA.StructMember (
+ "correctColor",
+ _tcOf_members0,
+ null);
+ __typeCode = org.omg.CORBA.ORB.init ().create_exception_tc (org.apache.tuscany.sca.test.corba.generated.WrongColorHelper.id (), "WrongColor", _members0);
+ __active = false;
+ }
+ }
+ }
+ return __typeCode;
+ }
+
+ public static String id ()
+ {
+ return _id;
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.WrongColor read (org.omg.CORBA.portable.InputStream istream)
+ {
+ org.apache.tuscany.sca.test.corba.generated.WrongColor value = new org.apache.tuscany.sca.test.corba.generated.WrongColor ();
+ // read and discard the repository ID
+ istream.read_string ();
+ value.givenColor = org.apache.tuscany.sca.test.corba.generated.ColorHelper.read (istream);
+ value.correctColor = org.apache.tuscany.sca.test.corba.generated.ColorHelper.read (istream);
+ return value;
+ }
+
+ public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.test.corba.generated.WrongColor value)
+ {
+ // write the repository ID
+ ostream.write_string (id ());
+ org.apache.tuscany.sca.test.corba.generated.ColorHelper.write (ostream, value.givenColor);
+ org.apache.tuscany.sca.test.corba.generated.ColorHelper.write (ostream, value.correctColor);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/WrongColorHolder.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/WrongColorHolder.java
new file mode 100644
index 0000000000..b4883cb35c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/WrongColorHolder.java
@@ -0,0 +1,57 @@
+/*
+ * 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.test.corba.generated;
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/WrongColorHolder.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* pi±tek, 27 czerwiec 2008 20:40:03 CEST
+*/
+
+public final class WrongColorHolder implements org.omg.CORBA.portable.Streamable
+{
+ public org.apache.tuscany.sca.test.corba.generated.WrongColor value = null;
+
+ public WrongColorHolder ()
+ {
+ }
+
+ public WrongColorHolder (org.apache.tuscany.sca.test.corba.generated.WrongColor initialValue)
+ {
+ value = initialValue;
+ }
+
+ public void _read (org.omg.CORBA.portable.InputStream i)
+ {
+ value = org.apache.tuscany.sca.test.corba.generated.WrongColorHelper.read (i);
+ }
+
+ public void _write (org.omg.CORBA.portable.OutputStream o)
+ {
+ org.apache.tuscany.sca.test.corba.generated.WrongColorHelper.write (o, value);
+ }
+
+ public org.omg.CORBA.TypeCode _type ()
+ {
+ return org.apache.tuscany.sca.test.corba.generated.WrongColorHelper.type ();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioOneImplBase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioOneImplBase.java
new file mode 100644
index 0000000000..c96fb61204
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioOneImplBase.java
@@ -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.
+ */
+
+package org.apache.tuscany.sca.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/_ScenarioOneImplBase.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* pi±tek, 27 czerwiec 2008 20:40:03 CEST
+*/
+
+public abstract class _ScenarioOneImplBase extends org.omg.CORBA.portable.ObjectImpl
+ implements org.apache.tuscany.sca.test.corba.generated.ScenarioOne, org.omg.CORBA.portable.InvokeHandler
+{
+
+ // Constructors
+ public _ScenarioOneImplBase ()
+ {
+ }
+
+ private static java.util.Hashtable _methods = new java.util.Hashtable ();
+ static
+ {
+ _methods.put ("setRichStruct", new java.lang.Integer (0));
+ }
+
+ public org.omg.CORBA.portable.OutputStream _invoke (String $method,
+ org.omg.CORBA.portable.InputStream in,
+ org.omg.CORBA.portable.ResponseHandler $rh)
+ {
+ org.omg.CORBA.portable.OutputStream out = null;
+ java.lang.Integer __method = (java.lang.Integer)_methods.get ($method);
+ if (__method == null)
+ throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
+
+ switch (__method.intValue ())
+ {
+ case 0: // org/apache/tuscany/sca/test/corba/generated/ScenarioOne/setRichStruct
+ {
+ try {
+ org.apache.tuscany.sca.test.corba.generated.RichStruct richStruct = org.apache.tuscany.sca.test.corba.generated.RichStructHelper.read (in);
+ org.apache.tuscany.sca.test.corba.generated.RichStruct $result = null;
+ $result = this.setRichStruct (richStruct);
+ out = $rh.createReply();
+ org.apache.tuscany.sca.test.corba.generated.RichStructHelper.write (out, $result);
+ } catch (org.apache.tuscany.sca.test.corba.generated.WrongColor $ex) {
+ out = $rh.createExceptionReply ();
+ org.apache.tuscany.sca.test.corba.generated.WrongColorHelper.write (out, $ex);
+ } catch (org.apache.tuscany.sca.test.corba.generated.UnexpectedException $ex) {
+ out = $rh.createExceptionReply ();
+ org.apache.tuscany.sca.test.corba.generated.UnexpectedExceptionHelper.write (out, $ex);
+ }
+ break;
+ }
+
+ default:
+ throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
+ }
+
+ return out;
+ } // _invoke
+
+ // Type-specific CORBA::Object operations
+ private static String[] __ids = {
+ "IDL:org/apache/tuscany/sca/test/corba/generated/ScenarioOne:1.0"};
+
+ public String[] _ids ()
+ {
+ return (String[])__ids.clone ();
+ }
+
+
+} // class _ScenarioOneImplBase
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioOneStub.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioOneStub.java
new file mode 100644
index 0000000000..3427c127ec
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioOneStub.java
@@ -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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/_ScenarioOneStub.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* pi±tek, 27 czerwiec 2008 20:40:03 CEST
+*/
+
+public class _ScenarioOneStub extends org.omg.CORBA.portable.ObjectImpl implements org.apache.tuscany.sca.test.corba.generated.ScenarioOne
+{
+
+ public org.apache.tuscany.sca.test.corba.generated.RichStruct setRichStruct (org.apache.tuscany.sca.test.corba.generated.RichStruct richStruct) throws org.apache.tuscany.sca.test.corba.generated.WrongColor, org.apache.tuscany.sca.test.corba.generated.UnexpectedException
+ {
+ org.omg.CORBA.portable.InputStream $in = null;
+ try {
+ org.omg.CORBA.portable.OutputStream $out = _request ("setRichStruct", true);
+ org.apache.tuscany.sca.test.corba.generated.RichStructHelper.write ($out, richStruct);
+ $in = _invoke ($out);
+ org.apache.tuscany.sca.test.corba.generated.RichStruct $result = org.apache.tuscany.sca.test.corba.generated.RichStructHelper.read ($in);
+ return $result;
+ } catch (org.omg.CORBA.portable.ApplicationException $ex) {
+ $in = $ex.getInputStream ();
+ String _id = $ex.getId ();
+ if (_id.equals ("IDL:org/apache/tuscany/sca/test/corba/generated/WrongColor:1.0"))
+ throw org.apache.tuscany.sca.test.corba.generated.WrongColorHelper.read ($in);
+ else if (_id.equals ("IDL:org/apache/tuscany/sca/test/corba/generated/UnexpectedException:1.0"))
+ throw org.apache.tuscany.sca.test.corba.generated.UnexpectedExceptionHelper.read ($in);
+ else
+ throw new org.omg.CORBA.MARSHAL (_id);
+ } catch (org.omg.CORBA.portable.RemarshalException $rm) {
+ return setRichStruct (richStruct );
+ } finally {
+ _releaseReply ($in);
+ }
+ } // setRichStruct
+
+ // Type-specific CORBA::Object operations
+ private static String[] __ids = {
+ "IDL:org/apache/tuscany/sca/test/corba/generated/ScenarioOne:1.0"};
+
+ public String[] _ids ()
+ {
+ return (String[])__ids.clone ();
+ }
+
+ private void readObject (java.io.ObjectInputStream s) throws java.io.IOException
+ {
+ String str = s.readUTF ();
+ String[] args = null;
+ java.util.Properties props = null;
+ org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str);
+ org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate ();
+ _set_delegate (delegate);
+ }
+
+ private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException
+ {
+ String[] args = null;
+ java.util.Properties props = null;
+ String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this);
+ s.writeUTF (str);
+ }
+} // class _ScenarioOneStub
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioSixImplBase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioSixImplBase.java
new file mode 100644
index 0000000000..78464fe40d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioSixImplBase.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/_ScenarioSixImplBase.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* niedziela, 17 sierpieñ 2008 23:35:36 CEST
+*/
+
+public abstract class _ScenarioSixImplBase extends org.omg.CORBA.portable.ObjectImpl
+ implements org.apache.tuscany.sca.test.corba.generated.ScenarioSix, org.omg.CORBA.portable.InvokeHandler
+{
+
+ // Constructors
+ public _ScenarioSixImplBase ()
+ {
+ }
+
+ private static java.util.Hashtable _methods = new java.util.Hashtable ();
+ static
+ {
+ _methods.put ("passStringArray", new java.lang.Integer (0));
+ _methods.put ("passAnnotatedStruct", new java.lang.Integer (1));
+ _methods.put ("passRichUnion", new java.lang.Integer (2));
+ }
+
+ public org.omg.CORBA.portable.OutputStream _invoke (String $method,
+ org.omg.CORBA.portable.InputStream in,
+ org.omg.CORBA.portable.ResponseHandler $rh)
+ {
+ org.omg.CORBA.portable.OutputStream out = null;
+ java.lang.Integer __method = (java.lang.Integer)_methods.get ($method);
+ if (__method == null)
+ throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
+
+ switch (__method.intValue ())
+ {
+ case 0: // org/apache/tuscany/sca/test/corba/generated/ScenarioSix/passStringArray
+ {
+ String arg[][] = org.apache.tuscany.sca.test.corba.generated.StringArrayHelper.read (in);
+ String $result[][] = null;
+ $result = this.passStringArray (arg);
+ out = $rh.createReply();
+ org.apache.tuscany.sca.test.corba.generated.StringArrayHelper.write (out, $result);
+ break;
+ }
+
+ case 1: // org/apache/tuscany/sca/test/corba/generated/ScenarioSix/passAnnotatedStruct
+ {
+ org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct arg = org.apache.tuscany.sca.test.corba.generated.AnnotatedStructHelper.read (in);
+ org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct $result = null;
+ $result = this.passAnnotatedStruct (arg);
+ out = $rh.createReply();
+ org.apache.tuscany.sca.test.corba.generated.AnnotatedStructHelper.write (out, $result);
+ break;
+ }
+
+ case 2: // org/apache/tuscany/sca/test/corba/generated/ScenarioSix/passRichUnion
+ {
+ org.apache.tuscany.sca.test.corba.generated.RichUnion arg = org.apache.tuscany.sca.test.corba.generated.RichUnionHelper.read (in);
+ org.apache.tuscany.sca.test.corba.generated.RichUnion $result = null;
+ $result = this.passRichUnion (arg);
+ out = $rh.createReply();
+ org.apache.tuscany.sca.test.corba.generated.RichUnionHelper.write (out, $result);
+ break;
+ }
+
+ default:
+ throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
+ }
+
+ return out;
+ } // _invoke
+
+ // Type-specific CORBA::Object operations
+ private static String[] __ids = {
+ "IDL:org/apache/tuscany/sca/test/corba/generated/ScenarioSix:1.0"};
+
+ public String[] _ids ()
+ {
+ return (String[])__ids.clone ();
+ }
+
+
+} // class _ScenarioSixImplBase
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioSixStub.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioSixStub.java
new file mode 100644
index 0000000000..faff36c2a4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioSixStub.java
@@ -0,0 +1,119 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/_ScenarioSixStub.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* niedziela, 17 sierpieñ 2008 19:07:14 CEST
+*/
+
+public class _ScenarioSixStub extends org.omg.CORBA.portable.ObjectImpl implements org.apache.tuscany.sca.test.corba.generated.ScenarioSix
+{
+
+ public String[][] passStringArray (String[][] arg)
+ {
+ org.omg.CORBA.portable.InputStream $in = null;
+ try {
+ org.omg.CORBA.portable.OutputStream $out = _request ("passStringArray", true);
+ org.apache.tuscany.sca.test.corba.generated.StringArrayHelper.write ($out, arg);
+ $in = _invoke ($out);
+ String $result[][] = org.apache.tuscany.sca.test.corba.generated.StringArrayHelper.read ($in);
+ return $result;
+ } catch (org.omg.CORBA.portable.ApplicationException $ex) {
+ $in = $ex.getInputStream ();
+ String _id = $ex.getId ();
+ throw new org.omg.CORBA.MARSHAL (_id);
+ } catch (org.omg.CORBA.portable.RemarshalException $rm) {
+ return passStringArray (arg );
+ } finally {
+ _releaseReply ($in);
+ }
+ } // passStringArray
+
+ public org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct passAnnotatedStruct (org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct arg)
+ {
+ org.omg.CORBA.portable.InputStream $in = null;
+ try {
+ org.omg.CORBA.portable.OutputStream $out = _request ("passAnnotatedStruct", true);
+ org.apache.tuscany.sca.test.corba.generated.AnnotatedStructHelper.write ($out, arg);
+ $in = _invoke ($out);
+ org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct $result = org.apache.tuscany.sca.test.corba.generated.AnnotatedStructHelper.read ($in);
+ return $result;
+ } catch (org.omg.CORBA.portable.ApplicationException $ex) {
+ $in = $ex.getInputStream ();
+ String _id = $ex.getId ();
+ throw new org.omg.CORBA.MARSHAL (_id);
+ } catch (org.omg.CORBA.portable.RemarshalException $rm) {
+ return passAnnotatedStruct (arg );
+ } finally {
+ _releaseReply ($in);
+ }
+ } // passAnnotatedStruct
+
+ public org.apache.tuscany.sca.test.corba.generated.RichUnion passRichUnion (org.apache.tuscany.sca.test.corba.generated.RichUnion arg)
+ {
+ org.omg.CORBA.portable.InputStream $in = null;
+ try {
+ org.omg.CORBA.portable.OutputStream $out = _request ("passRichUnion", true);
+ org.apache.tuscany.sca.test.corba.generated.RichUnionHelper.write ($out, arg);
+ $in = _invoke ($out);
+ org.apache.tuscany.sca.test.corba.generated.RichUnion $result = org.apache.tuscany.sca.test.corba.generated.RichUnionHelper.read ($in);
+ return $result;
+ } catch (org.omg.CORBA.portable.ApplicationException $ex) {
+ $in = $ex.getInputStream ();
+ String _id = $ex.getId ();
+ throw new org.omg.CORBA.MARSHAL (_id);
+ } catch (org.omg.CORBA.portable.RemarshalException $rm) {
+ return passRichUnion (arg );
+ } finally {
+ _releaseReply ($in);
+ }
+ } // passRichUnion
+
+ // Type-specific CORBA::Object operations
+ private static String[] __ids = {
+ "IDL:org/apache/tuscany/sca/test/corba/generated/ScenarioSix:1.0"};
+
+ public String[] _ids ()
+ {
+ return (String[])__ids.clone ();
+ }
+
+ private void readObject (java.io.ObjectInputStream s) throws java.io.IOException
+ {
+ String str = s.readUTF ();
+ String[] args = null;
+ java.util.Properties props = null;
+ org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str);
+ org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate ();
+ _set_delegate (delegate);
+ }
+
+ private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException
+ {
+ String[] args = null;
+ java.util.Properties props = null;
+ String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this);
+ s.writeUTF (str);
+ }
+} // class _ScenarioSixStub
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioTwoImplBase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioTwoImplBase.java
new file mode 100644
index 0000000000..750006cec6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioTwoImplBase.java
@@ -0,0 +1,93 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/_ScenarioTwoImplBase.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* wtorek, 15 lipiec 2008 13:36:31 CEST
+*/
+
+
+// objects for ScenarioTwo
+public abstract class _ScenarioTwoImplBase extends org.omg.CORBA.portable.ObjectImpl
+ implements org.apache.tuscany.sca.test.corba.generated.ScenarioTwo, org.omg.CORBA.portable.InvokeHandler
+{
+
+ // Constructors
+ public _ScenarioTwoImplBase ()
+ {
+ }
+
+ private static java.util.Hashtable _methods = new java.util.Hashtable ();
+ static
+ {
+ _methods.put ("_get_stringField", new java.lang.Integer (0));
+ _methods.put ("_set_stringField", new java.lang.Integer (1));
+ }
+
+ public org.omg.CORBA.portable.OutputStream _invoke (String $method,
+ org.omg.CORBA.portable.InputStream in,
+ org.omg.CORBA.portable.ResponseHandler $rh)
+ {
+ org.omg.CORBA.portable.OutputStream out = null;
+ java.lang.Integer __method = (java.lang.Integer)_methods.get ($method);
+ if (__method == null)
+ throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
+
+ switch (__method.intValue ())
+ {
+ case 0: // org/apache/tuscany/sca/test/corba/generated/ScenarioTwo/_get_stringField
+ {
+ String $result = null;
+ $result = this.stringField ();
+ out = $rh.createReply();
+ out.write_string ($result);
+ break;
+ }
+
+ case 1: // org/apache/tuscany/sca/test/corba/generated/ScenarioTwo/_set_stringField
+ {
+ String newStringField = in.read_string ();
+ this.stringField (newStringField);
+ out = $rh.createReply();
+ break;
+ }
+
+ default:
+ throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
+ }
+
+ return out;
+ } // _invoke
+
+ // Type-specific CORBA::Object operations
+ private static String[] __ids = {
+ "IDL:org/apache/tuscany/sca/test/corba/generated/ScenarioTwo:1.0"};
+
+ public String[] _ids ()
+ {
+ return (String[])__ids.clone ();
+ }
+
+
+} // class _ScenarioTwoImplBase
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioTwoStub.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioTwoStub.java
new file mode 100644
index 0000000000..ef9f561d1b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioTwoStub.java
@@ -0,0 +1,99 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/_ScenarioTwoStub.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* wtorek, 15 lipiec 2008 13:36:31 CEST
+*/
+
+
+// objects for ScenarioTwo
+public class _ScenarioTwoStub extends org.omg.CORBA.portable.ObjectImpl implements org.apache.tuscany.sca.test.corba.generated.ScenarioTwo
+{
+
+ public String stringField ()
+ {
+ org.omg.CORBA.portable.InputStream $in = null;
+ try {
+ org.omg.CORBA.portable.OutputStream $out = _request ("_get_stringField", true);
+ $in = _invoke ($out);
+ String $result = $in.read_string ();
+ return $result;
+ } catch (org.omg.CORBA.portable.ApplicationException $ex) {
+ $in = $ex.getInputStream ();
+ String _id = $ex.getId ();
+ throw new org.omg.CORBA.MARSHAL (_id);
+ } catch (org.omg.CORBA.portable.RemarshalException $rm) {
+ return stringField ( );
+ } finally {
+ _releaseReply ($in);
+ }
+ } // stringField
+
+ public void stringField (String newStringField)
+ {
+ org.omg.CORBA.portable.InputStream $in = null;
+ try {
+ org.omg.CORBA.portable.OutputStream $out = _request ("_set_stringField", true);
+ $out.write_string (newStringField);
+ $in = _invoke ($out);
+ return;
+ } catch (org.omg.CORBA.portable.ApplicationException $ex) {
+ $in = $ex.getInputStream ();
+ String _id = $ex.getId ();
+ throw new org.omg.CORBA.MARSHAL (_id);
+ } catch (org.omg.CORBA.portable.RemarshalException $rm) {
+ stringField (newStringField );
+ } finally {
+ _releaseReply ($in);
+ }
+ } // stringField
+
+ // Type-specific CORBA::Object operations
+ private static String[] __ids = {
+ "IDL:org/apache/tuscany/sca/test/corba/generated/ScenarioTwo:1.0"};
+
+ public String[] _ids ()
+ {
+ return (String[])__ids.clone ();
+ }
+
+ private void readObject (java.io.ObjectInputStream s) throws java.io.IOException
+ {
+ String str = s.readUTF ();
+ String[] args = null;
+ java.util.Properties props = null;
+ org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str);
+ org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate ();
+ _set_delegate (delegate);
+ }
+
+ private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException
+ {
+ String[] args = null;
+ java.util.Properties props = null;
+ String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this);
+ s.writeUTF (str);
+ }
+} // class _ScenarioTwoStub
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFive.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFive.java
new file mode 100644
index 0000000000..1bc2156183
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFive.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.test.corba.types;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * @version $Rev$ $Date$
+ * Operations for scenario five
+ */
+@Remotable
+public interface ScenarioFive {
+
+ void doNothing();
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFiveComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFiveComponent.java
new file mode 100644
index 0000000000..a198eaf646
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFiveComponent.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.test.corba.types;
+
+import org.oasisopen.sca.annotation.Reference;
+
+/**
+ * @version $Rev$ $Date$
+ * Component for obtaining ScenarioFive reference
+ */
+public class ScenarioFiveComponent {
+
+ private ScenarioFive scenarioFive;
+
+ @Reference
+ public void setScenarioFive(ScenarioFive scenarioFive) {
+ this.scenarioFive = scenarioFive;
+ }
+
+ public ScenarioFive getScenarioFive() {
+ return scenarioFive;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFiveImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFiveImpl.java
new file mode 100644
index 0000000000..dc752a2aea
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFiveImpl.java
@@ -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.test.corba.types;
+
+/**
+ * @version $Rev$ $Date$
+ * Implementation of ScenarioFive service
+ */
+public class ScenarioFiveImpl implements ScenarioFive {
+
+ public void doNothing() {
+ // does nothing
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFour.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFour.java
new file mode 100644
index 0000000000..aa2f06909b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFour.java
@@ -0,0 +1,38 @@
+/*
+ * 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.test.corba.types;
+
+import org.apache.tuscany.sca.test.corba.scenariofour.ScenarioFourSdo;
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * @version $Rev$ $Date$
+ * Operations for ScenarioFour
+ */
+@Remotable
+public interface ScenarioFour {
+
+ ScenarioFourStruct setStruct(ScenarioFourStruct struct);
+
+ void exceptionTest() throws ScenarioFourException;
+
+ ScenarioFourSdo passScenarioFourStruct(ScenarioFourSdo scenarioFourSdo);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFourComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFourComponent.java
new file mode 100644
index 0000000000..c7569720f0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFourComponent.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.test.corba.types;
+
+import org.oasisopen.sca.annotation.Reference;
+
+/**
+ * @version $Rev$ $Date$
+ * Component for obtaining ScenarioFour reference
+ */
+public class ScenarioFourComponent {
+
+ private ScenarioFour scenarioFour;
+
+ @Reference
+ public void setScenarioFour(ScenarioFour scenarioFour) {
+ this.scenarioFour = scenarioFour;
+ }
+
+ public ScenarioFour getScenarioFour() {
+ return scenarioFour;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFourException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFourException.java
new file mode 100644
index 0000000000..bc76373633
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFourException.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.test.corba.types;
+
+/**
+ * @version $Rev$ $Date$
+ * Exception for ScenarioFour tests
+ */
+public class ScenarioFourException extends Exception {
+
+ public static final String DEFAULT_CONTENT = "Test";
+
+ private static final long serialVersionUID = 1L;
+ private String content;
+
+ public String getContent() {
+ return content;
+ }
+
+ public void setContent(String content) {
+ this.content = content;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFourImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFourImpl.java
new file mode 100644
index 0000000000..2f10177bd0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFourImpl.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.test.corba.types;
+
+import org.apache.tuscany.sca.test.corba.scenariofour.ScenarioFourSdo;
+
+/**
+ * @version $Rev$ $Date$
+ * Implementation of ScenarioFour service
+ */
+public class ScenarioFourImpl implements ScenarioFour {
+
+ public ScenarioFourStruct setStruct(ScenarioFourStruct struct) {
+ return struct;
+ }
+
+ public void exceptionTest() throws ScenarioFourException {
+ ScenarioFourException exception = new ScenarioFourException();
+ exception.setContent(ScenarioFourException.DEFAULT_CONTENT);
+ throw exception;
+ }
+
+ public ScenarioFourSdo passScenarioFourStruct(ScenarioFourSdo scenarioFourSdo) {
+ return scenarioFourSdo;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFourStruct.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFourStruct.java
new file mode 100644
index 0000000000..de8624455f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioFourStruct.java
@@ -0,0 +1,40 @@
+/*
+ * 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.test.corba.types;
+
+/**
+ * @version $Rev$ $Date$
+ * Type for ScenarioFour test
+ */
+public class ScenarioFourStruct {
+
+ public String field1;
+ public int field2;
+ public double[] field3;
+
+ public boolean equals(ScenarioFourStruct arg) {
+ return (field1 != null && arg.field1 != null
+ && field1.equals(arg.field1)
+ && field2 == arg.field2
+ && field3 != null
+ && arg.field3 != null && field3.length == arg.field3.length);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioOneComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioOneComponent.java
new file mode 100644
index 0000000000..1813de4e67
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioOneComponent.java
@@ -0,0 +1,46 @@
+/*
+ * 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.test.corba.types;
+
+import org.apache.tuscany.sca.test.corba.generated.RichStruct;
+import org.apache.tuscany.sca.test.corba.generated.ScenarioOne;
+import org.apache.tuscany.sca.test.corba.generated.ScenarioOneOperations;
+import org.apache.tuscany.sca.test.corba.generated.UnexpectedException;
+import org.apache.tuscany.sca.test.corba.generated.WrongColor;
+import org.oasisopen.sca.annotation.Reference;
+
+/**
+ * @version $Rev$ $Date$
+ * Component for reference using generated interface.
+ */
+public class ScenarioOneComponent implements ScenarioOneOperations {
+
+ private ScenarioOne scenarionOne;
+
+ @Reference
+ public void setScenarioOne(ScenarioOne scenarioOne) {
+ this.scenarionOne = scenarioOne;
+ }
+
+ public RichStruct setRichStruct(RichStruct richStruct) throws WrongColor, UnexpectedException {
+ return scenarionOne.setRichStruct(richStruct);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioOneServant.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioOneServant.java
new file mode 100644
index 0000000000..9b49adbfbb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioOneServant.java
@@ -0,0 +1,45 @@
+/*
+ * 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.test.corba.types;
+
+import org.apache.tuscany.sca.test.corba.generated.Color;
+import org.apache.tuscany.sca.test.corba.generated.RichStruct;
+import org.apache.tuscany.sca.test.corba.generated.UnexpectedException;
+import org.apache.tuscany.sca.test.corba.generated.WrongColor;
+import org.apache.tuscany.sca.test.corba.generated._ScenarioOneImplBase;
+
+/**
+ * @version $Rev$ $Date$
+ * Servant for generated interface. Uses generated classes.
+ */
+public class ScenarioOneServant extends _ScenarioOneImplBase {
+
+ private static final long serialVersionUID = 1L;
+
+ public RichStruct setRichStruct(RichStruct richStruct) throws WrongColor, UnexpectedException {
+ if (richStruct.innerStruct.color.value() == Color.red.value()) {
+ throw new WrongColor(richStruct.innerStruct.color, Color.green);
+ } else if (richStruct.longField == 0) {
+ throw new UnexpectedException("Expected richStruct.longField != 0");
+ }
+ return richStruct;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioSixServant.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioSixServant.java
new file mode 100644
index 0000000000..7889a80bf1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioSixServant.java
@@ -0,0 +1,46 @@
+/*
+ * 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.test.corba.types;
+
+import org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct;
+import org.apache.tuscany.sca.test.corba.generated.RichUnion;
+import org.apache.tuscany.sca.test.corba.generated._ScenarioSixImplBase;
+
+/**
+ * @version $Rev$ $Date$
+ * Scenario six servant for generated interface.
+ */
+public class ScenarioSixServant extends _ScenarioSixImplBase {
+
+ private static final long serialVersionUID = 1L;
+
+ public String[][] passStringArray(String[][] arg) {
+ return arg;
+ }
+
+ public AnnotatedStruct passAnnotatedStruct(AnnotatedStruct arg) {
+ return arg;
+ }
+
+ public RichUnion passRichUnion(RichUnion arg) {
+ return arg;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioTwoServant.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioTwoServant.java
new file mode 100644
index 0000000000..cdd49904d3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioTwoServant.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.test.corba.types;
+
+import org.apache.tuscany.sca.test.corba.generated._ScenarioTwoImplBase;
+
+/**
+ * @version $Rev$ $Date$
+ * Servant for generated interface.
+ */
+public class ScenarioTwoServant extends _ScenarioTwoImplBase {
+
+ private static final long serialVersionUID = 1L;
+
+ private String stringField = "";
+
+ public String stringField() {
+ return stringField;
+ }
+
+ public void stringField(String newStringField) {
+ this.stringField = newStringField;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TAnnotatedStruct.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TAnnotatedStruct.java
new file mode 100644
index 0000000000..6f0ef584da
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TAnnotatedStruct.java
@@ -0,0 +1,40 @@
+/*
+ * 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.test.corba.types;
+
+import org.apache.tuscany.sca.binding.corba.provider.meta.CorbaArray;
+
+/**
+ * @version $Rev$ $Date$ Scenario six structure used by Tuscany.
+ */
+public final class TAnnotatedStruct {
+
+ @CorbaArray( {2, 2})
+ public String[][] stringArray;
+
+ public TAnnotatedStruct() {
+
+ }
+
+ public TAnnotatedStruct(String[][] stringArray) {
+ this.stringArray = stringArray;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TColor.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TColor.java
new file mode 100644
index 0000000000..71003d008f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TColor.java
@@ -0,0 +1,62 @@
+/*
+ * 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.test.corba.types;
+
+/**
+ * @version $Rev$ $Date$
+ * User provided enum representation for Color type.
+ */
+public class TColor {
+
+ private int value;
+
+ public static final int _red = 0;
+ public static final int _yellow = 1;
+ public static final int _green = 2;
+
+ public static final TColor red = new TColor(_red);
+ public static final TColor yellow = new TColor(_yellow);
+ public static final TColor green = new TColor(_green);
+
+ public int value() {
+ return value;
+ }
+
+ public static TColor from_int(int value) {
+ switch (value) {
+ case 0:
+ return red;
+ case 1:
+ return yellow;
+ case 2:
+ return green;
+ }
+ return green;
+ }
+
+ protected TColor(int value) {
+ this.value = value;
+ }
+
+ public TColor() {
+
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TInnerStruct.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TInnerStruct.java
new file mode 100644
index 0000000000..271f1e669b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TInnerStruct.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.test.corba.types;
+
+/**
+ * @version $Rev$ $Date$
+ * User provided interface representation for InnerStruct type.
+ */
+public final class TInnerStruct {
+
+ public int[][] twoDimLongSequence;
+ public String stringField;
+ public TColor color;
+
+ public TInnerStruct() {
+
+ }
+
+ public TInnerStruct(int[][] a1, String a2, TColor a3) {
+ twoDimLongSequence = a1;
+ stringField = a2;
+ color = a3;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TInnerUnion.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TInnerUnion.java
new file mode 100644
index 0000000000..f2baffce9a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TInnerUnion.java
@@ -0,0 +1,59 @@
+/*
+ * 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.test.corba.types;
+
+import org.apache.tuscany.sca.binding.corba.provider.meta.CorbaUnionElement;
+import org.apache.tuscany.sca.binding.corba.provider.meta.CorbaUnionElementType;
+
+/**
+ * @version $Rev$ $Date$
+ * User provided interface representation for CORBA InnerUnion type.
+ */
+public final class TInnerUnion {
+
+ @CorbaUnionElement(type = CorbaUnionElementType.option, optionNumber = 1)
+ private int x;
+
+ @CorbaUnionElement(type = CorbaUnionElementType.option, optionNumber = 2)
+ private float y;
+
+ @CorbaUnionElement(type = CorbaUnionElementType.discriminator)
+ @SuppressWarnings("unused")
+ private int discriminator;
+
+ public int getX() {
+ return x;
+ }
+
+ public void setX(int x) {
+ discriminator = 1;
+ this.x = x;
+ }
+
+ public float getY() {
+ return y;
+ }
+
+ public void setY(float y) {
+ discriminator = 2;
+ this.y = y;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TRichStruct.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TRichStruct.java
new file mode 100644
index 0000000000..1b44da9752
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TRichStruct.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.test.corba.types;
+
+/**
+ * @version $Rev$ $Date$
+ * User provided interface representation for RichStruct type.
+ */
+public final class TRichStruct {
+
+ public TInnerStruct innerStruct;
+ public String[] stringSequence;
+ public int longField;
+
+ public TRichStruct() {
+
+ }
+
+ public TRichStruct(TInnerStruct a1, String[] a2, int a3) {
+ innerStruct = a1;
+ stringSequence = a2;
+ longField = a3;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TRichUnion.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TRichUnion.java
new file mode 100644
index 0000000000..8270ba1a8c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TRichUnion.java
@@ -0,0 +1,95 @@
+/*
+ * 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.test.corba.types;
+
+import org.apache.tuscany.sca.binding.corba.provider.meta.CorbaUnionElement;
+import org.apache.tuscany.sca.binding.corba.provider.meta.CorbaUnionElementType;
+
+/**
+ * @version $Rev$ $Date$
+ * User provided interface representation for CORBA RichUnion type.
+ */
+public final class TRichUnion {
+
+ @CorbaUnionElement(type = CorbaUnionElementType.option, optionNumber = 1)
+ private int x;
+
+ @CorbaUnionElement(type = CorbaUnionElementType.option, optionNumber = 2)
+ private float y;
+
+ @CorbaUnionElement(type = CorbaUnionElementType.option, optionNumber = 3)
+ private String z;
+
+ @CorbaUnionElement(type = CorbaUnionElementType.option, optionNumber = 4)
+ private TInnerUnion iu;
+
+ @CorbaUnionElement(type = CorbaUnionElementType.defaultOption)
+ private boolean def;
+
+ @CorbaUnionElement(type = CorbaUnionElementType.discriminator)
+ @SuppressWarnings("unused")
+ private int discriminator = -1;
+
+ public int getX() {
+ return x;
+ }
+
+ public void setX(int x) {
+ this.discriminator = 1;
+ this.x = x;
+ }
+
+ public float getY() {
+ return y;
+ }
+
+ public void setY(float y) {
+ this.discriminator = 2;
+ this.y = y;
+ }
+
+ public String getZ() {
+ return z;
+ }
+
+ public void setZ(String z) {
+ this.discriminator = 3;
+ this.z = z;
+ }
+
+ public boolean isDef() {
+ return def;
+ }
+
+ public void setDef(boolean def) {
+ this.discriminator = -1;
+ this.def = def;
+ }
+
+ public TInnerUnion getIu() {
+ return iu;
+ }
+
+ public void setIu(TInnerUnion iu) {
+ this.discriminator = 4;
+ this.iu = iu;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioOne.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioOne.java
new file mode 100644
index 0000000000..922759cd8d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioOne.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.test.corba.types;
+
+import org.apache.tuscany.sca.test.corba.generated.UnexpectedException;
+import org.apache.tuscany.sca.test.corba.generated.WrongColor;
+
+/**
+ * @version $Rev$ $Date$
+ * User provided CORBA service interface.
+ */
+public interface TScenarioOne {
+
+ TRichStruct setRichStruct(TRichStruct richStruct) throws WrongColor, UnexpectedException;
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioOneComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioOneComponent.java
new file mode 100644
index 0000000000..ac7b0af175
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioOneComponent.java
@@ -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.test.corba.types;
+
+import org.apache.tuscany.sca.test.corba.generated.UnexpectedException;
+import org.apache.tuscany.sca.test.corba.generated.WrongColor;
+import org.oasisopen.sca.annotation.Reference;
+
+/**
+ * @version $Rev$ $Date$
+ * Component for reference using user provided interface.
+ */
+public class TScenarioOneComponent implements TScenarioOne {
+
+ private TScenarioOne scenarionOne;
+
+ @Reference
+ public void setScenarioOne(TScenarioOne scenarioOne) {
+ this.scenarionOne = scenarioOne;
+ }
+
+ public TRichStruct setRichStruct(TRichStruct richStruct) throws WrongColor, UnexpectedException {
+ return scenarionOne.setRichStruct(richStruct);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioOneServant.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioOneServant.java
new file mode 100644
index 0000000000..47f0775c16
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioOneServant.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.test.corba.types;
+
+import org.apache.tuscany.sca.test.corba.generated.Color;
+import org.apache.tuscany.sca.test.corba.generated.UnexpectedException;
+import org.apache.tuscany.sca.test.corba.generated.WrongColor;
+
+/**
+ * @version $Rev$ $Date$
+ * Servant for user provided interface. Uses T* classes.
+ */
+public class TScenarioOneServant implements TScenarioOne {
+
+ private static final long serialVersionUID = 1L;
+
+ public TRichStruct setRichStruct(TRichStruct richStruct) throws WrongColor, UnexpectedException {
+ if (richStruct.innerStruct.color.value() == Color.red.value()) {
+ Color translatedColor = Color.from_int(richStruct.innerStruct.color.value());
+ throw new WrongColor(translatedColor, Color.green);
+ } else if (richStruct.longField == 0) {
+ throw new UnexpectedException("Expected richStruct.longField != 0");
+ }
+ return richStruct;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioSix.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioSix.java
new file mode 100644
index 0000000000..0e894cb7ea
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioSix.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.test.corba.types;
+
+import org.apache.tuscany.sca.binding.corba.provider.meta.CorbaArray;
+
+/**
+ * @version $Rev$ $Date$
+ * Operations for scenario six.
+ */
+public interface TScenarioSix {
+
+ @CorbaArray( {2, 2})
+ public String[][] passStringArray(@CorbaArray( {2, 2})String[][] arg);
+
+ public TAnnotatedStruct passAnnotatedStruct(TAnnotatedStruct arg);
+
+ public TRichUnion passRichUnion(TRichUnion arg);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioSixComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioSixComponent.java
new file mode 100644
index 0000000000..13bc1d499e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioSixComponent.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.test.corba.types;
+
+import org.oasisopen.sca.annotation.Reference;
+
+/**
+ * @version $Rev$ $Date$
+ * Component for obtaining ScenartioSix reference.
+ */
+public class TScenarioSixComponent {
+
+ private TScenarioSix scenarioSix;
+
+ @Reference
+ public void setScenarioSix(TScenarioSix scenarioSix) {
+ this.scenarioSix = scenarioSix;
+ }
+
+ public TScenarioSix getScenarioSix() {
+ return scenarioSix;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioSixServant.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioSixServant.java
new file mode 100644
index 0000000000..8e76958e31
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioSixServant.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.test.corba.types;
+
+/**
+ * @version $Rev$ $Date$
+ * Tuscany scenario six servant.
+ */
+public class TScenarioSixServant implements TScenarioSix {
+
+ private static final long serialVersionUID = 1L;
+
+ public String[][] passStringArray(String[][] arg) {
+ return arg;
+ }
+
+ public TAnnotatedStruct passAnnotatedStruct(TAnnotatedStruct arg) {
+ return arg;
+ }
+
+ public TRichUnion passRichUnion(TRichUnion arg) {
+ return arg;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioThree.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioThree.java
new file mode 100644
index 0000000000..1e4264256b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioThree.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.test.corba.types;
+
+/**
+ * @version $Rev$ $Date$
+ * Operations for ScenarioThree.
+ */
+public interface TScenarioThree {
+
+ int getIntField();
+
+ void setIntField(int intField);
+
+ void overloadedName();
+
+ void overloadedName(String arg1);
+
+ void overloadedName(String arg1, int arg2);
+
+ int caseDifferent();
+
+ int CaseDifferent();
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioThreeComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioThreeComponent.java
new file mode 100644
index 0000000000..12b0f404ae
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioThreeComponent.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.test.corba.types;
+
+import org.oasisopen.sca.annotation.Reference;
+
+/**
+ * @version $Rev$ $Date$
+ * Component for obtaining ScenartioThree reference.
+ */
+public class TScenarioThreeComponent {
+
+ private TScenarioThree scenarionThree;
+
+ @Reference
+ public void setScenarioThree(TScenarioThree scenarioThree) {
+ this.scenarionThree = scenarioThree;
+ }
+
+ public TScenarioThree getScenarioThree() {
+ return scenarionThree;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioThreeServant.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioThreeServant.java
new file mode 100644
index 0000000000..b679214c6c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioThreeServant.java
@@ -0,0 +1,52 @@
+/*
+ * 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.test.corba.types;
+
+/**
+ * @version $Rev$ $Date$
+ * Servant for user provided interface.
+ */
+public class TScenarioThreeServant implements TScenarioThree {
+
+ public int getIntField() {
+ return 0;
+ }
+
+ public void overloadedName() {
+ }
+
+ public void overloadedName(String arg1) {
+ }
+
+ public void overloadedName(String arg1, int arg2) {
+ }
+
+ public void setIntField(int intField) {
+ }
+
+ public int CaseDifferent() {
+ return 1;
+ }
+
+ public int caseDifferent() {
+ return 0;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioTwo.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioTwo.java
new file mode 100644
index 0000000000..415634c80f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioTwo.java
@@ -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.test.corba.types;
+
+/**
+ * @version $Rev$ $Date$
+ * Operations for ScenarioTwo.
+ */
+public interface TScenarioTwo {
+
+ String getStringField();
+
+ void setStringField(String stringField);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioTwoComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioTwoComponent.java
new file mode 100644
index 0000000000..937d82b33e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioTwoComponent.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.test.corba.types;
+
+import org.oasisopen.sca.annotation.Reference;
+
+/**
+ * @version $Rev$ $Date$
+ * Component for obtaining ScenartioTwo reference.
+ */
+public class TScenarioTwoComponent {
+
+ private TScenarioTwo scenarioTwo;
+
+ @Reference
+ public void setScenarioTwo(TScenarioTwo scenarioTwo) {
+ this.scenarioTwo = scenarioTwo;
+ }
+
+ public TScenarioTwo getScenarioTwo() {
+ return scenarioTwo;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioTwoServant.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioTwoServant.java
new file mode 100644
index 0000000000..cb868d18a0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioTwoServant.java
@@ -0,0 +1,38 @@
+/*
+ * 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.test.corba.types;
+
+/**
+ * @version $Rev$ $Date$
+ * Servant for user provided interface.
+ */
+public class TScenarioTwoServant implements TScenarioTwo {
+
+ private static String stringField = "";
+
+ public String getStringField() {
+ return stringField;
+ }
+
+ public void setStringField(String stringField) {
+ TScenarioTwoServant.stringField = stringField;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator
new file mode 100644
index 0000000000..3e77527d73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator
@@ -0,0 +1,18 @@
+# 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.
+
+org.apache.tuscany.sca.test.corba.TestCorbaHostModuleActivator
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/ScenarioFive.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/ScenarioFive.composite
new file mode 100644
index 0000000000..b3675a0194
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/ScenarioFive.composite
@@ -0,0 +1,41 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="Corba5">
+
+ <component name="ScenarioFiveService">
+ <implementation.java class="org.apache.tuscany.sca.test.corba.types.ScenarioFiveImpl" />
+ </component>
+ <service name="ScenarioFive" promote="ScenarioFiveService">
+ <interface.java interface="org.apache.tuscany.sca.test.corba.types.ScenarioFive"/>
+ <binding.sca uri="corbaname::localhost:5090#ScenarioFive"/>
+ </service>
+
+ <component name="ScenarioFive">
+ <implementation.java class="org.apache.tuscany.sca.test.corba.types.ScenarioFiveComponent" />
+ <reference name="scenarioFive">
+ <binding.sca uri="corbaname::localhost:5090#ScenarioFive"/>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/ScenarioFour.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/ScenarioFour.composite
new file mode 100644
index 0000000000..50bfc02803
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/ScenarioFour.composite
@@ -0,0 +1,56 @@
+<!--
+ * 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:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="Corba4">
+
+ <!-- note that some binding configuration (like port or host name) is also used in JUnit test class -->
+
+ <component name="ScenarioFourService">
+ <implementation.java class="org.apache.tuscany.sca.test.corba.types.ScenarioFourImpl" />
+ </component>
+ <service name="ScenarioFour" promote="ScenarioFourService">
+ <interface.java interface="org.apache.tuscany.sca.test.corba.types.ScenarioFour"/>
+ <binding.sca uri="corbaname::localhost:5080#ScenarioFour"/>
+ </service>
+
+ <component name="ScenarioFour">
+ <implementation.java class="org.apache.tuscany.sca.test.corba.types.ScenarioFourComponent" />
+ <reference name="scenarioFour">
+ <binding.sca uri="corbaname::localhost:5080#ScenarioFour"/>
+ </reference>
+ </component>
+
+ <!-- doubled service and reference to test reuse of name server -->
+ <service name="ScenarioFourDoubled" promote="ScenarioFourService">
+ <interface.java interface="org.apache.tuscany.sca.test.corba.types.ScenarioFour"/>
+ <binding.sca uri="corbaname::localhost:5080#ScenarioFourReuse"/>
+ </service>
+
+ <component name="ScenarioFourReuse">
+ <implementation.java class="org.apache.tuscany.sca.test.corba.types.ScenarioFourComponent" />
+ <reference name="scenarioFour">
+ <binding.sca uri="corbaname::localhost:5080#ScenarioFourReuse"/>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/ScenarioOne.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/ScenarioOne.composite
new file mode 100644
index 0000000000..495ca2a41f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/ScenarioOne.composite
@@ -0,0 +1,111 @@
+<!--
+ * 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:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="Corba1">
+
+ <!-- note that some binding configuration (like port or host name) is also used in JUnit test class -->
+
+ <!-- reference 1 - consuming traditional CORBA service using USER PROVIDED Java interface -->
+ <component name="ScenarioOne">
+ <implementation.java class="org.apache.tuscany.sca.test.corba.types.TScenarioOneComponent" />
+ <reference name="scenarioOne">
+ <tuscany:binding.corba host="localhost" port="5060" name="ScenarioOne"/>
+ </reference>
+ </component>
+
+ <!-- reference 2 - consuming traditional CORBA service using GENERATED Java interface -->
+ <component name="ScenarioOneGenerated">
+ <implementation.java class="org.apache.tuscany.sca.test.corba.types.ScenarioOneComponent" />
+ <reference name="scenarioOne">
+ <tuscany:binding.corba host="localhost" port="5060" name="ScenarioOne"/>
+ </reference>
+ </component>
+
+ <!-- TUSCANY CORBA SERVICE 1 (TS1) - CORBA service using USER PROVIDED Java interface -->
+ <component name="ScenarionOneService">
+ <implementation.java class="org.apache.tuscany.sca.test.corba.types.TScenarioOneServant" />
+ </component>
+ <service name="ScenarionOneService" promote="ScenarionOneService">
+ <interface.java interface="org.apache.tuscany.sca.test.corba.types.TScenarioOne"/>
+ <tuscany:binding.corba host="localhost" port="5060" name="ScenarioOneTuscany" id="IDL:org/apache/tuscany/sca/test/corba/generated/ScenarioOne:1.0"/>
+ </service>
+
+ <!-- TUSCANY CORBA SERVICE 2 (TS2) - CORBA service using GENERATED provided Java interface -->
+ <component name="ScenarionOneServiceGenerated">
+ <implementation.java class="org.apache.tuscany.sca.test.corba.types.ScenarioOneServant" />
+ </component>
+ <service name="ScenarionOneServiceGenerated" promote="ScenarionOneServiceGenerated">
+ <interface.java interface="org.apache.tuscany.sca.test.corba.generated.ScenarioOneOperations"/>
+ <tuscany:binding.corba host="localhost" port="5060" name="ScenarioOneTuscanyGenerated" id="IDL:org/apache/tuscany/sca/test/corba/generated/ScenarioOne:1.0"/>
+ </service>
+
+ <!-- reference 3 - user provided interface combined with TUSCANY SERVICE 1 (TS1) -->
+ <component name="TU2TS1">
+ <implementation.java class="org.apache.tuscany.sca.test.corba.types.TScenarioOneComponent" />
+ <reference name="scenarioOne">
+ <tuscany:binding.corba host="localhost" port="5060" name="ScenarioOneTuscany"/>
+ </reference>
+ </component>
+
+ <!-- reference 4 - generated interface combined with TUSCANY SERVICE 1 (TS1) -->
+ <component name="TG2TS1">
+ <implementation.java class="org.apache.tuscany.sca.test.corba.types.ScenarioOneComponent" />
+ <reference name="scenarioOne">
+ <tuscany:binding.corba host="localhost" port="5060" name="ScenarioOneTuscany"/>
+ </reference>
+ </component>
+
+ <!-- reference 5 - user provided interface combined with TUSCANY SERVICE 2 (TS2) -->
+ <component name="TU2TS2">
+ <implementation.java class="org.apache.tuscany.sca.test.corba.types.TScenarioOneComponent" />
+ <reference name="scenarioOne">
+ <tuscany:binding.corba host="localhost" port="5060" name="ScenarioOneTuscanyGenerated"/>
+ </reference>
+ </component>
+
+ <!-- reference 6 - generated interface combined with TUSCANY SERVICE 2 (TS2) -->
+ <component name="TG2TS2">
+ <implementation.java class="org.apache.tuscany.sca.test.corba.types.ScenarioOneComponent" />
+ <reference name="scenarioOne">
+ <tuscany:binding.corba host="localhost" port="5060" name="ScenarioOneTuscanyGenerated"/>
+ </reference>
+ </component>
+
+ <!-- TUSCANY CORBA SERVICE 3 (TS3) - CORBA service using registered using URI -->
+ <component name="ScenarionOneServiceURI">
+ <implementation.java class="org.apache.tuscany.sca.test.corba.types.TScenarioOneServant" />
+ </component>
+ <service name="ScenarionOneServiceGenerated" promote="ScenarionOneServiceGenerated">
+ <interface.java interface="org.apache.tuscany.sca.test.corba.generated.ScenarioOneOperations"/>
+ <tuscany:binding.corba uri="corbaname::localhost:5060#NamedWithURI"/>
+ </service>
+
+ <!-- reference 7 - ... -->
+ <component name="UriBinding">
+ <implementation.java class="org.apache.tuscany.sca.test.corba.types.TScenarioOneComponent" />
+ <reference name="scenarioOne">
+ <tuscany:binding.corba uri="corbaname::localhost:5060#NamedWithURI"/>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/ScenarioSix.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/ScenarioSix.composite
new file mode 100644
index 0000000000..840cd076b1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/ScenarioSix.composite
@@ -0,0 +1,41 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="Corba6">
+
+ <component name="ScenarioSix">
+ <implementation.java class="org.apache.tuscany.sca.test.corba.types.TScenarioSixComponent" />
+ <reference name="scenarioSix">
+ <tuscany:binding.corba host="localhost" port="5050" name="ScenarioSix"/>
+ </reference>
+ </component>
+
+ <component name="ScenarionSixService">
+ <implementation.java class="org.apache.tuscany.sca.test.corba.types.TScenarioSixServant" />
+ </component>
+ <service name="ScenarionSixService" promote="ScenarionSixService">
+ <interface.java interface="org.apache.tuscany.sca.test.corba.types.TScenarioSix"/>
+ <tuscany:binding.corba host="localhost" port="5050" name="ScenarioSixTuscany" id="IDL:org/apache/tuscany/sca/test/corba/generated/ScenarioSix:1.0"/>
+ </service>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/ScenarioThree.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/ScenarioThree.composite
new file mode 100644
index 0000000000..f02ba89496
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/ScenarioThree.composite
@@ -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.
+-->
+
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="Corba3">
+
+ <!-- note that some binding configuration (like port or host name) is also used in JUnit test class -->
+
+ <component name="ScenarioThreeService">
+ <implementation.java class="org.apache.tuscany.sca.test.corba.types.TScenarioThreeServant" />
+ </component>
+ <service name="ScenarioThreeServiceTuscany" promote="ScenarioThreeService">
+ <interface.java interface="org.apache.tuscany.sca.test.corba.types.TScenarioThree"/>
+ <tuscany:binding.corba uri="corbaname::localhost:5060#ScenarioThree"/>
+ </service>
+
+ <component name="ScenarioThreeReference">
+ <implementation.java class="org.apache.tuscany.sca.test.corba.types.TScenarioThreeComponent" />
+ <reference name="scenarioThree">
+ <tuscany:binding.corba uri="corbaname::localhost:5060#ScenarioThree"/>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/ScenarioTwo.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/ScenarioTwo.composite
new file mode 100644
index 0000000000..ed3f545f72
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/ScenarioTwo.composite
@@ -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.
+-->
+
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="Corba2">
+
+ <!-- note that some binding configuration (like port or host name) is also used in JUnit test class -->
+
+ <component name="ScenarioTwoService">
+ <implementation.java class="org.apache.tuscany.sca.test.corba.types.TScenarioTwoServant" />
+ </component>
+ <service name="ScenarioTwoServiceTuscany" promote="ScenarioTwoService">
+ <interface.java interface="org.apache.tuscany.sca.test.corba.types.TScenarioTwo"/>
+ <tuscany:binding.corba uri="corbaname::localhost:5060#ScenarioTwo" id="IDL:org/apache/tuscany/sca/test/corba/generated/ScenarioTwo:1.0"/>
+ </service>
+
+ <component name="ScenarioTwo">
+ <implementation.java class="org.apache.tuscany.sca.test.corba.types.TScenarioTwoComponent" />
+ <reference name="scenarioTwo">
+ <tuscany:binding.corba uri="corbaname::localhost:5060#ScenarioTwoGenerated"/>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/itest_scenario.idl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/itest_scenario.idl
new file mode 100644
index 0000000000..41489a4565
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/itest_scenario.idl
@@ -0,0 +1,110 @@
+/*
+ * 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.
+ */
+
+/*
+ * compile by
+ * idlj -fall -oldImplBase itest_scenario.idl
+ */
+
+module org {
+ module apache {
+ module tuscany {
+ module sca {
+ module test {
+ module corba {
+ module generated {
+
+ // objects for ScenarioOne
+
+ enum Color {red, yellow, green};
+
+ typedef sequence<string> StringSequence;
+ typedef sequence<long> LongSequence;
+ typedef sequence<LongSequence> TwoDimLongSequence;
+
+ struct InnerStruct {
+ TwoDimLongSequence twoDimLongSequence;
+ string stringField;
+ Color color;
+ };
+
+ struct RichStruct {
+ InnerStruct innerStruct;
+ StringSequence stringSequence;
+ long longField;
+ };
+
+ exception WrongColor {
+ Color givenColor;
+ Color correctColor;
+ };
+
+ exception UnexpectedException {
+ string info;
+ };
+
+ interface ScenarioOne {
+
+ RichStruct setRichStruct(in RichStruct richStruct) raises (WrongColor, UnexpectedException);
+
+ };
+
+ // objects for ScenarioTwo
+
+ interface ScenarioTwo {
+
+ attribute string stringField;
+
+ };
+
+ typedef string StringArray[2][2];
+
+ struct AnnotatedStruct {
+ StringArray stringArray;
+ };
+
+ union InnerUnion switch (long) {
+ case 1: long x;
+ case 2: float y;
+ };
+
+ union RichUnion switch (long) {
+ case 1: long x;
+ case 2: float y;
+ case 3: string z;
+ case 4: InnerUnion iu;
+ default: boolean a;
+ };
+
+ interface ScenarioSix {
+
+ StringArray passStringArray(in StringArray arg);
+
+ AnnotatedStruct passAnnotatedStruct(in AnnotatedStruct arg);
+
+ RichUnion passRichUnion(in RichUnion arg);
+
+ };
+ };
+ };
+ };
+ };
+ };
+ };
+};
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/scenariofour.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/scenariofour.xsd
new file mode 100644
index 0000000000..2669b54be3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/corba/src/test/resources/scenariofour.xsd
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<schema targetNamespace="http://example.com/scenariofour" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="ScenarioFourSdo">
+ <complexType>
+ <sequence>
+ <element name="message" minOccurs="1" type="string" />
+ <element name="symbol" minOccurs="1" type="string" />
+ </sequence>
+ </complexType>
+ </element>
+
+</schema>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/client/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/client/pom.xml
new file mode 100644
index 0000000000..10137ee51b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/client/pom.xml
@@ -0,0 +1,49 @@
+<?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-data-copy</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-data-copy-client</artifactId>
+ <name>Apache Tuscany SCA iTest Data-Copy Client</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-data-copy-common</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0.1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-databinding</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/client/src/main/java/itest/client/impl/ClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/client/src/main/java/itest/client/impl/ClientImpl.java
new file mode 100644
index 0000000000..5c28ceaa8e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/client/src/main/java/itest/client/impl/ClientImpl.java
@@ -0,0 +1,118 @@
+/*
+ * 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 itest.client.impl;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertTrue;
+
+import java.io.StringReader;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import itest.common.intf.ClientIntf;
+import itest.privatecopy.intf.ServiceIntf;
+import itest.privatecopy.types.Name;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.xml.sax.InputSource;
+
+public class ClientImpl implements ClientIntf {
+
+ @Reference
+ public ServiceIntf service;
+
+ @Override
+ public void callJAXBCrossContribution() {
+ Name name = new Name();
+ name.setFirstName("Leora");
+ name.setLastName("Mayora");
+ Name retVal = service.greet(name);
+ assertEquals("Hi Leora", retVal.getFirstName());
+ assertEquals("Ms. Mayora", retVal.getLastName());
+ }
+
+ @Override
+ public void callObjectGraphCheck(int caseNumber) {
+ switch (caseNumber) {
+ case 1:
+ Name name1 = new Name();
+ name1.setFirstName("First");
+ name1.setLastName("Last");
+ boolean retVal1 = service.areNamesTheSameObjects(name1, name1);
+ assertTrue(retVal1);
+ break;
+ case 2:
+ Name name2a = new Name();
+ name2a.setFirstName("First");
+ name2a.setLastName("Last");
+ Name name2b = new Name();
+ name2b.setFirstName("First");
+ name2b.setLastName("Last");
+ boolean retVal2 = service.areNamesTheSameObjects(name2a, name2b);
+ assertFalse(retVal2);
+ break;
+
+ }
+ }
+
+ @Override
+ public void callJSON() {
+ Name name = new Name();
+ name.setFirstName("Jason");
+ name.setLastName("Nosaj");
+ service.greetJSON(name);
+ }
+
+// @Override
+ public void callDOM() {
+ Name name = new Name();
+ name.setFirstName("DOM");
+ name.setLastName("MOD");
+ String retVal = service.greetDOM(name);
+ assertEquals("SUCCESS", retVal);
+ }
+
+ @Override
+ public void testRoundTripDOMIdentity() {
+ try {
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ factory.setNamespaceAware(true);
+ DocumentBuilder builder = factory.newDocumentBuilder();
+
+ String nameString = "<?xml version=\"1.0\" ?>" +
+ "<name>BOB</name>";
+ InputSource is = new InputSource( new StringReader(nameString) );
+ Document doc = builder.parse(is);
+ Node name = doc.getDocumentElement();
+ Node retVal = service.returnDOM(name);
+ assertNotSame("PBV should result in different object", name, retVal);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+
+ }
+
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/client/src/main/java/itest/privatecopy/intf/ServiceIntf.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/client/src/main/java/itest/privatecopy/intf/ServiceIntf.java
new file mode 100644
index 0000000000..6101bb65b3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/client/src/main/java/itest/privatecopy/intf/ServiceIntf.java
@@ -0,0 +1,39 @@
+/*
+ * 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 itest.privatecopy.intf;
+
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+import org.apache.tuscany.sca.databinding.annotation.DataBinding;
+import org.oasisopen.sca.annotation.Remotable;
+import org.w3c.dom.Node;
+
+import itest.privatecopy.types.Name;
+
+@Remotable
+public interface ServiceIntf {
+ Name greet(Name name);
+ boolean areNamesTheSameObjects(Name name1, Name name2);
+
+ void greetJSON(Name name);
+ String greetDOM(Name name);
+ Node returnDOM(Node name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/client/src/main/java/itest/privatecopy/types/Name.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/client/src/main/java/itest/privatecopy/types/Name.java
new file mode 100644
index 0000000000..b8ef3e0305
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/client/src/main/java/itest/privatecopy/types/Name.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package itest.privatecopy.types;
+
+public class Name implements java.io.Serializable {
+
+ public Name() {
+ super();
+ }
+ private String firstName;
+ private String lastName;
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+ public String getLastName() {
+ return lastName;
+ }
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+ public String getFirstName() {
+ return firstName;
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/client/src/main/resources/helloworld-client.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/client/src/main/resources/helloworld-client.composite
new file mode 100644
index 0000000000..5108e1eae1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/client/src/main/resources/helloworld-client.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.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://itest"
+ name="ClientComposite">
+
+ <component name="ClientSCAAlternative">
+ <implementation.java class="itest.client.impl.ClientImpl"/>
+ <reference name="service" target="Service"/>
+ </component>
+
+ <component name="ClientSCA">
+ <implementation.java class="itest.client.impl.ClientImpl"/>
+ <reference name="service">
+ <binding.sca uri="Service"/>
+ </reference>
+ </component>
+
+ <component name="ClientWS">
+ <implementation.java class="itest.client.impl.ClientImpl"/>
+ <reference name="service">
+ <binding.ws uri="http://localhost:8085/Service/ServiceIntf"/>
+ </reference>
+ </component>
+
+ <component name="ClientRMI">
+ <implementation.java class="itest.client.impl.ClientImpl"/>
+ <reference name="service">
+ <tuscany:binding.rmi name="rmi" uri="rmi://localhost:8099/Service"/>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/common/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/common/pom.xml
new file mode 100644
index 0000000000..0c6b273bed
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/common/pom.xml
@@ -0,0 +1,39 @@
+<?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-data-copy</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-data-copy-common</artifactId>
+ <name>Apache Tuscany SCA iTest Data-Copy Common</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0.1</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/common/src/main/java/itest/common/intf/ClientIntf.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/common/src/main/java/itest/common/intf/ClientIntf.java
new file mode 100644
index 0000000000..0fa50e5ecc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/common/src/main/java/itest/common/intf/ClientIntf.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package itest.common.intf;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface ClientIntf {
+ void callJAXBCrossContribution();
+ void callObjectGraphCheck(int caseNumber);
+ void callJSON();
+ void callDOM();
+ void testRoundTripDOMIdentity();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/common/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/common/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..393bd0baaf
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/common/src/main/resources/META-INF/sca-contribution.xml
@@ -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://itest">
+ <export.java package="itest.common.intf"/>
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/driver/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/driver/pom.xml
new file mode 100644
index 0000000000..1fa637d1b0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/driver/pom.xml
@@ -0,0 +1,79 @@
+<?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-data-copy</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-data-copy-driver</artifactId>
+ <name>Apache Tuscany SCA iTest Data-Copy Driver</name>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-data-copy-common</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-client-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.19</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-rmi-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-databinding-json</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-databinding-sdo</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/driver/src/test/java/itest/CrossContribTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/driver/src/test/java/itest/CrossContribTestCase.java
new file mode 100644
index 0000000000..cc1f542769
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/driver/src/test/java/itest/CrossContribTestCase.java
@@ -0,0 +1,178 @@
+/*
+ * 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 itest;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import itest.common.intf.ClientIntf;
+
+import java.net.URI;
+
+import org.apache.tuscany.sca.assembly.Binding;
+import org.apache.tuscany.sca.assembly.SCABinding;
+import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class CrossContribTestCase {
+
+ private static URI domainURI = URI.create("CrossContribTestCase");
+ private static Node node;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ node = NodeFactory.getInstance().createNode(domainURI, "../service/target/classes", "../client/target/classes", "../common/target/classes");
+ node.start();
+ }
+
+ @Test
+ public void testJAXBCrossContributionSCA() throws Exception {
+ ClientIntf client = node.getService(ClientIntf.class, "ClientSCA");
+ assertNotNull(client);
+ client.callJAXBCrossContribution();
+ }
+
+ // TUSCANY-3941 - make sure binding.sca is matched properly when
+ // it's used to carry the target URI. Not much to do with
+ // JAXB but this is a convenient test
+ @Test
+ public void testJAXBCrossContributionSCAAlternative() throws Exception {
+ ClientIntf client = node.getService(ClientIntf.class, "ClientSCAAlternative");
+ assertNotNull(client);
+ client.callJAXBCrossContribution();
+
+ // Get the binding from the ClientSCA component
+ Binding binding = ((NodeImpl)node).getDomainComposite().getComponents().get(2).getReferences().get(0).getEndpointReferences().get(0).getBinding();
+ assertEquals(true, binding instanceof SCABinding);
+
+ // Get the binding from the ClientSCAAlternative component
+ Binding alternativeBinding = ((NodeImpl)node).getDomainComposite().getComponents().get(1).getReferences().get(0).getEndpointReferences().get(0).getBinding();
+ assertEquals(true, alternativeBinding instanceof WebServiceBinding);
+ }
+
+
+ @Test
+ public void testJAXBCrossContributionWS() throws Exception {
+ ClientIntf client = node.getService(ClientIntf.class, "ClientWS");
+ assertNotNull(client);
+ client.callJAXBCrossContribution();
+ }
+
+ @Test
+ public void testSameObjectSCA() throws Exception {
+ ClientIntf client = node.getService(ClientIntf.class, "ClientSCA");
+ assertNotNull(client);
+ client.callObjectGraphCheck(1);
+ }
+
+ @Test
+ public void testDifferentObjectSCA() throws Exception {
+ ClientIntf client = node.getService(ClientIntf.class, "ClientSCA");
+ assertNotNull(client);
+ client.callObjectGraphCheck(2);
+ }
+
+ @Test
+ public void testSameObjectRMI() throws Exception {
+ ClientIntf client = node.getService(ClientIntf.class, "ClientRMI");
+ assertNotNull(client);
+ client.callObjectGraphCheck(1);
+ }
+
+ @Test
+ public void testDifferentObjectRMI() throws Exception {
+ ClientIntf client = node.getService(ClientIntf.class, "ClientRMI");
+ assertNotNull(client);
+ client.callObjectGraphCheck(2);
+ }
+
+ // We expect that object identity will be different across binding.ws,
+ // so remove this test.
+ // public void testSameObjectWS() throws Exception {
+
+ @Test
+ public void testDifferentObjectWS() throws Exception {
+ ClientIntf client = node.getService(ClientIntf.class, "ClientWS");
+ assertNotNull(client);
+ client.callObjectGraphCheck(2);
+ }
+
+ @Test // Fails for 3894, (rename test)
+ public void testDOMSCA() throws Exception {
+ ClientIntf client = node.getService(ClientIntf.class, "ClientSCA");
+ assertNotNull(client);
+ client.callDOM();
+ }
+
+ @Test // Output DB treated as DOM, rather than String
+ public void testDOMWS() throws Exception {
+ ClientIntf client = node.getService(ClientIntf.class, "ClientWS");
+ assertNotNull(client);
+ client.callDOM();
+ }
+
+ @Test
+ @Ignore
+ public void testJSONSCA() throws Exception {
+ ClientIntf client = node.getService(ClientIntf.class, "ClientSCA");
+ assertNotNull(client);
+ client.callJSON();
+ }
+
+ @Test
+ @Ignore
+ public void testJSONWS() throws Exception {
+ ClientIntf client = node.getService(ClientIntf.class, "ClientWS");
+ assertNotNull(client);
+ client.callJSON();
+ }
+
+
+
+ @Test
+ public void testDOMIdentitySCA() throws Exception {
+ ClientIntf client = node.getService(ClientIntf.class, "ClientSCA");
+ assertNotNull(client);
+ client.testRoundTripDOMIdentity();
+ }
+
+ @Test
+ public void testDOMIdentityWS() throws Exception {
+ ClientIntf client = node.getService(ClientIntf.class, "ClientSCA");
+ assertNotNull(client);
+ client.testRoundTripDOMIdentity();
+ }
+
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/pom.xml
new file mode 100644
index 0000000000..7175bb8a1e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/pom.xml
@@ -0,0 +1,43 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <packaging>pom</packaging>
+ <artifactId>itest-data-copy</artifactId>
+ <name>Apache Tuscany SCA iTest Data-Copy</name>
+
+ <build>
+ <defaultGoal>install</defaultGoal>
+ </build>
+
+ <modules>
+ <module>common</module>
+ <module>client</module>
+ <module>service</module>
+ <module>driver</module>
+ </modules>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/service/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/service/pom.xml
new file mode 100644
index 0000000000..3fdd9a1c47
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/service/pom.xml
@@ -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. -->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-data-copy</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-data-copy-service</artifactId>
+ <name>Apache Tuscany SCA iTest Data-Copy Service</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-data-copy-common</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-databinding-json</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-databinding-sdo</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-databinding</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/service/src/main/java/itest/privatecopy/intf/ServiceIntf.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/service/src/main/java/itest/privatecopy/intf/ServiceIntf.java
new file mode 100644
index 0000000000..a708974bf4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/service/src/main/java/itest/privatecopy/intf/ServiceIntf.java
@@ -0,0 +1,51 @@
+/*
+ * 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 itest.privatecopy.intf;
+
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+import org.apache.tuscany.sca.databinding.annotation.DataBinding;
+import org.codehaus.jettison.json.JSONObject;
+import org.oasisopen.sca.annotation.Remotable;
+import org.w3c.dom.Node;
+
+import commonj.sdo.DataObject;
+
+import itest.privatecopy.types.Name;
+
+@Remotable
+public interface ServiceIntf {
+
+ boolean areNamesTheSameObjects(Name name1, Name name2);
+ Name greet(Name name);
+
+ @RequestWrapper(localName = "greetJSON", targetNamespace = "http://intf.privatecopy.itest/", className = "org.codehaus.jettison.json.JSONObject")
+ void greetJSON(JSONObject name);
+
+ @RequestWrapper(localName = "greetDOM", targetNamespace = "http://intf.privatecopy.itest/", className = "org.w3c.dom.Node")
+ // Won't work because of 2931 - lack of separation of req. vs. resp
+ //String greetDOM(Node name);
+ @ResponseWrapper(localName = "greetDOMResponse", targetNamespace = "http://intf.privatecopy.itest/", className = "org.w3c.dom.Node")
+ Node greetDOM(Node name);
+
+ Node returnDOM(Node name);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/service/src/main/java/itest/privatecopy/types/Name.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/service/src/main/java/itest/privatecopy/types/Name.java
new file mode 100644
index 0000000000..931a67cc59
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/service/src/main/java/itest/privatecopy/types/Name.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package itest.privatecopy.types;
+
+public class Name implements java.io.Serializable {
+
+ public Name() {
+ super();
+ }
+ private String firstName;
+ private String lastName;
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+ public String getLastName() {
+ return lastName;
+ }
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+ public String getFirstName() {
+ return firstName;
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/service/src/main/java/itest/service/impl/ServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/service/src/main/java/itest/service/impl/ServiceImpl.java
new file mode 100644
index 0000000000..933aadeaa3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/service/src/main/java/itest/service/impl/ServiceImpl.java
@@ -0,0 +1,101 @@
+/*
+ * 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 itest.service.impl;
+
+import java.io.StringReader;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.xml.sax.InputSource;
+
+
+import commonj.sdo.DataObject;
+
+import static org.junit.Assert.assertEquals;
+
+import itest.privatecopy.intf.ServiceIntf;
+import itest.privatecopy.types.Name;
+
+
+public class ServiceImpl implements ServiceIntf {
+
+ @Override
+ public Name greet(Name name) {
+ Name retVal = new Name();
+ retVal.setFirstName("Hi " + name.getFirstName());
+ retVal.setLastName("Ms. " + name.getLastName());
+ return retVal;
+ }
+
+ @Override
+ public boolean areNamesTheSameObjects(Name name1, Name name2) {
+ return name1 == name2;
+ }
+
+ @Override
+ public void greetJSON(JSONObject name) {
+ try {
+ String firstName = name.getString("firstName");
+ String lastName = name.getString("lastName");
+ assertEquals("Jason", firstName);
+ assertEquals("Nosaj", lastName);
+ } catch (JSONException exc) {
+ throw new RuntimeException(exc);
+ }
+ }
+
+
+ @Override
+ //public String greetDOM(Node name) {
+ public Node greetDOM(Node name) {
+ Node retVal = null;
+
+ try {
+ assertEquals("DOMMOD", name.getTextContent());
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ factory.setNamespaceAware(true);
+ DocumentBuilder builder = factory.newDocumentBuilder();
+
+ String retString = "<?xml version=\"1.0\" ?>" +
+ "<return>SUCCESS</return>";
+ InputSource is = new InputSource( new StringReader(retString) );
+ Document doc = builder.parse(is);
+ retVal = doc.getDocumentElement();
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ return retVal;
+ }
+
+ @Override
+ public Node returnDOM(Node name) {
+ return name;
+ }
+
+}
+
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/service/src/main/resources/helloworld-service.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/service/src/main/resources/helloworld-service.composite
new file mode 100644
index 0000000000..78b49eaa2c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/data-copy/service/src/main/resources/helloworld-service.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://itest"
+ name="ServiceComposite">
+
+ <component name="Service">
+ <implementation.java class="itest.service.impl.ServiceImpl"/>
+ <service name="ServiceIntf">
+ <binding.ws name="ws" uri="http://localhost:8085/Service/ServiceIntf"/>
+ <binding.sca name="sca"/>
+ <tuscany:binding.rmi name="rmi" uri="rmi://localhost:8099/Service"/>
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/pom.xml
new file mode 100644
index 0000000000..c0bb6713d2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/pom.xml
@@ -0,0 +1,113 @@
+<?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>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-databindings</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>itest-databindings-jaxb-bottom-up</artifactId>
+ <version>2.0.1</version>
+ <name>Apache Tuscany SCA iTest Databinding - JAXB Bottom Up</name>
+
+ <repositories>
+ <repository>
+ <id>java.net2</id>
+ <name>java.net Maven 2.x Repository</name>
+ <url>http://download.java.net/maven/2</url>
+ </repository>
+ </repositories>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.19</version>
+ </dependency>
+
+ <dependency>
+ <groupId>com.sun.xml.ws</groupId>
+ <artifactId>jaxws-rt</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <argLine>-Djava.endorsed.dirs=target/endorsed</argLine>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>javax.xml.ws</groupId>
+ <artifactId>jaxws-api</artifactId>
+ <version>2.1</version>
+ <type>jar</type>
+ </artifactItem>
+ <artifactItem>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <version>2.1</version>
+ <type>jar</type>
+ </artifactItem>
+ </artifactItems>
+ <outputDirectory>${project.build.directory}/endorsed</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AClientService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AClientService.java
new file mode 100644
index 0000000000..5d389643cc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AClientService.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.databindings.jaxb;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * The interface for AClientService.
+ */
+@Remotable
+public interface AClientService {
+ public String getGreetingsForward(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AService.java
new file mode 100644
index 0000000000..52f1c01fd8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AService.java
@@ -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.itest.databindings.jaxb;
+
+import javax.jws.soap.SOAPBinding;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * The interface for AService.
+ */
+@Remotable
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public interface AService {
+ public String getGreetings(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean1.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean1.java
new file mode 100644
index 0000000000..f1c948dc1c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean1.java
@@ -0,0 +1,66 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+import javax.xml.bind.annotation.XmlSeeAlso;
+
+/**
+ * @version $Rev$ $Date$
+ */
+@XmlSeeAlso({Bean10.class, Bean11.class, Bean10[].class, Bean11[].class})
+public class Bean1<T> {
+ private T item;
+
+ public Bean1() {
+ }
+
+ public Bean1(T item) {
+ this.item = item;
+ }
+
+ public void setItem(T item) {
+ this.item = item;
+ }
+
+ public T getItem() {
+ return item;
+ }
+
+ public boolean equals(Object that) {
+ if(that == null) {
+ return false;
+ }
+ if(that.getClass() != this.getClass()) {
+ return false;
+ }
+
+ Bean1<?> that1 = (Bean1<?>)that;
+ if(this == that1) {
+ return true;
+ } else if(this.item != null) {
+ return this.item.equals(that1.item);
+ } else {
+ return that1.item == null;
+ }
+ }
+
+ public String toString() {
+ return this.getClass().getSimpleName()+"[item = "+item+"]";
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean10.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean10.java
new file mode 100644
index 0000000000..4a4419a42b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean10.java
@@ -0,0 +1,25 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class Bean10 extends Bean1<String> {
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean11.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean11.java
new file mode 100644
index 0000000000..65f019ec48
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean11.java
@@ -0,0 +1,25 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class Bean11 extends Bean1<String> {
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean2.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean2.java
new file mode 100644
index 0000000000..45c01dc054
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean2.java
@@ -0,0 +1,59 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+import javax.xml.bind.annotation.XmlSeeAlso;
+
+/**
+ * @version $Rev$ $Date$
+ */
+@XmlSeeAlso({Bean3.class, Bean3[].class, Bean31.class, Bean31[].class})
+public class Bean2 {
+ private String name;
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public boolean equals(Object that) {
+ if(that == null) {
+ return false;
+ }
+
+ if(this.getClass() != that.getClass()) {
+ return false;
+ }
+
+ if(this == that) {
+ return true;
+ } else if(this.name != null) {
+ return this.name.equals(((Bean2)that).name);
+ } else {
+ return ((Bean2)that).name == null;
+ }
+ }
+
+ public String toString() {
+ return this.getClass().getSimpleName()+"[name = "+name+"]";
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean3.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean3.java
new file mode 100644
index 0000000000..4e0bd38b2b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean3.java
@@ -0,0 +1,56 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class Bean3 extends Bean2 {
+ private String address;
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+ public String getAddress() {
+ return address;
+ }
+
+ public boolean equals(Object that) {
+ if(that == null) {
+ return false;
+ }
+
+ if(this.getClass() != that.getClass()) {
+ return false;
+ }
+
+ if(this == that) {
+ return true;
+ } else if(this.address != null) {
+ return this.address.equals(((Bean3)that).address) && super.equals(that);
+ } else {
+ return ((Bean3)that).address == null && super.equals(that);
+ }
+ }
+
+ public String toString() {
+ return this.getClass().getSimpleName()+"[name = "+super.getName()+", address = "+address+"]";
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean31.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean31.java
new file mode 100644
index 0000000000..40aff31297
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean31.java
@@ -0,0 +1,56 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class Bean31 extends Bean2 {
+ private String address;
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+ public String getAddress() {
+ return address;
+ }
+
+ public boolean equals(Object that) {
+ if(that == null) {
+ return false;
+ }
+
+ if(this.getClass() != that.getClass()) {
+ return false;
+ }
+
+ if(this == that) {
+ return true;
+ } else if(this.address != null) {
+ return this.address.equals(((Bean31)that).address) && super.equals(that);
+ } else {
+ return ((Bean31)that).address == null && super.equals(that);
+ }
+ }
+
+ public String toString() {
+ return this.getClass().getSimpleName()+"[name = "+super.getName()+", address = "+address+"]";
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsLocalService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsLocalService.java
new file mode 100644
index 0000000000..ca012b967d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsLocalService.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.databindings.jaxb;
+
+/**
+ * The interface for GenericsLocalService.
+ *
+ * @version $Rev$ $Date$
+ */
+public interface GenericsLocalService {
+ Bean1<String> getTypeExplicit(Bean1<String> arg);
+
+ <T> Bean1<T> getTypeUnbound(T[] anArray);
+
+ <T extends Bean2> Bean1<T> getTypeExtends(T[] anArray);
+
+ <T extends Bean1<String>> Bean1<T> getRecursiveTypeBound(T[] anArray);
+
+ Bean1<?> getWildcardUnbound(Bean1<?> arg);
+
+ Bean1<? super Bean3> getWildcardSuper(Bean1<? super Bean3> arg);
+
+ Bean1<? extends Bean2> getWildcardExtends(Bean1<? extends Bean2> arg);
+
+ Bean2 getPolymorphic(Bean2 arg);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsService.java
new file mode 100644
index 0000000000..be446c9759
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsService.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.databindings.jaxb;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * The interface for GenericsService.
+ *
+ * @version $Rev$ $Date$
+ */
+@Remotable
+public interface GenericsService extends GenericsLocalService{
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsServiceClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsServiceClient.java
new file mode 100644
index 0000000000..3bae554dc7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsServiceClient.java
@@ -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.itest.databindings.jaxb;
+
+/**
+ * The interface for GenericsServiceClient.
+ *
+ * @version $Rev$ $Date$
+ */
+public interface GenericsServiceClient {
+ Bean1<String> getTypeExplicitForward(Bean1<String> arg);
+
+ <T> Bean1<T> getTypeUnboundForward(T[] anArray);
+
+ <T extends Bean2> Bean1<T> getTypeExtendsForward(T[] anArray);
+
+ <T extends Bean1<String>> Bean1<T> getRecursiveTypeBoundForward(T[] anArray);
+
+ Bean1<?> getWildcardUnboundForward(Bean1<?> arg);
+
+ Bean1<? super Bean3> getWildcardSuperForward(Bean1<? super Bean3> arg);
+
+ Bean1<? extends Bean2> getWildcardExtendsForward(Bean1<? extends Bean2> arg);
+
+ Bean2 getPolymorphicForward(Bean2 arg);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloLocalServiceSimple.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloLocalServiceSimple.java
new file mode 100644
index 0000000000..a31cc3d45a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloLocalServiceSimple.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.databindings.jaxb;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * The interface for HelloLocalServiceSimple.
+ */
+public interface HelloLocalServiceSimple {
+ String getGreetings(String name);
+ String[] getGreetingsArray(String[] names);
+ List<String> getGreetingsList(List<String> names);
+ ArrayList<String> getGreetingsArrayList(ArrayList<String> names);
+ Map<String, String> getGreetingsMap(Map<String, String> namesMap);
+ HashMap<String, String> getGreetingsHashMap(HashMap<String, String> namesMap);
+ String getGreetingsVarArgs(String... names);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimple.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimple.java
new file mode 100644
index 0000000000..df9e6e53ec
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimple.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.databindings.jaxb;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * The interface for HelloServiceSimple.
+ */
+@Remotable
+public interface HelloServiceSimple extends HelloLocalServiceSimple {
+ // Add any methods to the local interface.
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimpleClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimpleClient.java
new file mode 100644
index 0000000000..779943739e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimpleClient.java
@@ -0,0 +1,38 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * The interface for HelloServiceSimpleClient.
+ */
+public interface HelloServiceSimpleClient {
+ String getGreetingsForward(String name);
+ String[] getGreetingsArrayForward(String[] names);
+ List<String> getGreetingsListForward(List<String> names);
+ ArrayList<String> getGreetingsArrayListForward(ArrayList<String> names);
+ Map<String, String> getGreetingsMapForward(Map<String, String> namesMap);
+ HashMap<String, String> getGreetingsHashMapForward(HashMap<String, String> namesMap);
+ String getGreetingsVarArgsForward(String... names);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesLocalService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesLocalService.java
new file mode 100644
index 0000000000..6239c0f5f1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesLocalService.java
@@ -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.itest.databindings.jaxb;
+
+
+/**
+ * The interface for PrimitivesLocalService.
+ */
+public interface PrimitivesLocalService {
+ boolean negateBoolean(boolean flag);
+ boolean[] negateBooleanArray(boolean[] flags);
+ boolean[] identityBooleanArray(boolean[] flags);
+ byte negateByte(byte b);
+ byte[] negateByteArray(byte[] ba);
+ byte[] identityByteArray(byte[] ba);
+ short negateShort(short s);
+ short[] negateShortArray(short[] s);
+ short[] identityShortArray(short[] sa);
+ int negateInt(int s);
+ int[] negateIntArray(int[] s);
+ int[] identityIntArray(int[] ia);
+ long negateLong(long l);
+ long[] negateLongArray(long[] la);
+ long[] identityLongArray(long[] la);
+ float negateFloat(float f);
+ float[] negateFloatArray(float[] fa);
+ float[] identityFloatArray(float[] fa);
+ double negateDouble(double d);
+ double[] negateDoubleArray(double[] da);
+ double[] identityDoubleArray(double[] da);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesService.java
new file mode 100644
index 0000000000..690a2adb3d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesService.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.databindings.jaxb;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * The interface for PrimitivesService.
+ */
+@Remotable
+public interface PrimitivesService extends PrimitivesLocalService {
+ // Add any methods to the local interface.
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesServiceClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesServiceClient.java
new file mode 100644
index 0000000000..3bdf886dfa
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesServiceClient.java
@@ -0,0 +1,48 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+
+/**
+ * The interface for PrimitivesServiceClient.
+ */
+public interface PrimitivesServiceClient {
+ boolean negateBooleanForward(boolean flag);
+ boolean[] negateBooleanArrayForward(boolean[] flags);
+ boolean passByValueBooleanArray();
+ byte negateByteForward(byte b);
+ byte[] negateByteArrayForward(byte[] ba);
+ boolean passByValueByteArray();
+ short negateShortForward(short s);
+ short[] negateShortArrayForward(short[] sa);
+ boolean passByValueShortArray();
+ int negateIntForward(int i);
+ int[] negateIntArrayForward(int[] ia);
+ boolean passByValueIntArray();
+ long negateLongForward(long l);
+ long[] negateLongArrayForward(long[] la);
+ boolean passByValueLongArray();
+ float negateFloatForward(float f);
+ float[] negateFloatArrayForward(float[] fa);
+ boolean passByValueFloatArray();
+ double negateDoubleForward(double d);
+ double[] negateDoubleArrayForward(double[] da);
+ boolean passByValueDoubleArray();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesLocalService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesLocalService.java
new file mode 100644
index 0000000000..0fdf69459f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesLocalService.java
@@ -0,0 +1,78 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+import java.awt.Image;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.URI;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.UUID;
+
+import javax.activation.DataHandler;
+import javax.xml.datatype.Duration;
+import javax.xml.datatype.XMLGregorianCalendar;
+import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+
+
+/**
+ * The interface for StandardTypesLocalService.
+ */
+public interface StandardTypesLocalService {
+ BigInteger getNewBigInteger(BigInteger bi);
+ BigInteger[] getNewBigIntegerArray(BigInteger[] bia);
+
+ BigDecimal getNewBigDecimal(BigDecimal bd);
+ BigDecimal[] getNewBigDecimalArray(BigDecimal[] bda);
+
+ Calendar getNewCalendar(Calendar c);
+ Calendar[] getNewCalendarArray(Calendar[] ca);
+
+ Date getNewDate(Date d);
+ Date[] getNewDateArray(Date[] da);
+
+ QName getNewQName(QName qname);
+ QName[] getNewQNameArray(QName[] qnames);
+
+ URI getNewURI(URI uri);
+ URI[] getNewURIArray(URI[] uris);
+
+ XMLGregorianCalendar getNewXMLGregorianCalendar(XMLGregorianCalendar xgcal);
+ XMLGregorianCalendar[] getNewXMLGregorianCalendarArray(XMLGregorianCalendar[] xgcal);
+
+ Duration getNewDuration(Duration d);
+ Duration[] getNewDurationArray(Duration[] da);
+
+ Object getNewObject(Object obj);
+ Object[] getNewObjectArray(Object[] objs);
+
+ Image getNewImage(Image img);
+ Image[] getNewImageArray(Image[] imgs);
+
+ DataHandler getNewDataHandler(DataHandler dh);
+ DataHandler[] getNewDataHandlerArray(DataHandler[] dha);
+
+ Source getNewSource(Source src);
+ Source[] getNewSourceArray(Source[] srcs);
+
+ UUID getNewUUID(UUID uuid);
+ UUID[] getNewUUIDArray(UUID[] uuids);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesService.java
new file mode 100644
index 0000000000..3b9690b7d2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesService.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.databindings.jaxb;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+
+
+/**
+ * The interface for StandardTypesService.
+ */
+@Remotable
+public interface StandardTypesService extends StandardTypesLocalService{
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesServiceClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesServiceClient.java
new file mode 100644
index 0000000000..351d9df0cb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesServiceClient.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.databindings.jaxb;
+
+import java.awt.Image;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.URI;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.UUID;
+
+import javax.activation.DataHandler;
+import javax.xml.datatype.Duration;
+import javax.xml.datatype.XMLGregorianCalendar;
+import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+
+
+/**
+ * The interface for StandardTypesServiceClient.
+ */
+public interface StandardTypesServiceClient {
+ BigInteger getNewBigIntegerForward(BigInteger bi);
+ BigInteger[] getNewBigIntegerArrayForward(BigInteger[] bia);
+
+ BigDecimal getNewBigDecimalForward(BigDecimal bd);
+ BigDecimal[] getNewBigDecimalArrayForward(BigDecimal[] bda);
+
+ Calendar getNewCalendarForward(Calendar c);
+ Calendar[] getNewCalendarArrayForward(Calendar[] ca);
+
+ Date getNewDateForward(Date d);
+ Date[] getNewDateArrayForward(Date[] da);
+
+ QName getNewQNameForward(QName qname);
+ QName[] getNewQNameArrayForward(QName[] qnames);
+
+ URI getNewURIForward(URI uri);
+ URI[] getNewURIArrayForward(URI[] uris);
+
+ XMLGregorianCalendar getNewXMLGregorianCalendarForward(XMLGregorianCalendar xgcal);
+ XMLGregorianCalendar[] getNewXMLGregorianCalendarArrayForward(XMLGregorianCalendar[] xgcals);
+
+ Duration getNewDurationForward(Duration d);
+ Duration[] getNewDurationArrayForward(Duration[] da);
+
+ Object getNewObjectForward(Object obj);
+ Object[] getNewObjectArrayForward(Object[] objs);
+
+ Image getNewImageForward(Image img);
+ Image[] getNewImageArrayForward(Image[] imgs);
+
+ DataHandler getNewDataHandlerForward(DataHandler dh);
+ DataHandler[] getNewDataHandlerArrayForward(DataHandler[] dha);
+
+ Source getNewSourceForward(Source src);
+ Source[] getNewSourceArrayForward(Source[] srcs);
+
+ UUID getNewUUIDForward(UUID uuid);
+ UUID[] getNewUUIDArrayForward(UUID[] uuids);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AClientServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AClientServiceImpl.java
new file mode 100644
index 0000000000..2f3bd3f2cb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AClientServiceImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.AClientService;
+import org.apache.tuscany.sca.itest.databindings.jaxb.AService;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements AService.
+ */
+@Service(AClientService.class)
+public class AClientServiceImpl implements AClientService {
+
+ @Reference
+ protected AService aService;
+
+ public String getGreetingsForward(String name) {
+ return aService.getGreetings(name);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AServiceImpl.java
new file mode 100644
index 0000000000..078be8896e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AServiceImpl.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.databindings.jaxb.impl;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.AService;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements AService.
+ */
+@Service(AService.class)
+public class AServiceImpl implements AService {
+
+ public String getGreetings(String name) {
+ return "Hello " + name;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsLocalServiceClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsLocalServiceClientImpl.java
new file mode 100644
index 0000000000..4d451e6d32
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsLocalServiceClientImpl.java
@@ -0,0 +1,77 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.Bean1;
+import org.apache.tuscany.sca.itest.databindings.jaxb.Bean2;
+import org.apache.tuscany.sca.itest.databindings.jaxb.Bean3;
+import org.apache.tuscany.sca.itest.databindings.jaxb.GenericsLocalService;
+import org.apache.tuscany.sca.itest.databindings.jaxb.GenericsServiceClient;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of GenericsLocalServiceClient.
+ * The client forwards the request to the service component and returns the response from the service component.
+ *
+ * @version $Rev$ $Date$
+ */
+@Service(GenericsServiceClient.class)
+public class GenericsLocalServiceClientImpl implements GenericsServiceClient {
+
+ private GenericsLocalService service;
+
+ @Reference(required=false)
+ protected void setGenericsLocalService(GenericsLocalService service) {
+ this.service = service;
+ }
+
+ public Bean1<String> getTypeExplicitForward(Bean1<String> arg) {
+ return service.getTypeExplicit(arg);
+ }
+
+ public <T> Bean1<T> getTypeUnboundForward(T[] anArray) {
+ return service.getTypeUnbound(anArray);
+ }
+
+ public <T extends Bean2> Bean1<T> getTypeExtendsForward(T[] anArray) {
+ return service.getTypeExtends(anArray);
+ }
+
+ public <T extends Bean1<String>> Bean1<T> getRecursiveTypeBoundForward(T[] anArray) {
+ return service.getRecursiveTypeBound(anArray);
+ }
+
+ public Bean1<?> getWildcardUnboundForward(Bean1<?> arg) {
+ return service.getWildcardUnbound(arg);
+ }
+
+ public Bean1<? super Bean3> getWildcardSuperForward(Bean1<? super Bean3> arg) {
+ return service.getWildcardSuper(arg);
+ }
+
+ public Bean1<? extends Bean2> getWildcardExtendsForward(Bean1<? extends Bean2> arg) {
+ return service.getWildcardExtends(arg);
+ }
+
+ public Bean2 getPolymorphicForward(Bean2 arg) {
+ return service.getPolymorphic(arg);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsServiceClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsServiceClientImpl.java
new file mode 100644
index 0000000000..d520e64881
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsServiceClientImpl.java
@@ -0,0 +1,40 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.GenericsService;
+import org.apache.tuscany.sca.itest.databindings.jaxb.GenericsServiceClient;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of GenericsServiceClient.
+ * The client forwards the request to the service component and returns the response from the service component.
+ *
+ * @version $Rev$ $Date$
+ */
+@Service(GenericsServiceClient.class)
+public class GenericsServiceClientImpl extends GenericsLocalServiceClientImpl {
+
+ @Reference
+ public void setGenericsService(GenericsService service) {
+ super.setGenericsLocalService(service);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsServiceImpl.java
new file mode 100644
index 0000000000..460f6dd1a4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsServiceImpl.java
@@ -0,0 +1,69 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.Bean1;
+import org.apache.tuscany.sca.itest.databindings.jaxb.Bean2;
+import org.apache.tuscany.sca.itest.databindings.jaxb.Bean3;
+import org.apache.tuscany.sca.itest.databindings.jaxb.GenericsLocalService;
+import org.apache.tuscany.sca.itest.databindings.jaxb.GenericsService;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of GenericsService.
+ * This implementation provides both a local and a remotable service.
+ *
+ * @version $Rev$ $Date$
+ */
+@Service(value={GenericsService.class, GenericsLocalService.class})
+public class GenericsServiceImpl implements GenericsService, GenericsLocalService {
+
+ public Bean1<String> getTypeExplicit(Bean1<String> arg) {
+ return GenericsTransformer.getTypeExplicit(arg);
+ }
+
+ public <T> Bean1<T> getTypeUnbound(T[] anArray) {
+ return GenericsTransformer.getTypeUnbound(anArray);
+ }
+
+ public <T extends Bean2> Bean1<T> getTypeExtends(T[] anArray) {
+ return GenericsTransformer.getTypeExtends(anArray);
+ }
+
+ public <T extends Bean1<String>> Bean1<T> getRecursiveTypeBound(T[] anArray) {
+ return GenericsTransformer.getRecursiveTypeBound(anArray);
+ }
+
+ public Bean1<?> getWildcardUnbound(Bean1<?> arg) {
+ return GenericsTransformer.getWildcardUnbound(arg);
+ }
+
+ public Bean1<? super Bean3> getWildcardSuper(Bean1<? super Bean3> arg) {
+ return GenericsTransformer.getWildcardSuper(arg);
+ }
+
+ public Bean1<? extends Bean2> getWildcardExtends(Bean1<? extends Bean2> arg) {
+ return GenericsTransformer.getWildcardExtends(arg);
+ }
+
+ public Bean2 getPolymorphic(Bean2 arg) {
+ return GenericsTransformer.getPolymorphic(arg);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsTransformer.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsTransformer.java
new file mode 100644
index 0000000000..858b8da59a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsTransformer.java
@@ -0,0 +1,125 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.Bean1;
+import org.apache.tuscany.sca.itest.databindings.jaxb.Bean10;
+import org.apache.tuscany.sca.itest.databindings.jaxb.Bean11;
+import org.apache.tuscany.sca.itest.databindings.jaxb.Bean2;
+import org.apache.tuscany.sca.itest.databindings.jaxb.Bean3;
+import org.apache.tuscany.sca.itest.databindings.jaxb.Bean31;
+
+
+/**
+ * GenericsTransformer class that provide for transforming input provided to GenericsService methods.
+ *
+ * @version $Rev$ $Date$
+ */
+public class GenericsTransformer {
+
+ public static Bean1<String> getTypeExplicit(Bean1<String> arg) {
+ return new Bean1<String>(arg.getItem() == null ? null : arg.getItem()+" AA");
+ }
+
+ public static <T> Bean1<T> getTypeUnbound(T[] arg) {
+ if(arg instanceof String[]) {
+ return new Bean1<T>(arg[0]);
+ } else if(arg instanceof Integer[]){
+ return new Bean1<T>(arg[1]);
+ } else {
+ return new Bean1<T>(arg[2]);
+ }
+ }
+
+ public static <T extends Bean2> Bean1<T> getTypeExtends(T[] arg) {
+ if(arg instanceof Bean3[]) {
+ return new Bean1<T>(arg[0]);
+ } else if(arg instanceof Bean31[]) {
+ return new Bean1<T>(arg[1]);
+ } else {
+ return new Bean1<T>(arg[2]);
+ }
+ }
+
+ public static <T extends Bean1<String>> Bean1<T> getRecursiveTypeBound(T[] arg) {
+ if(arg instanceof Bean10[]) {
+ return new Bean1<T>(arg[0]);
+ } else if(arg instanceof Bean11[]) {
+ return new Bean1<T>(arg[1]);
+ } else {
+ return new Bean1<T>(arg[2]);
+ }
+ }
+
+ public static Bean1<?> getWildcardUnbound(Bean1<?> arg) {
+ if(arg.getItem() instanceof String) {
+ Bean1<String> temp = new Bean1<String>();
+ temp.setItem("Hello "+arg.getItem());
+ return temp;
+ } else if(arg.getItem() instanceof Integer) {
+ Bean1<Integer> temp = new Bean1<Integer>();
+ temp.setItem(10+(Integer)arg.getItem());
+ return temp;
+ } else {
+ return new Bean1<String>(arg.toString());
+ }
+ }
+
+ public static Bean1<? super Bean3> getWildcardSuper(Bean1<? super Bean3> arg) {
+ Object item = arg.getItem();
+ if(item instanceof Bean3) {
+ Bean3 temp = new Bean3();
+ temp.setName("Hello " + ((Bean3)item).getName());
+ temp.setAddress("New "+((Bean3)item).getAddress());
+ return new Bean1<Bean3>(temp);
+ } else if(item instanceof Bean2) {
+ Bean2 temp = new Bean2();
+ temp.setName("Hello " + ((Bean3)item).getName());
+ return new Bean1<Bean2>(temp);
+ } else {
+ Bean2 temp = new Bean2();
+ temp.setName(item.toString());
+ return new Bean1<Bean2>(temp);
+ }
+ }
+
+ public static Bean1<? extends Bean2> getWildcardExtends(Bean1<? extends Bean2> arg) {
+ Bean2 item = arg.getItem();
+ if(item instanceof Bean3) {
+ Bean3 temp = new Bean3();
+ temp.setName("Hello "+item.getName());
+ temp.setAddress("New "+((Bean3)item).getAddress());
+ return new Bean1<Bean3>(temp);
+ } else if(item instanceof Bean31) {
+ Bean31 temp = new Bean31();
+ temp.setName("Hello "+item.getName());
+ temp.setAddress("New "+((Bean31)item).getAddress());
+ return new Bean1<Bean31>(temp);
+ } else {
+ Bean2 temp = new Bean2();
+ temp.setName("Hello "+item.getName());
+ return new Bean1<Bean2>(temp);
+ }
+ }
+
+ public static Bean2 getPolymorphic(Bean2 arg) {
+ return arg;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloLocalServiceSimpleClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloLocalServiceSimpleClientImpl.java
new file mode 100644
index 0000000000..6c7c82a4ba
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloLocalServiceSimpleClientImpl.java
@@ -0,0 +1,73 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.HelloLocalServiceSimple;
+import org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceSimpleClient;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of HelloServiceSimpleClient.
+ * The client forwards the request to the service component and returns the response from the service component.
+ */
+@Service(HelloServiceSimpleClient.class)
+public class HelloLocalServiceSimpleClientImpl implements HelloServiceSimpleClient {
+
+ private HelloLocalServiceSimple service;
+
+ @Reference(required=false)
+ protected void setHelloLocalServiceSimple(HelloLocalServiceSimple service) {
+ this.service = service;
+ }
+
+ public String getGreetingsForward(String name) {
+ return service.getGreetings(name);
+ }
+
+ public String[] getGreetingsArrayForward(String[] names) {
+ return service.getGreetingsArray(names);
+ }
+
+ public List<String> getGreetingsListForward(List<String> names) {
+ return service.getGreetingsList(names);
+ }
+
+ public Map<String, String> getGreetingsMapForward(Map<String, String> namesMap) {
+ return service.getGreetingsMap(namesMap);
+ }
+
+ public ArrayList<String> getGreetingsArrayListForward(ArrayList<String> names) {
+ return service.getGreetingsArrayList(names);
+ }
+
+ public HashMap<String, String> getGreetingsHashMapForward(HashMap<String, String> namesMap) {
+ return service.getGreetingsHashMap(namesMap);
+ }
+
+ public String getGreetingsVarArgsForward(String... names) {
+ return service.getGreetingsVarArgs(names[0], names[1], names[2]);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleClientImpl.java
new file mode 100644
index 0000000000..44b6e9d906
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleClientImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceSimple;
+import org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceSimpleClient;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of HelloServiceSimpleClient.
+ * The client forwards the request to the service component and returns the response from the service component.
+ */
+@Service(HelloServiceSimpleClient.class)
+public class HelloServiceSimpleClientImpl extends HelloLocalServiceSimpleClientImpl {
+
+ @Reference
+ public void setHelloServiceSimple(HelloServiceSimple service) {
+ super.setHelloLocalServiceSimple(service);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleImpl.java
new file mode 100644
index 0000000000..e0b81152ad
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleImpl.java
@@ -0,0 +1,86 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.HelloLocalServiceSimple;
+import org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceSimple;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of HelloServiceSimple.
+ * The implementation provides both a local and a remotable service.
+ */
+@Service(value={HelloServiceSimple.class, HelloLocalServiceSimple.class})
+public class HelloServiceSimpleImpl implements HelloServiceSimple {
+ public String getGreetings(String name) {
+ return "Hello " + name;
+ }
+
+ public String[] getGreetingsArray(String[] names) {
+ String[] resps = new String[names.length];
+ for (int i = 0; i < names.length; ++i) {
+ resps[i] = "Hello " + names[i];
+ }
+ return resps;
+ }
+
+ public List<String> getGreetingsList(List<String> names) {
+ List<String> resps = new ArrayList<String>();
+ for (int i = 0; i < names.size(); ++i) {
+ resps.add("Hello " + names.get(i));
+ }
+ return resps;
+ }
+
+ public ArrayList<String> getGreetingsArrayList(ArrayList<String> names) {
+ ArrayList<String> resps = new ArrayList<String>();
+ for (int i = 0; i < names.size(); ++i) {
+ resps.add("Hello " + names.get(i));
+ }
+ return resps;
+ }
+
+ public Map<String, String> getGreetingsMap(Map<String, String> namesMap) {
+ for (Map.Entry<String, String> entry : namesMap.entrySet()) {
+ entry.setValue("Hello " + entry.getKey());
+ }
+ return namesMap;
+ }
+
+ public HashMap<String, String> getGreetingsHashMap(HashMap<String, String> namesMap) {
+ for (Map.Entry<String, String> entry : namesMap.entrySet()) {
+ entry.setValue("Hello " + entry.getKey());
+ }
+ return namesMap;
+ }
+
+ public String getGreetingsVarArgs(String... names) {
+ String resp = "Hello";
+ for(int i = 0; i < names.length; ++i) {
+ resp += (" "+names[i]);
+ }
+ return resp;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesLocalServiceClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesLocalServiceClientImpl.java
new file mode 100644
index 0000000000..eea19521c4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesLocalServiceClientImpl.java
@@ -0,0 +1,138 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesLocalService;
+import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesServiceClient;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of PrimitivesLocalServiceClient.
+ * The client forwards the request to the service component and returns the response from the service component.
+ */
+@Service(PrimitivesServiceClient.class)
+public class PrimitivesLocalServiceClientImpl implements PrimitivesServiceClient {
+
+ private PrimitivesLocalService service;
+
+ @Reference(required=false)
+ protected void setPrimitivesLocalService(PrimitivesLocalService service) {
+ this.service = service;
+ }
+
+ public boolean negateBooleanForward(boolean flag) {
+ return service.negateBoolean(flag);
+ }
+
+ public boolean[] negateBooleanArrayForward(boolean[] flags) {
+ return service.negateBooleanArray(flags);
+ }
+
+ public boolean passByValueBooleanArray() {
+ boolean[] req = new boolean[2];
+ boolean[] resp = service.identityBooleanArray(req);
+ return req != resp;
+ }
+
+ public byte negateByteForward(byte b) {
+ return service.negateByte(b);
+ }
+
+ public byte[] negateByteArrayForward(byte[] ba) {
+ return service.negateByteArray(ba);
+ }
+
+ public boolean passByValueByteArray() {
+ byte[] req = new byte[2];
+ byte[] resp = service.identityByteArray(req);
+ return req != resp;
+ }
+
+ public short negateShortForward(short s) {
+ return service.negateShort(s);
+ }
+
+ public short[] negateShortArrayForward(short[] s) {
+ return service.negateShortArray(s);
+ }
+
+ public boolean passByValueShortArray() {
+ short[] req = new short[2];
+ short[] resp = service.identityShortArray(req);
+ return req != resp;
+ }
+
+ public int negateIntForward(int i) {
+ return service.negateInt(i);
+ }
+
+ public int[] negateIntArrayForward(int[] ia) {
+ return service.negateIntArray(ia);
+ }
+
+ public boolean passByValueIntArray() {
+ int[] req = new int[2];
+ int[] resp = service.identityIntArray(req);
+ return req != resp;
+ }
+
+ public long negateLongForward(long l) {
+ return service.negateLong(l);
+ }
+
+ public long[] negateLongArrayForward(long[] la) {
+ return service.negateLongArray(la);
+ }
+
+ public boolean passByValueLongArray() {
+ long[] req = new long[2];
+ long[] resp = service.identityLongArray(req);
+ return req != resp;
+ }
+
+ public float negateFloatForward(float f) {
+ return service.negateFloat(f);
+ }
+
+ public float[] negateFloatArrayForward(float[] fa) {
+ return service.negateFloatArray(fa);
+ }
+
+ public boolean passByValueFloatArray() {
+ float[] req = new float[2];
+ float[] resp = service.identityFloatArray(req);
+ return req != resp;
+ }
+
+ public double negateDoubleForward(double d) {
+ return service.negateDouble(d);
+ }
+
+ public double[] negateDoubleArrayForward(double[] da) {
+ return service.negateDoubleArray(da);
+ }
+
+ public boolean passByValueDoubleArray() {
+ double[] req = new double[2];
+ double[] resp = service.identityDoubleArray(req);
+ return req != resp;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceClientImpl.java
new file mode 100644
index 0000000000..263d1212ca
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceClientImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesService;
+import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesServiceClient;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of PrimitivesServiceClient.
+ * The client forwards the request to the service component and returns the response from the service component.
+ */
+@Service(PrimitivesServiceClient.class)
+public class PrimitivesServiceClientImpl extends PrimitivesLocalServiceClientImpl {
+
+ @Reference
+ public void setPrimitivesService(PrimitivesService service) {
+ super.setPrimitivesLocalService(service);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceImpl.java
new file mode 100644
index 0000000000..182ccf0f83
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceImpl.java
@@ -0,0 +1,151 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesLocalService;
+import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesService;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of PrimitivesService.
+ * This implementation provides both a local and a remotable service.
+ */
+@Service(value={PrimitivesService.class, PrimitivesLocalService.class})
+public class PrimitivesServiceImpl implements PrimitivesService, PrimitivesLocalService {
+
+ public boolean negateBoolean(boolean flag) {
+ return !flag;
+ }
+
+ public boolean[] negateBooleanArray(boolean[] flags) {
+ boolean[] resp = new boolean[flags.length];
+
+ for(int i = 0; i < flags.length; ++i) {
+ resp[i] = !flags[i];
+ }
+ return resp;
+ }
+
+ public boolean[] identityBooleanArray(boolean[] flags) {
+ return flags;
+ }
+
+ public byte negateByte(byte b) {
+ return (byte)-b;
+ }
+
+ public byte[] negateByteArray(byte[] ba) {
+ byte[] resp = new byte[ba.length];
+
+ for(int i = 0; i < ba.length; ++i) {
+ resp[i] = (byte)-ba[i];
+ }
+ return resp;
+ }
+
+ public byte[] identityByteArray(byte[] ba) {
+ return ba;
+ }
+
+ public short negateShort(short s) {
+ return (short)-s;
+ }
+
+ public short[] negateShortArray(short[] s) {
+ short[] resp = new short[s.length];
+
+ for(int i = 0; i < s.length; ++i) {
+ resp[i] = (short)-s[i];
+ }
+ return resp;
+ }
+
+ public short[] identityShortArray(short[] sa) {
+ return sa;
+ }
+
+ public int negateInt(int i) {
+ return -i;
+ }
+
+ public int[] negateIntArray(int[] ia) {
+ int[] resp = new int[ia.length];
+
+ for(int i = 0; i < ia.length; ++i) {
+ resp[i] = -ia[i];
+ }
+ return resp;
+ }
+
+ public int[] identityIntArray(int[] ia) {
+ return ia;
+ }
+
+ public long negateLong(long l) {
+ return -l;
+ }
+
+ public long[] negateLongArray(long[] la) {
+ long[] resp = new long[la.length];
+
+ for(int i = 0; i < la.length; ++i) {
+ resp[i] = -la[i];
+ }
+ return resp;
+ }
+
+ public long[] identityLongArray(long[] la) {
+ return la;
+ }
+
+ public float negateFloat(float f) {
+ return -f;
+ }
+
+ public float[] negateFloatArray(float[] fa) {
+ float[] resp = new float[fa.length];
+
+ for(int i = 0; i < fa.length; ++i) {
+ resp[i] = -fa[i];
+ }
+ return resp;
+ }
+
+ public float[] identityFloatArray(float[] fa) {
+ return fa;
+ }
+
+ public double negateDouble(double d) {
+ return -d;
+ }
+
+ public double[] negateDoubleArray(double[] da) {
+ double[] resp = new double[da.length];
+
+ for(int i = 0; i < da.length; ++i) {
+ resp[i] = -da[i];
+ }
+ return resp;
+ }
+
+ public double[] identityDoubleArray(double[] da) {
+ return da;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesLocalServiceClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesLocalServiceClientImpl.java
new file mode 100644
index 0000000000..3ceee3c4b1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesLocalServiceClientImpl.java
@@ -0,0 +1,157 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.databindings.jaxb.impl;
+
+import java.awt.Image;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.URI;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.UUID;
+
+import javax.activation.DataHandler;
+import javax.xml.datatype.Duration;
+import javax.xml.datatype.XMLGregorianCalendar;
+import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesLocalService;
+import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesServiceClient;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of StandardTypesLocalServiceClient.
+ * The client forwards the request to the service component and returns the response from the service component.
+ */
+@Service(StandardTypesServiceClient.class)
+public class StandardTypesLocalServiceClientImpl implements StandardTypesServiceClient {
+
+ private StandardTypesLocalService service;
+
+ @Reference(required=false)
+ protected void setStandardTypesLocalService(StandardTypesLocalService service) {
+ this.service = service;
+ }
+
+ public BigInteger getNewBigIntegerForward(BigInteger bi) {
+ return service.getNewBigInteger(bi);
+ }
+
+ public BigInteger[] getNewBigIntegerArrayForward(BigInteger[] bia) {
+ return service.getNewBigIntegerArray(bia);
+ }
+
+ public BigDecimal getNewBigDecimalForward(BigDecimal bd) {
+ return service.getNewBigDecimal(bd);
+ }
+
+ public BigDecimal[] getNewBigDecimalArrayForward(BigDecimal[] bda) {
+ return service.getNewBigDecimalArray(bda);
+ }
+ public Calendar getNewCalendarForward(Calendar c) {
+ return service.getNewCalendar(c);
+ }
+ public Calendar[] getNewCalendarArrayForward(Calendar[] ca) {
+ return service.getNewCalendarArray(ca);
+ }
+
+ public Date getNewDateForward(Date d) {
+ return service.getNewDate(d);
+ }
+
+ public Date[] getNewDateArrayForward(Date[] da) {
+ return service.getNewDateArray(da);
+ }
+
+ public QName getNewQNameForward(QName qname) {
+ return service.getNewQName(qname);
+ }
+
+ public QName[] getNewQNameArrayForward(QName[] qnames) {
+ return service.getNewQNameArray(qnames);
+ }
+
+ public URI getNewURIForward(URI uri) {
+ return service.getNewURI(uri);
+ }
+
+ public URI[] getNewURIArrayForward(URI[] uris) {
+ return service.getNewURIArray(uris);
+ }
+
+ public XMLGregorianCalendar getNewXMLGregorianCalendarForward(XMLGregorianCalendar xgcal) {
+ return service.getNewXMLGregorianCalendar(xgcal);
+ }
+
+ public XMLGregorianCalendar[] getNewXMLGregorianCalendarArrayForward(XMLGregorianCalendar[] xgcals) {
+ return service.getNewXMLGregorianCalendarArray(xgcals);
+ }
+
+ public Duration getNewDurationForward(Duration d) {
+ return service.getNewDuration(d);
+ }
+
+ public Duration[] getNewDurationArrayForward(Duration[] da) {
+ return service.getNewDurationArray(da);
+ }
+
+ public Object getNewObjectForward(Object obj) {
+ return service.getNewObject(obj);
+ }
+
+ public Object[] getNewObjectArrayForward(Object[] objs) {
+ return service.getNewObjectArray(objs);
+ }
+
+ public Image getNewImageForward(Image img) {
+ return service.getNewImage(img);
+ }
+
+ public Image[] getNewImageArrayForward(Image[] imgs) {
+ return service.getNewImageArray(imgs);
+ }
+
+ public DataHandler getNewDataHandlerForward(DataHandler dh) {
+ return service.getNewDataHandler(dh);
+ }
+
+ public DataHandler[] getNewDataHandlerArrayForward(DataHandler[] dha) {
+ return service.getNewDataHandlerArray(dha);
+ }
+
+
+ public Source getNewSourceForward(Source src) {
+ return service.getNewSource(src);
+ }
+
+ public Source[] getNewSourceArrayForward(Source[] srcs) {
+ return service.getNewSourceArray(srcs);
+ }
+
+ public UUID getNewUUIDForward(UUID uuid) {
+ return service.getNewUUID(uuid);
+ }
+
+ public UUID[] getNewUUIDArrayForward(UUID[] uuids) {
+ return service.getNewUUIDArray(uuids);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceClientImpl.java
new file mode 100644
index 0000000000..6aefb05c83
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceClientImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesService;
+import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesServiceClient;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of StandardTypesServiceClient.
+ * The client forwards the request to the service component and returns the response from the service component.
+ */
+@Service(StandardTypesServiceClient.class)
+public class StandardTypesServiceClientImpl extends StandardTypesLocalServiceClientImpl {
+
+ @Reference
+ public void setStandardTypesService(StandardTypesService service) {
+ super.setStandardTypesLocalService(service);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceImpl.java
new file mode 100644
index 0000000000..4e40f006d6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceImpl.java
@@ -0,0 +1,208 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import java.awt.Image;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.URI;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.UUID;
+
+import javax.activation.DataHandler;
+import javax.xml.datatype.Duration;
+import javax.xml.datatype.XMLGregorianCalendar;
+import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesLocalService;
+import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesService;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of StandardTypesService.
+ * This implementation provides both a local and a remotable service.
+ */
+@Service(value={StandardTypesService.class, StandardTypesLocalService.class})
+public class StandardTypesServiceImpl implements StandardTypesService, StandardTypesLocalService {
+
+ public BigInteger getNewBigInteger(BigInteger bi) {
+ return bi.negate();
+ }
+
+ public BigInteger[] getNewBigIntegerArray(BigInteger[] bia) {
+ BigInteger[] resp = new BigInteger[bia.length];
+ for(int i = 0; i < bia.length; ++i) {
+ resp[i] = bia[i].negate();
+ }
+ return resp;
+ }
+
+ public BigDecimal getNewBigDecimal(BigDecimal bd) {
+ return bd.negate();
+ }
+
+ public BigDecimal[] getNewBigDecimalArray(BigDecimal[] bda) {
+ BigDecimal[] resp = new BigDecimal[bda.length];
+ for(int i = 0; i < bda.length; ++i) {
+ resp[i] = bda[i].negate();
+ }
+ return resp;
+ }
+
+ public Calendar getNewCalendar(Calendar c) {
+ Calendar resp = (Calendar)c.clone();
+ resp.add(Calendar.DAY_OF_MONTH, 5);
+ return resp;
+ }
+
+ public Calendar[] getNewCalendarArray(Calendar[] ca) {
+ Calendar[] resp = new Calendar[ca.length];
+ for(int i = 0; i < ca.length; ++i) {
+ resp[i] = getNewCalendar(ca[i]);
+ }
+ return resp;
+ }
+
+ public Date getNewDate(Date d) {
+ return new Date(d.getTime() + 5*24*60*60*1000);
+ }
+
+ public Date[] getNewDateArray(Date[] da) {
+ Date[] resp = new Date[da.length];
+ for(int i = 0; i < da.length; ++i) {
+ resp[i] = getNewDate(da[i]);
+ }
+ return resp;
+ }
+
+ public QName getNewQName(QName qname) {
+ return new QName(qname.getNamespaceURI()+"q", qname.getLocalPart()+"q", qname.getPrefix()+"q");
+
+ }
+
+ public QName[] getNewQNameArray(QName[] qnames) {
+ QName[] resp = new QName[qnames.length];
+ for(int i = 0; i < qnames.length; ++i) {
+ resp[i] = getNewQName(qnames[i]);
+ }
+ return resp;
+ }
+
+ public URI getNewURI(URI uri) {
+ return uri.resolve("uri");
+ }
+
+ public URI[] getNewURIArray(URI[] uris) {
+ URI[] resp = new URI[uris.length];
+ for(int i = 0; i < uris.length; ++i) {
+ resp[i] = getNewURI(uris[i]);
+ }
+ return resp;
+ }
+
+ public XMLGregorianCalendar getNewXMLGregorianCalendar(XMLGregorianCalendar xgcal) {
+ xgcal = (XMLGregorianCalendar)xgcal.clone();
+ xgcal.setDay(xgcal.getDay()+5);
+ return xgcal;
+ }
+
+ public XMLGregorianCalendar[] getNewXMLGregorianCalendarArray(XMLGregorianCalendar[] xgcals) {
+ XMLGregorianCalendar[] resp = new XMLGregorianCalendar[xgcals.length];
+ for(int i = 0; i < xgcals.length; ++i) {
+ resp[i] = getNewXMLGregorianCalendar(xgcals[i]);
+ }
+ return resp;
+ }
+
+ public Duration getNewDuration(Duration d) {
+ return d.negate();
+ }
+
+ public Duration[] getNewDurationArray(Duration[] da) {
+ Duration[] resp = new Duration[da.length];
+ for(int i = 0; i < da.length; ++i) {
+ resp[i] = da[i].negate();
+ }
+ return resp;
+ }
+
+ public Object getNewObject(Object obj) {
+ return StandardTypesTransformer.getNewObject(obj);
+ }
+
+ public Object[] getNewObjectArray(Object[] objs) {
+ Object[] resp = new Object[objs.length];
+ for(int i = 0; i < objs.length; ++i) {
+ resp[i] = getNewObject(objs[i]);
+ }
+ return resp;
+ }
+
+ public Image getNewImage(Image img) {
+ return StandardTypesTransformer.getNewImage(img);
+ }
+
+ public Image[] getNewImageArray(Image[] imgs) {
+ Image[] resp = new Image[imgs.length];
+ for(int i = 0; i < imgs.length; ++i) {
+ resp[i] = getNewImage(imgs[i]);
+ }
+ return resp;
+ }
+
+ public DataHandler getNewDataHandler(DataHandler dh) {
+ // FIXME: transform the input
+ return dh;
+ }
+
+ public DataHandler[] getNewDataHandlerArray(DataHandler[] dha) {
+ DataHandler[] resp = new DataHandler[dha.length];
+ for(int i = 0; i < dha.length; ++i) {
+ resp[i] = dha[i];
+ }
+ return resp;
+ }
+
+ public Source getNewSource(Source src) {
+ return StandardTypesTransformer.getNewSource(src);
+ }
+
+ public Source[] getNewSourceArray(Source[] srcs) {
+ Source[] resp = new Source[srcs.length];
+ for(int i = 0; i < srcs.length; ++i) {
+ resp[i] = getNewSource(srcs[i]);
+ }
+ return resp;
+ }
+
+ public UUID getNewUUID(UUID uuid) {
+ return UUID.fromString(uuid.toString()+"AAA");
+ }
+
+ public UUID[] getNewUUIDArray(UUID[] uuids) {
+ UUID[] resp = new UUID[uuids.length];
+ for(int i = 0; i < uuids.length; ++i) {
+ resp[i] = getNewUUID(uuids[i]);
+ }
+ return resp;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesTransformer.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesTransformer.java
new file mode 100644
index 0000000000..68510b4b03
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesTransformer.java
@@ -0,0 +1,144 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import java.awt.Image;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.CharArrayReader;
+import java.io.CharArrayWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.transform.stream.StreamSource;
+
+import org.xml.sax.InputSource;
+
+
+
+/**
+ * StandardTypesTransformer class that provide for transforming input provided to StandardTypesService methods.
+ *
+ * @version $Rev$ $Date$
+ */
+public class StandardTypesTransformer {
+
+ public static Object getNewObject(Object obj) {
+ if(obj instanceof String) {
+ return "Hello "+obj;
+ } else if(obj instanceof Integer) {
+ return new Integer(-((Integer)obj).intValue());
+ } else if(obj instanceof Double) {
+ return new Double(-((Double)obj).doubleValue());
+ }
+
+ return obj;
+ }
+
+ /**
+ * Returns a copy of the source object if the input is DOMSource, SAXSource or StreamSource.
+ * Returns the input object as is for other types.
+ */
+ public static Source getNewSource(Source src) {
+ Source ret = null;
+ if(src instanceof DOMSource) {
+ DOMSource dsrc = (DOMSource)src;
+ ret = new DOMSource(dsrc.getNode() != null ? dsrc.getNode().cloneNode(true) : null);
+ } else if(src instanceof SAXSource) {
+ SAXSource ssrc = (SAXSource)src;
+ if(ssrc.getInputSource().getByteStream() != null) {
+ InputStream inp = ssrc.getInputSource().getByteStream();
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ int b;
+ try {
+ while((b = inp.read()) != -1) {
+ bout.write(b);
+ }
+ } catch (IOException ignored) {
+ }
+ try { bout.close();} catch (IOException ignored) {}
+ try { inp.reset();} catch (IOException ignored) {}
+ ret = new SAXSource(new InputSource(new ByteArrayInputStream(bout.toByteArray())));
+ } else if(ssrc.getInputSource().getCharacterStream() != null) {
+ Reader rdr = ssrc.getInputSource().getCharacterStream();
+ CharArrayWriter caw = new CharArrayWriter();
+ try {
+ int c;
+ while((c = rdr.read()) != -1) {
+ caw.append((char)c);
+ }
+ } catch (IOException ignored) {
+ }
+ caw.close();
+ try{ rdr.reset();} catch(IOException ignored) {}
+ ret = new SAXSource(new InputSource(new CharArrayReader(caw.toCharArray())));
+ } else {
+ ret = new SAXSource();
+ }
+ } else if(src instanceof StreamSource) {
+ StreamSource ssrc = (StreamSource)src;
+ if(ssrc.getInputStream() != null) {
+ InputStream inp = ssrc.getInputStream();
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ int b;
+ try {
+ while((b = inp.read()) != -1) {
+ bout.write(b);
+ }
+ } catch (IOException ignored) {
+ }
+ try { bout.close();} catch (IOException ignored) {}
+ try { inp.reset();} catch (IOException ignored) {}
+ ret = new StreamSource(new ByteArrayInputStream(bout.toByteArray()));
+ } else if(ssrc.getReader() != null) {
+ Reader rdr = ssrc.getReader();
+ CharArrayWriter caw = new CharArrayWriter();
+ try {
+ int c;
+ while((c = rdr.read()) != -1) {
+ caw.append((char)c);
+ }
+ } catch (IOException ignored) {
+ }
+ caw.close();
+ try{ rdr.reset();} catch(IOException ignored) {}
+ ret = new StreamSource(new CharArrayReader(caw.toCharArray()));
+ } else {
+ ret = new StreamSource();
+ }
+ }
+
+ if(ret != null) {
+ ret.setSystemId(src.getSystemId());
+ } else {
+ ret = src;
+ }
+ return ret;
+ }
+
+ public static Image getNewImage(Image arg) {
+ arg.getGraphics().drawOval(2, 2, 7, 7);
+ return arg;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/resources/aservice.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/resources/aservice.wsdl
new file mode 100644
index 0000000000..10a242be4d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/resources/aservice.wsdl
@@ -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.
+-->
+<wsdl:definitions targetNamespace="http://jaxb.databindings.itest.sca.tuscany.apache.org"
+ xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
+ xmlns:ns0="http://jaxb.databindings.itest.sca.tuscany.apache.org"
+ xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
+ xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
+ xmlns:ns1="http://org.apache.axis2/xsd"
+ xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <wsdl:types>
+ <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://jaxb.databindings.itest.sca.tuscany.apache.org" xmlns:ns="http://jaxb.databindings.itest.sca.tuscany.apache.org">
+ <xs:element name="getGreetings" nillable="true" type="xs:string"/>
+ <xs:element name="getGreetingsResponse" nillable="true" type="xs:string"/>
+ </xs:schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part name="parameters" element="ns0:getGreetings"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part name="parameters" element="ns0:getGreetingsResponse"/>
+ </wsdl:message>
+
+ <wsdl:portType name="AServicePortType">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="ns0:getGreetingsRequest" wsaw:Action="urn:getGreetings"/>
+ <wsdl:output message="ns0:getGreetingsResponse" wsaw:Action="urn:getGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="AServiceSOAP12Binding" type="ns0:AServicePortType">
+ <soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <soap12:operation soapAction="urn:getGreetings" style="document"/>
+ <wsdl:input>
+ <soap12:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:binding name="AServicePortTypeBinding" type="ns0:AServicePortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <soap:operation soapAction=""/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:binding name="AServiceHttpBinding" type="ns0:AServicePortType">
+ <http:binding verb="POST"/>
+ <wsdl:operation name="getGreetings">
+ <http:operation location="AService/getGreetings"/>
+ <wsdl:input>
+ <mime:content part="getGreetings" type="text/xml"/>
+ </wsdl:input>
+ <wsdl:output>
+ <mime:content part="getGreetings" type="text/xml"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:binding name="AServiceSOAP11Binding" type="ns0:AServicePortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <soap:operation soapAction="urn:getGreetings" style="document"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="AServicePortTypeService">
+ <wsdl:port name="AServicePortTypePort" binding="ns0:AServicePortTypeBinding">
+ <soap:address location="http://localhost:8080/AService"/>
+ </wsdl:port>
+ </wsdl:service>
+
+ <wsdl:service name="AService">
+ <wsdl:port name="AServiceHttpport" binding="ns0:AServiceHttpBinding">
+ <http:address location="http://localhost:8080/AService/httpport"/>
+ </wsdl:port>
+ <wsdl:port name="AServiceSOAP12port_http" binding="ns0:AServiceSOAP12Binding">
+ <soap12:address location="http://localhost:8080/AService/soap12port"/>
+ </wsdl:port>
+ <wsdl:port name="AServiceSOAP11port_http" binding="ns0:AServiceSOAP11Binding">
+ <soap:address location="http://localhost:8080/AService/soap11port"/>
+ </wsdl:port>
+ <wsdl:port name="AServiceSOAP12port_http_null" binding="ns0:AServiceSOAP12Binding">
+ <soap12:address location=""/>
+ </wsdl:port>
+ <wsdl:port name="AServiceSOAP12port_http_wsdl" binding="ns0:AServiceSOAP12Binding">
+ <soap12:address location="inWsdl"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/resources/doclitbarewsdl.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/resources/doclitbarewsdl.composite
new file mode 100644
index 0000000000..0b5dacda35
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/resources/doclitbarewsdl.composite
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912" targetNamespace="http://itest" name="doclitbarewsdltest">
+
+ <component name="AComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.AServiceImpl"/>
+ <service name="AService">
+ <interface.wsdl interface="http://jaxb.databindings.itest.sca.tuscany.apache.org#wsdl.interface(AServicePortType)"/>
+ <binding.ws uri="http://localhost:8085/AService/endpointref"/>
+ </service>
+ </component>
+ <component name="AClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.AClientServiceImpl"/>
+ <reference name="aService">
+ <!--interface.wsdl interface="http://jaxb.databindings.itest.sca.tuscany.apache.org#wsdl.interface(AServicePortType)"/-->
+ <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.AService"/>
+ <binding.ws uri="http://localhost:8085/AService/endpointref"/>
+ </reference>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/resources/generics-service.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/resources/generics-service.composite
new file mode 100644
index 0000000000..6dd7ff738b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/resources/generics-service.composite
@@ -0,0 +1,67 @@
+<?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.
+-->
+
+<!-- $Rev: 741544 $ $Date: 2009-02-06 17:16:22 +0530 (Fri, 06 Feb 2009) $ -->
+
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
+ targetNamespace="http://jaxb.databindings.itest.sca.tuscany.apache.org/"
+ name="GenericsService">
+
+ <!-- Clients to test the service -->
+ <!-- A GenericsServiceClient component that uses WS binding to invoke GenericsService -->
+ <component name="GenericsServiceClientWSComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.GenericsServiceClientImpl" />
+ <reference name="genericsService">
+ <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.GenericsService"/>
+ <binding.ws uri="http://localhost:8085/gs-ep"/>
+ </reference>
+ </component>
+
+ <!-- A GenericsServiceClient component that uses SCA binding to invoke GenericsService service -->
+ <component name="GenericsServiceClientSCAComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.GenericsServiceClientImpl" />
+ <reference name="genericsService" target="GenericsServiceComponent/GenericsService">
+ <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.GenericsService"/>
+ </reference>
+ </component>
+
+ <!-- A GenericsLocalServiceClient component that uses SCA binding to invoke GenericsLocalService service -->
+ <component name="GenericsLocalServiceClientSCAComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.GenericsLocalServiceClientImpl" />
+ <reference name="genericsLocalService" target="GenericsServiceComponent/GenericsLocalService">
+ <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.GenericsLocalService"/>
+ </reference>
+ </component>
+
+ <!-- Components used to implement the services -->
+ <!-- A GenericsService component. -->
+ <component name="GenericsServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.GenericsServiceImpl"/>
+ <service name="GenericsService">
+ <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.GenericsService"/>
+ <binding.ws uri="http://localhost:8085/gs-ep"/>
+ </service>
+ <service name="GenericsLocalService">
+ <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.GenericsLocalService"/>
+ <binding.sca/>
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/resources/helloservice.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/resources/helloservice.composite
new file mode 100644
index 0000000000..d5a7cba69b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/resources/helloservice.composite
@@ -0,0 +1,63 @@
+<?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:wsdli="http://www.w3.org/2006/01/wsdl-instance"
+ targetNamespace="http://jaxb.databindings.itest.sca.tuscany.apache.org/"
+ name="HelloService">
+
+ <!-- Clients to test the service -->
+ <!-- A HelloServiceSimpleClient component that uses WS binding to invoke HelloServiceSimple service -->
+ <component name="HelloServiceSimpleClientWSComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.HelloServiceSimpleClientImpl" />
+ <reference name="helloServiceSimple">
+ <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceSimple"/>
+ <binding.ws uri="http://localhost:8085/hs-ep0"/>
+ </reference>
+ </component>
+
+ <!-- A HelloServiceSimpleClient component that uses SCA binding to invoke HelloServiceSimple service -->
+ <component name="HelloServiceSimpleClientSCAComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.HelloServiceSimpleClientImpl" />
+ <reference name="helloServiceSimple" target="HelloServiceSimpleComponent/HelloServiceSimple">
+ <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceSimple"/>
+ </reference>
+ </component>
+
+ <!-- A HelloLocalServiceSimpleClient component that uses SCA binding to invoke HelloLocalServiceSimple service -->
+ <component name="HelloLocalServiceSimpleClientSCAComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.HelloLocalServiceSimpleClientImpl" />
+ <reference name="helloLocalServiceSimple" target="HelloServiceSimpleComponent/HelloLocalServiceSimple">
+ <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.HelloLocalServiceSimple"/>
+ </reference>
+ </component>
+
+ <!-- Components used to implement the services -->
+ <!-- A HelloServiceSimple component. -->
+ <component name="HelloServiceSimpleComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.HelloServiceSimpleImpl"/>
+ <service name="HelloServiceSimple">
+ <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceSimple"/>
+ <binding.ws uri="http://localhost:8085/hs-ep0"/>
+ </service>
+ <service name="HelloLocalServiceSimple">
+ <binding.sca/>
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/resources/primitivesservice.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/resources/primitivesservice.composite
new file mode 100644
index 0000000000..df0106b3c0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/resources/primitivesservice.composite
@@ -0,0 +1,64 @@
+<?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:wsdli="http://www.w3.org/2006/01/wsdl-instance"
+ targetNamespace="http://jaxb.databindings.itest.sca.tuscany.apache.org/"
+ name="PrimitivesService">
+
+ <!-- Clients to test the service -->
+ <!-- A PrimitivesServiceClient component that uses WS binding to invoke PrimitivesService -->
+ <component name="PrimitivesServiceClientWSComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.PrimitivesServiceClientImpl" />
+ <reference name="primitivesService">
+ <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesService"/>
+ <binding.ws uri="http://localhost:8085/ps-ep"/>
+ </reference>
+ </component>
+
+ <!-- A PrimitivesServiceClient component that uses SCA binding to invoke PrimitivesService service -->
+ <component name="PrimitivesServiceClientSCAComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.PrimitivesServiceClientImpl" />
+ <reference name="primitivesService" target="PrimitivesServiceComponent/PrimitivesService">
+ <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesService"/>
+ </reference>
+ </component>
+
+ <!-- A PrimitivesLocalServiceClient component that uses SCA binding to invoke PrimitivesLocalService service -->
+ <component name="PrimitivesLocalServiceClientSCAComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.PrimitivesLocalServiceClientImpl" />
+ <reference name="primitivesLocalService" target="PrimitivesServiceComponent/PrimitivesLocalService">
+ <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesLocalService"/>
+ </reference>
+ </component>
+
+ <!-- Components used to implement the services -->
+ <!-- A PrimitivesService component. -->
+ <component name="PrimitivesServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.PrimitivesServiceImpl"/>
+ <service name="PrimitivesService">
+ <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesService"/>
+ <binding.ws uri="http://localhost:8085/ps-ep"/>
+ </service>
+ <service name="PrimitivesLocalService">
+ <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesLocalService"/>
+ <binding.sca/>
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/resources/standard-types-service.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/resources/standard-types-service.composite
new file mode 100644
index 0000000000..59ca1b9db7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/main/resources/standard-types-service.composite
@@ -0,0 +1,64 @@
+<?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:wsdli="http://www.w3.org/2006/01/wsdl-instance"
+ targetNamespace="http://jaxb.databindings.itest.sca.tuscany.apache.org/"
+ name="StandardTypesService">
+
+ <!-- Clients to test the service -->
+ <!-- A StandardTypesServiceClient component that uses WS binding to invoke StandardTypesService -->
+ <component name="StandardTypesServiceClientWSComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.StandardTypesServiceClientImpl" />
+ <reference name="standardTypesService">
+ <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesService"/>
+ <binding.ws uri="http://localhost:8085/sts-ep"/>
+ </reference>
+ </component>
+
+ <!-- A StandardTypesServiceClient component that uses SCA binding to invoke StandardTypesService service -->
+ <component name="StandardTypesServiceClientSCAComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.StandardTypesServiceClientImpl" />
+ <reference name="standardTypesService" target="StandardTypesServiceComponent/StandardTypesService">
+ <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesService"/>
+ </reference>
+ </component>
+
+ <!-- A StandardTypesLocalServiceClient component that uses SCA binding to invoke StandardTypesLocalService service -->
+ <component name="StandardTypesLocalServiceClientSCAComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.StandardTypesLocalServiceClientImpl" />
+ <reference name="standardTypesLocalService" target="StandardTypesServiceComponent/StandardTypesLocalService">
+ <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesLocalService"/>
+ </reference>
+ </component>
+
+ <!-- Components used to implement the services -->
+ <!-- A StandardTypesService component. -->
+ <component name="StandardTypesServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.StandardTypesServiceImpl"/>
+ <service name="StandardTypesService">
+ <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesService"/>
+ <binding.ws uri="http://localhost:8085/sts-ep"/>
+ </service>
+ <service name="StandardTypesLocalService">
+ <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesLocalService"/>
+ <binding.sca/>
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DatabindingTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DatabindingTestCase.java
new file mode 100644
index 0000000000..8bacf13063
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DatabindingTestCase.java
@@ -0,0 +1,345 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class DatabindingTestCase {
+
+ private static Node node;
+
+ /**
+ * Runs once before running the tests
+ */
+ @BeforeClass
+ public static void setUp() throws Exception {
+ try {
+ NodeFactory factory = NodeFactory.newInstance();
+ node = factory.createNode(new File("src/main/resources/helloservice.composite").toURI().toURL().toString(),
+ new Contribution("TestContribution", new File("src/main/resources/").toURI().toURL().toString()));
+ node.start();
+ } catch(Throwable e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Runs once after running the tests
+ */
+ @AfterClass
+ public static void tearDown() {
+ node.stop();
+ }
+
+ /**
+ * Invokes the HelloServiceSimple service using SCA binding.
+ * Service method invoked is getGreetings.
+ */
+ @Test
+ public void testSCA() throws Exception {
+ HelloServiceSimpleClient helloServiceSimpleClient = node.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientSCAComponent");
+ performTest(helloServiceSimpleClient);
+ }
+
+ /**
+ * Invokes the HelloServiceSimple service using SCA binding.
+ * Service method invoked is getGreetingsArray.
+ */
+ @Test
+ public void testSCAArray() throws Exception {
+ HelloServiceSimpleClient helloServiceSimpleClient = node.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientSCAComponent");
+ performTestArray(helloServiceSimpleClient);
+ }
+
+ /**
+ * Invokes the HelloServiceSimple service using SCA binding.
+ * Service method invoked is getGreetingsList.
+ */
+ @Test
+ public void testSCAList() throws Exception {
+ HelloServiceSimpleClient helloServiceSimpleClient = node.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientSCAComponent");
+ performTestList(helloServiceSimpleClient);
+ }
+
+ /**
+ * Invokes the HelloServiceSimple service using SCA binding.
+ * Service method invoked is getGreetingsArrayList.
+ */
+ @Test
+ public void testSCAArrayList() throws Exception {
+ HelloServiceSimpleClient helloServiceSimpleClient = node.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientSCAComponent");
+ performTestArrayList(helloServiceSimpleClient);
+ }
+
+ /**
+ * Invokes the HelloServiceSimple service using SCA binding.
+ * Service method invoked is getGreetingsMap.
+ */
+ @Test
+ public void testSCAMap() throws Exception {
+ HelloServiceSimpleClient helloServiceSimpleClient = node.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientSCAComponent");
+ performTestMap(helloServiceSimpleClient);
+ }
+
+ /**
+ * Invokes the HelloServiceSimple service using SCA binding.
+ * Service method invoked is getGreetingsHashMap.
+ */
+ @Test
+ public void testSCAHashMap() throws Exception {
+ HelloServiceSimpleClient helloServiceSimpleClient = node.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientSCAComponent");
+ performTestHashMap(helloServiceSimpleClient);
+ }
+
+ /**
+ * Invokes the HelloServiceSimple service using SCA binding.
+ * Service method invoked is getGreetingsVarArgs.
+ */
+ @Test
+ public void testSCAVarArgs() throws Exception {
+ HelloServiceSimpleClient helloServiceSimpleClient = node.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientSCAComponent");
+ performTestVarArgs(helloServiceSimpleClient);
+ }
+
+ /**
+ * Invokes the HelloServiceSimple service using WS binding.
+ * Service method invoked is getGreetings.
+ */
+ @Test
+ public void testWS() throws Exception {
+ HelloServiceSimpleClient helloServiceSimpleClient = node.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientWSComponent");
+ performTest(helloServiceSimpleClient);
+ }
+
+ /**
+ * Invokes the HelloServiceSimple service using WS binding.
+ * Service method invoked is getGreetingsArray.
+ */
+ @Test
+ public void testWSArray() throws Exception {
+ HelloServiceSimpleClient helloServiceSimpleClient = node.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientWSComponent");
+ performTestArray(helloServiceSimpleClient);
+ }
+
+ /**
+ * Invokes the HelloServiceSimple service using WS binding.
+ * Service method invoked is getGreetingsList.
+ */
+ @Test
+ public void testWSList() throws Exception {
+ HelloServiceSimpleClient helloServiceSimpleClient = node.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientWSComponent");
+ performTestList(helloServiceSimpleClient);
+ }
+
+ /**
+ * Invokes the HelloServiceSimple service using WS binding.
+ * Service method invoked is getGreetingsArrayList.
+ */
+ @Test
+ public void testWSArrayList() throws Exception {
+ HelloServiceSimpleClient helloServiceSimpleClient = node.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientWSComponent");
+ performTestArrayList(helloServiceSimpleClient);
+ }
+
+ /**
+ * Invokes the HelloServiceSimple service using WS binding.
+ * Service method invoked is getGreetingsMap.
+ */
+ @Test
+ public void testWSMap() throws Exception {
+ HelloServiceSimpleClient helloServiceSimpleClient = node.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientWSComponent");
+ performTestMap(helloServiceSimpleClient);
+ }
+
+ /**
+ * Invokes the HelloServiceSimple service using WS binding.
+ * Service method invoked is getGreetingsHashMap.
+ */
+ @Test
+ public void testWSHashMap() throws Exception {
+ HelloServiceSimpleClient helloServiceSimpleClient = node.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientWSComponent");
+ performTestHashMap(helloServiceSimpleClient);
+ }
+
+ /**
+ * Invokes the HelloServiceSimple service using WS binding.
+ * Service method invoked is getGreetingsVarArgs.
+ */
+ @Test
+ public void testWSVarArgs() throws Exception {
+ HelloServiceSimpleClient helloServiceSimpleClient = node.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientWSComponent");
+ performTestVarArgs(helloServiceSimpleClient);
+ }
+
+ /**
+ * Invokes the HelloLocalServiceSimple service using SCA binding.
+ * Service method invoked is getGreetings.
+ */
+ @Test
+ public void testSCALocal() throws Exception {
+ HelloServiceSimpleClient helloServiceSimpleClient = node.getService(HelloServiceSimpleClient.class, "HelloLocalServiceSimpleClientSCAComponent");
+ performTest(helloServiceSimpleClient);
+ }
+
+ /**
+ * Invokes the HelloLocalServiceSimple service using SCA binding.
+ * Service method invoked is getGreetingsArray.
+ */
+ @Test
+ public void testSCALocalArray() throws Exception {
+ HelloServiceSimpleClient helloServiceSimpleClient = node.getService(HelloServiceSimpleClient.class, "HelloLocalServiceSimpleClientSCAComponent");
+ performTestArray(helloServiceSimpleClient);
+ }
+
+ /**
+ * Invokes the HelloLocalServiceSimple service using SCA binding.
+ * Service method invoked is getGreetingsList.
+ */
+ @Test
+ public void testSCALocalList() throws Exception {
+ HelloServiceSimpleClient helloServiceSimpleClient = node.getService(HelloServiceSimpleClient.class, "HelloLocalServiceSimpleClientSCAComponent");
+ performTestList(helloServiceSimpleClient);
+ }
+
+ /**
+ * Invokes the HelloLocalServiceSimple service using SCA binding.
+ * Service method invoked is getGreetingsArrayList.
+ */
+ @Test
+ public void testSCALocalArrayList() throws Exception {
+ HelloServiceSimpleClient helloServiceSimpleClient = node.getService(HelloServiceSimpleClient.class, "HelloLocalServiceSimpleClientSCAComponent");
+ performTestArrayList(helloServiceSimpleClient);
+ }
+
+ /**
+ * Invokes the HelloLocalServiceSimple service using SCA binding.
+ * Service method invoked is getGreetingsMap.
+ */
+ @Test
+ public void testSCALocalMap() throws Exception {
+ HelloServiceSimpleClient helloServiceSimpleClient = node.getService(HelloServiceSimpleClient.class, "HelloLocalServiceSimpleClientSCAComponent");
+ performTestMap(helloServiceSimpleClient);
+ }
+
+ /**
+ * Invokes the HelloLocalServiceSimple service using SCA binding.
+ * Service method invoked is getGreetingsHashMap.
+ */
+ @Test
+ public void testSCALocalHashMap() throws Exception {
+ HelloServiceSimpleClient helloServiceSimpleClient = node.getService(HelloServiceSimpleClient.class, "HelloLocalServiceSimpleClientSCAComponent");
+ performTestHashMap(helloServiceSimpleClient);
+ }
+
+ /**
+ * Invokes the HelloLocalServiceSimple service using SCA binding.
+ * Service method invoked is getGreetingsVarArgs.
+ */
+ @Test
+ public void testSCALocalVarArgs() throws Exception {
+ HelloServiceSimpleClient helloServiceSimpleClient = node.getService(HelloServiceSimpleClient.class, "HelloLocalServiceSimpleClientSCAComponent");
+ performTestVarArgs(helloServiceSimpleClient);
+ }
+
+ private void performTest(HelloServiceSimpleClient helloServiceSimpleClient) {
+ String name = "Pandu";
+ String resp = helloServiceSimpleClient.getGreetingsForward(name);
+ Assert.assertEquals("Hello "+name, resp);
+ }
+
+ private void performTestArray(HelloServiceSimpleClient helloServiceSimpleClient) {
+ String[] names = {"Me", "Pandu"};
+ String[] resps = helloServiceSimpleClient.getGreetingsArrayForward(names);
+ for(int i = 0; i < names.length; ++i) {
+ Assert.assertEquals("Hello "+names[i], resps[i]);
+ }
+ }
+
+ private void performTestList(HelloServiceSimpleClient helloServiceSimpleClient) {
+ List<String> namesList = new ArrayList<String>();
+ namesList.add("Me");
+ namesList.add("Pandu");
+ namesList.add("Chinnipandu");
+ List<String> respList = helloServiceSimpleClient.getGreetingsListForward(namesList);
+ Assert.assertEquals(namesList.size(), respList.size());
+ for(int i = 0; i < namesList.size(); ++i) {
+ Assert.assertEquals("Hello "+namesList.get(i), respList.get(i));
+ }
+ }
+
+ private void performTestArrayList(HelloServiceSimpleClient helloServiceSimpleClient) {
+ ArrayList<String> namesList = new ArrayList<String>();
+ namesList.add("Me");
+ namesList.add("Pandu");
+ namesList.add("Chinnipandu");
+ ArrayList<String> respList = helloServiceSimpleClient.getGreetingsArrayListForward(namesList);
+ Assert.assertEquals(namesList.size(), respList.size());
+ for(int i = 0; i < namesList.size(); ++i) {
+ Assert.assertEquals("Hello "+namesList.get(i), respList.get(i));
+ }
+ }
+
+ private void performTestMap(HelloServiceSimpleClient helloServiceSimpleClient) {
+ Map<String, String> namesMap = new HashMap<String, String>();
+ namesMap.put("Me", null);
+ namesMap.put("Pandu", null);
+ namesMap.put("Chinnipandu", null);
+ Map<String, String> respMap = helloServiceSimpleClient.getGreetingsMapForward(namesMap);
+ Assert.assertEquals(namesMap.keySet().size(), respMap.keySet().size());
+ for(Map.Entry<String, String> entry: namesMap.entrySet()) {
+ Assert.assertEquals("Hello "+entry.getKey(), respMap.get(entry.getKey()));
+ }
+ }
+
+ private void performTestHashMap(HelloServiceSimpleClient helloServiceSimpleClient) {
+ HashMap<String, String> namesMap = new HashMap<String, String>();
+ namesMap.put("Me", null);
+ namesMap.put("Pandu", null);
+ namesMap.put("Chinnipandu", null);
+ Map<String, String> respMap = helloServiceSimpleClient.getGreetingsHashMapForward(namesMap);
+ Assert.assertEquals(namesMap.keySet().size(), respMap.keySet().size());
+ for(Map.Entry<String, String> entry: namesMap.entrySet()) {
+ Assert.assertEquals("Hello "+entry.getKey(), respMap.get(entry.getKey()));
+ }
+ }
+
+ private void performTestVarArgs(HelloServiceSimpleClient helloServiceSimpleClient) {
+ String[] names = { "Me", "You", "Pandu" }; // Do not change the array size from 3.
+ String expected = "Hello Me You Pandu";
+ String actual = helloServiceSimpleClient.getGreetingsVarArgsForward(names[0], names[1], names[2]);
+ Assert.assertEquals(expected, actual);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DocLitBareWsdlTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DocLitBareWsdlTestCase.java
new file mode 100644
index 0000000000..6aac75ae08
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DocLitBareWsdlTestCase.java
@@ -0,0 +1,75 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+import java.io.File;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class DocLitBareWsdlTestCase {
+
+ private static Node node;
+
+ /**
+ * Runs once before running the tests
+ */
+ @BeforeClass
+ public static void setUp() throws Exception {
+ try {
+ NodeFactory factory = NodeFactory.newInstance();
+ node = factory.createNode(new File("src/main/resources/doclitbarewsdl.composite").toURI().toURL().toString(),
+ new Contribution("TestContribution", new File("src/main/resources/").toURI().toURL().toString()));
+ node.start();
+ } catch (Throwable e) {
+ // @Ignore("TUSCANY-2398")
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Runs once after running the tests
+ */
+ @AfterClass
+ public static void tearDown() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+
+ // @Ignore("TUSCANY-2398")
+ @Test
+ public void testDocLitBareWsdl() throws Exception {
+ AClientService client = node.getService(AClientService.class, "AClientComponent");
+ String name = "Pandu";
+ String resp = client.getGreetingsForward(name);
+ Assert.assertEquals("Hello " + name, resp);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsDatabindingTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsDatabindingTestCase.java
new file mode 100644
index 0000000000..755619908d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsDatabindingTestCase.java
@@ -0,0 +1,493 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+import java.io.File;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.impl.GenericsTransformer;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+
+/**
+ * Databinding tests for generics, parameterized and polymorphic types.
+ *
+ * @version $Rev$ $Date$
+ */
+public class GenericsDatabindingTestCase {
+
+ private static Node node;
+
+ /**
+ * Runs before each test method
+ */
+ @BeforeClass
+ public static void setUp() throws Exception {
+ try {
+ NodeFactory factory = NodeFactory.newInstance();
+ node = factory.createNode(new File("src/main/resources/generics-service.composite").toURI().toURL().toString(),
+ new Contribution("TestContribution", new File("src/main/resources/").toURI().toURL().toString()));
+ node.start();
+ } catch(Throwable e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Runs after each test method
+ */
+ @AfterClass
+ public static void tearDown() {
+ node.stop();
+ }
+
+ /**
+ * Invokes the GenericsService service using SCA binding.
+ * Service method invoked is getTypeExplicit.
+ */
+ @Test
+ public void testSCATypeExplicit() throws Exception {
+ GenericsServiceClient serviceClient = node.getService(GenericsServiceClient.class, "GenericsServiceClientSCAComponent");
+ performTestTypeExplicit(serviceClient);
+ }
+
+ /**
+ * Invokes the GenericsService service using SCA binding.
+ * Service method invoked is getTypeUnbound.
+ */
+ @Test
+ public void testSCATypeUnbound() throws Exception {
+ GenericsServiceClient serviceClient = node.getService(GenericsServiceClient.class, "GenericsServiceClientSCAComponent");
+ performTestTypeUnbound(serviceClient);
+ }
+
+ /**
+ * Invokes the GenericsService service using SCA binding.
+ * Service method invoked is getTypeExtends.
+ */
+ @Test
+ public void testSCATypeExtends() throws Exception {
+ GenericsServiceClient serviceClient = node.getService(GenericsServiceClient.class, "GenericsServiceClientSCAComponent");
+ performTestTypeExtends(serviceClient);
+ }
+
+ /**
+ * Invokes the GenericsService service using SCA binding.
+ * Service method invoked is getRecursiveTypeBound.
+ */
+ @Test
+ public void testSCARecursiveTypeBound() throws Exception {
+ GenericsServiceClient serviceClient = node.getService(GenericsServiceClient.class, "GenericsServiceClientSCAComponent");
+ performTestRecursiveTypeBound(serviceClient);
+ }
+
+ /**
+ * Invokes the GenericsService service using SCA binding.
+ * Service method invoked is getWildcardUnbound.
+ */
+ @Test
+ public void testSCAWildcardUnbound() throws Exception {
+ GenericsServiceClient serviceClient = node.getService(GenericsServiceClient.class, "GenericsServiceClientSCAComponent");
+ performTestWildcardUnbound(serviceClient);
+ }
+
+ /**
+ * Invokes the GenericsService service using SCA binding.
+ * Service method invoked is getWildcardSuper.
+ */
+ @Test
+ public void testSCAWildcardSuper() throws Exception {
+ GenericsServiceClient serviceClient = node.getService(GenericsServiceClient.class, "GenericsServiceClientSCAComponent");
+ performTestWildcardSuper(serviceClient);
+ }
+
+ /**
+ * Invokes the GenericsService service using SCA binding.
+ * Service method invoked is getWildcardExtends.
+ */
+ @Test
+ public void testSCAWildcardExtends() throws Exception {
+ GenericsServiceClient serviceClient = node.getService(GenericsServiceClient.class, "GenericsServiceClientSCAComponent");
+ performTestWildcardExtends(serviceClient);
+ }
+
+ /**
+ * Invokes the GenericsService service using SCA binding.
+ * Service method invoked is getPolymorphic.
+ */
+ @Test
+ public void testSCAPolymorphic() throws Exception {
+ GenericsServiceClient serviceClient = node.getService(GenericsServiceClient.class, "GenericsServiceClientSCAComponent");
+ performTestPolymorphic(serviceClient);
+ }
+
+ /**
+ * Invokes the GenericsService service using WS binding.
+ * Service method invoked is getTypeExplicit.
+ */
+ @Test
+ public void testWSTypeExplicit() throws Exception {
+ GenericsServiceClient serviceClient = node.getService(GenericsServiceClient.class, "GenericsServiceClientWSComponent");
+ performTestTypeExplicit(serviceClient);
+ }
+
+ /**
+ * Invokes the GenericsService service using WS binding.
+ * Service method invoked is getTypeUnbound.
+ */
+ @Test
+ public void testWSTypeUnbound() throws Exception {
+ GenericsServiceClient serviceClient = node.getService(GenericsServiceClient.class, "GenericsServiceClientWSComponent");
+ performTestTypeUnbound(serviceClient);
+ }
+
+ /**
+ * Invokes the GenericsService service using WS binding.
+ * Service method invoked is getTypeExtends.
+ */
+ @Test
+ public void testWSTypeExtends() throws Exception {
+ GenericsServiceClient serviceClient = node.getService(GenericsServiceClient.class, "GenericsServiceClientWSComponent");
+ performTestTypeExtends(serviceClient);
+ }
+
+ /**
+ * Invokes the GenericsService service using WS binding.
+ * Service method invoked is getRecursiveTypeBound.
+ */
+ @Test
+ public void testWSRecursiveTypeBound() throws Exception {
+ GenericsServiceClient serviceClient = node.getService(GenericsServiceClient.class, "GenericsServiceClientWSComponent");
+ performTestRecursiveTypeBound(serviceClient);
+ }
+
+ /**
+ * Invokes the GenericsService service using WS binding.
+ * Service method invoked is getWildcardUnbound.
+ */
+ @Test
+ public void testWSWildcardUnbound() throws Exception {
+ GenericsServiceClient serviceClient = node.getService(GenericsServiceClient.class, "GenericsServiceClientWSComponent");
+ performTestWildcardUnbound(serviceClient);
+ }
+
+ /**
+ * Invokes the GenericsService service using WS binding.
+ * Service method invoked is getWildcardSuper.
+ */
+ @Test
+ public void testWSWildcardSuper() throws Exception {
+ GenericsServiceClient serviceClient = node.getService(GenericsServiceClient.class, "GenericsServiceClientWSComponent");
+ performTestWildcardSuper(serviceClient);
+ }
+
+ /**
+ * Invokes the GenericsService service using WS binding.
+ * Service method invoked is getWildcardExtends.
+ */
+ @Test
+ public void testWSWildcardExtends() throws Exception {
+ GenericsServiceClient serviceClient = node.getService(GenericsServiceClient.class, "GenericsServiceClientWSComponent");
+ performTestWildcardExtends(serviceClient);
+ }
+
+ /**
+ * Invokes the GenericsService service using WS binding.
+ * Service method invoked is getPolymorphic.
+ */
+ @Test
+ public void testWSPolymorphic() throws Exception {
+ GenericsServiceClient serviceClient = node.getService(GenericsServiceClient.class, "GenericsServiceClientWSComponent");
+ performTestPolymorphic(serviceClient);
+ }
+
+ /**
+ * Invokes the GenericsLocalService service using SCA binding.
+ * Service method invoked is getTypeExplicit.
+ */
+ @Test
+ public void testSCALocalTypeExplicit() throws Exception {
+ GenericsServiceClient serviceClient = node.getService(GenericsServiceClient.class, "GenericsLocalServiceClientSCAComponent");
+ performTestTypeExplicit(serviceClient);
+ }
+
+ /**
+ * Invokes the GenericsLocalService service using SCA binding.
+ * Service method invoked is getTypeUnbound.
+ */
+ @Test
+ public void testSCALocalTypeUnbound() throws Exception {
+ GenericsServiceClient serviceClient = node.getService(GenericsServiceClient.class, "GenericsLocalServiceClientSCAComponent");
+ performTestTypeUnbound(serviceClient);
+ }
+
+ /**
+ * Invokes the GenericsLocalService service using SCA binding.
+ * Service method invoked is getTypeExtends.
+ */
+ @Test
+ public void testSCALocalTypeExtends() throws Exception {
+ GenericsServiceClient serviceClient = node.getService(GenericsServiceClient.class, "GenericsLocalServiceClientSCAComponent");
+ performTestTypeExtends(serviceClient);
+ }
+
+ /**
+ * Invokes the GenericsLocalService service using SCA binding.
+ * Service method invoked is getRecursiveTypeBound.
+ */
+ @Test
+ public void testSCALocalRecursiveTypeBound() throws Exception {
+ GenericsServiceClient serviceClient = node.getService(GenericsServiceClient.class, "GenericsLocalServiceClientSCAComponent");
+ performTestRecursiveTypeBound(serviceClient);
+ }
+
+ /**
+ * Invokes the GenericsLocalService service using SCA binding.
+ * Service method invoked is getWildcardUnbound.
+ */
+ @Test
+ public void testSCALocalWildcardUnbound() throws Exception {
+ GenericsServiceClient serviceClient = node.getService(GenericsServiceClient.class, "GenericsLocalServiceClientSCAComponent");
+ performTestWildcardUnbound(serviceClient);
+ }
+
+ /**
+ * Invokes the GenericsLocalService service using SCA binding.
+ * Service method invoked is getWildcardSuper.
+ */
+ @Test
+ public void testSCALocalWildcardSuper() throws Exception {
+ GenericsServiceClient serviceClient = node.getService(GenericsServiceClient.class, "GenericsLocalServiceClientSCAComponent");
+ performTestWildcardSuper(serviceClient);
+ }
+
+ /**
+ * Invokes the GenericsLocalService service using SCA binding.
+ * Service method invoked is getWildcardExtends.
+ */
+ @Test
+ public void testSCALocalWildcardExtends() throws Exception {
+ GenericsServiceClient serviceClient = node.getService(GenericsServiceClient.class, "GenericsLocalServiceClientSCAComponent");
+ performTestWildcardExtends(serviceClient);
+ }
+
+ /**
+ * Invokes the GenericsLocalService service using SCA binding.
+ * Service method invoked is getPolymorphic.
+ */
+ @Test
+ public void testSCALocalPolymorphic() throws Exception {
+ GenericsServiceClient serviceClient = node.getService(GenericsServiceClient.class, "GenericsLocalServiceClientSCAComponent");
+ performTestPolymorphic(serviceClient);
+ }
+
+ private void performTestTypeExplicit(GenericsServiceClient serviceClient) {
+ Bean1<String> args[] = new Bean1[2];
+ args[0] = new Bean1<String>("Me");
+ args[1] = new Bean1<String>();
+ for(int i = 0; i < args.length; ++i) {
+ Bean1<String> arg = args[i];
+ Bean1<String> expected = GenericsTransformer.getTypeExplicit(arg);
+ Bean1<String> actual = serviceClient.getTypeExplicitForward(arg);
+ Assert.assertEquals(expected, actual);
+ }
+ }
+
+ private void performTestTypeUnbound(GenericsServiceClient serviceClient) {
+ { // String
+ String[] args = { "Me", "You", "Him" };
+ Bean1<String> expected = GenericsTransformer.getTypeUnbound(args);
+ Bean1<String> actual = serviceClient.getTypeUnboundForward(args);
+ // Assert.assertEquals(expected, actual);
+ }
+ { // Integer
+ Integer[] args = new Integer[3];
+ args[0] = -10;
+ args[1] = 0;
+ args[2] = 10;
+ Bean1<Integer> expected = GenericsTransformer.getTypeUnbound(args);
+ Bean1<Integer> actual = serviceClient.getTypeUnboundForward(args);
+ // Assert.assertEquals(expected, actual);
+ }
+ { // Object
+ Object[] args = new Object[3];
+ args[0] = "Me";
+ args[1] = 10;
+ args[2] = "Him";
+ Bean1<Object> expected = GenericsTransformer.getTypeUnbound(args);
+ Bean1<Object> actual = serviceClient.getTypeUnboundForward(args);
+ Assert.assertEquals(expected, actual);
+ }
+ }
+
+ private void performTestTypeExtends(GenericsServiceClient serviceClient) {
+ { // Bean2
+ Bean2[] args = new Bean2[3];
+ for(int i = 0; i < args.length; ++i) {
+ args[i] = new Bean2();
+ args[i].setName("Name"+i);
+ }
+
+ Bean1<Bean2> expected = GenericsTransformer.getTypeExtends(args);
+ Bean1<Bean2> actual = serviceClient.getTypeExtendsForward(args);
+ Assert.assertEquals(expected, actual);
+ }
+ { // Bean3 extends Bean2
+ Bean3[] args = new Bean3[3];
+ for(int i = 0; i < args.length; ++i) {
+ args[i] = new Bean3();
+ args[i].setName("Name"+i);
+ args[i].setAddress("Address"+i);
+ }
+
+ Bean1<Bean3> expected = GenericsTransformer.getTypeExtends(args);
+ Bean1<Bean3> actual = serviceClient.getTypeExtendsForward(args);
+ // Assert.assertEquals(expected, actual);
+ }
+ { //Bean31 extends Bean2
+ Bean31[] args = new Bean31[3];
+ for(int i = 0; i < args.length; ++i) {
+ args[i] = new Bean31();
+ args[i].setName("Name"+i);
+ args[i].setAddress("Address"+i);
+ }
+
+ Bean1<Bean31> expected = GenericsTransformer.getTypeExtends(args);
+ Bean1<Bean31> actual = serviceClient.getTypeExtendsForward(args);
+ // Assert.assertEquals(expected, actual);
+ }
+ }
+
+ private void performTestRecursiveTypeBound(GenericsServiceClient serviceClient) {
+ { // Bean1<String>
+ Bean1<String>[] args = new Bean1[3];
+ for(int i = 0; i < args.length; ++i) {
+ args[i] = new Bean1<String>();
+ args[i].setItem("Bean."+i);
+ }
+ Bean1<Bean1<String>> expected = GenericsTransformer.getRecursiveTypeBound(args);
+ Bean1<Bean1<String>> actual = serviceClient.getRecursiveTypeBoundForward(args);
+ Assert.assertEquals(expected, actual);
+ }
+ { // Bean10 extends Bean1<String>
+ Bean10[] args = new Bean10[3];
+ for(int i = 0; i < args.length; ++i) {
+ args[i] = new Bean10();
+ args[i].setItem("Bean10."+i);
+ }
+ Bean1<Bean10> expected = GenericsTransformer.getRecursiveTypeBound(args);
+ Bean1<Bean10> actual = serviceClient.getRecursiveTypeBoundForward(args);
+ // Assert.assertEquals(expected, actual);
+ }
+ { // Bean11 extends Bean1<String>
+ Bean11[] args = new Bean11[3];
+ for(int i = 0; i < args.length; ++i) {
+ args[i] = new Bean11();
+ args[i].setItem("Bean11."+i);
+ }
+ Bean1<Bean11> expected = GenericsTransformer.getRecursiveTypeBound(args);
+ Bean1<Bean11> actual = serviceClient.getRecursiveTypeBoundForward(args);
+ // Assert.assertEquals(expected, actual);
+ }
+ }
+
+ private void performTestWildcardUnbound(GenericsServiceClient serviceClient) {
+ {
+ Bean1<?> arg = new Bean1<String>("Me");
+ Bean1<?> expected = GenericsTransformer.getWildcardUnbound(arg);
+ Bean1<?> actual = serviceClient.getWildcardUnboundForward(arg);
+ Assert.assertEquals(expected, actual);
+ }
+ {
+ Bean1<?> arg = new Bean1<Integer>(1);
+ Bean1<?> expected = GenericsTransformer.getWildcardUnbound(arg);
+ Bean1<?> actual = serviceClient.getWildcardUnboundForward(arg);
+ Assert.assertEquals(expected, actual);
+ }
+ }
+
+ private void performTestWildcardSuper(GenericsServiceClient serviceClient) {
+ Bean1<? super Bean3> arg = new Bean1<Bean2>();
+ Bean3 item = new Bean3();
+ item.setName("Name");
+ item.setAddress("Address");
+ arg.setItem(item);
+ Bean1<? super Bean3> expected = GenericsTransformer.getWildcardSuper(arg);
+ Bean1<? super Bean3> actual = serviceClient.getWildcardSuperForward(arg);
+ Assert.assertEquals(expected, actual);
+ }
+
+ private void performTestWildcardExtends(GenericsServiceClient serviceClient) {
+ { // Bean2
+ Bean2 temp = new Bean2();
+ temp.setName("Me");
+ Bean1<? extends Bean2> arg = new Bean1<Bean2>(temp);
+ Bean1<? extends Bean2> expected = GenericsTransformer.getWildcardExtends(arg);
+ Bean1<? extends Bean2> actual = serviceClient.getWildcardExtendsForward(arg);
+ Assert.assertEquals(expected, actual);
+ }
+ { // Bean3 extends Bean2
+ Bean3 temp = new Bean3();
+ temp.setName("Me");
+ temp.setAddress("My address");
+ Bean1<? extends Bean2> arg = new Bean1<Bean3>(temp);
+ Bean1<? extends Bean2> expected = GenericsTransformer.getWildcardExtends(arg);
+ Bean1<? extends Bean2> actual = serviceClient.getWildcardExtendsForward(arg);
+ // The Bean3 will be unmarshalled into Bean2
+ // Assert.assertEquals(expected, actual);
+ Assert.assertTrue(actual.getItem() instanceof Bean2);
+ }
+ { // Bean31 extends Bean2
+ Bean31 temp = new Bean31();
+ temp.setName("Me1");
+ temp.setAddress("My address1");
+ Bean1<? extends Bean2> arg = new Bean1<Bean31>(temp);
+ Bean1<? extends Bean2> expected = GenericsTransformer.getWildcardExtends(arg);
+ Bean1<? extends Bean2> actual = serviceClient.getWildcardExtendsForward(arg);
+ // The Bean31 will be unmarshalled into Bean2
+ // Assert.assertEquals(expected, actual);
+ Assert.assertTrue(actual.getItem() instanceof Bean2);
+ }
+ }
+
+ private void performTestPolymorphic(GenericsServiceClient serviceClient) {
+ { // Bean2
+ Bean2 arg = new Bean2();
+ arg.setName("Me");
+ Bean2 expected = GenericsTransformer.getPolymorphic(arg);
+ Bean2 actual = serviceClient.getPolymorphicForward(arg);
+ Assert.assertEquals(expected, actual);
+ }
+ { // Bean3 extends Bean2
+ Bean3 arg = new Bean3();
+ arg.setName("Me");
+ arg.setAddress("My address");
+ Bean2 expected = GenericsTransformer.getPolymorphic(arg);
+ Bean2 actual = serviceClient.getPolymorphicForward(arg);
+ Assert.assertEquals(expected.getName(), actual.getName());
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesDatabindingTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesDatabindingTestCase.java
new file mode 100644
index 0000000000..8ece2c3293
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesDatabindingTestCase.java
@@ -0,0 +1,784 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+import java.io.File;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class PrimitivesDatabindingTestCase {
+
+ private static Node node;
+
+ /**
+ * Runs before each test method
+ */
+ @BeforeClass
+ public static void setUp() throws Exception {
+ try {
+ NodeFactory factory = NodeFactory.newInstance();
+ node = factory.createNode(new File("src/main/resources/primitivesservice.composite").toURI().toURL().toString(),
+ new Contribution("TestContribution", new File("src/main/resources/").toURI().toURL().toString()));
+ node.start();
+ } catch(Throwable e) {
+ e.printStackTrace();
+ Assert.fail();
+ }
+ }
+
+ /**
+ * Runs after each test method
+ */
+ @AfterClass
+ public static void tearDown() {
+ node.stop();
+ }
+
+ /**
+ * Invokes the PrimitivesService service using SCA binding.
+ * Service method invoked is negateBoolean.
+ */
+ @Test
+ public void testSCANegateBoolean() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent");
+ performTestNegateBoolean(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using SCA binding.
+ * Service method invoked is negateBooleanArray.
+ */
+ @Test
+ public void testSCANegateBooleanArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent");
+ performTestNegateBooleanArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with SCA binding.
+ * Test for boolean array.
+ */
+ @Test
+ public void testSCAPassByValueBooleanArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueBooleanArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using SCA binding.
+ * Service method invoked is negateByte.
+ */
+ @Test
+ public void testSCANegateByte() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent");
+ performTestNegateByte(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using SCA binding.
+ * Service method invoked is negateByteArray.
+ */
+ @Test
+ public void testSCANegateByteArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent");
+ performTestNegateByteArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with SCA binding.
+ * Test for byte array.
+ */
+ @Test
+ public void testSCAPassByValueByteArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueByteArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using SCA binding.
+ * Service method invoked is negateShort.
+ */
+ @Test
+ public void testSCANegateShort() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent");
+ performTestNegateShort(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using SCA binding.
+ * Service method invoked is negateShortArray.
+ */
+ @Test
+ public void testSCANegateShortArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent");
+ performTestNegateShortArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with SCA binding.
+ * Test for short array.
+ */
+ @Test
+ public void testSCAPassByValueShortArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueShortArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using SCA binding.
+ * Service method invoked is negateInt.
+ */
+ @Test
+ public void testSCANegateInt() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent");
+ performTestNegateInt(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using SCA binding.
+ * Service method invoked is negateIntArray.
+ */
+ @Test
+ public void testSCANegateIntArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent");
+ performTestNegateIntArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with SCA binding.
+ * Test for int array.
+ */
+ @Test
+ public void testSCAPassByValueIntArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueIntArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using SCA binding.
+ * Service method invoked is negateLong.
+ */
+ @Test
+ public void testSCANegateLong() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent");
+ performTestNegateLong(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using SCA binding.
+ * Service method invoked is negateLongArray.
+ */
+ @Test
+ public void testSCANegateLongArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent");
+ performTestNegateLongArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with SCA binding.
+ * Test for long array.
+ */
+ @Test
+ public void testSCAPassByValueLongArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueLongArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using SCA binding.
+ * Service method invoked is negateFloat.
+ */
+ @Test
+ public void testSCANegateFloat() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent");
+ performTestNegateFloat(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using SCA binding.
+ * Service method invoked is negateFloatArray.
+ */
+ @Test
+ public void testSCANegateFloatArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent");
+ performTestNegateFloatArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with SCA binding.
+ * Test for float array.
+ */
+ @Test
+ public void testSCAPassByValueFloatArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueFloatArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using SCA binding.
+ * Service method invoked is negateDouble.
+ */
+ @Test
+ public void testSCANegateDouble() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent");
+ performTestNegateDouble(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using SCA binding.
+ * Service method invoked is negateDoubleArray.
+ */
+ @Test
+ public void testSCANegateDoubleArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent");
+ performTestNegateDoubleArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with SCA binding.
+ * Test for double array.
+ */
+ @Test
+ public void testSCAPassByValueDoubleArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueDoubleArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateBoolean.
+ */
+ @Test
+ public void testWSNegateBoolean() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent");
+ performTestNegateBoolean(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateBooleanArray.
+ */
+ @Test
+ public void testWSNegateBooleanArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent");
+ performTestNegateBooleanArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with WS binding.
+ * Test for boolean array.
+ */
+ @Test
+ public void testWSPassByValueBooleanArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueBooleanArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateByte.
+ */
+ @Test
+ public void testWSNegateByte() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent");
+ performTestNegateByte(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateByteArray.
+ */
+ @Test
+ public void testWSNegateByteArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent");
+ performTestNegateByteArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with WS binding.
+ * Test for byte array.
+ */
+ @Test
+ public void testWSPassByValueByteArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueByteArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateShort.
+ */
+ @Test
+ public void testWSNegateShort() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent");
+ performTestNegateShort(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateShortArray.
+ */
+ @Test
+ public void testWSNegateShortArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent");
+ performTestNegateShortArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with WS binding.
+ * Test for short array.
+ */
+ @Test
+ public void testWSPassByValueShortArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueShortArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateInt.
+ */
+ @Test
+ public void testWSNegateInt() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent");
+ performTestNegateInt(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateIntArray.
+ */
+ @Test
+ public void testWSNegateIntArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent");
+ performTestNegateIntArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with WS binding.
+ * Test for int array.
+ */
+ @Test
+ public void testWSPassByValueIntArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueIntArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateLong.
+ */
+ @Test
+ public void testWSNegateLong() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent");
+ performTestNegateLong(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateLongArray.
+ */
+ @Test
+ public void testWSNegateLongArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent");
+ performTestNegateLongArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with WS binding.
+ * Test for long array.
+ */
+ @Test
+ public void testWSPassByValueLongArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueLongArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateFloat.
+ */
+ @Test
+ public void testWSNegateFloat() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent");
+ performTestNegateFloat(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateFloatArray.
+ */
+ @Test
+ public void testWSNegateFloatArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent");
+ performTestNegateFloatArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with WS binding.
+ * Test for float array.
+ */
+ @Test
+ public void testWSPassByValueFloatArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueFloatArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateDouble.
+ */
+ @Test
+ public void testWSNegateDouble() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent");
+ performTestNegateDouble(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateDoubleArray.
+ */
+ @Test
+ public void testWSNegateDoubleArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent");
+ performTestNegateDoubleArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with WS binding.
+ * Test for double array.
+ */
+ @Test
+ public void testWSPassByValueDoubleArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueDoubleArray());
+ }
+
+ /**
+ * Invokes the PrimitivesLocalService service using SCA binding.
+ * Service method invoked is negateBoolean.
+ */
+ @Test
+ public void testSCALocalNegateBoolean() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesLocalServiceClientSCAComponent");
+ performTestNegateBoolean(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesLocalService service using SCA binding.
+ * Service method invoked is negateBooleanArray.
+ */
+ @Test
+ public void testSCALocalNegateBooleanArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesLocalServiceClientSCAComponent");
+ performTestNegateBooleanArray(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesLocalService service using SCA binding.
+ * Service method invoked is negateByte.
+ */
+ @Test
+ public void testSCALocalNegateByte() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesLocalServiceClientSCAComponent");
+ performTestNegateByte(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesLocalService service using SCA binding.
+ * Service method invoked is negateByteArray.
+ */
+ @Test
+ public void testSCALocalNegateByteArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesLocalServiceClientSCAComponent");
+ performTestNegateByteArray(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesLocalService service using SCA binding.
+ * Service method invoked is negateShort.
+ */
+ @Test
+ public void testSCALocalNegateShort() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesLocalServiceClientSCAComponent");
+ performTestNegateShort(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesLocalService service using SCA binding.
+ * Service method invoked is negateShortArray.
+ */
+ @Test
+ public void testSCALocalNegateShortArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesLocalServiceClientSCAComponent");
+ performTestNegateShortArray(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesLocalService service using SCA binding.
+ * Service method invoked is negateInt.
+ */
+ @Test
+ public void testSCALocalNegateInt() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesLocalServiceClientSCAComponent");
+ performTestNegateInt(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesLocalService service using SCA binding.
+ * Service method invoked is negateIntArray.
+ */
+ @Test
+ public void testSCALocalNegateIntArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesLocalServiceClientSCAComponent");
+ performTestNegateIntArray(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesLocalService service using SCA binding.
+ * Service method invoked is negateLong.
+ */
+ @Test
+ public void testSCALocalNegateLong() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesLocalServiceClientSCAComponent");
+ performTestNegateLong(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesLocalService service using SCA binding.
+ * Service method invoked is negateLongArray.
+ */
+ @Test
+ public void testSCALocalNegateLongArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesLocalServiceClientSCAComponent");
+ performTestNegateLongArray(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesLocalService service using SCA binding.
+ * Service method invoked is negateFloat.
+ */
+ @Test
+ public void testSCALocalNegateFloat() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesLocalServiceClientSCAComponent");
+ performTestNegateFloat(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using SCA binding.
+ * Service method invoked is negateFloatArray.
+ */
+ @Test
+ public void testSCALocalNegateFloatArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesLocalServiceClientSCAComponent");
+ performTestNegateFloatArray(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesLocalService service using SCA binding.
+ * Service method invoked is negateDouble.
+ */
+ @Test
+ public void testSCALocalNegateDouble() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesLocalServiceClientSCAComponent");
+ performTestNegateDouble(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesLocalService service using SCA binding.
+ * Service method invoked is negateDoubleArray.
+ */
+ @Test
+ public void testSCALocalNegateDoubleArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesLocalServiceClientSCAComponent");
+ performTestNegateDoubleArray(primitivesServiceClient);
+ }
+
+ private void performTestNegateBoolean(PrimitivesServiceClient primitivesServiceClient) {
+ Assert.assertTrue(primitivesServiceClient.negateBooleanForward(false));
+ Assert.assertFalse(primitivesServiceClient.negateBooleanForward(true));
+ }
+
+ private void performTestNegateBooleanArray(PrimitivesServiceClient primitivesServiceClient) {
+ boolean flags[] = new boolean[2];
+ flags[0] = false;
+ flags[1] = true;
+ boolean[] respFlags = primitivesServiceClient.negateBooleanArrayForward(flags);
+ Assert.assertEquals(flags.length, respFlags.length);
+ for(int i = 0; i < flags.length; ++i) {
+ Assert.assertEquals(!flags[i], respFlags[i]);
+ }
+ }
+
+ private void performTestNegateByte(PrimitivesServiceClient primitivesServiceClient) {
+ byte[] ba = new byte[3];
+ ba[0] = -1;
+ ba[1] = 0;
+ ba[2] = 1;
+
+ for(int i = 0; i < ba.length; ++i) {
+ Assert.assertEquals((byte)-ba[i], primitivesServiceClient.negateByteForward(ba[i]));
+ }
+ }
+
+ private void performTestNegateByteArray(PrimitivesServiceClient primitivesServiceClient) {
+ byte[] ba = new byte[3];
+ ba[0] = -1;
+ ba[1] = 0;
+ ba[2] = 1;
+
+ byte[] r = primitivesServiceClient.negateByteArrayForward(ba);
+ Assert.assertEquals(ba.length, r.length);
+ for(int i = 0; i < ba.length; ++i) {
+ Assert.assertEquals((byte)-ba[i], r[i]);
+ }
+ }
+
+ private void performTestNegateShort(PrimitivesServiceClient primitivesServiceClient) {
+ short[] s = new short[3];
+ s[0] = -1;
+ s[1] = 0;
+ s[2] = 1;
+
+ for(int i = 0; i < s.length; ++i) {
+ Assert.assertEquals((short)-s[i], primitivesServiceClient.negateShortForward(s[i]));
+ }
+ }
+
+ private void performTestNegateShortArray(PrimitivesServiceClient primitivesServiceClient) {
+ short[] s = new short[3];
+ s[0] = -1;
+ s[1] = 0;
+ s[2] = 1;
+
+ short[] r = primitivesServiceClient.negateShortArrayForward(s);
+ Assert.assertEquals(s.length, r.length);
+ for(int i = 0; i < s.length; ++i) {
+ Assert.assertEquals((short)-s[i], r[i]);
+ }
+ }
+
+ private void performTestNegateInt(PrimitivesServiceClient primitivesServiceClient) {
+ int[] ia = new int[3];
+ ia[0] = -1;
+ ia[1] = 0;
+ ia[2] = 1;
+
+ for(int i = 0; i < ia.length; ++i) {
+ Assert.assertEquals(-ia[i], primitivesServiceClient.negateIntForward(ia[i]));
+ }
+ }
+
+ private void performTestNegateIntArray(PrimitivesServiceClient primitivesServiceClient) {
+ int[] ia = new int[3];
+ ia[0] = -1;
+ ia[1] = 0;
+ ia[2] = 1;
+
+ int[] r = primitivesServiceClient.negateIntArrayForward(ia);
+ Assert.assertEquals(ia.length, r.length);
+ for(int i = 0; i < ia.length; ++i) {
+ Assert.assertEquals(-ia[i], r[i]);
+ }
+ }
+
+ private void performTestNegateLong(PrimitivesServiceClient primitivesServiceClient) {
+ long[] la = new long[3];
+ la[0] = -1;
+ la[1] = 0;
+ la[2] = 1;
+
+ for(int i = 0; i < la.length; ++i) {
+ Assert.assertEquals(-la[i], primitivesServiceClient.negateLongForward(la[i]));
+ }
+ }
+
+ private void performTestNegateLongArray(PrimitivesServiceClient primitivesServiceClient) {
+ long[] la = new long[3];
+ la[0] = -1;
+ la[1] = 0;
+ la[2] = 1;
+
+ long[] r = primitivesServiceClient.negateLongArrayForward(la);
+ Assert.assertEquals(la.length, r.length);
+ for(int i = 0; i < la.length; ++i) {
+ Assert.assertEquals(-la[i], r[i]);
+ }
+ }
+
+ private void performTestNegateFloat(PrimitivesServiceClient primitivesServiceClient) {
+ float[] fa = new float[3];
+ fa[0] = -1;
+ fa[1] = 0;
+ fa[2] = 1;
+
+ for(int i = 0; i < fa.length; ++i) {
+ Assert.assertEquals(-fa[i], primitivesServiceClient.negateFloatForward(fa[i]));
+ }
+ }
+
+ private void performTestNegateFloatArray(PrimitivesServiceClient primitivesServiceClient) {
+ float[] ia = new float[3];
+ ia[0] = -1;
+ ia[1] = 0;
+ ia[2] = 1;
+
+ float[] r = primitivesServiceClient.negateFloatArrayForward(ia);
+ Assert.assertEquals(ia.length, r.length);
+ for(int i = 0; i < ia.length; ++i) {
+ Assert.assertEquals(-ia[i], r[i]);
+ }
+ }
+
+ private void performTestNegateDouble(PrimitivesServiceClient primitivesServiceClient) {
+ double[] da = new double[3];
+ da[0] = -1;
+ da[1] = 0;
+ da[2] = 1;
+
+ for(int i = 0; i < da.length; ++i) {
+ Assert.assertEquals(-da[i], primitivesServiceClient.negateDoubleForward(da[i]));
+ }
+ }
+
+ private void performTestNegateDoubleArray(PrimitivesServiceClient primitivesServiceClient) {
+ double[] da = new double[3];
+ da[0] = -1;
+ da[1] = 0;
+ da[2] = 1;
+
+ double[] r = primitivesServiceClient.negateDoubleArrayForward(da);
+ Assert.assertEquals(da.length, r.length);
+ for(int i = 0; i < da.length; ++i) {
+ Assert.assertEquals(-da[i], r[i]);
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesDatabindingTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesDatabindingTestCase.java
new file mode 100644
index 0000000000..4545ac379e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesDatabindingTestCase.java
@@ -0,0 +1,1443 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+import java.awt.Image;
+import java.awt.image.BufferedImage;
+import java.awt.image.PixelGrabber;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.URI;
+import java.net.URL;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.TimeZone;
+import java.util.UUID;
+
+import javax.activation.DataHandler;
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.Duration;
+import javax.xml.datatype.XMLGregorianCalendar;
+import javax.xml.namespace.QName;
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+
+import junit.framework.Assert;
+
+import org.apache.axiom.attachments.ByteArrayDataSource;
+import org.apache.tuscany.sca.itest.databindings.jaxb.impl.StandardTypesTransformer;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class StandardTypesDatabindingTestCase {
+
+ private static Node node;
+
+ /**
+ * Runs before each test method
+ */
+ @BeforeClass
+ public static void setUp() throws Exception {
+ try {
+ NodeFactory factory = NodeFactory.newInstance();
+ node = factory.createNode(new File("src/main/resources/standard-types-service.composite").toURI().toURL().toString(),
+ new Contribution("TestContribution", new File("src/main/resources/").toURI().toURL().toString()));
+ node.start();
+ } catch (Throwable e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Runs after each test method
+ */
+ @AfterClass
+ public static void tearDown() {
+ node.stop();
+ }
+
+ /**
+ * Invokes the StandardTypesService service using SCA binding.
+ * Service method invoked is getNewBigInteger.
+ */
+ @Test
+ public void testSCANewBigInteger() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent");
+ performTestNewBigInteger(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using SCA binding.
+ * Service method invoked is getNewBigIntegerArray.
+ */
+ @Test
+ public void testSCANewBigIntegerArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent");
+ performTestNewBigIntegerArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using SCA binding.
+ * Service method invoked is getNewBigDecimal.
+ */
+ @Test
+ public void testSCANewBigDecimal() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent");
+ performTestNewBigDecimal(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using SCA binding.
+ * Service method invoked is getNewBigDecimalArray.
+ */
+ @Test
+ public void testSCANewBigDecimalArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent");
+ performTestNewBigDecimalArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using SCA binding.
+ * Service method invoked is getNewCalendar.
+ */
+ @Test
+ public void testSCANewCalendar() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent");
+ performTestNewCalendar(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using SCA binding.
+ * Service method invoked is getNewCalendarArray.
+ */
+ @Test
+ public void testSCANewCalendarArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent");
+ performTestNewCalendarArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using SCA binding.
+ * Service method invoked is getNewDate.
+ */
+ @Test
+ public void testSCANewDate() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent");
+ performTestNewDate(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using SCA binding.
+ * Service method invoked is getNewDateArray.
+ */
+ @Test
+ public void testSCANewDateArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent");
+ performTestNewDateArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using SCA binding.
+ * Service method invoked is getNewQName.
+ */
+ @Test
+ public void testSCANewQName() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent");
+ performTestNewQName(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using SCA binding.
+ * Service method invoked is getNewQNameArray.
+ */
+ @Test
+ public void testSCANewQNameArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent");
+ performTestNewQNameArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using SCA binding.
+ * Service method invoked is getNewURI.
+ */
+ @Test
+ public void testSCANewURI() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent");
+ performTestNewURI(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using SCA binding.
+ * Service method invoked is getNewURIArray.
+ */
+ @Test
+ public void testSCANewURIArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent");
+ performTestNewURIArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using SCA binding.
+ * Service method invoked is getNewXMLGregorianCalendar.
+ */
+ @Test
+ public void testSCANewXMLGregorianCalendar() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent");
+ performTestNewXMLGregorianCalendar(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using SCA binding.
+ * Service method invoked is getNewXMLGregorianCalendarArray.
+ */
+ @Test
+ public void testSCANewXMLGregorianCalendarArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent");
+ performTestNewXMLGregorianCalendarArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using SCA binding.
+ * Service method invoked is getNewDuration.
+ */
+ @Test
+ public void testSCANewDuration() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent");
+ performTestNewDuration(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using SCA binding.
+ * Service method invoked is getNewDurationArray.
+ */
+ @Test
+ public void testSCANewDurationArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent");
+ performTestNewDurationArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using SCA binding.
+ * Service method invoked is getNewObject.
+ */
+ @Test
+ public void testSCANewObject() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent");
+ performTestNewObject(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using SCA binding.
+ * Service method invoked is getNewObjectArray.
+ */
+ @Test
+ public void testSCANewObjectArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent");
+ performTestNewObjectArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using SCA binding.
+ * Service method invoked is getNewImage.
+ */
+ @Test
+ public void testSCANewImage() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent");
+ performTestNewImage(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using SCA binding.
+ * Service method invoked is getNewImageArray.
+ */
+ @Test
+ public void testSCANewImageArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent");
+ performTestNewImageArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using SCA binding.
+ * Service method invoked is getNewDataHandler.
+ */
+ @Test
+ public void testSCANewDataHandler() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent");
+ performTestNewDataHandler(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using SCA binding.
+ * Service method invoked is getNewDataHandlerArray.
+ */
+ @Test
+ public void testSCANewDataHandlerArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent");
+ performTestNewDataHandlerArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using SCA binding.
+ * Service method invoked is getNewSource.
+ */
+ /*@Test
+ public void testSCANewSource() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent");
+ performTestNewSource(serviceClient);
+ }*/
+
+ /**
+ * Invokes the StandardTypesService service using SCA binding.
+ * Service method invoked is getNewSourceArray.
+ */
+ /*@Test
+ @Ignore("TUSCANY-2387")
+ public void testSCANewSourceArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent");
+ performTestNewSourceArray(serviceClient);
+ }*/
+
+ /**
+ * Invokes the StandardTypesService service using SCA binding.
+ * Service method invoked is getNewUUID.
+ */
+ @Test
+ public void testSCANewUUID() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent");
+ performTestNewUUID(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using SCA binding.
+ * Service method invoked is getNewUUIDArray.
+ */
+ @Test
+ public void testSCANewUUIDArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent");
+ performTestNewUUIDArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewBigInteger.
+ */
+ @Test
+ public void testWSNewBigInteger() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent");
+ performTestNewBigInteger(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewBigIntegerArray.
+ */
+ @Test
+ public void testWSNewBigIntegerArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent");
+ performTestNewBigIntegerArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewBigDecimal.
+ */
+ @Test
+ public void testWSNewBigDecimal() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent");
+ performTestNewBigDecimal(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewBigDecimalArray.
+ */
+ @Test
+ public void testWSNewBigDecimalArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent");
+ performTestNewBigDecimalArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewCalendar.
+ */
+ @Test
+ public void testWSNewCalendar() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent");
+ performTestNewCalendar(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewCalendarArray.
+ */
+ @Test
+ public void testWSNewCalendarArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent");
+ performTestNewCalendarArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewDate.
+ */
+ @Test
+ public void testWSNewDate() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent");
+ performTestNewDate(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewDateArray.
+ */
+ @Test
+ public void testWSNewDateArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent");
+ performTestNewDateArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewQName.
+ */
+ @Test
+ public void testWSNewQName() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent");
+ performTestNewQName(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewQNameArray.
+ */
+ @Test
+ public void testWSNewQNameArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent");
+ performTestNewQNameArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewURI.
+ */
+ @Test
+ public void testWSNewURI() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent");
+ performTestNewURI(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewURIArray.
+ */
+ @Test
+ public void testWSNewURIArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent");
+ performTestNewURIArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewXMLGregorianCalendar.
+ */
+ @Test
+ public void testWSNewXMLGregorianCalendar() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent");
+ performTestNewXMLGregorianCalendar(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewXMLGregorianCalendarArray.
+ */
+ @Test
+ public void testWSNewXMLGregorianCalendarArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent");
+ performTestNewXMLGregorianCalendarArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewDuration.
+ */
+ @Test
+ public void testWSNewDuration() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent");
+ performTestNewDuration(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewDurationArray.
+ */
+ @Test
+ public void testWSNewDurationArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent");
+ performTestNewDurationArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewObject.
+ */
+ @Test
+ public void testWSNewObject() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent");
+ performTestNewObject(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewObjectArray.
+ */
+ @Test
+ public void testWSNewObjectArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent");
+ performTestNewObjectArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewImage.
+ */
+ @Test
+ public void testWSNewImage() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent");
+ performTestNewImage(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewImageArray.
+ */
+ @Test
+ public void testWSNewImageArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent");
+ performTestNewImageArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewDataHandler.
+ */
+ @Test
+ public void testWSNewDataHandler() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent");
+ performTestNewDataHandler(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewDataHandlerArray.
+ */
+ @Test
+ public void testWSNewDataHandlerArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent");
+ performTestNewDataHandlerArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewSource.
+ */
+ /*@Test
+ // @Ignore("junit.framework.ComparisonFailure: null expected:<... encoding=\"UTF-8\"?><[a>A</a]>> but was:<... encoding=\"UTF-8\"?><[return xmlns=\"http://jaxb.databindings.itest.sca.tuscany.apache.org/\">A</return]>>")
+ public void testWSNewSource() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent");
+ performTestNewSource(serviceClient);
+ }*/
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewSourceArray.
+ */
+ /*@Test
+ @Ignore("TUSCANY-2386")
+ public void testWSNewSourceArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent");
+ performTestNewSourceArray(serviceClient);
+ }*/
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewUUID.
+ */
+ @Test
+ public void testWSNewUUID() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent");
+ performTestNewUUID(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewUUIDArray.
+ */
+ @Test
+ public void testWSNewUUIDArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent");
+ performTestNewUUIDArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesLocalService service using SCA binding.
+ * Service method invoked is getNewBigInteger.
+ */
+ @Test
+ public void testSCALocalNewBigInteger() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent");
+ performTestNewBigInteger(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesLocalService service using SCA binding.
+ * Service method invoked is getNewBigIntegerArray.
+ */
+ @Test
+ public void testSCALocalNewBigIntegerArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent");
+ performTestNewBigIntegerArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesLocalService service using SCA binding.
+ * Service method invoked is getNewBigDecimal.
+ */
+ @Test
+ public void testSCALocalNewBigDecimal() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent");
+ performTestNewBigDecimal(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesLocalService service using SCA binding.
+ * Service method invoked is getNewBigDecimalArray.
+ */
+ @Test
+ public void testSCALocalNewBigDecimalArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent");
+ performTestNewBigDecimalArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesLocalService service using SCA binding.
+ * Service method invoked is getNewCalendar.
+ */
+ @Test
+ public void testSCALocalNewCalendar() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent");
+ performTestNewCalendar(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesLocalService service using SCA binding.
+ * Service method invoked is getNewCalendarArray.
+ */
+ @Test
+ public void testSCALocalNewCalendarArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent");
+ performTestNewCalendarArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesLocalService service using SCA binding.
+ * Service method invoked is getNewDate.
+ */
+ @Test
+ public void testSCALocalNewDate() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent");
+ performTestNewDate(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesLocalService service using SCA binding.
+ * Service method invoked is getNewDateArray.
+ */
+ @Test
+ public void testSCALocalNewDateArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent");
+ performTestNewDateArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesLocalService service using SCA binding.
+ * Service method invoked is getNewQName.
+ */
+ @Test
+ public void testSCALocalNewQName() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent");
+ performTestNewQName(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesLocalService service using SCA binding.
+ * Service method invoked is getNewQNameArray.
+ */
+ @Test
+ public void testSCALocalNewQNameArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent");
+ performTestNewQNameArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesLocalService service using SCA binding.
+ * Service method invoked is getNewURI.
+ */
+ @Test
+ public void testSCALocalNewURI() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent");
+ performTestNewURI(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesLocalService service using SCA binding.
+ * Service method invoked is getNewURIArray.
+ */
+ @Test
+ public void testSCALocalNewURIArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent");
+ performTestNewURIArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesLocalService service using SCA binding.
+ * Service method invoked is getNewXMLGregorianCalendar.
+ */
+ @Test
+ public void testSCALocalNewXMLGregorianCalendar() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent");
+ performTestNewXMLGregorianCalendar(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesLocalService service using SCA binding.
+ * Service method invoked is getNewXMLGregorianCalendarArray.
+ */
+ @Test
+ public void testSCALocalNewXMLGregorianCalendarArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent");
+ performTestNewXMLGregorianCalendarArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesLocalService service using SCA binding.
+ * Service method invoked is getNewDuration.
+ */
+ @Test
+ public void testSCALocalNewDuration() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent");
+ performTestNewDuration(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesLocalService service using SCA binding.
+ * Service method invoked is getNewDurationArray.
+ */
+ @Test
+ public void testSCALocalNewDurationArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent");
+ performTestNewDurationArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesLocalService service using SCA binding.
+ * Service method invoked is getNewObject.
+ */
+ @Test
+ public void testSCALocalNewObject() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent");
+ performTestNewObject(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesLocalService service using SCA binding.
+ * Service method invoked is getNewObjectArray.
+ */
+ @Test
+ public void testSCALocalNewObjectArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent");
+ performTestNewObjectArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesLocalService service using SCA binding.
+ * Service method invoked is getNewImage.
+ */
+ @Test
+ public void testSCALocalNewImage() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent");
+ performTestNewImage(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesLocalService service using SCA binding.
+ * Service method invoked is getNewImageArray.
+ */
+ @Test
+ public void testSCALocalNewImageArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent");
+ performTestNewImageArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesLocalLocalService service using SCA binding.
+ * Service method invoked is getNewDataHandler.
+ */
+ @Test
+ public void testSCALocalNewDataHandler() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent");
+ performTestNewDataHandler(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesLocalService service using SCA binding.
+ * Service method invoked is getNewDataHandlerArray.
+ */
+ @Test
+ public void testSCALocalNewDataHandlerArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent");
+ performTestNewDataHandlerArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesLocalService service using SCA binding.
+ * Service method invoked is getNewSource.
+ */
+ /*@Test
+ public void testSCALocalNewSource() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent");
+ performTestNewSource(serviceClient);
+ }*/
+
+ /**
+ * Invokes the StandardTypesLocalService service using SCA binding.
+ * Service method invoked is getNewSourceArray.
+ */
+ /*@Test
+ public void testSCALocalNewSourceArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent");
+ performTestNewSourceArray(serviceClient);
+ }*/
+
+ /**
+ * Invokes the StandardTypesLocalService service using SCA binding.
+ * Service method invoked is getNewUUID.
+ */
+ @Test
+ public void testSCALocalNewUUID() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent");
+ performTestNewUUID(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesLocalService service using SCA binding.
+ * Service method invoked is getNewUUIDArray.
+ */
+ @Test
+ public void testSCALocalNewUUIDArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent");
+ performTestNewUUIDArray(serviceClient);
+ }
+
+ private void performTestNewBigInteger(StandardTypesServiceClient serviceClient) {
+ BigInteger bi = new BigInteger("1234567890123456789012345678901234");
+ BigInteger expected = bi.negate();
+ BigInteger actual = serviceClient.getNewBigIntegerForward(bi);
+ Assert.assertEquals(expected, actual);
+ }
+
+ private void performTestNewBigIntegerArray(StandardTypesServiceClient serviceClient) {
+ BigInteger[] bia = new BigInteger[2];
+ bia[0] = new BigInteger("1234567890123456789012345678901234");
+ bia[1] = new BigInteger("-98765432109876543210987654321");
+ BigInteger[] actual = serviceClient.getNewBigIntegerArrayForward(bia);
+ Assert.assertEquals(bia.length, actual.length);
+ for (int i = 0; i < bia.length; ++i) {
+ Assert.assertEquals(bia[i].negate(), actual[i]);
+ }
+ }
+
+ private void performTestNewBigDecimal(StandardTypesServiceClient serviceClient) {
+ BigDecimal bd = new BigDecimal("12345678901234567890.12345678901234");
+ BigDecimal expected = bd.negate();
+ BigDecimal actual = serviceClient.getNewBigDecimalForward(bd);
+ Assert.assertEquals(expected, actual);
+ }
+
+ private void performTestNewBigDecimalArray(StandardTypesServiceClient serviceClient) {
+ BigDecimal[] bda = new BigDecimal[2];
+ bda[0] = new BigDecimal("1234567890123456.789012345678901234");
+ bda[1] = new BigDecimal("-987654321098765.43210987654321");
+ BigDecimal[] actual = serviceClient.getNewBigDecimalArrayForward(bda);
+ Assert.assertEquals(bda.length, actual.length);
+ for (int i = 0; i < bda.length; ++i) {
+ Assert.assertEquals(bda[i].negate(), actual[i]);
+ }
+ }
+
+ private void performTestNewCalendar(StandardTypesServiceClient serviceClient) {
+ Calendar[] ca = new Calendar[3];
+ String[] tz = {"GMT+05:30", "GMT+00:00", "GMT-05:00"};
+ for (int i = 0; i < ca.length; ++i) {
+ ca[i] = Calendar.getInstance(TimeZone.getTimeZone(tz[i]));
+ ca[i].set(Calendar.DAY_OF_MONTH, i + 1);
+ }
+ for (int i = 0; i < ca.length; ++i) {
+ Calendar actual = serviceClient.getNewCalendarForward(ca[i]);
+ ca[i].add(Calendar.DAY_OF_MONTH, 5);
+ if (actual instanceof GregorianCalendar && ca[i] instanceof GregorianCalendar) {
+ // FIXME: Is this a problem?
+ // The instance returned by service method invoked over binding.ws seems to have a gregorianCutover
+ // different from the instance passed. Adjust the gregorianCutover as per the input instance.
+ ((GregorianCalendar)actual).setGregorianChange(((GregorianCalendar)ca[i]).getGregorianChange());
+ ((GregorianCalendar)actual).setMinimalDaysInFirstWeek(((GregorianCalendar)ca[i]).getMinimalDaysInFirstWeek());
+ ((GregorianCalendar)actual).setFirstDayOfWeek(((GregorianCalendar)ca[i]).getFirstDayOfWeek());
+ }
+ Assert.assertEquals(ca[i], actual);
+ }
+ }
+
+ private void performTestNewCalendarArray(StandardTypesServiceClient serviceClient) {
+ Calendar[] ca = new Calendar[3];
+ String[] tz = {"GMT+05:30", "GMT+00:00", "GMT-05:00"};
+ for (int i = 0; i < ca.length; ++i) {
+ ca[i] = Calendar.getInstance(TimeZone.getTimeZone(tz[i]));
+ ca[i].set(Calendar.DAY_OF_MONTH, i + 1);
+ }
+ Calendar[] actual = serviceClient.getNewCalendarArrayForward(ca);
+ Assert.assertEquals(ca.length, actual.length);
+ for (int i = 0; i < ca.length; ++i) {
+ ca[i].add(Calendar.DAY_OF_MONTH, 5);
+ if (actual[i] instanceof GregorianCalendar && ca[i] instanceof GregorianCalendar) {
+ // FIXME: Is this a problem?
+ // The instance returned by service method invoked over binding.ws seems to have a gregorianCutover
+ // different from the instance passed. Adjust the gregorianCutover as per the input instance.
+ ((GregorianCalendar)actual[i]).setGregorianChange(((GregorianCalendar)ca[i]).getGregorianChange());
+ ((GregorianCalendar)actual[i]).setMinimalDaysInFirstWeek(((GregorianCalendar)ca[i]).getMinimalDaysInFirstWeek());
+ ((GregorianCalendar)actual[i]).setFirstDayOfWeek(((GregorianCalendar)ca[i]).getFirstDayOfWeek());
+ }
+ Assert.assertEquals(ca[i], actual[i]);
+ }
+ }
+
+ private void performTestNewDate(StandardTypesServiceClient serviceClient) {
+ Date d = new Date();
+ Date expected = new Date(d.getTime() + 5 * 24 * 60 * 60 * 1000);
+ Date actual = serviceClient.getNewDateForward(d);
+ Assert.assertEquals(expected, actual);
+ }
+
+ private void performTestNewDateArray(StandardTypesServiceClient serviceClient) {
+ Date[] d = new Date[2];
+ Date[] expected = new Date[d.length];
+ for (int i = 0; i < d.length; ++i) {
+ d[i] = new Date();
+ d[i].setTime(d[i].getTime() + i * 24 * 60 * 60 * 1000);
+ expected[i] = new Date(d[i].getTime() + 5 * 24 * 60 * 60 * 1000);
+ }
+ Date[] actual = serviceClient.getNewDateArrayForward(d);
+ Assert.assertEquals(expected.length, actual.length);
+ for (int i = 0; i < expected.length; ++i) {
+ Assert.assertEquals(expected[i], actual[i]);
+ }
+ }
+
+ private void performTestNewQName(StandardTypesServiceClient serviceClient) {
+ QName[] qnames = new QName[3];
+ qnames[0] = new QName("localPart");
+ qnames[1] = new QName("namespaceUri", "localPart");
+ qnames[2] = new QName("namespaceUri", "localPart", "prefix");
+ QName[] expected = new QName[qnames.length];
+ for (int i = 0; i < qnames.length; ++i) {
+ expected[i] =
+ new QName(qnames[i].getNamespaceURI() + "q", qnames[i].getLocalPart() + "q",
+ qnames[i].getPrefix() + "q");
+ }
+ for (int i = 0; i < qnames.length; ++i) {
+ QName actual = serviceClient.getNewQNameForward(qnames[i]);
+ Assert.assertEquals(expected[i], actual);
+ }
+ }
+
+ private void performTestNewQNameArray(StandardTypesServiceClient serviceClient) {
+ QName[] qnames = new QName[4];
+ qnames[0] = new QName("localPart");
+ qnames[1] = new QName("namespaceUri", "localPart");
+ qnames[2] = new QName("namespaceUri", "localPart", "prefix");
+ qnames[3] = new QName("localPart2");
+ QName[] expected = new QName[qnames.length];
+ for (int i = 0; i < qnames.length; ++i) {
+ expected[i] =
+ new QName(qnames[i].getNamespaceURI() + "q", qnames[i].getLocalPart() + "q",
+ qnames[i].getPrefix() + "q");
+ }
+ QName[] actual = serviceClient.getNewQNameArrayForward(qnames);
+ Assert.assertEquals(expected.length, actual.length);
+ for (int i = 0; i < qnames.length; ++i) {
+ Assert.assertEquals(expected[i], actual[i]);
+ }
+ }
+
+ private void performTestNewURI(StandardTypesServiceClient serviceClient) {
+ URI[] uris = new URI[4];
+ uris[0] = URI.create("a/b/c");
+ uris[1] = URI.create("http://abc/");
+ uris[2] = URI.create("ftp://a/b");
+ uris[3] = URI.create("http://abc/").resolve("xyz");
+
+ for (int i = 0; i < uris.length; ++i) {
+ URI expected = uris[i].resolve("uri");
+ URI actual = serviceClient.getNewURIForward(uris[i]);
+ Assert.assertEquals(expected, actual);
+ }
+ }
+
+ private void performTestNewURIArray(StandardTypesServiceClient serviceClient) {
+ URI[] uris = new URI[4];
+ uris[0] = URI.create("a/b/c");
+ // [rfeng] We need to have a trialign / to avoid the resolving problem
+ // FIXME: [vamsi] This is actually a data transformation problem. The array being returned from the service method is
+ // not making to the caller intact.
+ uris[1] = URI.create("http://abc/");
+ uris[2] = URI.create("ftp://a/b");
+ uris[3] = URI.create("http://abc/").resolve("xyz");
+
+ URI[] expected = new URI[uris.length];
+ for (int i = 0; i < uris.length; ++i) {
+ expected[i] = uris[i].resolve("uri");
+ }
+
+ URI[] actual = serviceClient.getNewURIArrayForward(uris);
+ Assert.assertEquals(expected.length, actual.length);
+ for (int i = 0; i < uris.length; ++i) {
+ Assert.assertEquals(expected[i], actual[i]);
+ }
+ }
+
+ private void performTestNewXMLGregorianCalendar(StandardTypesServiceClient serviceClient)
+ throws DatatypeConfigurationException {
+ DatatypeFactory df = DatatypeFactory.newInstance();
+ XMLGregorianCalendar[] xgcals = new XMLGregorianCalendar[3];
+ xgcals[0] = df.newXMLGregorianCalendar(new GregorianCalendar(1974, GregorianCalendar.APRIL, 19));
+ xgcals[1] = df.newXMLGregorianCalendar(new GregorianCalendar(1978, GregorianCalendar.OCTOBER, 13));
+ xgcals[2] = df.newXMLGregorianCalendar(new GregorianCalendar(2006, GregorianCalendar.JUNE, 16));
+
+ for (int i = 0; i < xgcals.length; ++i) {
+ XMLGregorianCalendar actual = serviceClient.getNewXMLGregorianCalendarForward(xgcals[i]);
+ xgcals[i].setDay(xgcals[i].getDay() + 5);
+ Assert.assertEquals(xgcals[i], actual);
+ }
+ }
+
+ private void performTestNewXMLGregorianCalendarArray(StandardTypesServiceClient serviceClient)
+ throws DatatypeConfigurationException {
+ DatatypeFactory df = DatatypeFactory.newInstance();
+ XMLGregorianCalendar[] xgcals = new XMLGregorianCalendar[3];
+ xgcals[0] = df.newXMLGregorianCalendar(new GregorianCalendar(1974, GregorianCalendar.APRIL, 19));
+ xgcals[1] = df.newXMLGregorianCalendar(new GregorianCalendar(1978, GregorianCalendar.OCTOBER, 13));
+ xgcals[2] = df.newXMLGregorianCalendar(new GregorianCalendar(2006, GregorianCalendar.JUNE, 16));
+
+ XMLGregorianCalendar[] actual = serviceClient.getNewXMLGregorianCalendarArrayForward(xgcals);
+ Assert.assertEquals(xgcals.length, actual.length);
+ for (int i = 0; i < xgcals.length; ++i) {
+ xgcals[i].setDay(xgcals[i].getDay() + 5);
+ Assert.assertEquals(xgcals[i], actual[i]);
+ }
+ }
+
+ private void performTestNewDuration(StandardTypesServiceClient serviceClient) throws DatatypeConfigurationException {
+ DatatypeFactory df = DatatypeFactory.newInstance();
+ Duration[] da = new Duration[3];
+ da[0] = df.newDuration(1000000000000L);
+ da[1] = df.newDurationDayTime(1000000000000L);
+ da[2] = df.newDurationYearMonth(true, 1, 3);
+
+ for (int i = 0; i < da.length; ++i) {
+ Assert.assertEquals(da[i].negate(), serviceClient.getNewDurationForward(da[i]));
+ }
+ }
+
+ private void performTestNewObject(StandardTypesServiceClient serviceClient) {
+ Object[] objs = new Object[5];
+ objs[0] = "Hello";
+ objs[1] = 10;
+ objs[2] = null;
+ objs[3] = -1.0;
+ objs[4] = null;
+
+ for (int i = 0; i < objs.length; ++i) {
+ Object expected = StandardTypesTransformer.getNewObject(objs[i]);
+ Object actual = serviceClient.getNewObjectForward(objs[i]);
+ Assert.assertEquals(expected, actual);
+ }
+ }
+
+ private void performTestNewObjectArray(StandardTypesServiceClient serviceClient) {
+ Object[] objs = new Object[5];
+ objs[0] = "Hello";
+ objs[1] = 10;
+ objs[2] = null;
+ objs[3] = -1.0;
+ objs[4] = null;
+
+ Object[] actual = serviceClient.getNewObjectArrayForward(objs);
+ Assert.assertEquals(objs.length, actual.length);
+ for (int i = 0; i < objs.length; ++i) {
+ Object expected = StandardTypesTransformer.getNewObject(objs[i]);
+ Assert.assertEquals(expected, actual[i]);
+ }
+ }
+
+ private void performTestNewImage(StandardTypesServiceClient serviceClient) throws InterruptedException {
+ // Create some images to test with.
+ Image[] imgs = new Image[3];
+ imgs[0] = new BufferedImage(10, 10, BufferedImage.TYPE_3BYTE_BGR);
+ imgs[1] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB);
+ imgs[2] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB);
+ imgs[0].getGraphics().drawLine(1, 1, 8, 8);
+ imgs[1].getGraphics().drawLine(8, 1, 1, 8);
+ imgs[2].getGraphics().drawLine(1, 8, 8, 1);
+
+ Image[] copy = imgs;
+ // Create the same images once again as the StandardTypesTransformer may manipulate the image passed.
+ imgs = new Image[3];
+ imgs[0] = new BufferedImage(10, 10, BufferedImage.TYPE_3BYTE_BGR);
+ imgs[1] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB);
+ imgs[2] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB);
+ imgs[0].getGraphics().drawLine(1, 1, 8, 8);
+ imgs[1].getGraphics().drawLine(8, 1, 1, 8);
+ imgs[2].getGraphics().drawLine(1, 8, 8, 1);
+
+ // Make sure the images and copies are equal using ImageInfo
+ for(int i = 0; i < imgs.length; ++i) {
+ Assert.assertEquals(new ImageInfo(imgs[i]), new ImageInfo(copy[i]));
+ }
+
+ for (int i = 0; i < imgs.length; ++i) {
+ Image actual = serviceClient.getNewImageForward(imgs[i]);
+ Image expected = StandardTypesTransformer.getNewImage(copy[i]);
+ // Compare using ImageInfo
+ Assert.assertEquals(new ImageInfo(expected), new ImageInfo(actual));
+ }
+ }
+
+ private void performTestNewImageArray(StandardTypesServiceClient serviceClient) throws InterruptedException {
+ // Create some images to test with.
+ Image[] imgs = new Image[3];
+ imgs[0] = new BufferedImage(10, 10, BufferedImage.TYPE_3BYTE_BGR);
+ imgs[1] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB);
+ imgs[2] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB);
+ imgs[0].getGraphics().drawLine(1, 1, 8, 8);
+ imgs[1].getGraphics().drawLine(8, 1, 1, 8);
+ imgs[2].getGraphics().drawLine(1, 8, 8, 1);
+
+ Image[] copy = imgs;
+ // Create the same images once again as the StandardTypesTransformer may manipulate the image passed.
+ imgs = new Image[3];
+ imgs[0] = new BufferedImage(10, 10, BufferedImage.TYPE_3BYTE_BGR);
+ imgs[1] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB);
+ imgs[2] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB);
+ imgs[0].getGraphics().drawLine(1, 1, 8, 8);
+ imgs[1].getGraphics().drawLine(8, 1, 1, 8);
+ imgs[2].getGraphics().drawLine(1, 8, 8, 1);
+
+ // Make sure the images and copies are equal using ImageInfo
+ for(int i = 0; i < imgs.length; ++i) {
+ Assert.assertEquals(new ImageInfo(imgs[i]), new ImageInfo(copy[i]));
+ }
+
+ Image[] actual = serviceClient.getNewImageArrayForward(imgs);
+ Assert.assertEquals(imgs.length, actual.length);
+ for (int i = 0; i < imgs.length; ++i) {
+ Image expected = StandardTypesTransformer.getNewImage(copy[i]);
+ // Compare using ImageInfo
+ Assert.assertEquals(new ImageInfo(expected), new ImageInfo(actual[i]));
+ }
+ }
+
+ private void performTestNewDurationArray(StandardTypesServiceClient serviceClient)
+ throws DatatypeConfigurationException {
+ DatatypeFactory df = DatatypeFactory.newInstance();
+ Duration[] da = new Duration[3];
+ da[0] = df.newDuration(1000000000000L);
+ da[1] = df.newDurationDayTime(1000000000000L);
+ da[2] = df.newDurationYearMonth(true, 1, 3);
+
+ Duration[] actual = serviceClient.getNewDurationArrayForward(da);
+ Assert.assertEquals(da.length, actual.length);
+ for (int i = 0; i < da.length; ++i) {
+ Assert.assertEquals(da[i].negate(), actual[i]);
+ }
+ }
+
+ private void performTestNewDataHandler(StandardTypesServiceClient serviceClient) throws IOException {
+ DataHandler[] dha = new DataHandler[3];
+ dha[0] = new DataHandler("Some data", "text/plain");
+ dha[1] = new DataHandler(new URL("http://tuscany.apache.org/home.html"));
+ dha[2] = new DataHandler(new ByteArrayDataSource("Some data2".getBytes()));
+
+ for (int i = 0; i < dha.length; ++i) {
+ DataHandler actual = serviceClient.getNewDataHandlerForward(dha[i]);
+ // Note: The DataHandler returned may use a different type of DataSource.
+ // Compare the data content instead of using equals().
+ Assert.assertTrue(compare(dha[i], actual));
+ }
+ }
+
+ private void performTestNewDataHandlerArray(StandardTypesServiceClient serviceClient) throws IOException {
+ DataHandler[] dha = new DataHandler[3];
+ dha[0] = new DataHandler("Some data", "text/plain");
+ dha[1] = new DataHandler(new URL("http://tuscany.apache.org/home.html"));
+ dha[2] = new DataHandler(new ByteArrayDataSource("Some data2".getBytes()));
+
+ DataHandler[] actual = serviceClient.getNewDataHandlerArrayForward(dha);
+ Assert.assertEquals(dha.length, actual.length);
+ for (int i = 0; i < dha.length; ++i) {
+ // Note: The DataHandler returned may use a different type of DataSource.
+ // Compare the data content instead of using equals().
+ Assert.assertTrue(compare(dha[i], actual[i]));
+ }
+ }
+
+ /*private void performTestNewSource(StandardTypesServiceClient serviceClient) throws Exception {
+ String xml = "<a>A<b>B</b><c>C</c></a>";
+ Source[] srcs = new Source[3];
+ srcs[0] = new DOMSource(new String2Node(null).transform(xml, null));
+ srcs[1] = new SAXSource(new InputSource(new StringReader(xml)));
+ srcs[2] = new StreamSource(new StringReader(xml));
+
+ for (int i = 0; i < srcs.length; ++i) {
+ Source expected = StandardTypesTransformer.getNewSource(srcs[i]);
+ Source actual = serviceClient.getNewSourceForward(srcs[i]);
+ // [rfeng] The data may come back as a different source
+ Assert.assertEquals(sourceToString(expected), sourceToString(actual));
+ }
+ }
+
+ private void performTestNewSourceArray(StandardTypesServiceClient serviceClient) throws Exception {
+ String xml = "<a>A<b>B</b><c>C</c></a>";
+ Source[] srcs = new Source[3];
+ srcs[0] = new DOMSource(new String2Node(null).transform(xml, null));
+ srcs[1] = new SAXSource(new InputSource(new StringReader(xml)));
+ srcs[2] = new StreamSource(new StringReader(xml));
+
+ Source[] actual = serviceClient.getNewSourceArrayForward(srcs);
+ Source[] expected = new Source[srcs.length];
+ for(int i = 0; i < srcs.length; ++i) {
+ expected[i] = StandardTypesTransformer.getNewSource(srcs[i]);
+ }
+ Assert.assertEquals(srcs.length, actual.length);
+ for (int i = 0; i < srcs.length; ++i) {
+ // [rfeng] The data may come back as a different source
+ Assert.assertEquals(sourceToString(expected[i]), sourceToString(actual[i]));
+ }
+
+ }*/
+
+ private void performTestNewUUID(StandardTypesServiceClient serviceClient) {
+ UUID[] uuids = new UUID[3];
+ uuids[0] = UUID.nameUUIDFromBytes("ABCDEFGHJKLMNOPQRSTUVWXYZ".getBytes());
+ uuids[1] = UUID.nameUUIDFromBytes("abcdefghjklmnopqrstuvwxyz".getBytes());
+ uuids[2] = UUID.randomUUID();
+
+ for (int i = 0; i < uuids.length; ++i) {
+ UUID expected = UUID.fromString(uuids[i].toString() + "AAA");
+ UUID actual = serviceClient.getNewUUIDForward(uuids[i]);
+ Assert.assertEquals(expected, actual);
+ }
+ }
+
+ private void performTestNewUUIDArray(StandardTypesServiceClient serviceClient) {
+ UUID[] uuids = new UUID[3];
+ uuids[0] = UUID.nameUUIDFromBytes("ABCDEFGHJKLMNOPQRSTUVWXYZ".getBytes());
+ uuids[1] = UUID.nameUUIDFromBytes("abcdefghjklmnopqrstuvwxyz".getBytes());
+ uuids[2] = UUID.randomUUID();
+
+ UUID[] actual = serviceClient.getNewUUIDArrayForward(uuids);
+ for (int i = 0; i < uuids.length; ++i) {
+ UUID expected = UUID.fromString(uuids[i].toString() + "AAA");
+ Assert.assertEquals(expected, actual[i]);
+ }
+ }
+
+ /**
+ * This method compares two DataHandlers.
+ * @return true if the data in the two handlers is the same.
+ */
+ private boolean compare(DataHandler dh1, DataHandler dh2) throws IOException {
+ InputStream inp1 = dh1.getInputStream();
+ InputStream inp2 = dh2.getInputStream();
+ for(;;) {
+ int i1 = inp1.read();
+ int i2 = inp2.read();
+ if(i1 == -1 && i2 == -1) {
+ return true;
+ } else if(i1 != -1 && i2 != -1) {
+ if(i1 != i2) {
+ return false;
+ }
+ } else {
+ return false;
+ }
+ }
+ }
+
+ /**
+ * This method returns the content of a source object as String.
+ */
+ private String sourceToString(Source s) throws Exception {
+ StringWriter sw = new StringWriter();
+ Result r = new StreamResult(sw);
+ TransformerFactory.newInstance().newTransformer().transform(s, r);
+ sw.close();
+ return sw.toString();
+ }
+
+ /**
+ * This class initializes with the width, height and pixel data of a java.awt.Image object.
+ */
+ private static class ImageInfo {
+ private int h, w, pixels[];
+ public ImageInfo(Image img) throws InterruptedException {
+ w = img.getWidth(null);
+ h = img.getHeight(null);
+ pixels = new int[w*h];
+ PixelGrabber pg = new PixelGrabber(img, 0, 0, w, h, pixels, 0, w);
+ pg.grabPixels();
+ }
+
+ public boolean equals(Object that) {
+ if(that == null) {
+ return false;
+ } else if(!(that instanceof ImageInfo)) {
+ return false;
+ }
+
+ ImageInfo that1 = (ImageInfo)that;
+ if(w != that1.w || h != that1.h || pixels == null || that1.pixels == null || pixels.length != that1.pixels.length) {
+ return false;
+ }
+ for(int i = 0; i < pixels.length; ++i) {
+ if(pixels[i] != that1.pixels[i]) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public String toString() {
+ return this.getClass().getSimpleName()+"[w = "+w+", h = "+h+", pixels = "+pixels+"]";
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/pom.xml
new file mode 100644
index 0000000000..4771405be0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/pom.xml
@@ -0,0 +1,114 @@
+<?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.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<project>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-databindings</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>itest-databindings-jaxb-top-down</artifactId>
+ <version>2.0.1</version>
+ <name>Apache Tuscany SCA iTest Databinding - JAXB Top Down</name>
+
+ <repositories>
+ <repository>
+ <id>java.net2</id>
+ <name>java.net Maven 2.x Repository</name>
+ <url>http://download.java.net/maven/2</url>
+ </repository>
+ </repositories>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.19</version>
+ </dependency>
+
+ <dependency>
+ <groupId>com.sun.xml.ws</groupId>
+ <artifactId>jaxws-rt</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <argLine>-Djava.endorsed.dirs=target/endorsed</argLine>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>javax.xml.ws</groupId>
+ <artifactId>jaxws-api</artifactId>
+ <version>2.1</version>
+ <type>jar</type>
+ </artifactItem>
+ <artifactItem>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <version>2.1</version>
+ <type>jar</type>
+ </artifactItem>
+ </artifactItems>
+ <outputDirectory>${project.build.directory}/endorsed</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloService.java
new file mode 100644
index 0000000000..ab2d9630eb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloService.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.databindings.jaxb;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * The interface for HelloService.
+ *
+ * @version $Rev$ $Date$
+ */
+@Remotable
+public interface HelloService {
+ String getGreetings(String name);
+ String[] getGreetingsArray(String[] names);
+ List<String> getGreetingsList(List<String> names);
+ ArrayList<String> getGreetingsArrayList(ArrayList<String> names);
+ Map<String, String> getGreetingsMap(Map<String, String> namesMap);
+ HashMap<String, String> getGreetingsHashMap(HashMap<String, String> namesMap);
+ String getGreetingsVarArgs(String... names);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceClient.java
new file mode 100644
index 0000000000..7bd95cec95
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceClient.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.databindings.jaxb;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * The interface for HelloServiceClient.
+ *
+ * @version $Rev$ $Date$
+ */
+public interface HelloServiceClient {
+ String getGreetingsForward(String name);
+ String[] getGreetingsArrayForward(String[] names);
+ List<String> getGreetingsListForward(List<String> names);
+ ArrayList<String> getGreetingsArrayListForward(ArrayList<String> names);
+ Map<String, String> getGreetingsMapForward(Map<String, String> namesMap);
+ HashMap<String, String> getGreetingsHashMapForward(HashMap<String, String> namesMap);
+ String getGreetingsVarArgsForward(String... names);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesService.java
new file mode 100644
index 0000000000..ac6c8d5a60
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesService.java
@@ -0,0 +1,51 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * The interface for PrimitivesService.
+ *
+ * @version $Rev$ $Date$
+ */
+@Remotable
+public interface PrimitivesService {
+ boolean negateBoolean(boolean flag);
+ boolean[] negateBooleanArray(boolean[] flags);
+ boolean[] identityBooleanArray(boolean[] flags);
+ byte negateByte(byte b);
+ byte[] negateByteArray(byte[] ba);
+ byte[] identityByteArray(byte[] ba);
+ short negateShort(short s);
+ short[] negateShortArray(short[] s);
+ short[] identityShortArray(short[] sa);
+ int negateInt(int s);
+ int[] negateIntArray(int[] s);
+ int[] identityIntArray(int[] ia);
+ long negateLong(long l);
+ long[] negateLongArray(long[] la);
+ long[] identityLongArray(long[] la);
+ float negateFloat(float f);
+ float[] negateFloatArray(float[] fa);
+ float[] identityFloatArray(float[] fa);
+ double negateDouble(double d);
+ double[] negateDoubleArray(double[] da);
+ double[] identityDoubleArray(double[] da);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesServiceClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesServiceClient.java
new file mode 100644
index 0000000000..3a5a81bae4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesServiceClient.java
@@ -0,0 +1,50 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+
+/**
+ * The interface for PrimitivesServiceClient.
+ *
+ * @version $Rev$ $Date$
+ */
+public interface PrimitivesServiceClient {
+ boolean negateBooleanForward(boolean flag);
+ boolean[] negateBooleanArrayForward(boolean[] flags);
+ boolean passByValueBooleanArray();
+ byte negateByteForward(byte b);
+ byte[] negateByteArrayForward(byte[] ba);
+ boolean passByValueByteArray();
+ short negateShortForward(short s);
+ short[] negateShortArrayForward(short[] sa);
+ boolean passByValueShortArray();
+ int negateIntForward(int i);
+ int[] negateIntArrayForward(int[] ia);
+ boolean passByValueIntArray();
+ long negateLongForward(long l);
+ long[] negateLongArrayForward(long[] la);
+ boolean passByValueLongArray();
+ float negateFloatForward(float f);
+ float[] negateFloatArrayForward(float[] fa);
+ boolean passByValueFloatArray();
+ double negateDoubleForward(double d);
+ double[] negateDoubleArrayForward(double[] da);
+ boolean passByValueDoubleArray();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesService.java
new file mode 100644
index 0000000000..1f3b7ec633
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesService.java
@@ -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.itest.databindings.jaxb;
+
+import java.awt.Image;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.URI;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.UUID;
+
+import javax.activation.DataHandler;
+import javax.xml.datatype.Duration;
+import javax.xml.datatype.XMLGregorianCalendar;
+import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+
+
+/**
+ * The interface for StandardTypesService.
+ *
+ * @version $Rev$ $Date$
+ */
+@Remotable
+public interface StandardTypesService {
+ BigInteger getNewBigInteger(BigInteger bi);
+ BigInteger[] getNewBigIntegerArray(BigInteger[] bia);
+
+ BigDecimal getNewBigDecimal(BigDecimal bd);
+ BigDecimal[] getNewBigDecimalArray(BigDecimal[] bda);
+
+ Calendar getNewCalendar(Calendar c);
+ Calendar[] getNewCalendarArray(Calendar[] ca);
+
+ Date getNewDate(Date d);
+ Date[] getNewDateArray(Date[] da);
+
+ QName getNewQName(QName qname);
+ QName[] getNewQNameArray(QName[] qnames);
+
+ URI getNewURI(URI uri);
+ URI[] getNewURIArray(URI[] uris);
+
+ XMLGregorianCalendar getNewXMLGregorianCalendar(XMLGregorianCalendar xgcal);
+ XMLGregorianCalendar[] getNewXMLGregorianCalendarArray(XMLGregorianCalendar[] xgcal);
+
+ Duration getNewDuration(Duration d);
+ Duration[] getNewDurationArray(Duration[] da);
+
+ Object getNewObject(Object obj);
+ Object[] getNewObjectArray(Object[] objs);
+
+ Image getNewImage(Image img);
+ Image[] getNewImageArray(Image[] imgs);
+
+ DataHandler getNewDataHandler(DataHandler dh);
+ DataHandler[] getNewDataHandlerArray(DataHandler[] dha);
+
+ Source getNewSource(Source src);
+ Source[] getNewSourceArray(Source[] srcs);
+
+ UUID getNewUUID(UUID uuid);
+ UUID[] getNewUUIDArray(UUID[] uuids);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesServiceClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesServiceClient.java
new file mode 100644
index 0000000000..0c073cd054
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesServiceClient.java
@@ -0,0 +1,81 @@
+/*
+ * 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.itest.databindings.jaxb;
+
+import java.awt.Image;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.URI;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.UUID;
+
+import javax.activation.DataHandler;
+import javax.xml.datatype.Duration;
+import javax.xml.datatype.XMLGregorianCalendar;
+import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+
+
+/**
+ * The interface for StandardTypesServiceClient.
+ *
+ * @version $Rev$ $Date$
+ */
+public interface StandardTypesServiceClient {
+ BigInteger getNewBigIntegerForward(BigInteger bi);
+ BigInteger[] getNewBigIntegerArrayForward(BigInteger[] bia);
+
+ BigDecimal getNewBigDecimalForward(BigDecimal bd);
+ BigDecimal[] getNewBigDecimalArrayForward(BigDecimal[] bda);
+
+ Calendar getNewCalendarForward(Calendar c);
+ Calendar[] getNewCalendarArrayForward(Calendar[] ca);
+
+ Date getNewDateForward(Date d);
+ Date[] getNewDateArrayForward(Date[] da);
+
+ QName getNewQNameForward(QName qname);
+ QName[] getNewQNameArrayForward(QName[] qnames);
+
+ URI getNewURIForward(URI uri);
+ URI[] getNewURIArrayForward(URI[] uris);
+
+ XMLGregorianCalendar getNewXMLGregorianCalendarForward(XMLGregorianCalendar xgcal);
+ XMLGregorianCalendar[] getNewXMLGregorianCalendarArrayForward(XMLGregorianCalendar[] xgcals);
+
+ Duration getNewDurationForward(Duration d);
+ Duration[] getNewDurationArrayForward(Duration[] da);
+
+ Object getNewObjectForward(Object obj);
+ Object[] getNewObjectArrayForward(Object[] objs);
+
+ Image getNewImageForward(Image img);
+ Image[] getNewImageArrayForward(Image[] imgs);
+
+ DataHandler getNewDataHandlerForward(DataHandler dh);
+ DataHandler[] getNewDataHandlerArrayForward(DataHandler[] dha);
+
+ Source getNewSourceForward(Source src);
+ Source[] getNewSourceArrayForward(Source[] srcs);
+
+ UUID getNewUUIDForward(UUID uuid);
+ UUID[] getNewUUIDArrayForward(UUID[] uuids);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceClientImpl.java
new file mode 100644
index 0000000000..61449c8981
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceClientImpl.java
@@ -0,0 +1,73 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.HelloService;
+import org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceClient;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of HelloServiceClient.
+ * The client forwards the request to the service component and returns the response from the service component.
+ */
+@Service(HelloServiceClient.class)
+public class HelloServiceClientImpl {
+
+ private HelloService service;
+
+ @Reference
+ public void setHelloService(HelloService service) {
+ this.service = service;
+ }
+
+ public String getGreetingsForward(String name) {
+ return service.getGreetings(name);
+ }
+
+ public String[] getGreetingsArrayForward(String[] names) {
+ return service.getGreetingsArray(names);
+ }
+
+ public List<String> getGreetingsListForward(List<String> names) {
+ return service.getGreetingsList(names);
+ }
+
+ public Map<String, String> getGreetingsMapForward(Map<String, String> namesMap) {
+ return service.getGreetingsMap(namesMap);
+ }
+
+ public ArrayList<String> getGreetingsArrayListForward(ArrayList<String> names) {
+ return service.getGreetingsArrayList(names);
+ }
+
+ public HashMap<String, String> getGreetingsHashMapForward(HashMap<String, String> namesMap) {
+ return service.getGreetingsHashMap(namesMap);
+ }
+
+ public String getGreetingsVarArgsForward(String... names) {
+ return service.getGreetingsVarArgs(names[0], names[1], names[2]);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceImpl.java
new file mode 100644
index 0000000000..690001bfe1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceImpl.java
@@ -0,0 +1,86 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.HelloService;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of HelloService.
+ *
+ * @version $Rev$ $Date$
+ */
+@Service(HelloService.class)
+public class HelloServiceImpl implements HelloService {
+ public String getGreetings(String name) {
+ return "Hello " + name;
+ }
+
+ public String[] getGreetingsArray(String[] names) {
+ String[] resps = new String[names.length];
+ for (int i = 0; i < names.length; ++i) {
+ resps[i] = "Hello " + names[i];
+ }
+ return resps;
+ }
+
+ public List<String> getGreetingsList(List<String> names) {
+ List<String> resps = new ArrayList<String>();
+ for (int i = 0; i < names.size(); ++i) {
+ resps.add("Hello " + names.get(i));
+ }
+ return resps;
+ }
+
+ public ArrayList<String> getGreetingsArrayList(ArrayList<String> names) {
+ ArrayList<String> resps = new ArrayList<String>();
+ for (int i = 0; i < names.size(); ++i) {
+ resps.add("Hello " + names.get(i));
+ }
+ return resps;
+ }
+
+ public Map<String, String> getGreetingsMap(Map<String, String> namesMap) {
+ for (Map.Entry<String, String> entry : namesMap.entrySet()) {
+ entry.setValue("Hello " + entry.getKey());
+ }
+ return namesMap;
+ }
+
+ public HashMap<String, String> getGreetingsHashMap(HashMap<String, String> namesMap) {
+ for (Map.Entry<String, String> entry : namesMap.entrySet()) {
+ entry.setValue("Hello " + entry.getKey());
+ }
+ return namesMap;
+ }
+
+ public String getGreetingsVarArgs(String... names) {
+ String resp = "Hello";
+ for(int i = 0; i < names.length; ++i) {
+ resp += (" "+names[i]);
+ }
+ return resp;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceClientImpl.java
new file mode 100644
index 0000000000..e55d2527f4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceClientImpl.java
@@ -0,0 +1,139 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesService;
+import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesServiceClient;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of PrimitivesServiceClient.
+ * The client forwards the request to the service component and returns the response from the service component.
+ *
+ * @version $Rev$ $Date$
+ */
+@Service(PrimitivesServiceClient.class)
+public class PrimitivesServiceClientImpl {
+
+ private PrimitivesService service;
+
+ @Reference
+ public void setPrimitivesService(PrimitivesService service) {
+ this.service = service;
+ }
+ public boolean negateBooleanForward(boolean flag) {
+ return service.negateBoolean(flag);
+ }
+
+ public boolean[] negateBooleanArrayForward(boolean[] flags) {
+ return service.negateBooleanArray(flags);
+ }
+
+ public boolean passByValueBooleanArray() {
+ boolean[] req = new boolean[2];
+ boolean[] resp = service.identityBooleanArray(req);
+ return req != resp;
+ }
+
+ public byte negateByteForward(byte b) {
+ return service.negateByte(b);
+ }
+
+ public byte[] negateByteArrayForward(byte[] ba) {
+ return service.negateByteArray(ba);
+ }
+
+ public boolean passByValueByteArray() {
+ byte[] req = new byte[2];
+ byte[] resp = service.identityByteArray(req);
+ return req != resp;
+ }
+
+ public short negateShortForward(short s) {
+ return service.negateShort(s);
+ }
+
+ public short[] negateShortArrayForward(short[] s) {
+ return service.negateShortArray(s);
+ }
+
+ public boolean passByValueShortArray() {
+ short[] req = new short[2];
+ short[] resp = service.identityShortArray(req);
+ return req != resp;
+ }
+
+ public int negateIntForward(int i) {
+ return service.negateInt(i);
+ }
+
+ public int[] negateIntArrayForward(int[] ia) {
+ return service.negateIntArray(ia);
+ }
+
+ public boolean passByValueIntArray() {
+ int[] req = new int[2];
+ int[] resp = service.identityIntArray(req);
+ return req != resp;
+ }
+
+ public long negateLongForward(long l) {
+ return service.negateLong(l);
+ }
+
+ public long[] negateLongArrayForward(long[] la) {
+ return service.negateLongArray(la);
+ }
+
+ public boolean passByValueLongArray() {
+ long[] req = new long[2];
+ long[] resp = service.identityLongArray(req);
+ return req != resp;
+ }
+
+ public float negateFloatForward(float f) {
+ return service.negateFloat(f);
+ }
+
+ public float[] negateFloatArrayForward(float[] fa) {
+ return service.negateFloatArray(fa);
+ }
+
+ public boolean passByValueFloatArray() {
+ float[] req = new float[2];
+ float[] resp = service.identityFloatArray(req);
+ return req != resp;
+ }
+
+ public double negateDoubleForward(double d) {
+ return service.negateDouble(d);
+ }
+
+ public double[] negateDoubleArrayForward(double[] da) {
+ return service.negateDoubleArray(da);
+ }
+
+ public boolean passByValueDoubleArray() {
+ double[] req = new double[2];
+ double[] resp = service.identityDoubleArray(req);
+ return req != resp;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceImpl.java
new file mode 100644
index 0000000000..60ff4163d0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceImpl.java
@@ -0,0 +1,151 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesService;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of PrimitivesService.
+ *
+ * @version $Rev$ $Date$
+ */
+@Service(PrimitivesService.class)
+public class PrimitivesServiceImpl implements PrimitivesService {
+
+ public boolean negateBoolean(boolean flag) {
+ return !flag;
+ }
+
+ public boolean[] negateBooleanArray(boolean[] flags) {
+ boolean[] resp = new boolean[flags.length];
+
+ for(int i = 0; i < flags.length; ++i) {
+ resp[i] = !flags[i];
+ }
+ return resp;
+ }
+
+ public boolean[] identityBooleanArray(boolean[] flags) {
+ return flags;
+ }
+
+ public byte negateByte(byte b) {
+ return (byte)-b;
+ }
+
+ public byte[] negateByteArray(byte[] ba) {
+ byte[] resp = new byte[ba.length];
+
+ for(int i = 0; i < ba.length; ++i) {
+ resp[i] = (byte)-ba[i];
+ }
+ return resp;
+ }
+
+ public byte[] identityByteArray(byte[] ba) {
+ return ba;
+ }
+
+ public short negateShort(short s) {
+ return (short)-s;
+ }
+
+ public short[] negateShortArray(short[] s) {
+ short[] resp = new short[s.length];
+
+ for(int i = 0; i < s.length; ++i) {
+ resp[i] = (short)-s[i];
+ }
+ return resp;
+ }
+
+ public short[] identityShortArray(short[] sa) {
+ return sa;
+ }
+
+ public int negateInt(int i) {
+ return -i;
+ }
+
+ public int[] negateIntArray(int[] ia) {
+ int[] resp = new int[ia.length];
+
+ for(int i = 0; i < ia.length; ++i) {
+ resp[i] = -ia[i];
+ }
+ return resp;
+ }
+
+ public int[] identityIntArray(int[] ia) {
+ return ia;
+ }
+
+ public long negateLong(long l) {
+ return -l;
+ }
+
+ public long[] negateLongArray(long[] la) {
+ long[] resp = new long[la.length];
+
+ for(int i = 0; i < la.length; ++i) {
+ resp[i] = -la[i];
+ }
+ return resp;
+ }
+
+ public long[] identityLongArray(long[] la) {
+ return la;
+ }
+
+ public float negateFloat(float f) {
+ return -f;
+ }
+
+ public float[] negateFloatArray(float[] fa) {
+ float[] resp = new float[fa.length];
+
+ for(int i = 0; i < fa.length; ++i) {
+ resp[i] = -fa[i];
+ }
+ return resp;
+ }
+
+ public float[] identityFloatArray(float[] fa) {
+ return fa;
+ }
+
+ public double negateDouble(double d) {
+ return -d;
+ }
+
+ public double[] negateDoubleArray(double[] da) {
+ double[] resp = new double[da.length];
+
+ for(int i = 0; i < da.length; ++i) {
+ resp[i] = -da[i];
+ }
+ return resp;
+ }
+
+ public double[] identityDoubleArray(double[] da) {
+ return da;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceClientImpl.java
new file mode 100644
index 0000000000..b3d3c3eb3a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceClientImpl.java
@@ -0,0 +1,159 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import java.awt.Image;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.URI;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.UUID;
+
+import javax.activation.DataHandler;
+import javax.xml.datatype.Duration;
+import javax.xml.datatype.XMLGregorianCalendar;
+import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesService;
+import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesServiceClient;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of StandardTypesServiceClient.
+ * The client forwards the request to the service component and returns the response from the service component.
+ *
+ * @version $Rev$ $Date$
+ */
+@Service(StandardTypesServiceClient.class)
+public class StandardTypesServiceClientImpl implements StandardTypesServiceClient{
+
+ private StandardTypesService service;
+
+ @Reference
+ public void setStandardTypesService(StandardTypesService service) {
+ this.service = service;
+ }
+
+ public BigInteger getNewBigIntegerForward(BigInteger bi) {
+ return service.getNewBigInteger(bi);
+ }
+
+ public BigInteger[] getNewBigIntegerArrayForward(BigInteger[] bia) {
+ return service.getNewBigIntegerArray(bia);
+ }
+
+ public BigDecimal getNewBigDecimalForward(BigDecimal bd) {
+ return service.getNewBigDecimal(bd);
+ }
+
+ public BigDecimal[] getNewBigDecimalArrayForward(BigDecimal[] bda) {
+ return service.getNewBigDecimalArray(bda);
+ }
+ public Calendar getNewCalendarForward(Calendar c) {
+ return service.getNewCalendar(c);
+ }
+ public Calendar[] getNewCalendarArrayForward(Calendar[] ca) {
+ return service.getNewCalendarArray(ca);
+ }
+
+ public Date getNewDateForward(Date d) {
+ return service.getNewDate(d);
+ }
+
+ public Date[] getNewDateArrayForward(Date[] da) {
+ return service.getNewDateArray(da);
+ }
+
+ public QName getNewQNameForward(QName qname) {
+ return service.getNewQName(qname);
+ }
+
+ public QName[] getNewQNameArrayForward(QName[] qnames) {
+ return service.getNewQNameArray(qnames);
+ }
+
+ public URI getNewURIForward(URI uri) {
+ return service.getNewURI(uri);
+ }
+
+ public URI[] getNewURIArrayForward(URI[] uris) {
+ return service.getNewURIArray(uris);
+ }
+
+ public XMLGregorianCalendar getNewXMLGregorianCalendarForward(XMLGregorianCalendar xgcal) {
+ return service.getNewXMLGregorianCalendar(xgcal);
+ }
+
+ public XMLGregorianCalendar[] getNewXMLGregorianCalendarArrayForward(XMLGregorianCalendar[] xgcals) {
+ return service.getNewXMLGregorianCalendarArray(xgcals);
+ }
+
+ public Duration getNewDurationForward(Duration d) {
+ return service.getNewDuration(d);
+ }
+
+ public Duration[] getNewDurationArrayForward(Duration[] da) {
+ return service.getNewDurationArray(da);
+ }
+
+ public Object getNewObjectForward(Object obj) {
+ return service.getNewObject(obj);
+ }
+
+ public Object[] getNewObjectArrayForward(Object[] objs) {
+ return service.getNewObjectArray(objs);
+ }
+
+ public Image getNewImageForward(Image img) {
+ return service.getNewImage(img);
+ }
+
+ public Image[] getNewImageArrayForward(Image[] imgs) {
+ return service.getNewImageArray(imgs);
+ }
+
+ public DataHandler getNewDataHandlerForward(DataHandler dh) {
+ return service.getNewDataHandler(dh);
+ }
+
+ public DataHandler[] getNewDataHandlerArrayForward(DataHandler[] dha) {
+ return service.getNewDataHandlerArray(dha);
+ }
+
+
+ public Source getNewSourceForward(Source src) {
+ return service.getNewSource(src);
+ }
+
+ public Source[] getNewSourceArrayForward(Source[] srcs) {
+ return service.getNewSourceArray(srcs);
+ }
+
+ public UUID getNewUUIDForward(UUID uuid) {
+ return service.getNewUUID(uuid);
+ }
+
+ public UUID[] getNewUUIDArrayForward(UUID[] uuids) {
+ return service.getNewUUIDArray(uuids);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceImpl.java
new file mode 100644
index 0000000000..1fa525a0ee
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceImpl.java
@@ -0,0 +1,207 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import java.awt.Image;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.URI;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.UUID;
+
+import javax.activation.DataHandler;
+import javax.xml.datatype.Duration;
+import javax.xml.datatype.XMLGregorianCalendar;
+import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesService;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * An implementation of StandardTypesService.
+ *
+ * @version $Rev$ $Date$
+ */
+@Service(StandardTypesService.class)
+public class StandardTypesServiceImpl implements StandardTypesService {
+ public BigInteger getNewBigInteger(BigInteger bi) {
+ return bi.negate();
+ }
+
+ public BigInteger[] getNewBigIntegerArray(BigInteger[] bia) {
+ BigInteger[] resp = new BigInteger[bia.length];
+ for(int i = 0; i < bia.length; ++i) {
+ resp[i] = bia[i].negate();
+ }
+ return resp;
+ }
+
+ public BigDecimal getNewBigDecimal(BigDecimal bd) {
+ return bd.negate();
+ }
+
+ public BigDecimal[] getNewBigDecimalArray(BigDecimal[] bda) {
+ BigDecimal[] resp = new BigDecimal[bda.length];
+ for(int i = 0; i < bda.length; ++i) {
+ resp[i] = bda[i].negate();
+ }
+ return resp;
+ }
+
+ public Calendar getNewCalendar(Calendar c) {
+ Calendar resp = (Calendar)c.clone();
+ resp.add(Calendar.DAY_OF_MONTH, 5);
+ return resp;
+ }
+
+ public Calendar[] getNewCalendarArray(Calendar[] ca) {
+ Calendar[] resp = new Calendar[ca.length];
+ for(int i = 0; i < ca.length; ++i) {
+ resp[i] = getNewCalendar(ca[i]);
+ }
+ return resp;
+ }
+
+ public Date getNewDate(Date d) {
+ return new Date(d.getTime() + 5*24*60*60*1000);
+ }
+
+ public Date[] getNewDateArray(Date[] da) {
+ Date[] resp = new Date[da.length];
+ for(int i = 0; i < da.length; ++i) {
+ resp[i] = getNewDate(da[i]);
+ }
+ return resp;
+ }
+
+ public QName getNewQName(QName qname) {
+ return new QName(qname.getNamespaceURI()+"q", qname.getLocalPart()+"q", qname.getPrefix()+"q");
+
+ }
+
+ public QName[] getNewQNameArray(QName[] qnames) {
+ QName[] resp = new QName[qnames.length];
+ for(int i = 0; i < qnames.length; ++i) {
+ resp[i] = getNewQName(qnames[i]);
+ }
+ return resp;
+ }
+
+ public URI getNewURI(URI uri) {
+ return uri.resolve("uri");
+ }
+
+ public URI[] getNewURIArray(URI[] uris) {
+ URI[] resp = new URI[uris.length];
+ for(int i = 0; i < uris.length; ++i) {
+ resp[i] = getNewURI(uris[i]);
+ }
+ return resp;
+ }
+
+ public XMLGregorianCalendar getNewXMLGregorianCalendar(XMLGregorianCalendar xgcal) {
+ xgcal = (XMLGregorianCalendar)xgcal.clone();
+ xgcal.setDay(xgcal.getDay()+5);
+ return xgcal;
+ }
+
+ public XMLGregorianCalendar[] getNewXMLGregorianCalendarArray(XMLGregorianCalendar[] xgcals) {
+ XMLGregorianCalendar[] resp = new XMLGregorianCalendar[xgcals.length];
+ for(int i = 0; i < xgcals.length; ++i) {
+ resp[i] = getNewXMLGregorianCalendar(xgcals[i]);
+ }
+ return resp;
+ }
+
+ public Duration getNewDuration(Duration d) {
+ return d.negate();
+ }
+
+ public Duration[] getNewDurationArray(Duration[] da) {
+ Duration[] resp = new Duration[da.length];
+ for(int i = 0; i < da.length; ++i) {
+ resp[i] = da[i].negate();
+ }
+ return resp;
+ }
+
+ public Object getNewObject(Object obj) {
+ return StandardTypesTransformer.getNewObject(obj);
+ }
+
+ public Object[] getNewObjectArray(Object[] objs) {
+ Object[] resp = new Object[objs.length];
+ for(int i = 0; i < objs.length; ++i) {
+ resp[i] = getNewObject(objs[i]);
+ }
+ return resp;
+ }
+
+ public Image getNewImage(Image img) {
+ return StandardTypesTransformer.getNewImage(img);
+ }
+
+ public Image[] getNewImageArray(Image[] imgs) {
+ Image[] resp = new Image[imgs.length];
+ for(int i = 0; i < imgs.length; ++i) {
+ resp[i] = getNewImage(imgs[i]);
+ }
+ return resp;
+ }
+
+ public DataHandler getNewDataHandler(DataHandler dh) {
+ // FIXME: transform the input
+ return dh;
+ }
+
+ public DataHandler[] getNewDataHandlerArray(DataHandler[] dha) {
+ DataHandler[] resp = new DataHandler[dha.length];
+ for(int i = 0; i < dha.length; ++i) {
+ resp[i] = dha[i];
+ }
+ return resp;
+ }
+
+ public Source getNewSource(Source src) {
+ return StandardTypesTransformer.getNewSource(src);
+ }
+
+ public Source[] getNewSourceArray(Source[] srcs) {
+ Source[] resp = new Source[srcs.length];
+ for(int i = 0; i < srcs.length; ++i) {
+ resp[i] = getNewSource(srcs[i]);
+ }
+ return resp;
+ }
+
+ public UUID getNewUUID(UUID uuid) {
+ return UUID.fromString(uuid.toString()+"AAA");
+ }
+
+ public UUID[] getNewUUIDArray(UUID[] uuids) {
+ UUID[] resp = new UUID[uuids.length];
+ for(int i = 0; i < uuids.length; ++i) {
+ resp[i] = getNewUUID(uuids[i]);
+ }
+ return resp;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesTransformer.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesTransformer.java
new file mode 100644
index 0000000000..9d851455da
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesTransformer.java
@@ -0,0 +1,142 @@
+/*
+ * 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.itest.databindings.jaxb.impl;
+
+import java.awt.Image;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.CharArrayReader;
+import java.io.CharArrayWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.transform.stream.StreamSource;
+
+import org.xml.sax.InputSource;
+
+/**
+ * StandardTypesTransformer class that provide for transforming input provided to StandardTypesService methods.
+ *
+ * @version $Rev$ $Date$
+ */
+public class StandardTypesTransformer {
+
+ public static Object getNewObject(Object obj) {
+ if(obj instanceof String) {
+ return "Hello "+obj;
+ } else if(obj instanceof Integer) {
+ return new Integer(-((Integer)obj).intValue());
+ } else if(obj instanceof Double) {
+ return new Double(-((Double)obj).doubleValue());
+ }
+
+ return obj;
+ }
+
+ /**
+ * Returns a copy of the source object if the input is DOMSource, SAXSource or StreamSource.
+ * Returns the input object as is for other types.
+ */
+ public static Source getNewSource(Source src) {
+ Source ret = null;
+ if(src instanceof DOMSource) {
+ DOMSource dsrc = (DOMSource)src;
+ ret = new DOMSource(dsrc.getNode() != null ? dsrc.getNode().cloneNode(true) : null);
+ } else if(src instanceof SAXSource) {
+ SAXSource ssrc = (SAXSource)src;
+ if(ssrc.getInputSource().getByteStream() != null) {
+ InputStream inp = ssrc.getInputSource().getByteStream();
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ int b;
+ try {
+ while((b = inp.read()) != -1) {
+ bout.write(b);
+ }
+ } catch (IOException ignored) {
+ }
+ try { bout.close();} catch (IOException ignored) {}
+ try { inp.reset();} catch (IOException ignored) {}
+ ret = new SAXSource(new InputSource(new ByteArrayInputStream(bout.toByteArray())));
+ } else if(ssrc.getInputSource().getCharacterStream() != null) {
+ Reader rdr = ssrc.getInputSource().getCharacterStream();
+ CharArrayWriter caw = new CharArrayWriter();
+ try {
+ int c;
+ while((c = rdr.read()) != -1) {
+ caw.append((char)c);
+ }
+ } catch (IOException ignored) {
+ }
+ caw.close();
+ try{ rdr.reset();} catch(IOException ignored) {}
+ ret = new SAXSource(new InputSource(new CharArrayReader(caw.toCharArray())));
+ } else {
+ ret = new SAXSource();
+ }
+ } else if(src instanceof StreamSource) {
+ StreamSource ssrc = (StreamSource)src;
+ if(ssrc.getInputStream() != null) {
+ InputStream inp = ssrc.getInputStream();
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ int b;
+ try {
+ while((b = inp.read()) != -1) {
+ bout.write(b);
+ }
+ } catch (IOException ignored) {
+ }
+ try { bout.close();} catch (IOException ignored) {}
+ try { inp.reset();} catch (IOException ignored) {}
+ ret = new StreamSource(new ByteArrayInputStream(bout.toByteArray()));
+ } else if(ssrc.getReader() != null) {
+ Reader rdr = ssrc.getReader();
+ CharArrayWriter caw = new CharArrayWriter();
+ try {
+ int c;
+ while((c = rdr.read()) != -1) {
+ caw.append((char)c);
+ }
+ } catch (IOException ignored) {
+ }
+ caw.close();
+ try{ rdr.reset();} catch(IOException ignored) {}
+ ret = new StreamSource(new CharArrayReader(caw.toCharArray()));
+ } else {
+ ret = new StreamSource();
+ }
+ }
+
+ if(ret != null) {
+ ret.setSystemId(src.getSystemId());
+ } else {
+ ret = src;
+ }
+ return ret;
+ }
+
+ public static Image getNewImage(Image arg) {
+ arg.getGraphics().drawOval(2, 2, 7, 7);
+ return arg;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/hello-service.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/hello-service.wsdl
new file mode 100644
index 0000000000..a76e5c5802
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/hello-service.wsdl
@@ -0,0 +1,372 @@
+<?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.
+-->
+
+<!-- $Rev: 678733 $ $Date: 2008-07-22 17:48:58 +0530 (Tue, 22 Jul 2008) $ -->
+
+<wsdl:definitions name="HelloService"
+ targetNamespace="http://jaxb.databindings.itest.sca.tuscany.apache.org/"
+ xmlns:tns="http://jaxb.databindings.itest.sca.tuscany.apache.org/"
+ xmlns:soap11="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <wsdl:types>
+ <!-- <xs:schema targetNamespace="http://util.java/" -->
+ <xs:schema targetNamespace=""
+ version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:complexType name="arrayList">
+ <xs:complexContent>
+ <xs:extension base="abstractList">
+ <xs:sequence />
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType abstract="true" name="abstractList">
+ <xs:complexContent>
+ <xs:extension base="abstractCollection">
+ <xs:sequence />
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType abstract="true" name="abstractCollection">
+ <xs:sequence />
+ </xs:complexType>
+ <xs:complexType name="hashMap">
+ <xs:complexContent>
+ <xs:extension base="abstractMap">
+ <xs:sequence />
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType abstract="true" name="abstractMap">
+ <xs:sequence />
+ </xs:complexType>
+ </xs:schema>
+ <xs:schema targetNamespace="http://jaxb.dev.java.net/array"
+ version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:complexType final="#all" name="stringArray">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="item" nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ <xs:schema attributeFormDefault="qualified"
+ elementFormDefault="unqualified"
+ targetNamespace="http://jaxb.databindings.itest.sca.tuscany.apache.org/"
+ xmlns:ns0="http://util.java/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="getGreetings">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsArray">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="arg0" nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsArrayResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="return" nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsList">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ nillable="true" type="xs:anyType" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsListResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="xs:anyType" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsArrayList">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ nillable="true" type="ns0:arrayList" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsArrayListResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="ns0:arrayList" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsMap">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ nillable="true" type="xs:anyType" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsMapResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="xs:anyType" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsHashMap">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ nillable="true" type="ns0:hashMap" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsHashMapResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="ns0:hashMap" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsVarArgs">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="arg0" nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getGreetingsVarArgsResponse">
+ <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="getGreetings">
+ <wsdl:part name="getGreetings" element="tns:getGreetings">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part name="getGreetingsResponse"
+ element="tns:getGreetingsResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getGreetingsArray">
+ <wsdl:part name="getGreetingsArray"
+ element="tns:getGreetingsArray">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getGreetingsArrayResponse">
+ <wsdl:part name="getGreetingsArrayResponse"
+ element="tns:getGreetingsArrayResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getGreetingsList">
+ <wsdl:part name="getGreetingsList"
+ element="tns:getGreetingsList">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getGreetingsListResponse">
+ <wsdl:part name="getGreetingsListResponse"
+ element="tns:getGreetingsListResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getGreetingsArrayList">
+ <wsdl:part name="getGreetingsArrayList"
+ element="tns:getGreetingsArrayList">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getGreetingsArrayListResponse">
+ <wsdl:part name="getGreetingsArrayListResponse"
+ element="tns:getGreetingsArrayListResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getGreetingsMap">
+ <wsdl:part name="getGreetingsMap"
+ element="tns:getGreetingsMap">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getGreetingsMapResponse">
+ <wsdl:part name="getGreetingsMapResponse"
+ element="tns:getGreetingsMapResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getGreetingsHashMap">
+ <wsdl:part name="getGreetingsHashMap"
+ element="tns:getGreetingsHashMap">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getGreetingsHashMapResponse">
+ <wsdl:part name="getGreetingsHashMapResponse"
+ element="tns:getGreetingsHashMapResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getGreetingsVarArgs">
+ <wsdl:part name="getGreetingsVarArgs"
+ element="tns:getGreetingsVarArgs">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getGreetingsVarArgsResponse">
+ <wsdl:part name="getGreetingsVarArgsResponse"
+ element="tns:getGreetingsVarArgsResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="HelloService">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetings"></wsdl:input>
+ <wsdl:output message="tns:getGreetingsResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getGreetingsArray">
+ <wsdl:input message="tns:getGreetingsArray"></wsdl:input>
+ <wsdl:output message="tns:getGreetingsArrayResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getGreetingsList">
+ <wsdl:input message="tns:getGreetingsList"></wsdl:input>
+ <wsdl:output message="tns:getGreetingsListResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getGreetingsArrayList">
+ <wsdl:input message="tns:getGreetingsArrayList">
+ </wsdl:input>
+ <wsdl:output message="tns:getGreetingsArrayListResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getGreetingsMap">
+ <wsdl:input message="tns:getGreetingsMap">
+ </wsdl:input>
+ <wsdl:output message="tns:getGreetingsMapResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getGreetingsHashMap">
+ <wsdl:input message="tns:getGreetingsHashMap"></wsdl:input>
+ <wsdl:output message="tns:getGreetingsHashMapResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getGreetingsVarArgs">
+ <wsdl:input message="tns:getGreetingsVarArgs">
+ </wsdl:input>
+ <wsdl:output message="tns:getGreetingsVarArgsResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="HelloServiceBinding" type="tns:HelloService">
+ <soap11:binding style="document"
+ transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="getGreetings">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getGreetingsArray">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getGreetingsList">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getGreetingsArrayList">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getGreetingsMap">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getGreetingsHashMap">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getGreetingsVarArgs">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="HelloServiceService">
+ <wsdl:port name="HelloServicePort"
+ binding="tns:HelloServiceBinding">
+ <soap11:address location="http://localhost:8085/hs-ep" />
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/helloservice.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/helloservice.composite
new file mode 100644
index 0000000000..f62689c8b8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/helloservice.composite
@@ -0,0 +1,80 @@
+<?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.
+-->
+
+<!-- $Rev: 741544 $ $Date: 2009-02-06 17:16:22 +0530 (Fri, 06 Feb 2009) $ -->
+
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
+ targetNamespace="http://jaxb.databindings.itest.sca.tuscany.apache.org/"
+ name="HelloService">
+
+ <!-- Clients to test the service -->
+ <!-- A HelloServiceClient component that uses WS binding to invoke HelloService service.
+ The service component uses interface.wsdl on the service element.
+ This client component uses interface.wsdl on the reference element. -->
+ <component name="HelloServiceClientW2WComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.HelloServiceClientImpl" />
+ <reference name="helloService">
+ <interface.wsdl interface="http://jaxb.databindings.itest.sca.tuscany.apache.org/#wsdl.interface(HelloService)"/>
+ <binding.ws uri="http://localhost:8085/hs-ep-w"/>
+ </reference>
+ </component>
+
+ <!-- A HelloServiceClient component that uses WS binding to invoke HelloService service.
+ The service component uses interface.wsdl on the service element.
+ This client component uses interface.java on the reference element. -->
+ <component name="HelloServiceClientJ2WComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.HelloServiceClientImpl" />
+ <reference name="helloService">
+ <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.HelloService"/>
+ <binding.ws uri="http://localhost:8085/hs-ep-w"/>
+ </reference>
+ </component>
+
+ <!-- A HelloServiceClient component that uses WS binding to invoke HelloService service.
+ The service component uses interface.wsdl on the service element.
+ This client component uses interface.java on the reference element. -->
+ <component name="HelloServiceClientW2JComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.HelloServiceClientImpl" />
+ <reference name="helloService">
+ <interface.wsdl interface="http://jaxb.databindings.itest.sca.tuscany.apache.org/#wsdl.interface(HelloService)"/>
+ <binding.ws uri="http://localhost:8085/hs-ep-j"/>
+ </reference>
+ </component>
+
+ <!-- Components used to implement the services -->
+ <!-- A HelloService component that uses interface.wsdl -->
+ <component name="HelloServiceWSDLComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.HelloServiceImpl"/>
+ <service name="HelloService">
+ <interface.wsdl interface="http://jaxb.databindings.itest.sca.tuscany.apache.org/#wsdl.interface(HelloService)"/>
+ <binding.ws uri="http://localhost:8085/hs-ep-w"/>
+ </service>
+ </component>
+
+ <!-- A HelloService component that uses interface.java -->
+ <component name="HelloServiceJavaComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.HelloServiceImpl"/>
+ <service name="HelloService">
+ <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.HelloService"/>
+ <binding.ws uri="http://localhost:8085/hs-ep-j"/>
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/primitives-service.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/primitives-service.wsdl
new file mode 100644
index 0000000000..432c3115bd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/primitives-service.wsdl
@@ -0,0 +1,927 @@
+<?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.
+-->
+
+<!-- $Rev: 673594 $ $Date: 2008-07-03 11:20:39 +0530 (Thu, 03 Jul 2008) $ -->
+
+<wsdl:definitions name="PrimitivesService"
+ targetNamespace="http://jaxb.databindings.itest.sca.tuscany.apache.org/"
+ xmlns:tns="http://jaxb.databindings.itest.sca.tuscany.apache.org/"
+ xmlns:soap11="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <wsdl:types>
+ <xs:schema targetNamespace="http://jaxb.dev.java.net/array"
+ version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:complexType final="#all" name="shortArray">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="item" nillable="true" type="xs:short" />
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType final="#all" name="intArray">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="item" nillable="true" type="xs:int" />
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType final="#all" name="floatArray">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="item" nillable="true" type="xs:float" />
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType final="#all" name="doubleArray">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="item" nillable="true" type="xs:double" />
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType final="#all" name="longArray">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="item" nillable="true" type="xs:long" />
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType final="#all" name="booleanArray">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="item" nillable="true" type="xs:boolean" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ <xs:schema attributeFormDefault="qualified"
+ elementFormDefault="unqualified"
+ targetNamespace="http://jaxb.databindings.itest.sca.tuscany.apache.org/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="negateLongArrayResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="return" nillable="true" type="xs:long" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="identityByteArrayResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="xs:base64Binary" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="negateDoubleArray">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="arg0" nillable="true" type="xs:double" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="identityFloatArray">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="arg0" nillable="true" type="xs:float" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="negateLong">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ type="xs:long" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="identityIntArray">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="arg0" nillable="true" type="xs:int" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="negateIntResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ type="xs:int" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="negateLongArray">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="arg0" nillable="true" type="xs:long" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="negateInt">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ type="xs:int" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="negateFloatArrayResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="return" nillable="true" type="xs:float" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="identityDoubleArrayResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="return" nillable="true" type="xs:double" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="negateDouble">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ type="xs:double" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="identityByteArray">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ nillable="true" type="xs:base64Binary" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="negateByte">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ type="xs:byte" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="identityLongArrayResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="return" nillable="true" type="xs:long" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="negateDoubleResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ type="xs:double" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="identityFloatArrayResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="return" nillable="true" type="xs:float" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="negateFloat">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ type="xs:float" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="negateShortArrayResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="return" nillable="true" type="xs:short" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="negateByteArrayResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="xs:base64Binary" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="negateLongResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ type="xs:long" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="negateShortArray">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="arg0" nillable="true" type="xs:short" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="negateFloatArray">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="arg0" nillable="true" type="xs:float" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="negateBoolean">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ type="xs:boolean" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="negateShort">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ type="xs:short" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="negateByteArray">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ nillable="true" type="xs:base64Binary" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="identityBooleanArray">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="arg0" nillable="true" type="xs:boolean" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="identityShortArrayResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="return" nillable="true" type="xs:short" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="negateBooleanResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ type="xs:boolean" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="negateFloatResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ type="xs:float" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="identityBooleanArrayResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="return" nillable="true" type="xs:boolean" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="negateBooleanArray">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="arg0" nillable="true" type="xs:boolean" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="negateDoubleArrayResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="return" nillable="true" type="xs:double" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="identityDoubleArray">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="arg0" nillable="true" type="xs:double" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="negateIntArrayResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="return" nillable="true" type="xs:int" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="identityIntArrayResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="return" nillable="true" type="xs:int" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="negateByteResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ type="xs:byte" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="negateBooleanArrayResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="return" nillable="true" type="xs:boolean" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="negateShortResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ type="xs:short" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="negateIntArray">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="arg0" nillable="true" type="xs:int" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="identityShortArray">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="arg0" nillable="true" type="xs:short" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="identityLongArray">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="arg0" nillable="true" type="xs:long" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:schema>
+ </wsdl:types>
+
+ <wsdl:message name="negateLongArrayResponse">
+ <wsdl:part name="negateLongArrayResponse"
+ element="tns:negateLongArrayResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="identityByteArrayResponse">
+ <wsdl:part name="identityByteArrayResponse"
+ element="tns:identityByteArrayResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="negateDoubleArray">
+ <wsdl:part name="negateDoubleArray"
+ element="tns:negateDoubleArray">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="identityFloatArray">
+ <wsdl:part name="identityFloatArray"
+ element="tns:identityFloatArray">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="negateLong">
+ <wsdl:part name="negateLong" element="tns:negateLong">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="identityIntArray">
+ <wsdl:part name="identityIntArray"
+ element="tns:identityIntArray">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="negateIntResponse">
+ <wsdl:part name="negateIntResponse"
+ element="tns:negateIntResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="negateLongArray">
+ <wsdl:part name="negateLongArray"
+ element="tns:negateLongArray">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="negateInt">
+ <wsdl:part name="negateInt" element="tns:negateInt"></wsdl:part>
+ </wsdl:message>
+
+ <wsdl:message name="negateFloatArrayResponse">
+ <wsdl:part name="negateFloatArrayResponse"
+ element="tns:negateFloatArrayResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="identityDoubleArrayResponse">
+ <wsdl:part name="identityDoubleArrayResponse"
+ element="tns:identityDoubleArrayResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="negateDouble">
+ <wsdl:part name="negateDouble" element="tns:negateDouble">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="identityByteArray">
+ <wsdl:part name="identityByteArray"
+ element="tns:identityByteArray">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="negateByte">
+ <wsdl:part name="negateByte" element="tns:negateByte">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="identityLongArrayResponse">
+ <wsdl:part name="identityLongArrayResponse"
+ element="tns:identityLongArrayResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="negateDoubleResponse">
+ <wsdl:part name="negateDoubleResponse"
+ element="tns:negateDoubleResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="identityFloatArrayResponse">
+ <wsdl:part name="identityFloatArrayResponse"
+ element="tns:identityFloatArrayResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="negateFloat">
+ <wsdl:part name="negateFloat" element="tns:negateFloat">
+ </wsdl:part>
+ </wsdl:message>
+
+ <wsdl:message name="negateShortArrayResponse">
+ <wsdl:part name="negateShortArrayResponse"
+ element="tns:negateShortArrayResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="negateByteArrayResponse">
+ <wsdl:part name="negateByteArrayResponse"
+ element="tns:negateByteArrayResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="negateLongResponse">
+ <wsdl:part name="negateLongResponse"
+ element="tns:negateLongResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="negateShortArray">
+ <wsdl:part name="negateShortArray"
+ element="tns:negateShortArray">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="negateFloatArray">
+ <wsdl:part name="negateFloatArray"
+ element="tns:negateFloatArray">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="negateBoolean">
+ <wsdl:part name="negateBoolean" element="tns:negateBoolean">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="negateShort">
+ <wsdl:part name="negateShort" element="tns:negateShort">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="negateByteArray">
+ <wsdl:part name="negateByteArray"
+ element="tns:negateByteArray">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="identityBooleanArray">
+ <wsdl:part name="identityBooleanArray"
+ element="tns:identityBooleanArray">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="identityShortArrayResponse">
+ <wsdl:part name="identityShortArrayResponse"
+ element="tns:identityShortArrayResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="negateBooleanResponse">
+ <wsdl:part name="negateBooleanResponse"
+ element="tns:negateBooleanResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="negateFloatResponse">
+ <wsdl:part name="negateFloatResponse"
+ element="tns:negateFloatResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="identityBooleanArrayResponse">
+ <wsdl:part name="identityBooleanArrayResponse"
+ element="tns:identityBooleanArrayResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="negateBooleanArray">
+ <wsdl:part name="negateBooleanArray"
+ element="tns:negateBooleanArray">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="negateDoubleArrayResponse">
+ <wsdl:part name="negateDoubleArrayResponse"
+ element="tns:negateDoubleArrayResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="identityDoubleArray">
+ <wsdl:part name="identityDoubleArray"
+ element="tns:identityDoubleArray">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="negateIntArrayResponse">
+ <wsdl:part name="negateIntArrayResponse"
+ element="tns:negateIntArrayResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="identityIntArrayResponse">
+ <wsdl:part name="identityIntArrayResponse"
+ element="tns:identityIntArrayResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="negateByteResponse">
+ <wsdl:part name="negateByteResponse"
+ element="tns:negateByteResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="negateBooleanArrayResponse">
+ <wsdl:part name="negateBooleanArrayResponse"
+ element="tns:negateBooleanArrayResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="negateShortResponse">
+ <wsdl:part name="negateShortResponse"
+ element="tns:negateShortResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="negateIntArray">
+ <wsdl:part name="negateIntArray" element="tns:negateIntArray">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="identityShortArray">
+ <wsdl:part name="identityShortArray"
+ element="tns:identityShortArray">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="identityLongArray">
+ <wsdl:part name="identityLongArray"
+ element="tns:identityLongArray">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="PrimitivesService">
+ <wsdl:operation name="negateBoolean">
+ <wsdl:input message="tns:negateBoolean">
+ </wsdl:input>
+ <wsdl:output message="tns:negateBooleanResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="negateBooleanArray">
+ <wsdl:input message="tns:negateBooleanArray"></wsdl:input>
+ <wsdl:output message="tns:negateBooleanArrayResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="identityBooleanArray">
+ <wsdl:input message="tns:identityBooleanArray"></wsdl:input>
+ <wsdl:output message="tns:identityBooleanArrayResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="negateByte">
+ <wsdl:input message="tns:negateByte">
+ </wsdl:input>
+ <wsdl:output message="tns:negateByteResponse"></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="negateByteArray">
+ <wsdl:input message="tns:negateByteArray"></wsdl:input>
+ <wsdl:output message="tns:negateByteArrayResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="identityByteArray">
+ <wsdl:input message="tns:identityByteArray"></wsdl:input>
+ <wsdl:output message="tns:identityByteArrayResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="negateShort">
+ <wsdl:input message="tns:negateShort">
+ </wsdl:input>
+ <wsdl:output message="tns:negateShortResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="negateShortArray">
+ <wsdl:input message="tns:negateShortArray"></wsdl:input>
+ <wsdl:output message="tns:negateShortArrayResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="identityShortArray">
+ <wsdl:input message="tns:identityShortArray"></wsdl:input>
+ <wsdl:output message="tns:identityShortArrayResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="negateInt">
+ <wsdl:input message="tns:negateInt">
+ </wsdl:input>
+ <wsdl:output message="tns:negateIntResponse"></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="negateIntArray">
+ <wsdl:input message="tns:negateIntArray"></wsdl:input>
+ <wsdl:output message="tns:negateIntArrayResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="identityIntArray">
+ <wsdl:input message="tns:identityIntArray"></wsdl:input>
+ <wsdl:output message="tns:identityIntArrayResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="negateLong">
+ <wsdl:input message="tns:negateLong">
+ </wsdl:input>
+ <wsdl:output message="tns:negateLongResponse"></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="negateLongArray">
+ <wsdl:input message="tns:negateLongArray"></wsdl:input>
+ <wsdl:output message="tns:negateLongArrayResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="identityLongArray">
+ <wsdl:input message="tns:identityLongArray"></wsdl:input>
+ <wsdl:output message="tns:identityLongArrayResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="negateFloat">
+ <wsdl:input message="tns:negateFloat">
+ </wsdl:input>
+ <wsdl:output message="tns:negateFloatResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="negateFloatArray">
+ <wsdl:input message="tns:negateFloatArray"></wsdl:input>
+ <wsdl:output message="tns:negateFloatArrayResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="identityFloatArray">
+ <wsdl:input message="tns:identityFloatArray"></wsdl:input>
+ <wsdl:output message="tns:identityFloatArrayResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="negateDouble">
+ <wsdl:input message="tns:negateDouble">
+ </wsdl:input>
+ <wsdl:output message="tns:negateDoubleResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="negateDoubleArray">
+ <wsdl:input message="tns:negateDoubleArray"></wsdl:input>
+ <wsdl:output message="tns:negateDoubleArrayResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="identityDoubleArray">
+ <wsdl:input message="tns:identityDoubleArray"></wsdl:input>
+ <wsdl:output message="tns:identityDoubleArrayResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="PrimitivesServiceBinding"
+ type="tns:PrimitivesService">
+ <soap11:binding style="document"
+ transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="negateBoolean">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="negateBooleanArray">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="identityBooleanArray">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="negateByte">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="negateByteArray">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="identityByteArray">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="negateShort">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="negateShortArray">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="identityShortArray">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="negateInt">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="negateIntArray">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="identityIntArray">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="negateLong">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="negateLongArray">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="identityLongArray">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="negateFloat">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="negateFloatArray">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="identityFloatArray">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="negateDouble">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="negateDoubleArray">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="identityDoubleArray">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="PrimitivesServiceService">
+ <wsdl:port name="PrimitivesServicePort"
+ binding="tns:PrimitivesServiceBinding">
+ <soap11:address location="http://localhost:8085/ps-ep" />
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/primitivesservice.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/primitivesservice.composite
new file mode 100644
index 0000000000..9b08c334cc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/primitivesservice.composite
@@ -0,0 +1,80 @@
+<?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.
+-->
+
+<!-- $Rev: 741544 $ $Date: 2009-02-06 17:16:22 +0530 (Fri, 06 Feb 2009) $ -->
+
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://jaxb.databindings.itest.sca.tuscany.apache.org/"
+ xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
+ name="PrimitivesService">
+
+ <!-- Clients to test the service -->
+ <!-- A PrimitivesServiceClient component that uses WS binding to invoke PrimitivesService.
+ The service component uses interface.wsdl on the service element.
+ This client component uses interface.wsdl on the reference element. -->
+ <component name="PrimitivesServiceClientW2WComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.PrimitivesServiceClientImpl" />
+ <reference name="primitivesService">
+ <interface.wsdl interface="http://jaxb.databindings.itest.sca.tuscany.apache.org/#wsdl.interface(PrimitivesService)"/>
+ <binding.ws uri="http://localhost:8085/ps-ep-w"/>
+ </reference>
+ </component>
+
+ <!-- A PrimitivesServiceClient component that uses WS binding to invoke PrimitivesService.
+ The service component uses interface.wsdl on the service element.
+ This client component uses interface.java on the reference element. -->
+ <component name="PrimitivesServiceClientJ2WComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.PrimitivesServiceClientImpl" />
+ <reference name="primitivesService">
+ <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesService"/>
+ <binding.ws uri="http://localhost:8085/ps-ep-w"/>
+ </reference>
+ </component>
+
+ <!-- A PrimitivesServiceClient component that uses WS binding to invoke PrimitivesService.
+ The service component uses interface.java on the service element.
+ This client component uses interface.wsdl on the reference element. -->
+ <component name="PrimitivesServiceClientW2JComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.PrimitivesServiceClientImpl" />
+ <reference name="primitivesService">
+ <interface.wsdl interface="http://jaxb.databindings.itest.sca.tuscany.apache.org/#wsdl.interface(PrimitivesService)"/>
+ <binding.ws uri="http://localhost:8085/ps-ep-j"/>
+ </reference>
+ </component>
+
+ <!-- Components used to implement the services -->
+ <!-- A PrimitivesService component that uses interface.java -->
+ <component name="PrimitivesServiceJavaComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.PrimitivesServiceImpl"/>
+ <service name="PrimitivesService">
+ <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesService"/>
+ <binding.ws uri="http://localhost:8085/ps-ep-j"/>
+ </service>
+ </component>
+
+ <!-- A PrimitivesService component that uses interface.wsdl -->
+ <component name="PrimitivesServiceWSDLComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.PrimitivesServiceImpl"/>
+ <service name="PrimitivesService">
+ <interface.wsdl interface="http://jaxb.databindings.itest.sca.tuscany.apache.org/#wsdl.interface(PrimitivesService)"/>
+ <binding.ws uri="http://localhost:8085/ps-ep-w"/>
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/standard-types-service.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/standard-types-service.composite
new file mode 100644
index 0000000000..f9ac98d5bc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/standard-types-service.composite
@@ -0,0 +1,80 @@
+<?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.
+-->
+
+<!-- $Rev: 741544 $ $Date: 2009-02-06 17:16:22 +0530 (Fri, 06 Feb 2009) $ -->
+
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://jaxb.databindings.itest.sca.tuscany.apache.org/"
+ xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
+ name="StandardTypesService">
+
+ <!-- Clients to test the service -->
+ <!-- A StandardTypesServiceClient component that uses WS binding to invoke StandardTypesService.
+ The service component uses interface.wsdl on the service element.
+ This client component uses interface.wsdl on the reference element. -->
+ <component name="StandardTypesServiceClientW2WComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.StandardTypesServiceClientImpl" />
+ <reference name="standardTypesService">
+ <interface.wsdl interface="http://jaxb.databindings.itest.sca.tuscany.apache.org/#wsdl.interface(StandardTypesService)"/>
+ <binding.ws uri="http://localhost:8085/sts-ep-w"/>
+ </reference>
+ </component>
+
+ <!-- A StandardTypesServiceClient component that uses WS binding to invoke StandardTypesService.
+ The service component uses interface.wsdl on the service element.
+ This client component uses interface.java on the reference element. -->
+ <component name="StandardTypesServiceClientJ2WComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.StandardTypesServiceClientImpl" />
+ <reference name="standardTypesService">
+ <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesService"/>
+ <binding.ws uri="http://localhost:8085/sts-ep-w"/>
+ </reference>
+ </component>
+
+ <!-- A StandardTypesServiceClient component that uses WS binding to invoke StandardTypesService.
+ The service component uses interface.java on the service element.
+ This client component uses interface.wsdl on the reference element. -->
+ <component name="StandardTypesServiceClientW2JComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.StandardTypesServiceClientImpl" />
+ <reference name="standardTypesService">
+ <interface.wsdl interface="http://jaxb.databindings.itest.sca.tuscany.apache.org/#wsdl.interface(StandardTypesService)"/>
+ <binding.ws uri="http://localhost:8085/sts-ep-j"/>
+ </reference>
+ </component>
+
+ <!-- Components used to implement the services -->
+ <!-- A StandardTypesService component. -->
+ <component name="StandardTypesServiceJavaComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.StandardTypesServiceImpl"/>
+ <service name="StandardTypesService">
+ <interface.java interface="org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesService"/>
+ <binding.ws uri="http://localhost:8085/sts-ep-j"/>
+ </service>
+ </component>
+
+ <!-- A StandardTypesService component. -->
+ <component name="StandardTypesServiceWSDLComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.databindings.jaxb.impl.StandardTypesServiceImpl"/>
+ <service name="StandardTypesService">
+ <interface.wsdl interface="http://jaxb.databindings.itest.sca.tuscany.apache.org/#wsdl.interface(StandardTypesService)"/>
+ <binding.ws uri="http://localhost:8085/sts-ep-w"/>
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/standard-types-service.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/standard-types-service.wsdl
new file mode 100644
index 0000000000..219497e2c1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/standard-types-service.wsdl
@@ -0,0 +1,1155 @@
+<?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.
+-->
+
+<!-- $Rev: 673585 $ $Date: 2008-07-03 10:42:18 +0530 (Thu, 03 Jul 2008) $ -->
+
+<wsdl:definitions name="StandardTypesService"
+ targetNamespace="http://jaxb.databindings.itest.sca.tuscany.apache.org/"
+ xmlns:tns="http://jaxb.databindings.itest.sca.tuscany.apache.org/"
+ xmlns:soap11="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <wsdl:types>
+ <xs:schema targetNamespace="http://jaxb.dev.java.net/array"
+ version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:complexType final="#all" name="anyTypeArray">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="item" nillable="true" type="xs:anyType" />
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType final="#all" name="base64BinaryArray">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="item" nillable="true" type="xs:base64Binary" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ <xs:schema targetNamespace="http://jaxb.dev.java.net/array"
+ version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:complexType final="#all" name="dateTimeArray">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="item" nillable="true" type="xs:dateTime" />
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType final="#all" name="durationArray">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="item" nillable="true" type="xs:duration" />
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType final="#all" name="integerArray">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="item" nillable="true" type="xs:integer" />
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType final="#all" name="anySimpleTypeArray">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="item" nillable="true" type="xs:anySimpleType" />
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType final="#all" name="QNameArray">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="item" nillable="true" type="xs:QName" />
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType final="#all" name="decimalArray">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="item" nillable="true" type="xs:decimal" />
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType final="#all" name="base64BinaryArray">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="item" nillable="true" type="xs:base64Binary" />
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType final="#all" name="stringArray">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="item" nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ <xs:schema attributeFormDefault="qualified"
+ elementFormDefault="unqualified"
+ targetNamespace="http://jaxb.databindings.itest.sca.tuscany.apache.org/"
+ xmlns:ns0="http://activation.javax/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="getNewBigDecimalArray">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="arg0" nillable="true" type="xs:decimal" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewImageArrayResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="return" nillable="true" type="xs:base64Binary" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewBigDecimal">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ nillable="true" type="xs:decimal" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewURIArray">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="arg0" nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewObjectArray">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="arg0" nillable="true" type="xs:anyType" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewDataHandler">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ nillable="true" type="xs:base64Binary" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewDateResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="xs:dateTime" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewBigInteger">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ nillable="true" type="xs:integer" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewDateArrayResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="return" nillable="true" type="xs:dateTime" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewBigIntegerArray">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="arg0" nillable="true" type="xs:integer" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewQNameArrayResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="return" nillable="true" type="xs:QName" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewURIResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewUUIDArrayResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="return" nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewCalendarArrayResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="return" nillable="true" type="xs:dateTime" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewXMLGregorianCalendarArray">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="arg0" nillable="true" type="xs:anySimpleType" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewCalendarResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="xs:dateTime" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewCalendar">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ nillable="true" type="xs:dateTime" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewCalendarArray">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="arg0" nillable="true" type="xs:dateTime" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewImageArray">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="arg0" nillable="true" type="xs:base64Binary" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewObjectResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="xs:anyType" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewDurationArray">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="arg0" nillable="true" type="xs:duration" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element
+ name="getNewXMLGregorianCalendarArrayResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="return" nillable="true" type="xs:anySimpleType" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewSource">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ nillable="true" type="xs:base64Binary" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewObjectArrayResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="return" nillable="true" type="xs:anyType" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewUUIDResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewBigIntegerResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="xs:integer" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewQNameArray">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="arg0" nillable="true" type="xs:QName" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewUUIDArray">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="arg0" nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewBigDecimalResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="xs:decimal" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewDateArray">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="arg0" nillable="true" type="xs:dateTime" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewURIArrayResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="return" nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewDurationArrayResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="return" nillable="true" type="xs:duration" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewObject">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ nillable="true" type="xs:anyType" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewDataHandlerResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="xs:base64Binary" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewQName">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ nillable="true" type="xs:QName" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewDate">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ nillable="true" type="xs:dateTime" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewUUID">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewXMLGregorianCalendarResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="xs:anySimpleType" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewBigIntegerArrayResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="return" nillable="true" type="xs:integer" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewSourceArray">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="arg0" nillable="true" type="xs:base64Binary" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewImage">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ nillable="true" type="xs:base64Binary" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewSourceArrayResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="return" nillable="true" type="xs:base64Binary" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewXMLGregorianCalendar">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ nillable="true" type="xs:anySimpleType" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewQNameResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="xs:QName" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewDataHandlerArrayResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="return" nillable="true" type="xs:base64Binary" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewBigDecimalArrayResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="return" nillable="true" type="xs:decimal" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewDuration">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ nillable="true" type="xs:duration" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewDataHandlerArray">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
+ name="arg0" nillable="true" type="xs:base64Binary" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewImageResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="xs:base64Binary" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewSourceResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="xs:base64Binary" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewDurationResponse">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
+ nillable="true" type="xs:duration" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="getNewURI">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
+ nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:schema>
+ </wsdl:types>
+ <wsdl:message name="getNewBigDecimalArray">
+ <wsdl:part name="getNewBigDecimalArray"
+ element="tns:getNewBigDecimalArray">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewImageArrayResponse">
+
+ <wsdl:part name="getNewImageArrayResponse"
+ element="tns:getNewImageArrayResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewBigDecimal">
+ <wsdl:part name="getNewBigDecimal"
+ element="tns:getNewBigDecimal">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewURIArray">
+ <wsdl:part name="getNewURIArray" element="tns:getNewURIArray">
+
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewObjectArray">
+ <wsdl:part name="getNewObjectArray"
+ element="tns:getNewObjectArray">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewDataHandler">
+ <wsdl:part name="getNewDataHandler"
+ element="tns:getNewDataHandler">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewDateResponse">
+ <wsdl:part name="getNewDateResponse"
+ element="tns:getNewDateResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewBigInteger">
+ <wsdl:part name="getNewBigInteger"
+ element="tns:getNewBigInteger">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewDateArrayResponse">
+ <wsdl:part name="getNewDateArrayResponse"
+ element="tns:getNewDateArrayResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewBigIntegerArray">
+ <wsdl:part name="getNewBigIntegerArray"
+ element="tns:getNewBigIntegerArray">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewQNameArrayResponse">
+ <wsdl:part name="getNewQNameArrayResponse"
+ element="tns:getNewQNameArrayResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewURIResponse">
+ <wsdl:part name="getNewURIResponse"
+ element="tns:getNewURIResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewUUIDArrayResponse">
+ <wsdl:part name="getNewUUIDArrayResponse"
+ element="tns:getNewUUIDArrayResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewCalendarArrayResponse">
+ <wsdl:part name="getNewCalendarArrayResponse"
+ element="tns:getNewCalendarArrayResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewXMLGregorianCalendarArray">
+ <wsdl:part name="getNewXMLGregorianCalendarArray"
+ element="tns:getNewXMLGregorianCalendarArray">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewCalendarResponse">
+ <wsdl:part name="getNewCalendarResponse"
+ element="tns:getNewCalendarResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewCalendar">
+ <wsdl:part name="getNewCalendar" element="tns:getNewCalendar">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewCalendarArray">
+ <wsdl:part name="getNewCalendarArray"
+ element="tns:getNewCalendarArray">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewImageArray">
+ <wsdl:part name="getNewImageArray"
+ element="tns:getNewImageArray">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewObjectResponse">
+ <wsdl:part name="getNewObjectResponse"
+ element="tns:getNewObjectResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewDurationArray">
+ <wsdl:part name="getNewDurationArray"
+ element="tns:getNewDurationArray">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewXMLGregorianCalendarArrayResponse">
+ <wsdl:part name="getNewXMLGregorianCalendarArrayResponse"
+ element="tns:getNewXMLGregorianCalendarArrayResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewSource">
+ <wsdl:part name="getNewSource" element="tns:getNewSource">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewObjectArrayResponse">
+ <wsdl:part name="getNewObjectArrayResponse"
+ element="tns:getNewObjectArrayResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewUUIDResponse">
+ <wsdl:part name="getNewUUIDResponse"
+ element="tns:getNewUUIDResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewBigIntegerResponse">
+ <wsdl:part name="getNewBigIntegerResponse"
+ element="tns:getNewBigIntegerResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewQNameArray">
+ <wsdl:part name="getNewQNameArray"
+ element="tns:getNewQNameArray">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewUUIDArray">
+ <wsdl:part name="getNewUUIDArray"
+ element="tns:getNewUUIDArray">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewBigDecimalResponse">
+ <wsdl:part name="getNewBigDecimalResponse"
+ element="tns:getNewBigDecimalResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewDateArray">
+ <wsdl:part name="getNewDateArray"
+ element="tns:getNewDateArray">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewURIArrayResponse">
+ <wsdl:part name="getNewURIArrayResponse"
+ element="tns:getNewURIArrayResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewDurationArrayResponse">
+ <wsdl:part name="getNewDurationArrayResponse"
+ element="tns:getNewDurationArrayResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewObject">
+ <wsdl:part name="getNewObject" element="tns:getNewObject">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewDataHandlerResponse">
+ <wsdl:part name="getNewDataHandlerResponse"
+ element="tns:getNewDataHandlerResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewQName">
+ <wsdl:part name="getNewQName" element="tns:getNewQName">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewDate">
+ <wsdl:part name="getNewDate" element="tns:getNewDate">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewUUID">
+ <wsdl:part name="getNewUUID" element="tns:getNewUUID">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewXMLGregorianCalendarResponse">
+ <wsdl:part name="getNewXMLGregorianCalendarResponse"
+ element="tns:getNewXMLGregorianCalendarResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewBigIntegerArrayResponse">
+ <wsdl:part name="getNewBigIntegerArrayResponse"
+ element="tns:getNewBigIntegerArrayResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewSourceArray">
+ <wsdl:part name="getNewSourceArray"
+ element="tns:getNewSourceArray">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewImage">
+ <wsdl:part name="getNewImage" element="tns:getNewImage">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewSourceArrayResponse">
+ <wsdl:part name="getNewSourceArrayResponse"
+ element="tns:getNewSourceArrayResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewXMLGregorianCalendar">
+ <wsdl:part name="getNewXMLGregorianCalendar"
+ element="tns:getNewXMLGregorianCalendar">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewQNameResponse">
+ <wsdl:part name="getNewQNameResponse"
+ element="tns:getNewQNameResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewDataHandlerArrayResponse">
+ <wsdl:part name="getNewDataHandlerArrayResponse"
+ element="tns:getNewDataHandlerArrayResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewBigDecimalArrayResponse">
+ <wsdl:part name="getNewBigDecimalArrayResponse"
+ element="tns:getNewBigDecimalArrayResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewDuration">
+ <wsdl:part name="getNewDuration" element="tns:getNewDuration">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewDataHandlerArray">
+ <wsdl:part name="getNewDataHandlerArray"
+ element="tns:getNewDataHandlerArray">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewImageResponse">
+ <wsdl:part name="getNewImageResponse"
+ element="tns:getNewImageResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewSourceResponse">
+ <wsdl:part name="getNewSourceResponse"
+ element="tns:getNewSourceResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewDurationResponse">
+ <wsdl:part name="getNewDurationResponse"
+ element="tns:getNewDurationResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getNewURI">
+ <wsdl:part name="getNewURI" element="tns:getNewURI"></wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="StandardTypesService">
+ <wsdl:operation name="getNewObject">
+ <wsdl:input message="tns:getNewObject"></wsdl:input>
+ <wsdl:output message="tns:getNewObjectResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewImage">
+ <wsdl:input message="tns:getNewImage"></wsdl:input>
+ <wsdl:output message="tns:getNewImageResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewSource">
+ <wsdl:input message="tns:getNewSource"></wsdl:input>
+ <wsdl:output message="tns:getNewSourceResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewBigInteger">
+ <wsdl:input message="tns:getNewBigInteger"></wsdl:input>
+ <wsdl:output message="tns:getNewBigIntegerResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewBigIntegerArray">
+ <wsdl:input message="tns:getNewBigIntegerArray">
+ </wsdl:input>
+ <wsdl:output message="tns:getNewBigIntegerArrayResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewBigDecimal">
+ <wsdl:input message="tns:getNewBigDecimal"></wsdl:input>
+ <wsdl:output message="tns:getNewBigDecimalResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewBigDecimalArray">
+ <wsdl:input message="tns:getNewBigDecimalArray">
+ </wsdl:input>
+ <wsdl:output message="tns:getNewBigDecimalArrayResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewCalendar">
+ <wsdl:input message="tns:getNewCalendar"></wsdl:input>
+ <wsdl:output message="tns:getNewCalendarResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewCalendarArray">
+ <wsdl:input message="tns:getNewCalendarArray"></wsdl:input>
+ <wsdl:output message="tns:getNewCalendarArrayResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewDate">
+ <wsdl:input message="tns:getNewDate"></wsdl:input>
+ <wsdl:output message="tns:getNewDateResponse"></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewDateArray">
+ <wsdl:input message="tns:getNewDateArray"></wsdl:input>
+ <wsdl:output message="tns:getNewDateArrayResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewQName">
+ <wsdl:input message="tns:getNewQName"></wsdl:input>
+ <wsdl:output message="tns:getNewQNameResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewQNameArray">
+ <wsdl:input message="tns:getNewQNameArray"></wsdl:input>
+ <wsdl:output message="tns:getNewQNameArrayResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewURI">
+ <wsdl:input message="tns:getNewURI"></wsdl:input>
+ <wsdl:output message="tns:getNewURIResponse"></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewURIArray">
+ <wsdl:input message="tns:getNewURIArray"></wsdl:input>
+ <wsdl:output message="tns:getNewURIArrayResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewXMLGregorianCalendar">
+ <wsdl:input message="tns:getNewXMLGregorianCalendar">
+ </wsdl:input>
+ <wsdl:output
+ message="tns:getNewXMLGregorianCalendarResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewXMLGregorianCalendarArray">
+ <wsdl:input message="tns:getNewXMLGregorianCalendarArray">
+ </wsdl:input>
+ <wsdl:output
+ message="tns:getNewXMLGregorianCalendarArrayResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewDuration">
+ <wsdl:input message="tns:getNewDuration"></wsdl:input>
+ <wsdl:output message="tns:getNewDurationResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewDurationArray">
+ <wsdl:input message="tns:getNewDurationArray"></wsdl:input>
+ <wsdl:output message="tns:getNewDurationArrayResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewObjectArray">
+ <wsdl:input message="tns:getNewObjectArray"></wsdl:input>
+ <wsdl:output message="tns:getNewObjectArrayResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewImageArray">
+ <wsdl:input message="tns:getNewImageArray"></wsdl:input>
+ <wsdl:output message="tns:getNewImageArrayResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewDataHandler">
+ <wsdl:input message="tns:getNewDataHandler"></wsdl:input>
+ <wsdl:output message="tns:getNewDataHandlerResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewDataHandlerArray">
+ <wsdl:input message="tns:getNewDataHandlerArray">
+ </wsdl:input>
+ <wsdl:output message="tns:getNewDataHandlerArrayResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewSourceArray">
+ <wsdl:input message="tns:getNewSourceArray"></wsdl:input>
+ <wsdl:output message="tns:getNewSourceArrayResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewUUID">
+ <wsdl:input message="tns:getNewUUID"></wsdl:input>
+ <wsdl:output message="tns:getNewUUIDResponse"></wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewUUIDArray">
+ <wsdl:input message="tns:getNewUUIDArray"></wsdl:input>
+ <wsdl:output message="tns:getNewUUIDArrayResponse">
+ </wsdl:output>
+ </wsdl:operation>
+
+ </wsdl:portType>
+ <wsdl:binding name="StandardTypesServiceBinding"
+ type="tns:StandardTypesService">
+ <soap11:binding style="document"
+ transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="getNewObject">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewImage">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewSource">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewBigInteger">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewBigIntegerArray">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewBigDecimal">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewBigDecimalArray">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewCalendar">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewCalendarArray">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewDate">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewDateArray">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewQName">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewQNameArray">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewURI">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewURIArray">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewXMLGregorianCalendar">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewXMLGregorianCalendarArray">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewDuration">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewDurationArray">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewObjectArray">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewImageArray">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewDataHandler">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewDataHandlerArray">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewSourceArray">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewUUID">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getNewUUIDArray">
+ <soap11:operation />
+ <wsdl:input>
+ <soap11:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap11:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="StandardTypesServiceService">
+ <wsdl:port name="StandardTypesServicePort"
+ binding="tns:StandardTypesServiceBinding">
+ <soap11:address location="http://localhost:8085/sts-ep"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/DatabindingTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/DatabindingTestCase.java
new file mode 100644
index 0000000000..3351e9c441
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/DatabindingTestCase.java
@@ -0,0 +1,346 @@
+/*
+ * 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.itest.databindings.jaxb.topdown;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceClient;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class DatabindingTestCase {
+
+ private static Node node;
+
+ /**
+ * Runs once before running the tests
+ */
+ @BeforeClass
+ public static void setUp() throws Exception {
+ try {
+ NodeFactory factory = NodeFactory.newInstance();
+ node = factory.createNode(new File("src/main/resources/wsdl/wrapped/helloservice.composite").toURI().toURL().toString(),
+ new Contribution("TestContribution", new File("src/main/resources/wsdl/wrapped/").toURI().toURL().toString()));
+ node.start();
+ }catch(Throwable e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Runs once after running the tests
+ */
+ @AfterClass
+ public static void tearDown() {
+ node.stop();
+ }
+
+ /**
+ * Invokes the HelloService service using WS binding.
+ * Service method invoked is getGreetings.
+ */
+ @Test
+ public void testW2W() throws Exception {
+ HelloServiceClient helloServiceClient = node.getService(HelloServiceClient.class, "HelloServiceClientW2WComponent");
+ performTest(helloServiceClient);
+ }
+
+ /**
+ * Invokes the HelloService service using WS binding.
+ * Service method invoked is getGreetingsArray.
+ */
+ @Test
+ public void testW2WArray() throws Exception {
+ HelloServiceClient helloServiceClient = node.getService(HelloServiceClient.class, "HelloServiceClientW2WComponent");
+ performTestArray(helloServiceClient);
+ }
+
+ /**
+ * Invokes the HelloService service using WS binding.
+ * Service method invoked is getGreetingsList.
+ */
+ @Test
+ public void testW2WList() throws Exception {
+ HelloServiceClient helloServiceClient = node.getService(HelloServiceClient.class, "HelloServiceClientW2WComponent");
+ performTestList(helloServiceClient);
+ }
+
+ /**
+ * Invokes the HelloService service using WS binding.
+ * Service method invoked is getGreetingsArrayList.
+ */
+ @Test
+ public void testW2WArrayList() throws Exception {
+ HelloServiceClient helloServiceClient = node.getService(HelloServiceClient.class, "HelloServiceClientW2WComponent");
+ performTestArrayList(helloServiceClient);
+ }
+
+ /**
+ * Invokes the HelloService service using WS binding.
+ * Service method invoked is getGreetingsMap.
+ */
+ @Test
+ public void testW2WMap() throws Exception {
+ HelloServiceClient helloServiceClient = node.getService(HelloServiceClient.class, "HelloServiceClientW2WComponent");
+ performTestMap(helloServiceClient);
+ }
+
+ /**
+ * Invokes the HelloService service using WS binding.
+ * Service method invoked is getGreetingsHashMap.
+ */
+ @Test
+ public void testW2WHashMap() throws Exception {
+ HelloServiceClient helloServiceClient = node.getService(HelloServiceClient.class, "HelloServiceClientW2WComponent");
+ performTestHashMap(helloServiceClient);
+ }
+
+ /**
+ * Invokes the HelloService service using WS binding.
+ * Service method invoked is getGreetingsVarArgs.
+ */
+ @Test
+ public void testW2WVarArgs() throws Exception {
+ HelloServiceClient helloServiceClient = node.getService(HelloServiceClient.class, "HelloServiceClientW2WComponent");
+ performTestVarArgs(helloServiceClient);
+ }
+
+ /**
+ * Invokes the HelloService service using WS binding.
+ * Service method invoked is getGreetings.
+ */
+ @Test
+ public void testJ2W() throws Exception {
+ HelloServiceClient helloServiceClient = node.getService(HelloServiceClient.class, "HelloServiceClientJ2WComponent");
+ performTest(helloServiceClient);
+ }
+
+ /**
+ * Invokes the HelloService service using WS binding.
+ * Service method invoked is getGreetingsArray.
+ */
+ @Test
+ public void testJ2WArray() throws Exception {
+ HelloServiceClient helloServiceClient = node.getService(HelloServiceClient.class, "HelloServiceClientJ2WComponent");
+ performTestArray(helloServiceClient);
+ }
+
+ /**
+ * Invokes the HelloService service using WS binding.
+ * Service method invoked is getGreetingsList.
+ */
+ @Test
+ public void testJ2WList() throws Exception {
+ HelloServiceClient helloServiceClient = node.getService(HelloServiceClient.class, "HelloServiceClientJ2WComponent");
+ performTestList(helloServiceClient);
+ }
+
+ /**
+ * Invokes the HelloService service using WS binding.
+ * Service method invoked is getGreetingsArrayList.
+ */
+ @Test
+ public void testJ2WArrayList() throws Exception {
+ HelloServiceClient helloServiceClient = node.getService(HelloServiceClient.class, "HelloServiceClientJ2WComponent");
+ performTestArrayList(helloServiceClient);
+ }
+
+ /**
+ * Invokes the HelloService service using WS binding.
+ * Service method invoked is getGreetingsMap.
+ */
+ @Test
+ public void testJ2WMap() throws Exception {
+ HelloServiceClient helloServiceClient = node.getService(HelloServiceClient.class, "HelloServiceClientJ2WComponent");
+ performTestMap(helloServiceClient);
+ }
+
+ /**
+ * Invokes the HelloService service using WS binding.
+ * Service method invoked is getGreetingsHashMap.
+ */
+ @Test
+ public void testJ2WHashMap() throws Exception {
+ HelloServiceClient helloServiceClient = node.getService(HelloServiceClient.class, "HelloServiceClientJ2WComponent");
+ performTestHashMap(helloServiceClient);
+ }
+
+ /**
+ * Invokes the HelloService service using WS binding.
+ * Service method invoked is getGreetingsVarArgs.
+ */
+ @Test
+ public void testJ2WVarArgs() throws Exception {
+ HelloServiceClient helloServiceClient = node.getService(HelloServiceClient.class, "HelloServiceClientJ2WComponent");
+ performTestVarArgs(helloServiceClient);
+ }
+
+ /**
+ * Invokes the HelloService service using WS binding.
+ * Service method invoked is getGreetings.
+ */
+ @Test
+ public void testW2J() throws Exception {
+ HelloServiceClient helloServiceClient = node.getService(HelloServiceClient.class, "HelloServiceClientW2JComponent");
+ performTest(helloServiceClient);
+ }
+
+ /**
+ * Invokes the HelloService service using WS binding.
+ * Service method invoked is getGreetingsArray.
+ */
+ @Test
+ public void testW2JArray() throws Exception {
+ HelloServiceClient helloServiceClient = node.getService(HelloServiceClient.class, "HelloServiceClientW2JComponent");
+ performTestArray(helloServiceClient);
+ }
+
+ /**
+ * Invokes the HelloService service using WS binding.
+ * Service method invoked is getGreetingsList.
+ */
+ @Test
+ public void testW2JList() throws Exception {
+ HelloServiceClient helloServiceClient = node.getService(HelloServiceClient.class, "HelloServiceClientW2JComponent");
+ performTestList(helloServiceClient);
+ }
+
+ /**
+ * Invokes the HelloService service using WS binding.
+ * Service method invoked is getGreetingsArrayList.
+ */
+ @Test
+ public void testW2JArrayList() throws Exception {
+ HelloServiceClient helloServiceClient = node.getService(HelloServiceClient.class, "HelloServiceClientW2JComponent");
+ performTestArrayList(helloServiceClient);
+ }
+
+ /**
+ * Invokes the HelloService service using WS binding.
+ * Service method invoked is getGreetingsMap.
+ */
+ @Test
+ public void testW2JMap() throws Exception {
+ HelloServiceClient helloServiceClient = node.getService(HelloServiceClient.class, "HelloServiceClientW2JComponent");
+ performTestMap(helloServiceClient);
+ }
+
+ /**
+ * Invokes the HelloService service using WS binding.
+ * Service method invoked is getGreetingsHashMap.
+ */
+ @Test
+ public void testW2JHashMap() throws Exception {
+ HelloServiceClient helloServiceClient = node.getService(HelloServiceClient.class, "HelloServiceClientW2JComponent");
+ performTestHashMap(helloServiceClient);
+ }
+
+ /**
+ * Invokes the HelloService service using WS binding.
+ * Service method invoked is getGreetingsVarArgs.
+ */
+ @Test
+ public void testW2JVarArgs() throws Exception {
+ HelloServiceClient helloServiceClient = node.getService(HelloServiceClient.class, "HelloServiceClientW2JComponent");
+ performTestVarArgs(helloServiceClient);
+ }
+
+ private void performTest(HelloServiceClient helloServiceClient) {
+ String name = "Pandu";
+ String resp = helloServiceClient.getGreetingsForward(name);
+ Assert.assertEquals("Hello "+name, resp);
+ }
+
+ private void performTestArray(HelloServiceClient helloServiceClient) {
+ String[] names = {"Me", "Pandu"};
+ String[] resps = helloServiceClient.getGreetingsArrayForward(names);
+ for(int i = 0; i < names.length; ++i) {
+ Assert.assertEquals("Hello "+names[i], resps[i]);
+ }
+ }
+
+ private void performTestList(HelloServiceClient helloServiceClient) {
+ List<String> namesList = new ArrayList<String>();
+ namesList.add("Me");
+ namesList.add("Pandu");
+ namesList.add("Chinnipandu");
+ List<String> respList = helloServiceClient.getGreetingsListForward(namesList);
+ Assert.assertEquals(namesList.size(), respList.size());
+ for(int i = 0; i < namesList.size(); ++i) {
+ Assert.assertEquals("Hello "+namesList.get(i), respList.get(i));
+ }
+ }
+
+ private void performTestArrayList(HelloServiceClient helloServiceClient) {
+ ArrayList<String> namesList = new ArrayList<String>();
+ namesList.add("Me");
+ namesList.add("Pandu");
+ namesList.add("Chinnipandu");
+ ArrayList<String> respList = helloServiceClient.getGreetingsArrayListForward(namesList);
+ Assert.assertEquals(namesList.size(), respList.size());
+ for(int i = 0; i < namesList.size(); ++i) {
+ Assert.assertEquals("Hello "+namesList.get(i), respList.get(i));
+ }
+ }
+
+ private void performTestMap(HelloServiceClient helloServiceClient) {
+ Map<String, String> namesMap = new HashMap<String, String>();
+ namesMap.put("Me", null);
+ namesMap.put("Pandu", null);
+ namesMap.put("Chinnipandu", null);
+ Map<String, String> respMap = helloServiceClient.getGreetingsMapForward(namesMap);
+ Assert.assertEquals(namesMap.keySet().size(), respMap.keySet().size());
+ for(Map.Entry<String, String> entry: namesMap.entrySet()) {
+ Assert.assertEquals("Hello "+entry.getKey(), respMap.get(entry.getKey()));
+ }
+ }
+
+ private void performTestHashMap(HelloServiceClient helloServiceClient) {
+ HashMap<String, String> namesMap = new HashMap<String, String>();
+ namesMap.put("Me", null);
+ namesMap.put("Pandu", null);
+ namesMap.put("Chinnipandu", null);
+ Map<String, String> respMap = helloServiceClient.getGreetingsHashMapForward(namesMap);
+ Assert.assertEquals(namesMap.keySet().size(), respMap.keySet().size());
+ for(Map.Entry<String, String> entry: namesMap.entrySet()) {
+ Assert.assertEquals("Hello "+entry.getKey(), respMap.get(entry.getKey()));
+ }
+ }
+
+ private void performTestVarArgs(HelloServiceClient helloServiceClient) {
+ String[] names = { "Me", "You", "Pandu" }; // Do not change the array size from 3.
+ String expected = "Hello Me You Pandu";
+ String actual = helloServiceClient.getGreetingsVarArgsForward(names[0], names[1], names[2]);
+ Assert.assertEquals(expected, actual);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/PrimitivesDatabindingTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/PrimitivesDatabindingTestCase.java
new file mode 100644
index 0000000000..8430d5e978
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/PrimitivesDatabindingTestCase.java
@@ -0,0 +1,849 @@
+/*
+ * 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.itest.databindings.jaxb.topdown;
+
+import java.io.File;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesServiceClient;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class PrimitivesDatabindingTestCase {
+
+ private static Node node;
+
+ /**
+ * Runs before each test method
+ */
+ @BeforeClass
+ public static void setUp() throws Exception {
+ NodeFactory factory = NodeFactory.newInstance();
+ node = factory.createNode(new File("src/main/resources/wsdl/wrapped/primitivesservice.composite").toURI().toURL().toString(),
+ new Contribution("TestContribution", new File("src/main/resources/wsdl/wrapped/").toURI().toURL().toString()));
+ node.start();
+ }
+
+ /**
+ * Runs after each test method
+ */
+ @AfterClass
+ public static void tearDown() {
+ node.stop();
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateBoolean.
+ */
+ @Test
+ public void testW2WNegateBoolean() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent");
+ performTestNegateBoolean(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateBooleanArray.
+ */
+ @Test
+ public void testW2WNegateBooleanArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent");
+ performTestNegateBooleanArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with WS binding.
+ * Test for boolean array.
+ */
+ @Test
+ public void testW2WPassByValueBooleanArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueBooleanArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateByte.
+ */
+ @Test
+ public void testW2WNegateByte() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent");
+ performTestNegateByte(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateByteArray.
+ */
+ @Test
+ public void testW2WNegateByteArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent");
+ performTestNegateByteArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with WS binding.
+ * Test for byte array.
+ */
+ @Test
+ public void testW2WPassByValueByteArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueByteArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateShort.
+ */
+ @Test
+ public void testW2WNegateShort() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent");
+ performTestNegateShort(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateShortArray.
+ */
+ @Test
+ public void testW2WNegateShortArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent");
+ performTestNegateShortArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with WS binding.
+ * Test for short array.
+ */
+ @Test
+ public void testW2WPassByValueShortArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueShortArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateInt.
+ */
+ @Test
+ public void testW2WNegateInt() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent");
+ performTestNegateInt(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateIntArray.
+ */
+ @Test
+ public void testW2WNegateIntArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent");
+ performTestNegateIntArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with WS binding.
+ * Test for int array.
+ */
+ @Test
+ public void testW2WPassByValueIntArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueIntArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateLong.
+ */
+ @Test
+ public void testW2WNegateLong() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent");
+ performTestNegateLong(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateLongArray.
+ */
+ @Test
+ public void testW2WNegateLongArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent");
+ performTestNegateLongArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with WS binding.
+ * Test for long array.
+ */
+ @Test
+ public void testW2WPassByValueLongArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueLongArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateFloat.
+ */
+ @Test
+ public void testW2WNegateFloat() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent");
+ performTestNegateFloat(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateFloatArray.
+ */
+ @Test
+ public void testW2WNegateFloatArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent");
+ performTestNegateFloatArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with WS binding.
+ * Test for float array.
+ */
+ @Test
+ public void testW2WPassByValueFloatArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueFloatArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateDouble.
+ */
+ @Test
+ public void testW2WNegateDouble() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent");
+ performTestNegateDouble(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateDoubleArray.
+ */
+ @Test
+ public void testW2WNegateDoubleArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent");
+ performTestNegateDoubleArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with WS binding.
+ * Test for double array.
+ */
+ @Test
+ public void testW2WPassByValueDoubleArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueDoubleArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateBoolean.
+ */
+ @Test
+ public void testJ2WNegateBoolean() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent");
+ performTestNegateBoolean(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateBooleanArray.
+ */
+ @Test
+ public void testJ2WNegateBooleanArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent");
+ performTestNegateBooleanArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with WS binding.
+ * Test for boolean array.
+ */
+ @Test
+ public void testJ2WPassByValueBooleanArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueBooleanArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateByte.
+ */
+ @Test
+ public void testJ2WNegateByte() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent");
+ performTestNegateByte(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateByteArray.
+ */
+ @Test
+ public void testJ2WNegateByteArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent");
+ performTestNegateByteArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with WS binding.
+ * Test for byte array.
+ */
+ @Test
+ public void testJ2WPassByValueByteArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueByteArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateShort.
+ */
+ @Test
+ public void testJ2WNegateShort() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent");
+ performTestNegateShort(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateShortArray.
+ */
+ @Test
+ public void testJ2WNegateShortArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent");
+ performTestNegateShortArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with WS binding.
+ * Test for short array.
+ */
+ @Test
+ public void testJ2WPassByValueShortArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueShortArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateInt.
+ */
+ @Test
+ public void testJ2WNegateInt() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent");
+ performTestNegateInt(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateIntArray.
+ */
+ @Test
+ public void testJ2WNegateIntArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent");
+ performTestNegateIntArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with WS binding.
+ * Test for int array.
+ */
+ @Test
+ public void testJ2WPassByValueIntArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueIntArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateLong.
+ */
+ @Test
+ public void testJ2WNegateLong() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent");
+ performTestNegateLong(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateLongArray.
+ */
+ @Test
+ public void testJ2WNegateLongArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent");
+ performTestNegateLongArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with WS binding.
+ * Test for long array.
+ */
+ @Test
+ public void testJ2WPassByValueLongArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueLongArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateFloat.
+ */
+ @Test
+ public void testJ2WNegateFloat() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent");
+ performTestNegateFloat(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateFloatArray.
+ */
+ @Test
+ public void testJ2WNegateFloatArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent");
+ performTestNegateFloatArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with WS binding.
+ * Test for float array.
+ */
+ @Test
+ public void testJ2WPassByValueFloatArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueFloatArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateDouble.
+ */
+ @Test
+ public void testJ2WNegateDouble() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent");
+ performTestNegateDouble(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateDoubleArray.
+ */
+ @Test
+ public void testJ2WNegateDoubleArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent");
+ performTestNegateDoubleArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with WS binding.
+ * Test for double array.
+ */
+ @Test
+ public void testJ2WPassByValueDoubleArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueDoubleArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateBoolean.
+ */
+ @Test
+ public void testW2JNegateBoolean() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent");
+ performTestNegateBoolean(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateBooleanArray.
+ */
+ @Test
+ public void testW2JNegateBooleanArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent");
+ performTestNegateBooleanArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with WS binding.
+ * Test for boolean array.
+ */
+ @Test
+ public void testW2JPassByValueBooleanArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueBooleanArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateByte.
+ */
+ @Test
+ public void testW2JNegateByte() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent");
+ performTestNegateByte(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateByteArray.
+ */
+ @Test
+ public void testW2JNegateByteArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent");
+ performTestNegateByteArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with WS binding.
+ * Test for byte array.
+ */
+ @Test
+ public void testW2JPassByValueByteArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueByteArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateShort.
+ */
+ @Test
+ public void testW2JNegateShort() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent");
+ performTestNegateShort(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateShortArray.
+ */
+ @Test
+ public void testW2JNegateShortArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent");
+ performTestNegateShortArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with WS binding.
+ * Test for short array.
+ */
+ @Test
+ public void testW2JPassByValueShortArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueShortArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateInt.
+ */
+ @Test
+ public void testW2JNegateInt() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent");
+ performTestNegateInt(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateIntArray.
+ */
+ @Test
+ public void testW2JNegateIntArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent");
+ performTestNegateIntArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with WS binding.
+ * Test for int array.
+ */
+ @Test
+ public void testW2JPassByValueIntArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueIntArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateLong.
+ */
+ @Test
+ public void testW2JNegateLong() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent");
+ performTestNegateLong(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateLongArray.
+ */
+ @Test
+ public void testW2JNegateLongArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent");
+ performTestNegateLongArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with WS binding.
+ * Test for long array.
+ */
+ @Test
+ public void testW2JPassByValueLongArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueLongArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateFloat.
+ */
+ @Test
+ public void testW2JNegateFloat() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent");
+ performTestNegateFloat(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateFloatArray.
+ */
+ @Test
+ public void testW2JNegateFloatArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent");
+ performTestNegateFloatArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with WS binding.
+ * Test for float array.
+ */
+ @Test
+ public void testW2JPassByValueFloatArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueFloatArray());
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateDouble.
+ */
+ @Test
+ public void testW2JNegateDouble() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent");
+ performTestNegateDouble(primitivesServiceClient);
+ }
+
+ /**
+ * Invokes the PrimitivesService service using WS binding.
+ * Service method invoked is negateDoubleArray.
+ */
+ @Test
+ public void testW2JNegateDoubleArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent");
+ performTestNegateDoubleArray(primitivesServiceClient);
+ }
+
+ /**
+ * Test the pass-by-value semantics of a remotable service with WS binding.
+ * Test for double array.
+ */
+ @Test
+ public void testW2JPassByValueDoubleArray() throws Exception {
+ PrimitivesServiceClient primitivesServiceClient = node.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent");
+ Assert.assertTrue(primitivesServiceClient.passByValueDoubleArray());
+ }
+
+ private void performTestNegateBoolean(PrimitivesServiceClient primitivesServiceClient) {
+ Assert.assertTrue(primitivesServiceClient.negateBooleanForward(false));
+ Assert.assertFalse(primitivesServiceClient.negateBooleanForward(true));
+ }
+
+ private void performTestNegateBooleanArray(PrimitivesServiceClient primitivesServiceClient) {
+ boolean flags[] = new boolean[2];
+ flags[0] = false;
+ flags[1] = true;
+ boolean[] respFlags = primitivesServiceClient.negateBooleanArrayForward(flags);
+ Assert.assertEquals(flags.length, respFlags.length);
+ for(int i = 0; i < flags.length; ++i) {
+ Assert.assertEquals(!flags[i], respFlags[i]);
+ }
+ }
+
+ private void performTestNegateByte(PrimitivesServiceClient primitivesServiceClient) {
+ byte[] ba = new byte[3];
+ ba[0] = -1;
+ ba[1] = 0;
+ ba[2] = 1;
+
+ for(int i = 0; i < ba.length; ++i) {
+ Assert.assertEquals((byte)-ba[i], primitivesServiceClient.negateByteForward(ba[i]));
+ }
+ }
+
+ private void performTestNegateByteArray(PrimitivesServiceClient primitivesServiceClient) {
+ byte[] ba = new byte[3];
+ ba[0] = -1;
+ ba[1] = 0;
+ ba[2] = 1;
+
+ byte[] r = primitivesServiceClient.negateByteArrayForward(ba);
+ Assert.assertEquals(ba.length, r.length);
+ for(int i = 0; i < ba.length; ++i) {
+ Assert.assertEquals((byte)-ba[i], r[i]);
+ }
+ }
+
+ private void performTestNegateShort(PrimitivesServiceClient primitivesServiceClient) {
+ short[] s = new short[3];
+ s[0] = -1;
+ s[1] = 0;
+ s[2] = 1;
+
+ for(int i = 0; i < s.length; ++i) {
+ Assert.assertEquals((short)-s[i], primitivesServiceClient.negateShortForward(s[i]));
+ }
+ }
+
+ private void performTestNegateShortArray(PrimitivesServiceClient primitivesServiceClient) {
+ short[] s = new short[3];
+ s[0] = -1;
+ s[1] = 0;
+ s[2] = 1;
+
+ short[] r = primitivesServiceClient.negateShortArrayForward(s);
+ Assert.assertEquals(s.length, r.length);
+ for(int i = 0; i < s.length; ++i) {
+ Assert.assertEquals((short)-s[i], r[i]);
+ }
+ }
+
+ private void performTestNegateInt(PrimitivesServiceClient primitivesServiceClient) {
+ int[] ia = new int[3];
+ ia[0] = -1;
+ ia[1] = 0;
+ ia[2] = 1;
+
+ for(int i = 0; i < ia.length; ++i) {
+ Assert.assertEquals(-ia[i], primitivesServiceClient.negateIntForward(ia[i]));
+ }
+ }
+
+ private void performTestNegateIntArray(PrimitivesServiceClient primitivesServiceClient) {
+ int[] ia = new int[3];
+ ia[0] = -1;
+ ia[1] = 0;
+ ia[2] = 1;
+
+ int[] r = primitivesServiceClient.negateIntArrayForward(ia);
+ Assert.assertEquals(ia.length, r.length);
+ for(int i = 0; i < ia.length; ++i) {
+ Assert.assertEquals(-ia[i], r[i]);
+ }
+ }
+
+ private void performTestNegateLong(PrimitivesServiceClient primitivesServiceClient) {
+ long[] la = new long[3];
+ la[0] = -1;
+ la[1] = 0;
+ la[2] = 1;
+
+ for(int i = 0; i < la.length; ++i) {
+ Assert.assertEquals(-la[i], primitivesServiceClient.negateLongForward(la[i]));
+ }
+ }
+
+ private void performTestNegateLongArray(PrimitivesServiceClient primitivesServiceClient) {
+ long[] la = new long[3];
+ la[0] = -1;
+ la[1] = 0;
+ la[2] = 1;
+
+ long[] r = primitivesServiceClient.negateLongArrayForward(la);
+ Assert.assertEquals(la.length, r.length);
+ for(int i = 0; i < la.length; ++i) {
+ Assert.assertEquals(-la[i], r[i]);
+ }
+ }
+
+ private void performTestNegateFloat(PrimitivesServiceClient primitivesServiceClient) {
+ float[] fa = new float[3];
+ fa[0] = -1;
+ fa[1] = 0;
+ fa[2] = 1;
+
+ for(int i = 0; i < fa.length; ++i) {
+ Assert.assertEquals(-fa[i], primitivesServiceClient.negateFloatForward(fa[i]));
+ }
+ }
+
+ private void performTestNegateFloatArray(PrimitivesServiceClient primitivesServiceClient) {
+ float[] ia = new float[3];
+ ia[0] = -1;
+ ia[1] = 0;
+ ia[2] = 1;
+
+ float[] r = primitivesServiceClient.negateFloatArrayForward(ia);
+ Assert.assertEquals(ia.length, r.length);
+ for(int i = 0; i < ia.length; ++i) {
+ Assert.assertEquals(-ia[i], r[i]);
+ }
+ }
+
+ private void performTestNegateDouble(PrimitivesServiceClient primitivesServiceClient) {
+ double[] da = new double[3];
+ da[0] = -1;
+ da[1] = 0;
+ da[2] = 1;
+
+ for(int i = 0; i < da.length; ++i) {
+ Assert.assertEquals(-da[i], primitivesServiceClient.negateDoubleForward(da[i]));
+ }
+ }
+
+ private void performTestNegateDoubleArray(PrimitivesServiceClient primitivesServiceClient) {
+ double[] da = new double[3];
+ da[0] = -1;
+ da[1] = 0;
+ da[2] = 1;
+
+ double[] r = primitivesServiceClient.negateDoubleArrayForward(da);
+ Assert.assertEquals(da.length, r.length);
+ for(int i = 0; i < da.length; ++i) {
+ Assert.assertEquals(-da[i], r[i]);
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/StandardTypesDatabindingTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/StandardTypesDatabindingTestCase.java
new file mode 100644
index 0000000000..6647394e55
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/StandardTypesDatabindingTestCase.java
@@ -0,0 +1,1442 @@
+/*
+ * 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.itest.databindings.jaxb.topdown;
+
+import java.awt.Image;
+import java.awt.image.BufferedImage;
+import java.awt.image.PixelGrabber;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.URI;
+import java.net.URL;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.TimeZone;
+import java.util.UUID;
+
+import javax.activation.DataHandler;
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.Duration;
+import javax.xml.datatype.XMLGregorianCalendar;
+import javax.xml.namespace.QName;
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+
+import junit.framework.Assert;
+
+import org.apache.axiom.attachments.ByteArrayDataSource;
+import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesServiceClient;
+import org.apache.tuscany.sca.itest.databindings.jaxb.impl.StandardTypesTransformer;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class StandardTypesDatabindingTestCase {
+
+ private static Node node;
+
+ /**
+ * Runs once before the tests
+ */
+ @BeforeClass
+ public static void setUp() throws Exception {
+ NodeFactory factory = NodeFactory.newInstance();
+ node = factory.createNode(new File("src/main/resources/wsdl/wrapped/standard-types-service.composite").toURI().toURL().toString(),
+ new Contribution("TestContribution", new File("src/main/resources/wsdl/wrapped/").toURI().toURL().toString()));
+ node.start();
+ }
+
+ /**
+ * Runs once after the tests
+ */
+ @AfterClass
+ public static void tearDown() {
+ node.stop();
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewBigInteger.
+ */
+ @Test
+ public void testW2WNewBigInteger() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent");
+ performTestNewBigInteger(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewBigIntegerArray.
+ */
+ @Test
+ public void testW2WNewBigIntegerArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent");
+ performTestNewBigIntegerArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewBigDecimal.
+ */
+ @Test
+ public void testW2WNewBigDecimal() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent");
+ performTestNewBigDecimal(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewBigDecimalArray.
+ */
+ @Test
+ public void testW2WNewBigDecimalArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent");
+ performTestNewBigDecimalArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewCalendar.
+ */
+ @Test
+ public void testW2WNewCalendar() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent");
+ performTestNewCalendar(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewCalendarArray.
+ */
+ @Test
+ public void testW2WNewCalendarArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent");
+ performTestNewCalendarArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewDate.
+ */
+ @Test
+ public void testW2WNewDate() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent");
+ performTestNewDate(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewDateArray.
+ */
+ @Test
+ public void testW2WNewDateArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent");
+ performTestNewDateArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewQName.
+ */
+ @Test
+ public void testW2WNewQName() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent");
+ performTestNewQName(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewQNameArray.
+ */
+ @Test
+ public void testW2WNewQNameArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent");
+ performTestNewQNameArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewURI.
+ */
+ @Test
+ public void testW2WNewURI() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent");
+ performTestNewURI(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewURIArray.
+ */
+ @Test
+ public void testW2WNewURIArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent");
+ performTestNewURIArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewXMLGregorianCalendar.
+ */
+ @Test
+ public void testW2WNewXMLGregorianCalendar() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent");
+ performTestNewXMLGregorianCalendar(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewXMLGregorianCalendarArray.
+ */
+ @Test
+ public void testW2WNewXMLGregorianCalendarArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent");
+ performTestNewXMLGregorianCalendarArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewDuration.
+ */
+ @Test
+ public void testW2WNewDuration() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent");
+ performTestNewDuration(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewDurationArray.
+ */
+ @Test
+ public void testW2WNewDurationArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent");
+ performTestNewDurationArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewObject.
+ */
+ @Test
+ public void testW2WNewObject() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent");
+ performTestNewObject(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewObjectArray.
+ */
+ @Test
+ public void testW2WNewObjectArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent");
+ performTestNewObjectArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewImage.
+ */
+ @Test
+ public void testW2WNewImage() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent");
+ performTestNewImage(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewImageArray.
+ */
+ @Test
+ public void testW2WNewImageArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent");
+ performTestNewImageArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewDataHandler.
+ */
+ @Test
+ public void testW2WNewDataHandler() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent");
+ performTestNewDataHandler(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewDataHandlerArray.
+ */
+ @Test
+ public void testW2WNewDataHandlerArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent");
+ performTestNewDataHandlerArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewSource.
+ */
+ /*@Test
+ //@Ignore("junit.framework.ComparisonFailure: null expected:<... encoding=\"UTF-8\"?><[a>A</a]>> but was:<... encoding=\"UTF-8\"?><[return xmlns=\"http://jaxb.databindings.itest.sca.tuscany.apache.org/\">A</return]>>")
+ public void testW2WNewSource() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent");
+ performTestNewSource(serviceClient);
+ }*/
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewSourceArray.
+ */
+ /*@Test
+ @Ignore("TUSCANY-2452")
+ public void testW2WNewSourceArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent");
+ performTestNewSourceArray(serviceClient);
+ }*/
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewUUID.
+ */
+ @Test
+ public void testW2WNewUUID() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent");
+ performTestNewUUID(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewUUIDArray.
+ */
+ @Test
+ public void testW2WNewUUIDArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent");
+ performTestNewUUIDArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewBigInteger.
+ */
+ @Test
+ public void testJ2WNewBigInteger() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent");
+ performTestNewBigInteger(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewBigIntegerArray.
+ */
+ @Test
+ public void testJ2WNewBigIntegerArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent");
+ performTestNewBigIntegerArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewBigDecimal.
+ */
+ @Test
+ public void testJ2WNewBigDecimal() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent");
+ performTestNewBigDecimal(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewBigDecimalArray.
+ */
+ @Test
+ public void testJ2WNewBigDecimalArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent");
+ performTestNewBigDecimalArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewCalendar.
+ */
+ @Test
+ public void testJ2WNewCalendar() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent");
+ performTestNewCalendar(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewCalendarArray.
+ */
+ @Test
+ public void testJ2WNewCalendarArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent");
+ performTestNewCalendarArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewDate.
+ */
+ @Test
+ public void testJ2WNewDate() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent");
+ performTestNewDate(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewDateArray.
+ */
+ @Test
+ public void testJ2WNewDateArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent");
+ performTestNewDateArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewQName.
+ */
+ @Test
+ public void testJ2WNewQName() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent");
+ performTestNewQName(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewQNameArray.
+ */
+ @Test
+ public void testJ2WNewQNameArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent");
+ performTestNewQNameArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewURI.
+ */
+ @Test
+ public void testJ2WNewURI() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent");
+ performTestNewURI(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewURIArray.
+ */
+ @Test
+ public void testJ2WNewURIArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent");
+ performTestNewURIArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewXMLGregorianCalendar.
+ */
+ @Test
+ public void testJ2WNewXMLGregorianCalendar() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent");
+ performTestNewXMLGregorianCalendar(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewXMLGregorianCalendarArray.
+ */
+ @Test
+ public void testJ2WNewXMLGregorianCalendarArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent");
+ performTestNewXMLGregorianCalendarArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewDuration.
+ */
+ @Test
+ public void testJ2WNewDuration() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent");
+ performTestNewDuration(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewDurationArray.
+ */
+ @Test
+ public void testJ2WNewDurationArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent");
+ performTestNewDurationArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewObject.
+ */
+ @Test
+ public void testJ2WNewObject() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent");
+ performTestNewObject(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewObjectArray.
+ */
+ @Test
+ public void testJ2WNewObjectArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent");
+ performTestNewObjectArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewImage.
+ */
+ @Test
+ public void testJ2WNewImage() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent");
+ performTestNewImage(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewImageArray.
+ */
+ @Test
+ public void testJ2WNewImageArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent");
+ performTestNewImageArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewDataHandler.
+ */
+ @Test
+ public void testJ2WNewDataHandler() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent");
+ performTestNewDataHandler(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewDataHandlerArray.
+ */
+ @Test
+ public void testJ2WNewDataHandlerArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent");
+ performTestNewDataHandlerArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewSource.
+ */
+ /*@Test
+ //@Ignore("junit.framework.ComparisonFailure: null expected:<... encoding=\"UTF-8\"?><[a>A</a]>> but was:<... encoding=\"UTF-8\"?><[return xmlns=\"http://jaxb.databindings.itest.sca.tuscany.apache.org/\">A</return]>>")
+ public void testJ2WNewSource() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent");
+ performTestNewSource(serviceClient);
+ }*/
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewSourceArray.
+ */
+ /*@Test
+ @Ignore("TUSCANY-2452")
+ public void testJ2WNewSourceArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent");
+ performTestNewSourceArray(serviceClient);
+ }*/
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewUUID.
+ */
+ @Test
+ public void testJ2WNewUUID() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent");
+ performTestNewUUID(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewUUIDArray.
+ */
+ @Test
+ public void testJ2WNewUUIDArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent");
+ performTestNewUUIDArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewBigInteger.
+ */
+ @Test
+ public void testW2JNewBigInteger() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent");
+ performTestNewBigInteger(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewBigIntegerArray.
+ */
+ @Test
+ public void testW2JNewBigIntegerArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent");
+ performTestNewBigIntegerArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewBigDecimal.
+ */
+ @Test
+ public void testW2JNewBigDecimal() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent");
+ performTestNewBigDecimal(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewBigDecimalArray.
+ */
+ @Test
+ public void testW2JNewBigDecimalArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent");
+ performTestNewBigDecimalArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewCalendar.
+ */
+ @Test
+ public void testW2JNewCalendar() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent");
+ performTestNewCalendar(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewCalendarArray.
+ */
+ @Test
+ public void testW2JNewCalendarArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent");
+ performTestNewCalendarArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewDate.
+ */
+ @Test
+ public void testW2JNewDate() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent");
+ performTestNewDate(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewDateArray.
+ */
+ @Test
+ public void testW2JNewDateArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent");
+ performTestNewDateArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewQName.
+ */
+ @Test
+ public void testW2JNewQName() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent");
+ performTestNewQName(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewQNameArray.
+ */
+ @Test
+ public void testW2JNewQNameArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent");
+ performTestNewQNameArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewURI.
+ */
+ @Test
+ public void testW2JNewURI() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent");
+ performTestNewURI(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewURIArray.
+ */
+ @Test
+ public void testW2JNewURIArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent");
+ performTestNewURIArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewXMLGregorianCalendar.
+ */
+ @Test
+ public void testW2JNewXMLGregorianCalendar() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent");
+ performTestNewXMLGregorianCalendar(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewXMLGregorianCalendarArray.
+ */
+ @Test
+ public void testW2JNewXMLGregorianCalendarArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent");
+ performTestNewXMLGregorianCalendarArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewDuration.
+ */
+ @Test
+ public void testW2JNewDuration() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent");
+ performTestNewDuration(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewDurationArray.
+ */
+ @Test
+ public void testW2JNewDurationArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent");
+ performTestNewDurationArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewObject.
+ */
+ @Test
+ public void testW2JNewObject() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent");
+ performTestNewObject(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewObjectArray.
+ */
+ @Test
+ public void testW2JNewObjectArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent");
+ performTestNewObjectArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewImage.
+ */
+ @Test
+ public void testW2JNewImage() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent");
+ performTestNewImage(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewImageArray.
+ */
+ @Test
+ public void testW2JNewImageArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent");
+ performTestNewImageArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewDataHandler.
+ */
+ @Test
+ public void testW2JNewDataHandler() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent");
+ performTestNewDataHandler(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewDataHandlerArray.
+ */
+ @Test
+ public void testW2JNewDataHandlerArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent");
+ performTestNewDataHandlerArray(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewSource.
+ */
+ /*@Test
+ //@Ignore("junit.framework.ComparisonFailure: null expected:<... encoding=\"UTF-8\"?><[a>A</a]>> but was:<... encoding=\"UTF-8\"?><[return xmlns=\"http://jaxb.databindings.itest.sca.tuscany.apache.org/\">A</return]>>")
+ public void testW2JNewSource() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent");
+ performTestNewSource(serviceClient);
+ }*/
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewSourceArray.
+ */
+ /*@Test
+ @Ignore("TUSCANY-2452")
+ public void testW2JNewSourceArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent");
+ performTestNewSourceArray(serviceClient);
+ }*/
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewUUID.
+ */
+ @Test
+ public void testW2JNewUUID() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent");
+ performTestNewUUID(serviceClient);
+ }
+
+ /**
+ * Invokes the StandardTypesService service using WS binding.
+ * Service method invoked is getNewUUIDArray.
+ */
+ @Test
+ public void testW2JNewUUIDArray() throws Exception {
+ StandardTypesServiceClient serviceClient =
+ node.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent");
+ performTestNewUUIDArray(serviceClient);
+ }
+
+ private void performTestNewBigInteger(StandardTypesServiceClient serviceClient) {
+ BigInteger bi = new BigInteger("1234567890123456789012345678901234");
+ BigInteger expected = bi.negate();
+ BigInteger actual = serviceClient.getNewBigIntegerForward(bi);
+ Assert.assertEquals(expected, actual);
+ }
+
+ private void performTestNewBigIntegerArray(StandardTypesServiceClient serviceClient) {
+ BigInteger[] bia = new BigInteger[2];
+ bia[0] = new BigInteger("1234567890123456789012345678901234");
+ bia[1] = new BigInteger("-98765432109876543210987654321");
+ BigInteger[] actual = serviceClient.getNewBigIntegerArrayForward(bia);
+ Assert.assertEquals(bia.length, actual.length);
+ for (int i = 0; i < bia.length; ++i) {
+ Assert.assertEquals(bia[i].negate(), actual[i]);
+ }
+ }
+
+ private void performTestNewBigDecimal(StandardTypesServiceClient serviceClient) {
+ BigDecimal bd = new BigDecimal("12345678901234567890.12345678901234");
+ BigDecimal expected = bd.negate();
+ BigDecimal actual = serviceClient.getNewBigDecimalForward(bd);
+ Assert.assertEquals(expected, actual);
+ }
+
+ private void performTestNewBigDecimalArray(StandardTypesServiceClient serviceClient) {
+ BigDecimal[] bda = new BigDecimal[2];
+ bda[0] = new BigDecimal("1234567890123456.789012345678901234");
+ bda[1] = new BigDecimal("-987654321098765.43210987654321");
+ BigDecimal[] actual = serviceClient.getNewBigDecimalArrayForward(bda);
+ Assert.assertEquals(bda.length, actual.length);
+ for (int i = 0; i < bda.length; ++i) {
+ Assert.assertEquals(bda[i].negate(), actual[i]);
+ }
+ }
+
+ private void performTestNewCalendar(StandardTypesServiceClient serviceClient) {
+ Calendar[] ca = new Calendar[3];
+ String[] tz = {"GMT+05:30", "GMT+00:00", "GMT-05:00"};
+ for (int i = 0; i < ca.length; ++i) {
+ ca[i] = Calendar.getInstance(TimeZone.getTimeZone(tz[i]));
+ ca[i].set(Calendar.DAY_OF_MONTH, i + 1);
+ }
+ for (int i = 0; i < ca.length; ++i) {
+ Calendar actual = serviceClient.getNewCalendarForward(ca[i]);
+ ca[i].add(Calendar.DAY_OF_MONTH, 5);
+ if (actual instanceof GregorianCalendar && ca[i] instanceof GregorianCalendar) {
+ // FIXME: Is this a problem?
+ // The instance returned by service method invoked over binding.ws seems to have a gregorianCutover
+ // different from the instance passed. Adjust the gregorianCutover as per the input instance.
+ ((GregorianCalendar)actual).setGregorianChange(((GregorianCalendar)ca[i]).getGregorianChange());
+ ((GregorianCalendar)actual).setMinimalDaysInFirstWeek(((GregorianCalendar)ca[i]).getMinimalDaysInFirstWeek());
+ ((GregorianCalendar)actual).setFirstDayOfWeek(((GregorianCalendar)ca[i]).getFirstDayOfWeek());
+ }
+ Assert.assertEquals(ca[i], actual);
+ }
+ }
+
+ private void performTestNewCalendarArray(StandardTypesServiceClient serviceClient) {
+ Calendar[] ca = new Calendar[3];
+ String[] tz = {"GMT+05:30", "GMT+00:00", "GMT-05:00"};
+ for (int i = 0; i < ca.length; ++i) {
+ ca[i] = Calendar.getInstance(TimeZone.getTimeZone(tz[i]));
+ ca[i].set(Calendar.DAY_OF_MONTH, i + 1);
+ }
+ Calendar[] actual = serviceClient.getNewCalendarArrayForward(ca);
+ Assert.assertEquals(ca.length, actual.length);
+ for (int i = 0; i < ca.length; ++i) {
+ ca[i].add(Calendar.DAY_OF_MONTH, 5);
+ if (actual[i] instanceof GregorianCalendar && ca[i] instanceof GregorianCalendar) {
+ // FIXME: Is this a problem?
+ // The instance returned by service method invoked over binding.ws seems to have a gregorianCutover
+ // different from the instance passed. Adjust the gregorianCutover as per the input instance.
+ ((GregorianCalendar)actual[i]).setGregorianChange(((GregorianCalendar)ca[i]).getGregorianChange());
+ ((GregorianCalendar)actual[i]).setMinimalDaysInFirstWeek(((GregorianCalendar)ca[i]).getMinimalDaysInFirstWeek());
+ ((GregorianCalendar)actual[i]).setFirstDayOfWeek(((GregorianCalendar)ca[i]).getFirstDayOfWeek());
+ }
+ Assert.assertEquals(ca[i], actual[i]);
+ }
+ }
+
+ private void performTestNewDate(StandardTypesServiceClient serviceClient) {
+ Date d = new Date();
+ Date expected = new Date(d.getTime() + 5 * 24 * 60 * 60 * 1000);
+ Date actual = serviceClient.getNewDateForward(d);
+ Assert.assertEquals(expected, actual);
+ }
+
+ private void performTestNewDateArray(StandardTypesServiceClient serviceClient) {
+ Date[] d = new Date[2];
+ Date[] expected = new Date[d.length];
+ for (int i = 0; i < d.length; ++i) {
+ d[i] = new Date();
+ d[i].setTime(d[i].getTime() + i * 24 * 60 * 60 * 1000);
+ expected[i] = new Date(d[i].getTime() + 5 * 24 * 60 * 60 * 1000);
+ }
+ Date[] actual = serviceClient.getNewDateArrayForward(d);
+ Assert.assertEquals(expected.length, actual.length);
+ for (int i = 0; i < expected.length; ++i) {
+ Assert.assertEquals(expected[i], actual[i]);
+ }
+ }
+
+ private void performTestNewQName(StandardTypesServiceClient serviceClient) {
+ QName[] qnames = new QName[3];
+ qnames[0] = new QName("localPart");
+ qnames[1] = new QName("namespaceUri", "localPart");
+ qnames[2] = new QName("namespaceUri", "localPart", "prefix");
+ QName[] expected = new QName[qnames.length];
+ for (int i = 0; i < qnames.length; ++i) {
+ expected[i] =
+ new QName(qnames[i].getNamespaceURI() + "q", qnames[i].getLocalPart() + "q",
+ qnames[i].getPrefix() + "q");
+ }
+ for (int i = 0; i < qnames.length; ++i) {
+ QName actual = serviceClient.getNewQNameForward(qnames[i]);
+ Assert.assertEquals(expected[i], actual);
+ }
+ }
+
+ private void performTestNewQNameArray(StandardTypesServiceClient serviceClient) {
+ QName[] qnames = new QName[4];
+ qnames[0] = new QName("localPart");
+ qnames[1] = new QName("namespaceUri", "localPart");
+ qnames[2] = new QName("namespaceUri", "localPart", "prefix");
+ qnames[3] = new QName("localPart2");
+ QName[] expected = new QName[qnames.length];
+ for (int i = 0; i < qnames.length; ++i) {
+ expected[i] =
+ new QName(qnames[i].getNamespaceURI() + "q", qnames[i].getLocalPart() + "q",
+ qnames[i].getPrefix() + "q");
+ }
+ QName[] actual = serviceClient.getNewQNameArrayForward(qnames);
+ Assert.assertEquals(expected.length, actual.length);
+ for (int i = 0; i < qnames.length; ++i) {
+ Assert.assertEquals(expected[i], actual[i]);
+ }
+ }
+
+ private void performTestNewURI(StandardTypesServiceClient serviceClient) {
+ URI[] uris = new URI[4];
+ uris[0] = URI.create("a/b/c");
+ uris[1] = URI.create("http://abc/");
+ uris[2] = URI.create("ftp://a/b");
+ uris[3] = URI.create("http://abc/").resolve("xyz");
+
+ for (int i = 0; i < uris.length; ++i) {
+ URI expected = uris[i].resolve("uri");
+ URI actual = serviceClient.getNewURIForward(uris[i]);
+ Assert.assertEquals(expected, actual);
+ }
+ }
+
+ private void performTestNewURIArray(StandardTypesServiceClient serviceClient) {
+ URI[] uris = new URI[4];
+ uris[0] = URI.create("a/b/c");
+ // [rfeng] We need to have a trialign / to avoid the resolving problem
+ // FIXME: [vamsi] This is actually a data transformation problem. The array being returned from the service method is
+ // not making to the caller intact.
+ uris[1] = URI.create("http://abc/");
+ uris[2] = URI.create("ftp://a/b");
+ uris[3] = URI.create("http://abc/").resolve("xyz");
+
+ URI[] expected = new URI[uris.length];
+ for (int i = 0; i < uris.length; ++i) {
+ expected[i] = uris[i].resolve("uri");
+ }
+
+ URI[] actual = serviceClient.getNewURIArrayForward(uris);
+ Assert.assertEquals(expected.length, actual.length);
+ for (int i = 0; i < uris.length; ++i) {
+ Assert.assertEquals(expected[i], actual[i]);
+ }
+ }
+
+ private void performTestNewXMLGregorianCalendar(StandardTypesServiceClient serviceClient)
+ throws DatatypeConfigurationException {
+ DatatypeFactory df = DatatypeFactory.newInstance();
+ XMLGregorianCalendar[] xgcals = new XMLGregorianCalendar[3];
+ xgcals[0] = df.newXMLGregorianCalendar(new GregorianCalendar(1974, GregorianCalendar.APRIL, 19));
+ xgcals[1] = df.newXMLGregorianCalendar(new GregorianCalendar(1978, GregorianCalendar.OCTOBER, 13));
+ xgcals[2] = df.newXMLGregorianCalendar(new GregorianCalendar(2006, GregorianCalendar.JUNE, 16));
+
+ for (int i = 0; i < xgcals.length; ++i) {
+ XMLGregorianCalendar actual = serviceClient.getNewXMLGregorianCalendarForward(xgcals[i]);
+ xgcals[i].setDay(xgcals[i].getDay() + 5);
+ Assert.assertEquals(xgcals[i], actual);
+ }
+ }
+
+ private void performTestNewXMLGregorianCalendarArray(StandardTypesServiceClient serviceClient)
+ throws DatatypeConfigurationException {
+ DatatypeFactory df = DatatypeFactory.newInstance();
+ XMLGregorianCalendar[] xgcals = new XMLGregorianCalendar[3];
+ xgcals[0] = df.newXMLGregorianCalendar(new GregorianCalendar(1974, GregorianCalendar.APRIL, 19));
+ xgcals[1] = df.newXMLGregorianCalendar(new GregorianCalendar(1978, GregorianCalendar.OCTOBER, 13));
+ xgcals[2] = df.newXMLGregorianCalendar(new GregorianCalendar(2006, GregorianCalendar.JUNE, 16));
+
+ XMLGregorianCalendar[] actual = serviceClient.getNewXMLGregorianCalendarArrayForward(xgcals);
+ Assert.assertEquals(xgcals.length, actual.length);
+ for (int i = 0; i < xgcals.length; ++i) {
+ xgcals[i].setDay(xgcals[i].getDay() + 5);
+ Assert.assertEquals(xgcals[i], actual[i]);
+ }
+ }
+
+ private void performTestNewDuration(StandardTypesServiceClient serviceClient) throws DatatypeConfigurationException {
+ DatatypeFactory df = DatatypeFactory.newInstance();
+ Duration[] da = new Duration[3];
+ da[0] = df.newDuration(1000000000000L);
+ da[1] = df.newDurationDayTime(1000000000000L);
+ da[2] = df.newDurationYearMonth(true, 1, 3);
+
+ for (int i = 0; i < da.length; ++i) {
+ Assert.assertEquals(da[i].negate(), serviceClient.getNewDurationForward(da[i]));
+ }
+ }
+
+ private void performTestNewObject(StandardTypesServiceClient serviceClient) {
+ Object[] objs = new Object[5];
+ objs[0] = "Hello";
+ objs[1] = 10;
+ objs[2] = null;
+ objs[3] = -1.0;
+ objs[4] = null;
+
+ for (int i = 0; i < objs.length; ++i) {
+ Object expected = StandardTypesTransformer.getNewObject(objs[i]);
+ Object actual = serviceClient.getNewObjectForward(objs[i]);
+ Assert.assertEquals(expected, actual);
+ }
+ }
+
+ private void performTestNewObjectArray(StandardTypesServiceClient serviceClient) {
+ Object[] objs = new Object[5];
+ objs[0] = "Hello";
+ objs[1] = 10;
+ objs[2] = null;
+ objs[3] = -1.0;
+ objs[4] = null;
+
+ Object[] actual = serviceClient.getNewObjectArrayForward(objs);
+ Assert.assertEquals(objs.length, actual.length);
+ for (int i = 0; i < objs.length; ++i) {
+ Object expected = StandardTypesTransformer.getNewObject(objs[i]);
+ Assert.assertEquals(expected, actual[i]);
+ }
+ }
+
+ private void performTestNewImage(StandardTypesServiceClient serviceClient) throws InterruptedException {
+ // Create some images to test with.
+ Image[] imgs = new Image[3];
+ imgs[0] = new BufferedImage(10, 10, BufferedImage.TYPE_3BYTE_BGR);
+ imgs[1] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB);
+ imgs[2] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB);
+ imgs[0].getGraphics().drawLine(1, 1, 8, 8);
+ imgs[1].getGraphics().drawLine(8, 1, 1, 8);
+ imgs[2].getGraphics().drawLine(1, 8, 8, 1);
+
+ Image[] copy = imgs;
+ // Create the same images once again as the StandardTypesTransformer may manipulate the image passed.
+ imgs = new Image[3];
+ imgs[0] = new BufferedImage(10, 10, BufferedImage.TYPE_3BYTE_BGR);
+ imgs[1] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB);
+ imgs[2] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB);
+ imgs[0].getGraphics().drawLine(1, 1, 8, 8);
+ imgs[1].getGraphics().drawLine(8, 1, 1, 8);
+ imgs[2].getGraphics().drawLine(1, 8, 8, 1);
+
+ // Make sure the images and copies are equal using ImageInfo
+ for(int i = 0; i < imgs.length; ++i) {
+ Assert.assertEquals(new ImageInfo(imgs[i]), new ImageInfo(copy[i]));
+ }
+
+ for (int i = 0; i < imgs.length; ++i) {
+ Image actual = serviceClient.getNewImageForward(imgs[i]);
+ Image expected = StandardTypesTransformer.getNewImage(copy[i]);
+ // Compare using ImageInfo
+ Assert.assertEquals(new ImageInfo(expected), new ImageInfo(actual));
+ }
+ }
+
+ private void performTestNewImageArray(StandardTypesServiceClient serviceClient) throws InterruptedException {
+ // Create some images to test with.
+ Image[] imgs = new Image[3];
+ imgs[0] = new BufferedImage(10, 10, BufferedImage.TYPE_3BYTE_BGR);
+ imgs[1] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB);
+ imgs[2] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB);
+ imgs[0].getGraphics().drawLine(1, 1, 8, 8);
+ imgs[1].getGraphics().drawLine(8, 1, 1, 8);
+ imgs[2].getGraphics().drawLine(1, 8, 8, 1);
+
+ Image[] copy = imgs;
+ // Create the same images once again as the StandardTypesTransformer may manipulate the image passed.
+ imgs = new Image[3];
+ imgs[0] = new BufferedImage(10, 10, BufferedImage.TYPE_3BYTE_BGR);
+ imgs[1] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB);
+ imgs[2] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB);
+ imgs[0].getGraphics().drawLine(1, 1, 8, 8);
+ imgs[1].getGraphics().drawLine(8, 1, 1, 8);
+ imgs[2].getGraphics().drawLine(1, 8, 8, 1);
+
+ // Make sure the images and copies are equal using ImageInfo
+ for(int i = 0; i < imgs.length; ++i) {
+ Assert.assertEquals(new ImageInfo(imgs[i]), new ImageInfo(copy[i]));
+ }
+
+ Image[] actual = serviceClient.getNewImageArrayForward(imgs);
+ Assert.assertEquals(imgs.length, actual.length);
+ for (int i = 0; i < imgs.length; ++i) {
+ Image expected = StandardTypesTransformer.getNewImage(copy[i]);
+ // Compare using ImageInfo
+ Assert.assertEquals(new ImageInfo(expected), new ImageInfo(actual[i]));
+ }
+ }
+
+ private void performTestNewDurationArray(StandardTypesServiceClient serviceClient)
+ throws DatatypeConfigurationException {
+ DatatypeFactory df = DatatypeFactory.newInstance();
+ Duration[] da = new Duration[3];
+ da[0] = df.newDuration(1000000000000L);
+ da[1] = df.newDurationDayTime(1000000000000L);
+ da[2] = df.newDurationYearMonth(true, 1, 3);
+
+ Duration[] actual = serviceClient.getNewDurationArrayForward(da);
+ Assert.assertEquals(da.length, actual.length);
+ for (int i = 0; i < da.length; ++i) {
+ Assert.assertEquals(da[i].negate(), actual[i]);
+ }
+ }
+
+ private void performTestNewDataHandler(StandardTypesServiceClient serviceClient) throws IOException {
+ DataHandler[] dha = new DataHandler[3];
+ dha[0] = new DataHandler("Some data", "text/plain");
+ dha[1] = new DataHandler(new URL("http://tuscany.apache.org/home.html"));
+ dha[2] = new DataHandler(new ByteArrayDataSource("Some data2".getBytes()));
+
+ for (int i = 0; i < dha.length; ++i) {
+ DataHandler actual = serviceClient.getNewDataHandlerForward(dha[i]);
+ // Note: The DataHandler returned may use a different type of DataSource.
+ // Compare the data content instead of using equals().
+ Assert.assertTrue(compare(dha[i], actual));
+ }
+ }
+
+ private void performTestNewDataHandlerArray(StandardTypesServiceClient serviceClient) throws IOException {
+ DataHandler[] dha = new DataHandler[3];
+ dha[0] = new DataHandler("Some data", "text/plain");
+ dha[1] = new DataHandler(new URL("http://tuscany.apache.org/home.html"));
+ dha[2] = new DataHandler(new ByteArrayDataSource("Some data2".getBytes()));
+
+ DataHandler[] actual = serviceClient.getNewDataHandlerArrayForward(dha);
+ Assert.assertEquals(dha.length, actual.length);
+ for (int i = 0; i < dha.length; ++i) {
+ // Note: The DataHandler returned may use a different type of DataSource.
+ // Compare the data content instead of using equals().
+ Assert.assertTrue(compare(dha[i], actual[i]));
+ }
+ }
+
+ /*private void performTestNewSource(StandardTypesServiceClient serviceClient) throws Exception {
+ String xml = "<a>A<b>B</b><c>C</c></a>";
+ Source[] srcs = new Source[3];
+ srcs[0] = new DOMSource(new String2Node(null).transform(xml, null));
+ srcs[1] = new SAXSource(new InputSource(new StringReader(xml)));
+ srcs[2] = new StreamSource(new StringReader(xml));
+
+ for (int i = 0; i < srcs.length; ++i) {
+ Source expected = StandardTypesTransformer.getNewSource(srcs[i]);
+ Source actual = serviceClient.getNewSourceForward(srcs[i]);
+ // [rfeng] The data may come back as a different source
+ Assert.assertEquals(sourceToString(expected), sourceToString(actual));
+ }
+ }
+
+ private void performTestNewSourceArray(StandardTypesServiceClient serviceClient) throws Exception {
+ String xml = "<a>A<b>B</b><c>C</c></a>";
+ Source[] srcs = new Source[3];
+ srcs[0] = new DOMSource(new String2Node(null).transform(xml, null));
+ srcs[1] = new SAXSource(new InputSource(new StringReader(xml)));
+ srcs[2] = new StreamSource(new StringReader(xml));
+
+ Source[] actual = serviceClient.getNewSourceArrayForward(srcs);
+ Source[] expected = new Source[srcs.length];
+ for(int i = 0; i < srcs.length; ++i) {
+ expected[i] = StandardTypesTransformer.getNewSource(srcs[i]);
+ }
+ Assert.assertEquals(srcs.length, actual.length);
+ for (int i = 0; i < srcs.length; ++i) {
+ // [rfeng] The data may come back as a different source
+ Assert.assertEquals(sourceToString(expected[i]), sourceToString(actual[i]));
+ }
+
+ }*/
+
+ private void performTestNewUUID(StandardTypesServiceClient serviceClient) {
+ UUID[] uuids = new UUID[3];
+ uuids[0] = UUID.nameUUIDFromBytes("ABCDEFGHJKLMNOPQRSTUVWXYZ".getBytes());
+ uuids[1] = UUID.nameUUIDFromBytes("abcdefghjklmnopqrstuvwxyz".getBytes());
+ uuids[2] = UUID.randomUUID();
+
+ for (int i = 0; i < uuids.length; ++i) {
+ UUID expected = UUID.fromString(uuids[i].toString() + "AAA");
+ UUID actual = serviceClient.getNewUUIDForward(uuids[i]);
+ Assert.assertEquals(expected, actual);
+ }
+ }
+
+ private void performTestNewUUIDArray(StandardTypesServiceClient serviceClient) {
+ UUID[] uuids = new UUID[3];
+ uuids[0] = UUID.nameUUIDFromBytes("ABCDEFGHJKLMNOPQRSTUVWXYZ".getBytes());
+ uuids[1] = UUID.nameUUIDFromBytes("abcdefghjklmnopqrstuvwxyz".getBytes());
+ uuids[2] = UUID.randomUUID();
+
+ UUID[] actual = serviceClient.getNewUUIDArrayForward(uuids);
+ for (int i = 0; i < uuids.length; ++i) {
+ UUID expected = UUID.fromString(uuids[i].toString() + "AAA");
+ Assert.assertEquals(expected, actual[i]);
+ }
+ }
+
+ /**
+ * This method compares two DataHandlers.
+ * @return true if the data in the two handlers is the same.
+ */
+ private boolean compare(DataHandler dh1, DataHandler dh2) throws IOException {
+ InputStream inp1 = dh1.getInputStream();
+ InputStream inp2 = dh2.getInputStream();
+ for(;;) {
+ int i1 = inp1.read();
+ int i2 = inp2.read();
+ if(i1 == -1 && i2 == -1) {
+ return true;
+ } else if(i1 != -1 && i2 != -1) {
+ if(i1 != i2) {
+ return false;
+ }
+ } else {
+ return false;
+ }
+ }
+ }
+
+ /**
+ * This method returns the content of a source object as String.
+ */
+ private String sourceToString(Source s) throws Exception {
+ StringWriter sw = new StringWriter();
+ Result r = new StreamResult(sw);
+ TransformerFactory.newInstance().newTransformer().transform(s, r);
+ sw.close();
+ return sw.toString();
+ }
+
+ /**
+ * This class initializes with the width, height and pixel data of a java.awt.Image object.
+ */
+ private static class ImageInfo {
+ private int h, w, pixels[];
+ public ImageInfo(Image img) throws InterruptedException {
+ w = img.getWidth(null);
+ h = img.getHeight(null);
+ pixels = new int[w*h];
+ PixelGrabber pg = new PixelGrabber(img, 0, 0, w, h, pixels, 0, w);
+ pg.grabPixels();
+ }
+
+ public boolean equals(Object that) {
+ if(that == null) {
+ return false;
+ } else if(!(that instanceof ImageInfo)) {
+ return false;
+ }
+
+ ImageInfo that1 = (ImageInfo)that;
+ if(w != that1.w || h != that1.h || pixels == null || that1.pixels == null || pixels.length != that1.pixels.length) {
+ return false;
+ }
+ for(int i = 0; i < pixels.length; ++i) {
+ if(pixels[i] != that1.pixels[i]) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public String toString() {
+ return this.getClass().getSimpleName()+"[w = "+w+", h = "+h+", pixels = "+pixels+"]";
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/pom.xml
new file mode 100644
index 0000000000..ffa7732e16
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/databindings/pom.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-databindings</artifactId>
+ <name>Apache Tuscany SCA Databindings Integration Tests</name>
+ <version>2.0.1</version>
+
+ <packaging>pom</packaging>
+ <build>
+ <defaultGoal>install</defaultGoal>
+ </build>
+ <modules>
+ <module>jaxb-bottom-up</module>
+ <module>jaxb-top-down</module>
+ </modules>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/bin-distro-unzip/build.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/bin-distro-unzip/build.xml
new file mode 100644
index 0000000000..6e6a1ea9ef
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/bin-distro-unzip/build.xml
@@ -0,0 +1,27 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<project name="itest-unzip" default="unzip">
+
+ <target name="unzip">
+ <delete dir="../../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}.dir"/>
+ <unzip src="../../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}.zip"
+ dest="../../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}.dir"/>
+ </target>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/bin-distro-unzip/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/bin-distro-unzip/pom.xml
new file mode 100644
index 0000000000..01cdd4a29e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/bin-distro-unzip/pom.xml
@@ -0,0 +1,128 @@
+<?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-distribution</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-bin-distro-unzip</artifactId>
+ <name>Apache Tuscany SCA iTest Distribution Bin Distro Unzip</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-distribution-all</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+
+ <!-- HACK: use profile to control if we need to add tools.jar -->
+ <!-- Mac OS doesn't have tools.jar -->
+ <profiles>
+ <profile>
+ <id>not-sun-jdk</id>
+ <activation>
+ <file>
+ <missing>${java.home}/../lib/tools.jar</missing>
+ </file>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>run-samples</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="java.home" value="${java.home}"/>
+ <property name="tuscany.version" value="${project.version}" />
+ <ant antfile="./build.xml" />
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>sun-jdk</id>
+ <activation>
+ <file>
+ <exists>${java.home}/../lib/tools.jar</exists>
+ </file>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.3</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-trax</artifactId>
+ <version>1.6.5</version>
+ </dependency>
+ <!-- this JDk dependency is a workaround for Maven bug - http://jira.codehaus.org/browse/MNG-1323 -->
+ <dependency>
+ <groupId>sun.jdk</groupId>
+ <artifactId>tools</artifactId>
+ <version>1.6</version>
+ <scope>system</scope>
+ <systemPath>${java.home}/../lib/tools.jar</systemPath>
+ </dependency>
+ </dependencies>
+
+ <executions>
+ <execution>
+ <id>run-samples</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="java.home" value="${java.home}"/>
+ <property name="tuscany.version" value="${project.version}" />
+ <ant antfile="./build.xml" />
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-jsonrpc-calculator/build.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-jsonrpc-calculator/build.xml
new file mode 100644
index 0000000000..3822085094
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-jsonrpc-calculator/build.xml
@@ -0,0 +1,40 @@
+<!--
+ * 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 name="itest-samples" default="run">
+
+ <echo>${java.home}</echo>
+ <!--
+ compile and run each sample as though the user were running
+ samples from the binary distribution. Here we use ant targets
+ in the first instance but for some tests we may want to run
+ jars directly or fire up webapp containers and deploy wars. In other cases
+ we may need to run two samples together to provide reference and
+ service sides of the sample.
+ -->
+
+ <property name="distro.root" value="../../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}.dir/tuscany-sca-${tuscany.version}" />
+
+ <target name="run">
+
+ <ant antfile="build.xml"
+ dir="${distro.root}/samples/learning-more/binding-jsonrpc/calculator-contribution"/>
+
+ </target>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-jsonrpc-calculator/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-jsonrpc-calculator/pom.xml
new file mode 100644
index 0000000000..dc837bfffe
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-jsonrpc-calculator/pom.xml
@@ -0,0 +1,87 @@
+<?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-distribution</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-distribution-contribution-binding-jsonrpc-calculator</artifactId>
+ <name>Apache Tuscany SCA iTest Distribution Contribution binding-jsonrpc Calculator</name>
+
+ <profiles>
+ <profile>
+ <id>distribution</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-bin-distro-unzip</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.3</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-trax</artifactId>
+ <version>1.6.5</version>
+ </dependency>
+ <!-- this JDk dependency is a workaround for Maven bug - http://jira.codehaus.org/browse/MNG-1323 -->
+ <dependency>
+ <groupId>sun.jdk</groupId>
+ <artifactId>tools</artifactId>
+ <version>1.6</version>
+ <scope>system</scope>
+ <systemPath>${java.home}/../lib/tools.jar</systemPath>
+ </dependency>
+ </dependencies>
+
+ <executions>
+ <execution>
+ <id>run-samples</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="tuscany.version" value="${project.version}" />
+ <property name="java.home" value="${java.home}"/>
+ <ant antfile="./build.xml" target="run"/>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-rmi-calculator/build.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-rmi-calculator/build.xml
new file mode 100644
index 0000000000..7550f70fb5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-rmi-calculator/build.xml
@@ -0,0 +1,39 @@
+<!--
+ * 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 name="itest-samples" default="run">
+
+ <!--
+ compile and run each sample as though the user were running
+ samples from the binary distribution. Here we use ant targets
+ in the first instance but for some tests we may want to run
+ jars directly or fire up webapp containers and deploy wars. In other cases
+ we may need to run two samples together to provide reference and
+ service sides of the sample.
+ -->
+
+ <property name="distro.root" value="../../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}.dir/tuscany-sca-${tuscany.version}" />
+
+ <target name="run">
+ <ant antfile="build.xml"
+ dir="${distro.root}/samples/learning-more/binding-rmi/calculator-reference-contribution"/>
+ <ant antfile="build.xml"
+ dir="${distro.root}/samples/learning-more/binding-rmi/calculator-service-contribution"/>
+ </target>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-rmi-calculator/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-rmi-calculator/pom.xml
new file mode 100644
index 0000000000..6eae42b5fa
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-rmi-calculator/pom.xml
@@ -0,0 +1,68 @@
+<?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-distribution</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-distribution-contribution-binding-rmi-calculator</artifactId>
+ <name>Apache Tuscany SCA iTest Distribution Contribution binding-rmi Calculator</name>
+
+ <profiles>
+ <profile>
+ <id>distribution</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-bin-distro-unzip</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>run-samples</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="tuscany.version" value="${project.version}" />
+ <ant antfile="./build.xml" target="run"/>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-sca-calculator/build.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-sca-calculator/build.xml
new file mode 100644
index 0000000000..aa13cba49b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-sca-calculator/build.xml
@@ -0,0 +1,40 @@
+<!--
+ * 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 name="itest-samples" default="run">
+
+ <echo>${java.home}</echo>
+ <!--
+ compile and run each sample as though the user were running
+ samples from the binary distribution. Here we use ant targets
+ in the first instance but for some tests we may want to run
+ jars directly or fire up webapp containers and deploy wars. In other cases
+ we may need to run two samples together to provide reference and
+ service sides of the sample.
+ -->
+
+ <property name="distro.root" value="../../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}.dir/tuscany-sca-${tuscany.version}" />
+
+ <target name="run">
+
+ <ant antfile="build.xml"
+ dir="${distro.root}/samples/learning-more/binding-sca/calculator-contribution"/>
+
+ </target>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-sca-calculator/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-sca-calculator/pom.xml
new file mode 100644
index 0000000000..e79520a8e1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-sca-calculator/pom.xml
@@ -0,0 +1,87 @@
+<?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-distribution</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-distribution-contribution-binding-sca-calculator</artifactId>
+ <name>Apache Tuscany SCA iTest Distribution Contribution binding-sca Calculator</name>
+
+ <profiles>
+ <profile>
+ <id>distribution</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-bin-distro-unzip</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.3</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-trax</artifactId>
+ <version>1.6.5</version>
+ </dependency>
+ <!-- this JDk dependency is a workaround for Maven bug - http://jira.codehaus.org/browse/MNG-1323 -->
+ <dependency>
+ <groupId>sun.jdk</groupId>
+ <artifactId>tools</artifactId>
+ <version>1.6</version>
+ <scope>system</scope>
+ <systemPath>${java.home}/../lib/tools.jar</systemPath>
+ </dependency>
+ </dependencies>
+
+ <executions>
+ <execution>
+ <id>run-samples</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="tuscany.version" value="${project.version}" />
+ <property name="java.home" value="${java.home}"/>
+ <ant antfile="./build.xml" target="run"/>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-ws-calculator/build.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-ws-calculator/build.xml
new file mode 100644
index 0000000000..7b95bedf6c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-ws-calculator/build.xml
@@ -0,0 +1,40 @@
+<!--
+ * 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 name="itest-samples" default="run">
+
+ <echo>${java.home}</echo>
+ <!--
+ compile and run each sample as though the user were running
+ samples from the binary distribution. Here we use ant targets
+ in the first instance but for some tests we may want to run
+ jars directly or fire up webapp containers and deploy wars. In other cases
+ we may need to run two samples together to provide reference and
+ service sides of the sample.
+ -->
+
+ <property name="distro.root" value="../../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}.dir/tuscany-sca-${tuscany.version}" />
+
+ <target name="run">
+
+ <ant antfile="build.xml"
+ dir="${distro.root}/samples/learning-more/binding-ws/calculator-contribution"/>
+
+ </target>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-ws-calculator/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-ws-calculator/pom.xml
new file mode 100644
index 0000000000..db8bdb0a60
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-binding-ws-calculator/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.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-distribution</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-distribution-contribution-binding-ws-calculator</artifactId>
+ <name>Apache Tuscany SCA iTest Distribution Contribution binding-ws Calculator</name>
+
+ <profiles>
+ <profile>
+ <id>distribution</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-bin-distro-unzip</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>run-samples</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="java.home" value="${java.home}"/>
+ <property name="tuscany.version" value="${project.version}" />
+ <ant antfile="./build.xml" target="run"/>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-implementation-java-calculator/build.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-implementation-java-calculator/build.xml
new file mode 100644
index 0000000000..e70619ab51
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-implementation-java-calculator/build.xml
@@ -0,0 +1,40 @@
+<!--
+ * 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 name="itest-samples" default="run">
+
+ <echo>${java.home}</echo>
+ <!--
+ compile and run each sample as though the user were running
+ samples from the binary distribution. Here we use ant targets
+ in the first instance but for some tests we may want to run
+ jars directly or fire up webapp containers and deploy wars. In other cases
+ we may need to run two samples together to provide reference and
+ service sides of the sample.
+ -->
+
+ <property name="distro.root" value="../../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}.dir/tuscany-sca-${tuscany.version}" />
+
+ <target name="run">
+
+ <ant antfile="build.xml"
+ dir="${distro.root}/samples/learning-more/implementation-java/calculator-contribution"/>
+
+ </target>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-implementation-java-calculator/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-implementation-java-calculator/pom.xml
new file mode 100644
index 0000000000..68f31ce2bd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/contribution-implementation-java-calculator/pom.xml
@@ -0,0 +1,87 @@
+<?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-distribution</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-distribution-contribution-implementation-java-calculator</artifactId>
+ <name>Apache Tuscany SCA iTest Distribution contribution implementation-java Calculator</name>
+
+ <profiles>
+ <profile>
+ <id>distribution</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-bin-distro-unzip</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.3</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-trax</artifactId>
+ <version>1.6.5</version>
+ </dependency>
+ <!-- this JDk dependency is a workaround for Maven bug - http://jira.codehaus.org/browse/MNG-1323 -->
+ <dependency>
+ <groupId>sun.jdk</groupId>
+ <artifactId>tools</artifactId>
+ <version>1.6</version>
+ <scope>system</scope>
+ <systemPath>${java.home}/../lib/tools.jar</systemPath>
+ </dependency>
+ </dependencies>
+
+ <executions>
+ <execution>
+ <id>run-samples</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="tuscany.version" value="${project.version}" />
+ <property name="java.home" value="${java.home}"/>
+ <ant antfile="./build.xml" target="run"/>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/launcher-embedded-jse/build.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/launcher-embedded-jse/build.xml
new file mode 100644
index 0000000000..02c353e083
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/launcher-embedded-jse/build.xml
@@ -0,0 +1,57 @@
+<!--
+ * 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 name="itest-samples" default="run">
+
+ <echo>${java.home}</echo>
+ <!--
+ compile and run each sample as though the user were running
+ samples from the binary distribution. Here we use ant targets
+ in the first instance but for some tests we may want to run
+ jars directly or fire up webapp containers and deploy wars. In other cases
+ we may need to run two samples together to provide reference and
+ service sides of the sample.
+ -->
+
+ <property name="distro.root" value="../../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}.dir/tuscany-sca-${tuscany.version}" />
+
+ <target name="run">
+
+ <ant dir="${distro.root}/samples/running-tuscany/embedded-jse"
+ target="sample-binding-sca-calculator-contribution">
+ </ant>
+
+ <ant dir="${distro.root}/samples/running-tuscany/embedded-jse"
+ target="sample-binding-ws-calculator-contribution">
+ </ant>
+
+ <ant dir="${distro.root}/samples/running-tuscany/embedded-jse"
+ target="sample-binding-rmi-calculator-contribution">
+ </ant>
+
+ <ant dir="${distro.root}/samples/running-tuscany/embedded-jse"
+ target="sample-implementation-java-calculator-contribution">
+ </ant>
+
+ <ant dir="${distro.root}/samples/running-tuscany/embedded-jse"
+ target="sample-implementation-java-calculator-async-contribution">
+ </ant>
+
+ </target>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/launcher-embedded-jse/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/launcher-embedded-jse/pom.xml
new file mode 100644
index 0000000000..cdb90ddaf8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/launcher-embedded-jse/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.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-distribution</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-distribution-launcher-embedded-jse</artifactId>
+ <name>Apache Tuscany SCA iTest Distribution Launcher Embedded JSE</name>
+
+ <profiles>
+ <profile>
+ <id>distribution</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-bin-distro-unzip</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>run-samples</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="java.home" value="${java.home}"/>
+ <property name="tuscany.version" value="${project.version}" />
+ <ant antfile="./build.xml" target="run"/>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/launcher-embedded-osgi/build.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/launcher-embedded-osgi/build.xml
new file mode 100644
index 0000000000..0015b13f49
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/launcher-embedded-osgi/build.xml
@@ -0,0 +1,45 @@
+<!--
+ * 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 name="itest-samples" default="run">
+
+ <echo>${java.home}</echo>
+ <!--
+ compile and run each sample as though the user were running
+ samples from the binary distribution. Here we use ant targets
+ in the first instance but for some tests we may want to run
+ jars directly or fire up webapp containers and deploy wars. In other cases
+ we may need to run two samples together to provide reference and
+ service sides of the sample.
+ -->
+
+ <property name="distro.root" value="../../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}.dir/tuscany-sca-${tuscany.version}" />
+
+ <target name="run">
+
+<!-- Seems to be hanging in the console at the end of the OSGi run
+ configure it to run no tests for now
+ <ant dir="${distro.root}/samples/launcher-embedded-osgi"
+ target="run-contribution-binding-sca-calculator"/>
+-->
+
+ <ant dir="${distro.root}/samples/running-tuscany/embedded-osgi"/>
+
+ </target>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/launcher-embedded-osgi/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/launcher-embedded-osgi/pom.xml
new file mode 100644
index 0000000000..6006dc9569
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/launcher-embedded-osgi/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.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-distribution</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-distribution-launcher-embedded-osgi</artifactId>
+ <name>Apache Tuscany SCA iTest Distribution Launcher Embedded OSGi</name>
+
+ <profiles>
+ <profile>
+ <id>distribution</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-bin-distro-unzip</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>run-samples</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="java.home" value="${java.home}"/>
+ <property name="tuscany.version" value="${project.version}" />
+ <ant antfile="./build.xml" target="run"/>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/legal-checks/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/legal-checks/pom.xml
new file mode 100644
index 0000000000..796a142007
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/legal-checks/pom.xml
@@ -0,0 +1,76 @@
+<?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-distribution</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-distribution-legal-checks</artifactId>
+ <name>Apache Tuscany SCA iTest Distribution Legal Checks</name>
+
+ <profiles>
+ <profile>
+ <id>distribution</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-bin-distro-unzip</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <version>0.6</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <basedir>../../../../distribution/all/target/apache-tuscany-sca-all-${project.version}.dir</basedir>
+ <excludeSubProjects>false</excludeSubProjects>
+ <excludes>
+ <exclude>tuscany-sca-2.0.1/CHANGES</exclude>
+ <exclude>**/MANIFEST.MF</exclude>
+ <exclude>**/DEPENDENCIES</exclude>
+ <exclude>**/target/**/*.log</exclude>
+ <exclude>**/config.ini</exclude>
+ <exclude>**/*.odg</exclude>
+ <exclude>**/*.html</exclude>
+ <exclude>tuscany-sca-2.0.1/features/configuration/config.ini</exclude>
+ <exclude>../../../../maven/archetypes/policy/src/test/resources/projects/basic/goal.txt</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/legal-checks/src/test/java/itest/JarsInLICENSETestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/legal-checks/src/test/java/itest/JarsInLICENSETestCase.java
new file mode 100644
index 0000000000..49d6486aa2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/legal-checks/src/test/java/itest/JarsInLICENSETestCase.java
@@ -0,0 +1,164 @@
+/*
+ * 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 itest;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.junit.Test;
+
+/**
+ * Checks that all jar files included in the distribution are mentioned in the LICENSE file
+ * and that all jars mentioned in the LICENSE are in the distribution.
+ */
+public class JarsInLICENSETestCase {
+
+ @Test
+ public void testJars() throws Exception {
+ File distroRoot = getUnzipedDistroRoot();
+
+ File licenseFile = new File(distroRoot, "LICENSE");
+ if (!licenseFile.exists()) {
+ throw new IllegalStateException("can't find LICENSE file at: " + licenseFile.getAbsoluteFile().toString());
+ }
+
+ File libDirectory = new File(distroRoot, "modules");
+ if (!libDirectory.exists()) {
+ throw new IllegalStateException("can't find modules folder at: " + libDirectory.getAbsoluteFile().toString());
+ }
+
+ List<String> jars = getJarsInDistro(libDirectory);
+
+ List<String> bad2 = getLICENSEJarsNotInDistro(licenseFile, jars);
+ if (bad2.size() > 0) {
+ System.err.println("Jars in LICENSE but not in Distribution: " + bad2);
+ }
+
+ List<String> bad1 = getJarsNotInLICENSE(jars, licenseFile);
+ if (bad1.size() > 0) {
+ System.err.println("Jars in distribution but not in LICENSE: " + bad1);
+ }
+
+ if (bad1.size() > 0 || bad2.size() > 0) {
+ throw new IllegalStateException("LICENSE problems, check log");
+ }
+ }
+
+ private List<String> getLICENSEJarsNotInDistro(File licenseFile, List<String> jars) throws IOException {
+ List<String> badJars = new ArrayList<String>();
+ BufferedReader reader = new BufferedReader(new FileReader(licenseFile));
+ String line = null;
+ while ((line = reader.readLine()) != null) {
+ line = line.trim();
+ if (line.contains(".jar")) {
+ StringTokenizer st = new StringTokenizer(line);
+ while (st.hasMoreTokens()) {
+ String s = st.nextToken();
+ if (s.contains(".jar")) {
+ if (s.startsWith("(")) {
+ s = s.substring(1);
+ }
+ if (s.endsWith(",") || s.endsWith(":")) {
+ s = s.substring(0, s.length()-1);
+ }
+ if (s.endsWith(")")) {
+ s = s.substring(0, s.length()-1);
+ }
+ if (!jars.contains(s) && !s.startsWith("tuscany-")) {
+ badJars.add(s);
+ }
+ }
+ }
+ }
+ }
+ return badJars;
+ }
+
+ private List<String> getJarsNotInLICENSE(List<String> jars, File licenseFile) throws IOException {
+ List<String> badJars = new ArrayList<String>();
+ String licenseText = readLICENSE(licenseFile);
+ for (String jar : jars) {
+ if (!licenseText.contains(jar)) {
+ if (jar.startsWith("tuscany-") || jar.startsWith("sample-") || jar.startsWith("test-") || jar.startsWith("itest-")) {
+ // ignore tuscany jars as they're not mentioned in the LICENSE file
+ } else if (System.getProperty("java.vendor").equals("IBM Corporation") && (jar.equals("bcel-5.2.jar") || jar.equals("jakarta-regexp-1.4.jar"))) {
+ // ignore IBM JDK specific jars.
+ } else {
+ badJars.add(jar);
+ }
+ }
+ }
+ return badJars;
+ }
+
+ private List<String> getJarsInDistro(File directory) {
+ List<String> jars = new ArrayList<String>();
+ for (String fn : directory.list()){
+ if (fn.endsWith(".jar")) {
+ jars.add(fn);
+ } else {
+ File f = new File(directory, fn);
+ if (f.isDirectory()) {
+ jars.addAll(getJarsInDistro(f));
+ }
+ }
+ }
+ return jars;
+ }
+
+ private File getUnzipedDistroRoot() {
+ File distroTarget = new File("../../../../distribution/all/target");
+ File root = null;
+ for (String f : distroTarget.list()) {
+ if (f.endsWith(".dir") && !f.endsWith("src.dir")) {
+ root = new File(distroTarget, f);
+ break;
+ }
+ }
+ if (root == null) {
+ throw new IllegalStateException("can't find distro root");
+ }
+ if (root.list().length != 1) {
+ throw new IllegalStateException("expecting one directory in distro root");
+ }
+ root = new File(root, root.list()[0]);
+ return root;
+ }
+
+ private static String readLICENSE(File licenseFile) throws java.io.IOException {
+ StringBuffer fileData = new StringBuffer();
+ BufferedReader reader = new BufferedReader(new FileReader(licenseFile));
+ char[] buf = new char[1024];
+ int numRead = 0;
+ while ((numRead = reader.read(buf)) != -1) {
+ String readData = String.valueOf(buf, 0, numRead);
+ fileData.append(readData);
+ buf = new char[1024];
+ }
+ reader.close();
+ return fileData.toString();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/pom.xml
new file mode 100644
index 0000000000..dd3ac83e5b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/pom.xml
@@ -0,0 +1,100 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <packaging>pom</packaging>
+ <artifactId>itest-distribution</artifactId>
+ <name>Apache Tuscany SCA iTest Distribution</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-distribution-all</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>default</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <modules>
+ <module>legal-checks</module>
+
+<!--
+
+Take out these sample tests while the sample reorg happens
+
+ <module>contribution-binding-sca-calculator</module>
+ <module>contribution-binding-ws-calculator</module>
+ <module>contribution-binding-rmi-calculator</module>
+ <module>contribution-binding-jsonrpc-calculator</module>
+ <module>contribution-implementation-java-calculator</module>
+ <module>launcher-embedded-jse</module>
+ <module>launcher-embedded-osgi</module>
+
+-->
+ </modules>
+ </profile>
+
+ <profile>
+ <id>distribution</id>
+ <activation>
+ <property>
+ <name>buildZips</name>
+ <value>true</value>
+ </property>
+ </activation>
+ <modules>
+ <module>src-distro-unzip</module>
+ <module>src-distro-rat</module>
+ <module>bin-distro-unzip</module>
+ <module>legal-checks</module>
+<!--
+
+Take out these sample tests while the sample reorg happens
+
+ <module>contribution-binding-sca-calculator</module>
+ <module>contribution-binding-ws-calculator</module>
+ <module>contribution-binding-rmi-calculator</module>
+ <module>contribution-binding-jsonrpc-calculator</module>
+ <module>contribution-implementation-java-calculator</module>
+ <module>launcher-embedded-jse</module>
+ <module>launcher-embedded-osgi</module>
+
+-->
+ </modules>
+ </profile>
+ </profiles>
+
+ <build>
+ <defaultGoal>install</defaultGoal>
+ </build>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/src-distro-rat/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/src-distro-rat/pom.xml
new file mode 100644
index 0000000000..a67d164549
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/src-distro-rat/pom.xml
@@ -0,0 +1,94 @@
+<?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-distribution</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-distribution-src-dsitro-rat</artifactId>
+ <name>Apache Tuscany SCA iTest Distribution Src Distro RAT</name>
+
+ <profiles>
+ <profile>
+ <id>distribution</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-src-distro-unzip</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <version>0.6</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <basedir>../../../../distribution/all/target/apache-tuscany-sca-all-2.0-src.dir</basedir>
+ <excludeSubProjects>false</excludeSubProjects>
+ <excludes>
+ <exclude>tuscany-sca-2.0-src/CHANGES</exclude>
+ <exclude>**/*.MF</exclude>
+ <exclude>tuscany-sca-2.0-src/testing/itest/spi/spi-safe.txt</exclude>
+ <exclude>tuscany-sca-2.0-src/testing/compliance-tests/binding-ws/sca_variables.dtd</exclude>
+ <exclude>tuscany-sca-2.0-src/testing/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorJass.config</exclude>
+ <exclude>tuscany-sca-2.0-src/modules/binding-ws-runtime-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/repository/modules/modules.list</exclude>
+ <exclude>tuscany-sca-2.0-src/modules/binding-ws-runtime-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/repository/services/services.list</exclude>
+ <exclude>tuscany-sca-2.0-src/modules/implementation-spring-tie/src/main/resources/META-INF/spring.handlers</exclude>
+ <exclude>tuscany-sca-2.0-src/modules/implementation-spring-tie/src/main/resources/META-INF/spring.schemas</exclude>
+ <exclude>tuscany-sca-2.0-src/modules/implementation-spring-runtime/src/main/resources/META-INF/spring.handlers</exclude>
+ <exclude>tuscany-sca-2.0-src/modules/implementation-spring-runtime/src/main/resources/META-INF/spring.schemas</exclude>
+ <exclude>tuscany-sca-2.0-src/maven/archetypes/binding/src/test/resources/projects/basic/goal.txt</exclude>
+ <exclude>tuscany-sca-2.0-src/maven/archetypes/implementation/src/test/resources/projects/basic/goal.txt</exclude>
+ <exclude>tuscany-sca-2.0-src/modules/implementation-python-runtime/src/main/resources/django/__init__.py</exclude>
+ <exclude>tuscany-sca-2.0-src/modules/implementation-python-runtime/src/main/resources/django/utils/__init__.py</exclude>
+ <exclude>tuscany-sca-2.0-src/maven/archetypes/policy/src/test/resources/projects/basic/goal.txt</exclude>
+
+ <!-- these ones we need to implement RAT license processors to handle the non-AL headers, just exclude for now -->
+ <exclude>tuscany-sca-2.0-src/modules/assembly-xsd/**/*.*</exclude>
+ <exclude>tuscany-sca-2.0-src/modules/sca-api/**/*.*</exclude>
+ <exclude>tuscany-sca-2.0-src/modules/implementation-web-runtime/src/main/resources/META-INF/sca.tld</exclude>
+ <exclude>tuscany-sca-2.0-src/modules/assembly-xml/src/main/resources/META-INF/sca-policy-1.1-intents-definitions-cd04.xml</exclude>
+ <exclude>tuscany-sca-2.0-src/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientFactoryFinderImpl.java</exclude>
+ <exclude>tuscany-sca-2.0-src/modules/binding-comet-runtime/src/main/resources/jquery.guid.js</exclude>
+ <exclude>tuscany-sca-2.0-src/modules/binding-comet-runtime/src/main/resources/jquery.json-2.2.min.js</exclude>
+ <exclude>tuscany-sca-2.0-src/modules/implementation-python-runtime/src/main/resources/django/utils/simplejson/*</exclude>
+ <exclude>tuscany-sca-2.0-src/testing/compliance-tests/binding-jms/src/test/resources/tuscany-oasis-sca-tests-errors.properties</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/src-distro-unzip/build.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/src-distro-unzip/build.xml
new file mode 100644
index 0000000000..db9fe4a969
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/src-distro-unzip/build.xml
@@ -0,0 +1,27 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<project name="itest-unzip" default="unzip">
+
+ <target name="unzip">
+ <delete dir="../../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}-src.dir"/>
+ <unzip src="../../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}-src.zip"
+ dest="../../../../distribution/all/target/apache-tuscany-sca-all-${tuscany.version}-src.dir"/>
+ </target>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/src-distro-unzip/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/src-distro-unzip/pom.xml
new file mode 100644
index 0000000000..2afa082c72
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/distribution/src-distro-unzip/pom.xml
@@ -0,0 +1,128 @@
+<?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-distribution</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-src-distro-unzip</artifactId>
+ <name>Apache Tuscany SCA iTest Distribution Src Distro Unzip</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-distribution-all</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+
+ <!-- HACK: use profile to control if we need to add tools.jar -->
+ <!-- Mac OS doesn't have tools.jar -->
+ <profiles>
+ <profile>
+ <id>not-sun-jdk</id>
+ <activation>
+ <file>
+ <missing>${java.home}/../lib/tools.jar</missing>
+ </file>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>run-samples</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="java.home" value="${java.home}"/>
+ <property name="tuscany.version" value="${project.version}" />
+ <ant antfile="./build.xml" />
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>sun-jdk</id>
+ <activation>
+ <file>
+ <exists>${java.home}/../lib/tools.jar</exists>
+ </file>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.3</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-trax</artifactId>
+ <version>1.6.5</version>
+ </dependency>
+ <!-- this JDk dependency is a workaround for Maven bug - http://jira.codehaus.org/browse/MNG-1323 -->
+ <dependency>
+ <groupId>sun.jdk</groupId>
+ <artifactId>tools</artifactId>
+ <version>1.6</version>
+ <scope>system</scope>
+ <systemPath>${java.home}/../lib/tools.jar</systemPath>
+ </dependency>
+ </dependencies>
+
+ <executions>
+ <execution>
+ <id>run-samples</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="java.home" value="${java.home}"/>
+ <property name="tuscany.version" value="${project.version}" />
+ <ant antfile="./build.xml" />
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/pom.xml
new file mode 100644
index 0000000000..49179fe7a2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/pom.xml
@@ -0,0 +1,79 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-domain-node-hazelcast</artifactId>
+ <name>Apache Tuscany SCA iTest Domain Node Hazelcast</name>
+
+ <dependencies>
+
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-assembly-xml</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-data-api</artifactId>
+ <version>2.0.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-domain-node</artifactId>
+ <version>2.0.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-domain-hazelcast</artifactId>
+ <version>2.0.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-wsdlgen</artifactId>
+ <version>2.0.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/java/itest/nodes/Helloworld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/java/itest/nodes/Helloworld.java
new file mode 100644
index 0000000000..ee15dfba12
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/java/itest/nodes/Helloworld.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package itest.nodes;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface Helloworld {
+
+ String sayHello(String name);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/java/org/apache/tuscany/sca/impl/Node2TestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/java/org/apache/tuscany/sca/impl/Node2TestCase.java
new file mode 100644
index 0000000000..45dbec605a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/java/org/apache/tuscany/sca/impl/Node2TestCase.java
@@ -0,0 +1,312 @@
+/*
+ * 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.impl;
+
+import java.io.Reader;
+import java.io.StringReader;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.stream.XMLStreamException;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.contribution.Contribution;
+import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
+import org.apache.tuscany.sca.monitor.ValidationException;
+import org.apache.tuscany.sca.runtime.ActivationException;
+import org.apache.tuscany.sca.runtime.ContributionDescription;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchDomainException;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class Node2TestCase {
+
+ @Test
+ public void localInstall() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
+ Node node = TuscanyRuntime.newInstance().createNode("ImportTestCase");
+ node.installContribution("src/test/resources/import.jar");
+
+ Assert.assertEquals(1, node.getInstalledContributionURIs().size());
+ Assert.assertEquals("import", node.getInstalledContributionURIs().get(0));
+ Contribution c = node.getContribution("import");
+ Assert.assertNotNull(c);
+ }
+
+ @Test
+ public void remoteInstall() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
+ Node node = TuscanyRuntime.newInstance().createNode("ImportTestCase");
+ node.installContribution("https://repository.apache.org/content/groups/snapshots/org/apache/tuscany/sca/samples/helloworld/2.0-SNAPSHOT/helloworld-2.0-SNAPSHOT.jar");
+
+ Assert.assertEquals(1, node.getInstalledContributionURIs().size());
+ Assert.assertEquals("helloworld", node.getInstalledContributionURIs().get(0));
+ Contribution c = node.getContribution("helloworld");
+ Assert.assertNotNull(c);
+ }
+
+ @Test
+ public void DistributedInstall() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
+ TuscanyRuntime runtime = TuscanyRuntime.newInstance();
+ try {
+ Node nodeA = runtime.createNode("uri:DistributedInstall");
+ nodeA.installContribution("https://repository.apache.org/content/groups/snapshots/org/apache/tuscany/sca/samples/helloworld/2.0-SNAPSHOT/helloworld-2.0-SNAPSHOT.jar");
+ nodeA.installContribution("src/test/resources/export.jar");
+
+ Assert.assertEquals(2, nodeA.getInstalledContributionURIs().size());
+ Assert.assertTrue(nodeA.getInstalledContributionURIs().contains("export"));
+ Assert.assertTrue(nodeA.getInstalledContributionURIs().contains("helloworld"));
+ Contribution cA = nodeA.getContribution("helloworld");
+ Assert.assertNotNull(cA);
+
+ Node nodeB = runtime.createNode("uri:DistributedInstall");
+ Assert.assertEquals(2, nodeB.getInstalledContributionURIs().size());
+ Assert.assertTrue(nodeB.getInstalledContributionURIs().contains("export"));
+ Assert.assertTrue(nodeB.getInstalledContributionURIs().contains("helloworld"));
+ Contribution cB = nodeB.getContribution("helloworld");
+ Assert.assertNotNull(cB);
+
+ ContributionDescription cd = ((NodeImpl)nodeB).getInstalledContribution("export");
+ Assert.assertEquals(1, cd.getJavaExports().size());
+ Assert.assertEquals("sample", cd.getJavaExports().get(0));
+ } finally {
+ runtime.stop();
+ }
+ }
+
+ @Test
+ public void deployables() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
+ Node node = TuscanyRuntime.newInstance().createNode("ImportTestCase");
+ node.installContribution("src/test/resources/import.jar");
+
+ Assert.assertEquals(1, node.getInstalledContributionURIs().size());
+ Assert.assertEquals("import", node.getInstalledContributionURIs().get(0));
+ List<String> ds = node.getDeployableCompositeURIs("import");
+ Assert.assertEquals(1, ds.size());
+ Assert.assertEquals("helloworld.composite", ds.get(0));
+
+ }
+
+ @Test
+ public void exports() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
+ Node node = TuscanyRuntime.newInstance().createNode("ImportTestCase");
+ node.installContribution("src/test/resources/export.jar");
+
+ Assert.assertEquals(1, node.getInstalledContributionURIs().size());
+ Assert.assertEquals("export", node.getInstalledContributionURIs().get(0));
+
+ ContributionDescription cd = ((NodeImpl)node).getInstalledContribution("export");
+ Assert.assertEquals(1, cd.getJavaExports().size());
+ Assert.assertEquals("sample", cd.getJavaExports().get(0));
+ }
+
+ @Test
+ public void validValidate() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
+ Node node = TuscanyRuntime.newInstance().createNode("ImportTestCase");
+ node.installContribution("src/test/resources/sample-helloworld.jar");
+ node.validateContribution("sample-helloworld");
+ }
+
+ @Test
+ public void invalidValidate() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
+ Node node = TuscanyRuntime.newInstance().createNode("ImportTestCase");
+ node.installContribution("src/test/resources/import.jar");
+ try {
+ node.validateContribution("import");
+ } catch (ValidationException e) {
+ Assert.assertTrue(e.getMessage().endsWith("Unresolved import: Import = sample"));
+ }
+ }
+
+ @Test
+ public void importExportValidate() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
+ Node node = TuscanyRuntime.newInstance().createNode("ImportTestCase");
+ node.installContribution("src/test/resources/import.jar");
+ try {
+ node.validateContribution("import");
+ } catch (ValidationException e) {
+ // expected
+ }
+ node.installContribution("src/test/resources/export.jar");
+ node.validateContribution("import");
+ node.startComposite("import", "helloworld.composite");
+ Map<String, List<String>> scs = node.getStartedCompositeURIs();
+ Assert.assertEquals(1, scs.size());
+ }
+
+ @Test
+ public void importExportDistributedValidate() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
+ TuscanyRuntime runtime = TuscanyRuntime.newInstance();
+ try {
+ Node nodeA = runtime.createNode("uri:ImportTestCase");
+ nodeA.installContribution("src/test/resources/import.jar");
+ try {
+ nodeA.validateContribution("import");
+ } catch (ValidationException e) {
+ // expected
+ }
+ Node nodeB =runtime.createNode("uri:ImportTestCase");
+ nodeB.installContribution("src/test/resources/export.jar");
+ nodeA.validateContribution("import");
+ nodeA.startComposite("import", "helloworld.composite");
+ Map<String, List<String>> scs = nodeB.getStartedCompositeURIs();
+ Assert.assertEquals(1, scs.size());
+ }finally {
+ runtime.stop();
+ }
+
+ }
+
+ @Test
+ public void startTest() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
+ Node node = TuscanyRuntime.newInstance().createNode("ImportTestCase");
+ node.installContribution("src/test/resources/sample-helloworld.jar");
+ Assert.assertEquals(0, node.getStartedCompositeURIs().size());
+
+ node.startComposite("sample-helloworld", "helloworld.composite");
+ Assert.assertEquals(1, node.getStartedCompositeURIs().size());
+ Assert.assertEquals("helloworld.composite", node.getStartedCompositeURIs().get("sample-helloworld").get(0));
+
+ node.stopComposite("sample-helloworld", "helloworld.composite");
+// Assert.assertEquals(0, node.getStartedComposites().size());
+ node.startComposite("sample-helloworld", "helloworld.composite");
+ Assert.assertEquals(1, node.getStartedCompositeURIs().size());
+ Assert.assertEquals("helloworld.composite", node.getStartedCompositeURIs().get("sample-helloworld").get(0));
+ node.stopComposite("sample-helloworld", "helloworld.composite");
+ }
+
+ @Test
+ public void startDistributedTest() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, InterruptedException {
+ TuscanyRuntime runtime = TuscanyRuntime.newInstance();
+ try {
+ Node node = runtime.createNode("uri:ImportTestCase");
+ Node node2 = runtime.createNode("uri:ImportTestCase");
+
+ node.installContribution("src/test/resources/sample-helloworld.jar");
+ Assert.assertEquals(1, node.getInstalledContributionURIs().size());
+ Assert.assertEquals(1, node2.getInstalledContributionURIs().size());
+
+ node.startComposite("sample-helloworld", "helloworld.composite");
+ Assert.assertEquals(1, node.getStartedCompositeURIs().size());
+ Assert.assertEquals(1, node2.getStartedCompositeURIs().size());
+
+ Assert.assertEquals("helloworld.composite", node.getStartedCompositeURIs().get("sample-helloworld").get(0));
+ Assert.assertEquals("helloworld.composite", node2.getStartedCompositeURIs().get("sample-helloworld").get(0));
+
+ node.stopComposite("sample-helloworld", "helloworld.composite");
+ Assert.assertEquals(0, node.getStartedCompositeURIs().size());
+ Assert.assertEquals(0, node2.getStartedCompositeURIs().size());
+
+ node2.startComposite("sample-helloworld", "helloworld.composite");
+ Assert.assertEquals(1, node.getStartedCompositeURIs().size());
+ Assert.assertEquals("helloworld.composite", node.getStartedCompositeURIs().get("sample-helloworld").get(0));
+
+ Assert.assertEquals(1, node2.getStartedCompositeURIs().size());
+ Assert.assertEquals("helloworld.composite", node2.getStartedCompositeURIs().get("sample-helloworld").get(0));
+
+ } finally {
+ runtime.stop();
+ }
+ }
+
+ @Test
+ public void addDeploymentCompositeTest() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, XMLStreamException {
+ Node node = TuscanyRuntime.newInstance().createNode("addDeploymentCompositeTest");
+ String curi = node.installContribution("src/test/resources/sample-helloworld.jar");
+
+ String compositeXML =
+ "<composite xmlns=\"http://docs.oasis-open.org/ns/opencsa/sca/200912\""
+ + " xmlns:tuscany=\"http://tuscany.apache.org/xmlns/sca/1.1\""
+ + " targetNamespace=\"http://test/composite\""
+ + " name=\"TestComposite\">"
+ + " <component name=\"TestComponent\">"
+ + " <implementation.java class=\"sample.HelloworldImpl\"/>"
+ + " </component>"
+ + "</composite>";
+ String compositeURI = node.addDeploymentComposite(curi, new StringReader(compositeXML));
+
+ node.startComposite(curi, compositeURI);
+ Assert.assertEquals(1, node.getStartedCompositeURIs().size());
+
+ Composite dc = node.getDomainComposite();
+ Assert.assertEquals(1, dc.getIncludes().size());
+ Composite runningComposite = dc.getIncludes().get(0);
+ Assert.assertEquals("TestComposite", runningComposite.getName().getLocalPart());
+ }
+
+ @Test
+ public void invalidCompositeStartTest() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, XMLStreamException {
+ Node node = TuscanyRuntime.newInstance().createNode("invalidCompositeStartTest");
+ String curi = node.installContribution("src/test/resources/helloworld-invalidComposite.jar");
+ Assert.assertEquals(1, node.getInstalledContributionURIs().size());
+ Assert.assertEquals(0, node.getStartedCompositeURIs().size());
+ ContributionDescription cd = node.getInstalledContribution(curi);
+ Assert.assertEquals(1, cd.getDeployables().size());
+
+ String compositeXML =
+ "<composite xmlns=\"http://docs.oasis-open.org/ns/opencsa/sca/200912\""
+ + " xmlns:tuscany=\"http://tuscany.apache.org/xmlns/sca/1.1\""
+ + " targetNamespace=\"http://test/composite\""
+ + " name=\"TestComposite\">"
+ + " <component name=\"TestComponent\">"
+ + " <implementation.java class=\"sample.HelloworldImpl\"/>"
+ + " </component>"
+ + "</composite>";
+ String compositeURI = node.addDeploymentComposite(curi, new StringReader(compositeXML));
+ node.startComposite(curi, compositeURI);
+
+// node.startComposite("sample-helloworld", "helloworld.composite");
+// Assert.assertEquals(1, node.getStartedCompositeURIs().size());
+// Assert.assertEquals("helloworld.composite", node.getStartedCompositeURIs().get("sample-helloworld").get(0));
+//
+// node.stopComposite("sample-helloworld", "helloworld.composite");
+//// Assert.assertEquals(0, node.getStartedComposites().size());
+// node.startComposite("sample-helloworld", "helloworld.composite");
+// Assert.assertEquals(1, node.getStartedCompositeURIs().size());
+// Assert.assertEquals("helloworld.composite", node.getStartedCompositeURIs().get("sample-helloworld").get(0));
+// node.stopComposite("sample-helloworld", "helloworld.composite");
+ }
+
+ @Test
+ public void stopAndUnistallTest() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException, XMLStreamException {
+ Node node = TuscanyRuntime.newInstance().createNode("stopAndUnistallTest");
+ node.installContribution("src/test/resources/import.jar");
+ node.installContribution("src/test/resources/export.jar");
+ String compositeXML =
+ "<composite xmlns=\"http://docs.oasis-open.org/ns/opencsa/sca/200912\""
+ + " xmlns:tuscany=\"http://tuscany.apache.org/xmlns/sca/1.1\""
+ + " targetNamespace=\"http://test/composite\""
+ + " name=\"TestComposite\">"
+ + " <component name=\"TestComponent\">"
+ + " <implementation.java class=\"sample.HelloworldImpl\"/>"
+ + " </component>"
+ + "</composite>";
+ String compositeURI = node.addDeploymentComposite("export", new StringReader(compositeXML));
+ node.startComposite("import", "helloworld.composite");
+ node.startComposite("export", compositeURI);
+ Assert.assertEquals(2, node.getInstalledContributionURIs().size());
+ node.stopCompositeAndUninstallUnused("import", "helloworld.composite");
+ Assert.assertEquals(1, node.getInstalledContributionURIs().size());
+ node.stopCompositeAndUninstallUnused("export", compositeURI);
+ Assert.assertEquals(0, node.getInstalledContributionURIs().size());
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/java/org/apache/tuscany/sca/runtime/DomainCompositeTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/java/org/apache/tuscany/sca/runtime/DomainCompositeTestCase.java
new file mode 100644
index 0000000000..97910aaf37
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/java/org/apache/tuscany/sca/runtime/DomainCompositeTestCase.java
@@ -0,0 +1,69 @@
+/*
+ * 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.runtime;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.assembly.xml.Utils;
+import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
+import org.apache.tuscany.sca.impl.NodeImpl;
+import org.apache.tuscany.sca.monitor.ValidationException;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchDomainException;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class DomainCompositeTestCase {
+
+ @Test
+ public void localOnlyDomain() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
+ Node node = TuscanyRuntime.newInstance().createNode("DomainCompositeTestCase");
+ testIt(node);
+ }
+
+ @Test
+ public void distributedDomain() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
+ TuscanyRuntime runtime = TuscanyRuntime.newInstance();
+ try {
+ Node node = runtime.createNode("uri:DomainCompositeTestCase");
+ testIt(node);
+ } finally { runtime.stop(); }
+ }
+
+ private void testIt(Node node) throws ContributionReadException, ActivationException, ValidationException {
+ node.installContribution("helloworld", "src/test/resources/sample-helloworld.jar", null, null);
+ node.startComposite("helloworld", "helloworld.composite");
+
+ Composite dc = node.getDomainComposite();
+ Assert.assertEquals("DomainCompositeTestCase", dc.getName().getLocalPart());
+ Assert.assertEquals(1, dc.getIncludes().size());
+ Composite c = dc.getIncludes().get(0);
+ Assert.assertEquals("helloworld", c.getName().getLocalPart());
+
+// String s = node.getDomainLevelCompositeAsString();
+ System.out.println(Utils.modelToXML(node.getDomainComposite(), true, ((NodeImpl)node).getExtensionPointRegistry()));
+// Assert.assertTrue(s.contains(":helloworld\""));
+
+ node.stopComposite("helloworld", "helloworld.composite");
+ Assert.assertEquals(0, node.getDomainComposite().getIncludes().size());
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/java/org/apache/tuscany/sca/runtime/TwoNodesTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/java/org/apache/tuscany/sca/runtime/TwoNodesTestCase.java
new file mode 100644
index 0000000000..7827d5dcf0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/java/org/apache/tuscany/sca/runtime/TwoNodesTestCase.java
@@ -0,0 +1,50 @@
+/*
+ * 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.runtime;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
+import org.apache.tuscany.sca.monitor.ValidationException;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchDomainException;
+import org.oasisopen.sca.NoSuchServiceException;
+
+import sample.Helloworld;
+
+public class TwoNodesTestCase {
+
+ @Test
+ public void testInstallDeployable() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
+ TuscanyRuntime runtime = TuscanyRuntime.newInstance();
+ try {
+ Node node1 = runtime.createNode("uri:TwoNodesTestCase?multicast=off&bind=127.0.0.1:44331");
+ node1.installContribution("helloworld", "src/test/resources/sample-helloworld.jar", null, null);
+ node1.startComposite("helloworld", "helloworld.composite");
+
+ Node node2 = TuscanyRuntime.newInstance().createNode("uri:TwoNodesTestCase?multicast=off&bind=127.0.0.1:44332&wka=127.0.0.1:44331");
+
+ Helloworld helloworldService = node2.getService(Helloworld.class, "HelloworldComponent");
+ Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));
+ } finally { runtime.stop(); }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/java/sample/Helloworld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/java/sample/Helloworld.java
new file mode 100644
index 0000000000..a422c23e6a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/java/sample/Helloworld.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package sample;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface Helloworld {
+ String sayHello(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/compositeImpl.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/compositeImpl.composite
new file mode 100644
index 0000000000..735bf3bbcc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/compositeImpl.composite
@@ -0,0 +1,30 @@
+<?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:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:sample="http://sample"
+ targetNamespace="http://sample"
+ name="compositeImpl">
+
+ <component name="Helloworld2Component">
+ <implementation.composite name="sample:helloworld"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/export.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/export.jar
new file mode 100644
index 0000000000..0ca3450bed
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/export.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/helloworld-invalidComposite.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/helloworld-invalidComposite.jar
new file mode 100644
index 0000000000..fa35a21696
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/helloworld-invalidComposite.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/helloworld2.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/helloworld2.composite
new file mode 100644
index 0000000000..8c7a789380
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/helloworld2.composite
@@ -0,0 +1,29 @@
+<?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:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://sample"
+ name="helloworld2">
+
+ <component name="Helloworld2Component">
+ <implementation.java class="sample.HelloworldImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/helloworld2.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/helloworld2.jar
new file mode 100644
index 0000000000..2f8e473cd0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/helloworld2.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/helloworldNode.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/helloworldNode.xml
new file mode 100644
index 0000000000..3095200945
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/helloworldNode.xml
@@ -0,0 +1,27 @@
+<?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.
+-->
+<node xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ domain="helloworld">
+
+ <contribution location="sample-helloworld.jar" startDeployables="true" />
+
+</node> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/import.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/import.jar
new file mode 100644
index 0000000000..4931074878
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/import.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/include.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/include.composite
new file mode 100644
index 0000000000..a1d9a658be
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/include.composite
@@ -0,0 +1,28 @@
+<?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:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:sample="http://sample"
+ targetNamespace="http://sample"
+ name="include">
+
+ <include name="sample:helloworld" />
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/itest-nodes-helloworld-client-2.0-SNAPSHOT.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/itest-nodes-helloworld-client-2.0-SNAPSHOT.jar
new file mode 100644
index 0000000000..7f6073ce7f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/itest-nodes-helloworld-client-2.0-SNAPSHOT.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/itest-nodes-helloworld-service-2.0-SNAPSHOT.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/itest-nodes-helloworld-service-2.0-SNAPSHOT.jar
new file mode 100644
index 0000000000..2306ce4d1a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/itest-nodes-helloworld-service-2.0-SNAPSHOT.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/nested.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/nested.composite
new file mode 100644
index 0000000000..1c31941a83
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/nested.composite
@@ -0,0 +1,28 @@
+<?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:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:sample="http://sample"
+ targetNamespace="http://sample"
+ name="nested">
+
+ <include name="sample:compositeImpl" />
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/sample-helloworld-nodeployable.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/sample-helloworld-nodeployable.jar
new file mode 100644
index 0000000000..16dde03858
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/sample-helloworld-nodeployable.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/sample-helloworld.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/sample-helloworld.jar
new file mode 100644
index 0000000000..1ea85c8e63
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/sample-helloworld.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/sample-helloworld2.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/sample-helloworld2.jar
new file mode 100644
index 0000000000..80b8b2315f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/sample-helloworld2.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/sca-contribution-generated.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/sca-contribution-generated.xml
new file mode 100644
index 0000000000..5b3d81cb97
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/sca-contribution-generated.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:helloworld"/>
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/MyDomain/domain.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/MyDomain/domain.properties
new file mode 100644
index 0000000000..d7ac22d6ad
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/MyDomain/domain.properties
@@ -0,0 +1,17 @@
+#
+# 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.
+#
+domainName=foo
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/MyDomain/helloworld-contribution.deployable.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/MyDomain/helloworld-contribution.deployable.composite
new file mode 100644
index 0000000000..8c7a789380
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/MyDomain/helloworld-contribution.deployable.composite
@@ -0,0 +1,29 @@
+<?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:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://sample"
+ name="helloworld2">
+
+ <component name="Helloworld2Component">
+ <implementation.java class="sample.HelloworldImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/MyDomain/helloworld-contribution.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/MyDomain/helloworld-contribution.jar
new file mode 100644
index 0000000000..5198370d85
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/MyDomain/helloworld-contribution.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/MyDomain/helloworld-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/MyDomain/helloworld-contribution.xml
new file mode 100644
index 0000000000..2788e14022
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/MyDomain/helloworld-contribution.xml
@@ -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:sample="http://sample">
+ <export.java package="sample" />
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/MyDomain/readme.txt b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/MyDomain/readme.txt
new file mode 100644
index 0000000000..10114926c4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/MyDomain/readme.txt
@@ -0,0 +1,8 @@
+A file named domain.properties is used to override the domain name, see in the properties file for what
+other properties are supportted.
+
+Side files are used to modify the helloworld-contribution.jar installed contribution.
+- sca-contribution.xml metaData is modified by having a metaData side file named helloworld-contribution.xml
+- additional deployment composites are added with files named helloworld-contribution.<anything>.composite
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/NodeXMLDomain/node.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/NodeXMLDomain/node.xml
new file mode 100644
index 0000000000..1fe1ccff14
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/NodeXMLDomain/node.xml
@@ -0,0 +1,27 @@
+<?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.
+-->
+<node xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ domain="helloworld">
+
+ <contribution location="../../sample-helloworld.jar" startDeployables="true" />
+
+</node> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/NodeXMLDomain/readme.txt b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/NodeXMLDomain/readme.txt
new file mode 100644
index 0000000000..15dac7bd0c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/NodeXMLDomain/readme.txt
@@ -0,0 +1,2 @@
+The domain directory gets all its config from a config XML file named node.xml,
+which may refer to contributions at another location outside of the directory. \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/default/readme.txt b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/default/readme.txt
new file mode 100644
index 0000000000..34b3e347ff
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/default/readme.txt
@@ -0,0 +1,4 @@
+The simplest domain. Just a directory of contrbutions,
+the domain is named with the directory name an the contributions
+are installed and all deployables are started.
+ \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/default/sample-helloworld.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/default/sample-helloworld.jar
new file mode 100644
index 0000000000..1ea85c8e63
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/default/sample-helloworld.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/dependencies/export1.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/dependencies/export1.jar
new file mode 100644
index 0000000000..b2755b65c5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/dependencies/export1.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/dependencies/export2.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/dependencies/export2.jar
new file mode 100644
index 0000000000..eec5ded5ee
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/dependencies/export2.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/dependencies/import1.dependencies b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/dependencies/import1.dependencies
new file mode 100644
index 0000000000..b7c54895d0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/dependencies/import1.dependencies
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+ export1
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/dependencies/import1.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/dependencies/import1.jar
new file mode 100644
index 0000000000..8402f6e3c3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/dependencies/import1.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/dependencies/import2.dependencies b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/dependencies/import2.dependencies
new file mode 100644
index 0000000000..dd3052994c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/dependencies/import2.dependencies
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+export2
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/dependencies/import2.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/dependencies/import2.jar
new file mode 100644
index 0000000000..6667994eb6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/dependencies/import2.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/dependencies/readme.txt b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/dependencies/readme.txt
new file mode 100644
index 0000000000..fc645c0682
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/dependencies/readme.txt
@@ -0,0 +1,14 @@
+Uses the domain.properties file to show explicitly defining a contrbutions dependent contribution URIS.
+
+Contributions export1.jar and export2.jar both export the Java package "sample" and both have
+a class sample.HelloworldImpl but the classes return a sayHello string "Hello 1" in export1.jar
+and "Hello 2" in export2.jar.
+
+Contributions import1.jar and import2.jar both import the package sample and use the
+sample.HelloworldImpl class in the component implementation.
+
+The *.dependencies files explicitly set the dependency URIs used by
+Contributions import1.jar and import2.jar, without the explicit property the imports would just t
+use the first contribution found that exports the sample package.
+
+See section 10.2.1 and 10.4 in the Assembly spec.
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/readme.txt b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/readme.txt
new file mode 100644
index 0000000000..ea7af2b3f7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/readme.txt
@@ -0,0 +1,4 @@
+A domain directory showing a contribution jar exploded into a contribution directory.
+In this case the contribution jar is ignored and the contribution directory is used.
+Thats the same approach used for things like Tomcat with exploded webapps and it
+enables more easily supporting dynamic updates to individual files in a contribution. \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld.jar
new file mode 100644
index 0000000000..1ea85c8e63
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/MANIFEST.MF b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..c5d7d06f98
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Archiver-Version: Plexus Archiver
+Created-By: Apache Maven
+Built-By: ant
+Build-Jdk: 1.6.0_18
+Extension-Name: sample-helloworld
+Implementation-Title: Apache Tuscany SCA Sample Helloworld
+Implementation-Vendor: The Apache Software Foundation
+Implementation-Vendor-Id: org.apache
+Implementation-Version: 2.0-SNAPSHOT
+Specification-Title: Apache Tuscany SCA Sample Helloworld
+Specification-Vendor: The Apache Software Foundation
+Specification-Version: 2.0-SNAPSHOT
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/maven/org.apache.tuscany.sca/sample-helloworld/pom.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/maven/org.apache.tuscany.sca/sample-helloworld/pom.properties
new file mode 100644
index 0000000000..ff83691757
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/maven/org.apache.tuscany.sca/sample-helloworld/pom.properties
@@ -0,0 +1,5 @@
+#Generated by Maven
+#Wed May 19 10:03:09 BST 2010
+version=2.0-SNAPSHOT
+groupId=org.apache.tuscany.sca
+artifactId=sample-helloworld
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/maven/org.apache.tuscany.sca/sample-helloworld/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/maven/org.apache.tuscany.sca/sample-helloworld/pom.xml
new file mode 100644
index 0000000000..e480d4f534
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/maven/org.apache.tuscany.sca/sample-helloworld/pom.xml
@@ -0,0 +1,58 @@
+<?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>tuscany-sca</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+ <packaging>jar</packaging>
+ <artifactId>sample-helloworld</artifactId>
+ <name>Apache Tuscany SCA Sample Helloworld</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>${artifactId}</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.tuscany.maven.plugins</groupId>
+ <artifactId>maven-tuscany-plugin</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e81e94d9a1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:sample="http://sample">
+ <deployable composite="sample:helloworld"/>
+ <export.java package="sample" />
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld/helloworld.composite
new file mode 100644
index 0000000000..324395c246
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld/helloworld.composite
@@ -0,0 +1,29 @@
+<?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:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://sample"
+ name="helloworld">
+
+ <component name="HelloworldComponent">
+ <implementation.java class="sample.HelloworldImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld/sample/Helloworld.class b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld/sample/Helloworld.class
new file mode 100644
index 0000000000..19c82db88e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld/sample/Helloworld.class
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld/sample/HelloworldImpl.class b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld/sample/HelloworldImpl.class
new file mode 100644
index 0000000000..575b3370c4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domain-node-hazelcast/src/test/resources/test-domains/exploded/sample-helloworld/sample/HelloworldImpl.class
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/distributed/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/distributed/pom.xml
new file mode 100644
index 0000000000..5f56e38ae9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/distributed/pom.xml
@@ -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.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-domains-distributed</artifactId>
+ <name>Apache Tuscany SCA itest domain distributed</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-nodep</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/distributed/src/test/java/itest/Helloworld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/distributed/src/test/java/itest/Helloworld.java
new file mode 100644
index 0000000000..f764bc8358
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/distributed/src/test/java/itest/Helloworld.java
@@ -0,0 +1,28 @@
+/*
+ * 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 itest;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface Helloworld {
+
+ String sayHello(String name);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/distributed/src/test/java/itest/StandaloneTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/distributed/src/test/java/itest/StandaloneTestCase.java
new file mode 100644
index 0000000000..222b3e8c3a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/distributed/src/test/java/itest/StandaloneTestCase.java
@@ -0,0 +1,46 @@
+/*
+ * 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 itest;
+
+import static org.junit.Assert.assertEquals;
+
+import java.net.URI;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.Test;
+import org.oasisopen.sca.client.SCAClientFactory;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class StandaloneTestCase{
+
+ @Test
+ public void test1() throws Exception {
+ Node node = NodeFactory.newInstance().createNode(URI.create("tuscany:foo"),"../helloworld/target/itest-domains-helloworld.zip");
+ node.start();
+ assertEquals(1, node.getServiceNames().size());
+ assertEquals("HelloworldComponent/Helloworld", node.getServiceNames().get(0));
+ Helloworld helloworld = SCAClientFactory.newInstance(URI.create("tuscany:foo")).getService(Helloworld.class, "HelloworldComponent");
+ assertEquals("Hello petra", helloworld.sayHello("petra"));
+ }
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/endpoint-uri/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/endpoint-uri/pom.xml
new file mode 100644
index 0000000000..0832856d54
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/endpoint-uri/pom.xml
@@ -0,0 +1,49 @@
+<?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-nodes</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-domains-enpoint-uri</artifactId>
+ <name>Apache Tuscany SCA iTest Domains-endpoint-uri</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-jetty</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/endpoint-uri/src/test/java/itest/EndpointURITestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/endpoint-uri/src/test/java/itest/EndpointURITestCase.java
new file mode 100644
index 0000000000..360b3bd57e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/endpoint-uri/src/test/java/itest/EndpointURITestCase.java
@@ -0,0 +1,97 @@
+/*
+ * 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 itest;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.net.URI;
+import java.util.List;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.wsdl.Service;
+import javax.wsdl.extensions.soap.SOAPAddress;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.Test;
+
+/**
+ * Tests if a non-default domain name gets used as part of the service endpoint URI
+ */
+public class EndpointURITestCase{
+
+ @Test
+ public void testDefault() throws Exception {
+ Node node = TuscanyRuntime.runComposite(null, "src/test/resources/helloworld-ws.jar");
+ try {
+
+ assertEquals(1, node.getInstalledContributionURIs().size());
+
+ assertNotNull(getWsdlUrl("http://localhost:8080/HelloworldComponent/Helloworld"));
+
+ } finally {
+ node.stop();
+ }
+ }
+
+ @Test
+ public void testDomainRoot() throws Exception {
+ Node node = TuscanyRuntime.runComposite(URI.create("myDomain"), null, "src/test/resources/helloworld-ws.jar");
+ try {
+
+ assertEquals(1, node.getInstalledContributionURIs().size());
+
+ assertNotNull(getWsdlUrl("http://localhost:8080/myDomain/HelloworldComponent/Helloworld"));
+
+ } finally {
+ node.stop();
+ }
+ }
+
+ String getWsdlUrl(String uri) throws Exception {
+
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ wsdlReader.setFeature("javax.wsdl.verbose",false);
+ wsdlReader.setFeature("javax.wsdl.importDocuments",true);
+
+ Definition definition = wsdlReader.readWSDL(uri + "?wsdl");
+
+ Service service = (Service)definition.getServices().values().iterator().next();
+ Port port = (Port)service.getPorts().values().iterator().next();
+
+ String wsdlURL = getEndpoint(port);
+ System.out.println("WSDL URL: "+ wsdlURL);
+ return wsdlURL;
+ }
+
+ String getEndpoint(Port port) {
+ List<?> wsdlPortExtensions = port.getExtensibilityElements();
+ for (final Object extension : wsdlPortExtensions) {
+ if (extension instanceof SOAPAddress) {
+ return ((SOAPAddress) extension).getLocationURI();
+ }
+ }
+ throw new RuntimeException("no SOAPAddress");
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/endpoint-uri/src/test/resources/helloworld-ws.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/endpoint-uri/src/test/resources/helloworld-ws.jar
new file mode 100644
index 0000000000..39098190ba
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/endpoint-uri/src/test/resources/helloworld-ws.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/helloworld/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/helloworld/pom.xml
new file mode 100644
index 0000000000..f2d1da6941
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/helloworld/pom.xml
@@ -0,0 +1,83 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-domains-helloworld</artifactId>
+ <name>Apache Tuscany SCA itest domain helloworld</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0.1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-domains-interfaces</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2-beta-3</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-zip-contribution-descriptor</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+ <descriptor>tuscany-zip-contribution.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/helloworld/src/main/java/itest/HelloworldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/helloworld/src/main/java/itest/HelloworldImpl.java
new file mode 100644
index 0000000000..2a10b3fb77
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/helloworld/src/main/java/itest/HelloworldImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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 itest;
+
+import itest.Helloworld;
+
+import org.oasisopen.sca.annotation.EagerInit;
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Scope;
+
+@Scope("COMPOSITE") @EagerInit
+public class HelloworldImpl implements Helloworld {
+
+ public String sayHello(String name) {
+ return "Hello " + name;
+ }
+
+ @Init
+ public void init() {
+ System.out.println(sayHello("world"));
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/helloworld/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/helloworld/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..8939a73d01
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/helloworld/src/main/resources/META-INF/sca-contribution.xml
@@ -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://org.apache.tuscany.sca.itest">
+ <deployable composite="itest:helloworld"/>
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/helloworld/src/main/resources/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/helloworld/src/main/resources/helloworld.composite
new file mode 100644
index 0000000000..18d064c588
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/helloworld/src/main/resources/helloworld.composite
@@ -0,0 +1,29 @@
+<?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:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://org.apache.tuscany.sca.itest"
+ name="helloworld">
+
+ <component name="HelloworldComponent">
+ <implementation.java class="itest.HelloworldImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/interfaces/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/interfaces/pom.xml
new file mode 100644
index 0000000000..3545505e33
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/interfaces/pom.xml
@@ -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.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-domains-interfaces</artifactId>
+ <name>Apache Tuscany SCA itest domain interfaces</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0.1</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/interfaces/src/main/java/itest/Helloworld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/interfaces/src/main/java/itest/Helloworld.java
new file mode 100644
index 0000000000..f764bc8358
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/interfaces/src/main/java/itest/Helloworld.java
@@ -0,0 +1,28 @@
+/*
+ * 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 itest;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface Helloworld {
+
+ String sayHello(String name);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/pom.xml
new file mode 100644
index 0000000000..ad4355122a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/pom.xml
@@ -0,0 +1,38 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-domains</artifactId>
+ <packaging>pom</packaging>
+ <name>Apache Tuscany SCA Domians Integration Tests</name>
+
+ <modules>
+ <module>interfaces</module>
+ <module>helloworld</module>
+ <module>standalone</module>
+ <module>distributed</module>
+ </modules>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/standalone/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/standalone/pom.xml
new file mode 100644
index 0000000000..591e70aac5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/standalone/pom.xml
@@ -0,0 +1,57 @@
+<?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>tuscany-sca</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-domains-standalone</artifactId>
+ <name>Apache Tuscany SCA itest domain standalone</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-domain-node</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <!-- TODO: shouldnt need to have this dependency, should be in DomainNode -->
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-client-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/standalone/src/test/java/itest/StandaloneTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/standalone/src/test/java/itest/StandaloneTestCase.java
new file mode 100644
index 0000000000..0fbcc98a96
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/domains/standalone/src/test/java/itest/StandaloneTestCase.java
@@ -0,0 +1,66 @@
+/*
+ * 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 itest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.domain.node.DomainNode;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class StandaloneTestCase{
+
+ private static DomainNode node;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ node = new DomainNode();
+ node.addContribution("../helloworld/target/itest-domains-helloworld.zip");
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testServices() throws Exception {
+ assertEquals(1, node.getServiceNames().size());
+ assertEquals("HelloworldComponent/Helloworld", node.getServiceNames().get(0));
+ }
+
+ @Test
+ public void testDuplicateComponents() throws Exception {
+ try {
+ node.addContribution("../helloworld/target/itest-domains-helloworld.zip", "dup");
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ // verify the old one is still there
+ // TODO: doesn't work correctly yet
+// assertEquals(1, node.getServiceNames().size());
+// assertEquals("HelloworldComponent/Helloworld", node.getServiceNames().get(0));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/dynamicRefURI/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/dynamicRefURI/pom.xml
new file mode 100644
index 0000000000..4509b3ccc9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/dynamicRefURI/pom.xml
@@ -0,0 +1,56 @@
+<?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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-dynamicrefuri</artifactId>
+ <name>Apache Tuscany SCA iTest Dynamic reference URI</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</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/tags/2.0.1-RC1/testing/itest/dynamicRefURI/src/main/java/org/apache/tuscany/sca/itest/Helloworld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/dynamicRefURI/src/main/java/org/apache/tuscany/sca/itest/Helloworld.java
new file mode 100644
index 0000000000..5945f773b1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/dynamicRefURI/src/main/java/org/apache/tuscany/sca/itest/Helloworld.java
@@ -0,0 +1,28 @@
+/*
+ * 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.itest;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface Helloworld {
+
+ String sayHello(String name);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/dynamicRefURI/src/main/java/org/apache/tuscany/sca/itest/HelloworldClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/dynamicRefURI/src/main/java/org/apache/tuscany/sca/itest/HelloworldClient.java
new file mode 100644
index 0000000000..a687f44dae
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/dynamicRefURI/src/main/java/org/apache/tuscany/sca/itest/HelloworldClient.java
@@ -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.itest;
+
+import org.apache.tuscany.sca.runtime.TuscanyComponentContext;
+import org.apache.tuscany.sca.runtime.TuscanyServiceReference;
+import org.oasisopen.sca.annotation.Context;
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloworldClient implements Helloworld {
+
+ @Reference
+ public Helloworld helloworldService;
+
+ @Context
+ public TuscanyComponentContext tuscanyComponentContext;
+
+ @Override
+ public String sayHello(String name) {
+
+ TuscanyServiceReference<Helloworld> tsr = tuscanyComponentContext.getServiceReference(Helloworld.class, "helloworldService");
+ tsr.setBindingURI("http://localhost:8080/HelloworldService/Helloworld");
+
+ return "client: " + tsr.getService().sayHello(name);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/dynamicRefURI/src/main/java/org/apache/tuscany/sca/itest/HelloworldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/dynamicRefURI/src/main/java/org/apache/tuscany/sca/itest/HelloworldImpl.java
new file mode 100644
index 0000000000..d32c1fba63
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/dynamicRefURI/src/main/java/org/apache/tuscany/sca/itest/HelloworldImpl.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest;
+
+public class HelloworldImpl implements Helloworld {
+
+ public String sayHello(String name) {
+ return "Hello " + name;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/dynamicRefURI/src/main/resources/client.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/dynamicRefURI/src/main/resources/client.composite
new file mode 100644
index 0000000000..243b538ea0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/dynamicRefURI/src/main/resources/client.composite
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
+ name="ClientComposite">
+
+ <component name="HelloworldClient">
+ <implementation.java class="org.apache.tuscany.sca.itest.HelloworldClient"/>
+ <reference name="helloworldService">
+ <binding.ws uri="http://localhost:8080/client/will/correct/this"/>
+ </reference>
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/dynamicRefURI/src/main/resources/service.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/dynamicRefURI/src/main/resources/service.composite
new file mode 100644
index 0000000000..218b086696
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/dynamicRefURI/src/main/resources/service.composite
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
+ name="ServiceComposite">
+
+ <component name="HelloworldService">
+ <implementation.java class="org.apache.tuscany.sca.itest.HelloworldImpl"/>
+ <service name="Helloworld">
+ <binding.ws/>
+ </service>
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/dynamicRefURI/src/test/java/org/apache/tuscany/sca/itest/Test1TestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/dynamicRefURI/src/test/java/org/apache/tuscany/sca/itest/Test1TestCase.java
new file mode 100644
index 0000000000..2ce9697901
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/dynamicRefURI/src/test/java/org/apache/tuscany/sca/itest/Test1TestCase.java
@@ -0,0 +1,54 @@
+/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class Test1TestCase {
+
+ protected TuscanyRuntime runtime;
+ protected Node serviceNode;
+ protected Node clientNode;
+
+ @Before
+ public void setUp() throws Exception {
+ serviceNode = TuscanyRuntime.runComposite("service.composite", "target/classes");
+ clientNode = TuscanyRuntime.runComposite("client.composite", "target/classes");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ serviceNode.stop();
+ clientNode.stop();
+ }
+
+ @Test
+ public void testReference() throws NoSuchServiceException {
+ Helloworld client = clientNode.getService(Helloworld.class, "HelloworldClient");
+ assertEquals("client: Hello Ariana", client.sayHello("Ariana"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/pom.xml
new file mode 100644
index 0000000000..4b5339ca18
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/pom.xml
@@ -0,0 +1,68 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-endpoints</artifactId>
+ <name>Apache Tuscany SCA iTest Endpoints</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-jsonp-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-rmi-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-jetty</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ </dependencies>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/src/test/java/helloworld/HelloWorldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/src/test/java/helloworld/HelloWorldImpl.java
new file mode 100644
index 0000000000..c307547f56
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/src/test/java/helloworld/HelloWorldImpl.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package helloworld;
+
+
+public class HelloWorldImpl implements HelloWorldService {
+
+ public String sayHello(String name) {
+ return "Hello " + name;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/src/test/java/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/src/test/java/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..064d615c45
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/src/test/java/helloworld/HelloWorldService.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorldService {
+
+ String sayHello(String name);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/src/test/java/test/EndpointsTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/src/test/java/test/EndpointsTestCase.java
new file mode 100644
index 0000000000..7802848c3b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/src/test/java/test/EndpointsTestCase.java
@@ -0,0 +1,110 @@
+/*
+ * 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 test;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+
+import org.apache.tuscany.sca.http.jetty.JettyServer;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class EndpointsTestCase {
+
+ private static Node node;
+
+ @Test
+ public void testJSONP1() throws MalformedURLException, IOException {
+ // <tuscany:binding.jsonp />
+ Utils.invokeJSONPEndpoint("http://localhost:8085/JSONPComponent1/HelloWorldService/sayHello?name=petra&callback=foo");
+ }
+ @Test
+ public void testJSONP2() throws MalformedURLException, IOException {
+ // <tuscany:binding.jsonp name="jsonp2"/>
+ Utils.invokeJSONPEndpoint("http://localhost:8085/JSONPComponent2/HelloWorldService/jsonp2/sayHello?name=petra&callback=foo");
+ }
+ @Test
+ public void testJSONP3() throws MalformedURLException, IOException {
+ // <tuscany:binding.jsonp uri="jsonp3"/>
+ Utils.invokeJSONPEndpoint("http://localhost:8085/JSONPComponent3/HelloWorldService/jsonp3/sayHello?name=petra&callback=foo");
+ }
+ @Test
+ public void testJSONP4() throws MalformedURLException, IOException {
+ // <tuscany:binding.jsonp uri="/jsonp4"/>
+ Utils.invokeJSONPEndpoint("http://localhost:8085/jsonp4/sayHello?name=petra&callback=foo");
+ }
+ @Test
+ public void testJSONP5() throws MalformedURLException, IOException {
+ // <tuscany:binding.jsonp name="jsonp5a" uri="/jsonp5b"/>
+ Utils.invokeJSONPEndpoint("http://localhost:8085/jsonp5b/sayHello?name=petra&callback=foo");
+ }
+ @Test
+ public void testJSONP6() throws MalformedURLException, IOException {
+ // <tuscany:binding.jsonp name="jsonp6a" uri="jsonp6b"/>
+ Utils.invokeJSONPEndpoint("http://localhost:8085/JSONPComponent6/HelloWorldService/jsonp6a/jsonp6b/sayHello?name=petra&callback=foo");
+ }
+
+ @Test
+ public void testWS1() throws MalformedURLException, Exception {
+ // <tuscany:binding.WS />
+ Utils.invokeWSEndpoint("http://localhost:8085/WSComponent1/HelloWorldService");
+ }
+ @Test
+ public void testWS2() throws MalformedURLException, Exception {
+ // <tuscany:binding.WS name="WS2"/>
+ Utils.invokeWSEndpoint("http://localhost:8085/WSComponent2/HelloWorldService/ws2");
+ }
+ @Test
+ public void testWS3() throws MalformedURLException, Exception {
+ // <tuscany:binding.WS uri="WS3"/>
+ Utils.invokeWSEndpoint("http://localhost:8085/WSComponent3/HelloWorldService/ws3");
+ }
+ @Test
+ public void testWS4() throws MalformedURLException, Exception {
+ // <tuscany:binding.WS uri="/WS4"/>
+ Utils.invokeWSEndpoint("http://localhost:8085/ws4");
+ }
+ @Test
+ public void testWS5() throws MalformedURLException, Exception {
+ // <tuscany:binding.WS name="WS5a" uri="/WS5b"/>
+ Utils.invokeWSEndpoint("http://localhost:8085/ws5b");
+ }
+ @Test
+ public void testWS6() throws Exception {
+ // <tuscany:binding.ws name="ws6a" uri="ws6b"/>
+ Utils.invokeWSEndpoint("http://localhost:8085/WSComponent6/HelloWorldService/ws6a/ws6b");
+ }
+
+ @BeforeClass
+ public static void init() throws Exception {
+ JettyServer.portDefault = 8085;
+ node = NodeFactory.newInstance().createNode("helloworld.composite").start();
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/src/test/java/test/NestedEndpointsTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/src/test/java/test/NestedEndpointsTestCase.java
new file mode 100644
index 0000000000..f3b6c15bf1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/src/test/java/test/NestedEndpointsTestCase.java
@@ -0,0 +1,110 @@
+/*
+ * 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 test;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+
+import org.apache.tuscany.sca.http.jetty.JettyServer;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class NestedEndpointsTestCase {
+
+ private static Node node;
+
+ @Test
+ public void testJSONP1() throws MalformedURLException, IOException {
+ // <tuscany:binding.jsonp />
+ Utils.invokeJSONPEndpoint("http://localhost:8085/NestedComponent1/JSONPComponent1/HelloWorldService/sayHello?name=petra&callback=foo");
+ }
+ @Test
+ public void testJSONP2() throws MalformedURLException, IOException {
+ // <tuscany:binding.jsonp name="jsonp2"/>
+ Utils.invokeJSONPEndpoint("http://localhost:8085/NestedComponent1/JSONPComponent2/HelloWorldService/jsonp2/sayHello?name=petra&callback=foo");
+ }
+ @Test
+ public void testJSONP3() throws MalformedURLException, IOException {
+ // <tuscany:binding.jsonp uri="jsonp3"/>
+ Utils.invokeJSONPEndpoint("http://localhost:8085/NestedComponent1/JSONPComponent3/HelloWorldService/jsonp3/sayHello?name=petra&callback=foo");
+ }
+ @Test
+ public void testJSONP4() throws MalformedURLException, IOException {
+ // <tuscany:binding.jsonp uri="/jsonp4"/>
+ Utils.invokeJSONPEndpoint("http://localhost:8085/jsonp4/sayHello?name=petra&callback=foo");
+ }
+ @Test
+ public void testJSONP5() throws MalformedURLException, IOException {
+ // <tuscany:binding.jsonp name="jsonp5a" uri="/jsonp5b"/>
+ Utils.invokeJSONPEndpoint("http://localhost:8085/jsonp5b/sayHello?name=petra&callback=foo");
+ }
+ @Test
+ public void testJSONP6() throws MalformedURLException, IOException {
+ // <tuscany:binding.jsonp name="jsonp6a" uri="jsonp6b"/>
+ Utils.invokeJSONPEndpoint("http://localhost:8085/NestedComponent1/JSONPComponent6/HelloWorldService/jsonp6a/jsonp6b/sayHello?name=petra&callback=foo");
+ }
+
+ @Test
+ public void testWS1() throws MalformedURLException, Exception {
+ // <tuscany:binding.WS />
+ Utils.invokeWSEndpoint("http://localhost:8085/NestedComponent1/WSComponent1/HelloWorldService");
+ }
+ @Test
+ public void testWS2() throws MalformedURLException, Exception {
+ // <tuscany:binding.WS name="WS2"/>
+ Utils.invokeWSEndpoint("http://localhost:8085/NestedComponent1/WSComponent2/HelloWorldService/ws2");
+ }
+ @Test
+ public void testWS3() throws MalformedURLException, Exception {
+ // <tuscany:binding.WS uri="WS3"/>
+ Utils.invokeWSEndpoint("http://localhost:8085/NestedComponent1/WSComponent3/HelloWorldService/ws3");
+ }
+ @Test
+ public void testWS4() throws MalformedURLException, Exception {
+ // <tuscany:binding.WS uri="/WS4"/>
+ Utils.invokeWSEndpoint("http://localhost:8085/ws4");
+ }
+ @Test
+ public void testWS5() throws MalformedURLException, Exception {
+ // <tuscany:binding.WS name="WS5a" uri="/WS5b"/>
+ Utils.invokeWSEndpoint("http://localhost:8085/ws5b");
+ }
+ @Test
+ public void testWS6() throws Exception {
+ // <tuscany:binding.ws name="ws6a" uri="ws6b"/>
+ Utils.invokeWSEndpoint("http://localhost:8085/NestedComponent1/WSComponent6/HelloWorldService/ws6a/ws6b");
+ }
+
+ @BeforeClass
+ public static void init() throws Exception {
+ JettyServer.portDefault = 8085;
+ node = NodeFactory.newInstance().createNode("nested.composite").start();
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/src/test/java/test/Utils.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/src/test/java/test/Utils.java
new file mode 100644
index 0000000000..5107d8f660
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/src/test/java/test/Utils.java
@@ -0,0 +1,70 @@
+/*
+ * 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 test;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.List;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.wsdl.Service;
+import javax.wsdl.extensions.soap.SOAPAddress;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+
+import junit.framework.Assert;
+
+public class Utils {
+
+ public static void invokeJSONPEndpoint(String s) throws MalformedURLException, IOException {
+ URL url = new URL(s);
+ BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+ String response = br.readLine();
+ Assert.assertEquals("foo(\"Hello petra\");", response);
+ }
+
+ public static void invokeWSEndpoint(String endpoint) throws Exception {
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ wsdlReader.setFeature("javax.wsdl.verbose",false);
+ wsdlReader.setFeature("javax.wsdl.importDocuments",true);
+
+ Definition definition = wsdlReader.readWSDL(endpoint + "?wsdl");
+ Assert.assertNotNull(definition);
+ Service service = (Service)definition.getServices().values().iterator().next();
+ Port port = (Port)service.getPorts().values().iterator().next();
+
+ Assert.assertEquals(new URL(endpoint).getPath(), new URL(getEndpoint(port)).getPath());
+ }
+
+ private static String getEndpoint(Port port) {
+ List<?> wsdlPortExtensions = port.getExtensibilityElements();
+ for (final Object extension : wsdlPortExtensions) {
+ if (extension instanceof SOAPAddress) {
+ return ((SOAPAddress) extension).getLocationURI();
+ }
+ }
+ throw new RuntimeException("no SOAPAddress");
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/src/test/resources/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/src/test/resources/helloworld.composite
new file mode 100644
index 0000000000..1f56c3d73b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/src/test/resources/helloworld.composite
@@ -0,0 +1,116 @@
+<?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:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://itest"
+ name="HelloWorldComposite">
+
+ <component name="JSONPComponent1">
+ <implementation.java class="helloworld.HelloWorldImpl"/>
+ <service name="HelloWorldService" >
+ <tuscany:binding.jsonp />
+ </service>
+ </component>
+
+ <component name="JSONPComponent2">
+ <implementation.java class="helloworld.HelloWorldImpl"/>
+ <service name="HelloWorldService" >
+ <tuscany:binding.jsonp name="jsonp2"/>
+ </service>
+ </component>
+
+ <component name="JSONPComponent3">
+ <implementation.java class="helloworld.HelloWorldImpl"/>
+ <service name="HelloWorldService" >
+ <tuscany:binding.jsonp uri="jsonp3"/>
+ </service>
+ </component>
+
+ <component name="JSONPComponent4">
+ <implementation.java class="helloworld.HelloWorldImpl"/>
+ <service name="HelloWorldService" >
+ <tuscany:binding.jsonp uri="/jsonp4"/>
+ </service>
+ </component>
+
+ <component name="JSONPComponent5">
+ <implementation.java class="helloworld.HelloWorldImpl"/>
+ <service name="HelloWorldService" >
+ <tuscany:binding.jsonp name="jsonp5a" uri="/jsonp5b"/>
+ </service>
+ </component>
+
+ <component name="JSONPComponent6">
+ <implementation.java class="helloworld.HelloWorldImpl"/>
+ <service name="HelloWorldService" >
+ <tuscany:binding.jsonp name="jsonp6a" uri="jsonp6b"/>
+ </service>
+ </component>
+
+ <component name="RMIComponent6">
+ <implementation.java class="helloworld.HelloWorldImpl"/>
+ <service name="HelloWorldService" >
+ <tuscany:binding.rmi name="rmi6a" uri="rmi6b"/>
+ </service>
+ </component>
+
+ <component name="WSComponent1">
+ <implementation.java class="helloworld.HelloWorldImpl"/>
+ <service name="HelloWorldService" >
+ <binding.ws />
+ </service>
+ </component>
+
+ <component name="WSComponent2">
+ <implementation.java class="helloworld.HelloWorldImpl"/>
+ <service name="HelloWorldService" >
+ <binding.ws name="ws2"/>
+ </service>
+ </component>
+
+ <component name="WSComponent3">
+ <implementation.java class="helloworld.HelloWorldImpl"/>
+ <service name="HelloWorldService" >
+ <binding.ws uri="ws3"/>
+ </service>
+ </component>
+
+ <component name="WSComponent4">
+ <implementation.java class="helloworld.HelloWorldImpl"/>
+ <service name="HelloWorldService" >
+ <binding.ws uri="/ws4"/>
+ </service>
+ </component>
+
+ <component name="WSComponent5">
+ <implementation.java class="helloworld.HelloWorldImpl"/>
+ <service name="HelloWorldService" >
+ <binding.ws name="ws5a" uri="/ws5b"/>
+ </service>
+ </component>
+
+ <component name="WSComponent6">
+ <implementation.java class="helloworld.HelloWorldImpl"/>
+ <service name="HelloWorldService" >
+ <binding.ws name="ws6a" uri="ws6b"/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/src/test/resources/nested.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/src/test/resources/nested.composite
new file mode 100644
index 0000000000..138020eab0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/endpoints/src/test/resources/nested.composite
@@ -0,0 +1,30 @@
+<?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:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:itest="http://itest"
+ targetNamespace="http://itest"
+ name="NestedComposite">
+
+ <component name="NestedComponent1">
+ <implementation.composite name="itest:HelloWorldComposite"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/pom.xml
new file mode 100644
index 0000000000..0f8166a65d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/pom.xml
@@ -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.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-exceptions</artifactId>
+ <name>Apache Tuscany SCA iTest Exceptions</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-jetty</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/Checked.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/Checked.java
new file mode 100644
index 0000000000..1f57116bac
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/Checked.java
@@ -0,0 +1,57 @@
+/*
+ * 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.test.exceptions;
+
+public class Checked extends Exception {
+ private static final long serialVersionUID = -129752837478357452L;
+
+ /**
+ *
+ */
+ public Checked() {
+
+ }
+
+ /**
+ * @param message
+ */
+ public Checked(String message) {
+ super(message);
+
+ }
+
+ /**
+ * @param cause
+ */
+ public Checked(Throwable cause) {
+ super(cause);
+
+ }
+
+ /**
+ * @param message
+ * @param cause
+ */
+ public Checked(String message, Throwable cause) {
+ super(message, cause);
+
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionHandler.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionHandler.java
new file mode 100644
index 0000000000..204c2927f1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionHandler.java
@@ -0,0 +1,39 @@
+/*
+ * 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.test.exceptions;
+
+import org.oasisopen.sca.ServiceRuntimeException;
+
+public interface ExceptionHandler {
+
+ void testing();
+
+ Checked getTheBad();
+
+ String getTheGood();
+
+ UnChecked getTheUgly();
+
+ ServiceRuntimeException getServiceRuntimeException();
+
+ ServiceRuntimeException getBindingException();
+
+ ServiceRuntimeException getUncheckedException();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionRemoteThrower.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionRemoteThrower.java
new file mode 100644
index 0000000000..53a6c70b57
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionRemoteThrower.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.test.exceptions;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * Remote exception thrower
+ * @version $Rev$ $Date$
+ */
+@Remotable
+public interface ExceptionRemoteThrower extends ExceptionThrower {
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionThrower.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionThrower.java
new file mode 100644
index 0000000000..bdffb5fea6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionThrower.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.test.exceptions;
+
+import org.oasisopen.sca.ServiceRuntimeException;
+
+/**
+ * Local exception thrower
+ * @version $Rev$ $Date$
+ */
+public interface ExceptionThrower {
+ Checked BAD = new Checked("theBad");
+ UnChecked UGLY = new UnChecked("theUgly");
+ String SO_THEY_SAY = "All is good that ends good.";
+ ServiceRuntimeException SERVICE_RUNTIME_EXCEPTION = new ServiceRuntimeException("A service runtime exception");
+
+ String theGood() throws Checked;
+
+ String theBad() throws Checked;
+
+ String theUgly() throws Checked;
+
+ String serviceRuntimeException();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/UnChecked.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/UnChecked.java
new file mode 100644
index 0000000000..453528444d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/UnChecked.java
@@ -0,0 +1,57 @@
+/*
+ * 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.test.exceptions;
+
+public class UnChecked extends RuntimeException {
+ private static final long serialVersionUID = -1318118082838092244L;
+
+ /**
+ *
+ */
+ public UnChecked() {
+
+ }
+
+ /**
+ * @param message
+ */
+ public UnChecked(String message) {
+ super(message);
+
+ }
+
+ /**
+ * @param cause
+ */
+ public UnChecked(Throwable cause) {
+ super(cause);
+
+ }
+
+ /**
+ * @param message
+ * @param cause
+ */
+ public UnChecked(String message, Throwable cause) {
+ super(message, cause);
+
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionHandlerImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionHandlerImpl.java
new file mode 100644
index 0000000000..217febdcd6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionHandlerImpl.java
@@ -0,0 +1,152 @@
+/*
+ * 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.test.exceptions.impl;
+
+import org.apache.tuscany.sca.test.exceptions.Checked;
+import org.apache.tuscany.sca.test.exceptions.ExceptionHandler;
+import org.apache.tuscany.sca.test.exceptions.ExceptionThrower;
+import org.apache.tuscany.sca.test.exceptions.UnChecked;
+import org.oasisopen.sca.ServiceRuntimeException;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Scope;
+
+@Scope("COMPOSITE")
+public class ExceptionHandlerImpl implements ExceptionHandler {
+ static final String INIT = "INIT";
+
+ private ExceptionThrower exceptionThrower;
+
+ private String theGood;
+
+ private Checked theBad;
+
+ private UnChecked theUgly;
+
+ private ServiceRuntimeException serviceRuntimeException;
+
+ public void testing() {
+
+ assert exceptionThrower != null : "'exceptionThrower' never wired";
+ String result = INIT;
+ try {
+ theGood = result = exceptionThrower.theGood();
+ assert result == ExceptionThrower.SO_THEY_SAY;
+ } catch (Throwable e) {
+ assert result == INIT;
+ assert false;
+ e.printStackTrace();
+ }
+
+ result = INIT;
+ try {
+ result = exceptionThrower.theBad();
+ // incredible
+ assert false : "Expected 'Check' Exception";
+
+ } catch (Checked e) {
+ // This is good...
+ assert result == INIT;
+ theBad = e;
+ } catch (Throwable t) {
+ // This is not so good.
+ t.printStackTrace();
+ assert result == INIT;
+ assert false : "Got wrong exception '" + t.getClass().getName();
+ }
+
+ result = INIT;
+ try {
+ result = exceptionThrower.theUgly();
+ // incredible
+ assert false : "Expected 'UnCheck' Exception";
+
+ } catch (Checked e) {
+ // This is not so good...
+ assert false : "Got wrong exception '" + e.getClass().getName();
+ assert result == INIT;
+ } catch (UnChecked e) {
+ theUgly = e;
+
+ } catch (Throwable t) {
+ // This is not good.
+ assert false;
+ assert result == INIT;
+
+ System.out.println(ExceptionThrower.SO_THEY_SAY + " " + INIT);
+ }
+
+ result = INIT;
+ try {
+ result = exceptionThrower.serviceRuntimeException();
+ // incredible
+ assert false : "Expected 'ServiceRuntimeException' Exception";
+
+ } catch (ServiceRuntimeException e) {
+
+ serviceRuntimeException = e;
+
+ } catch (UnChecked e) {
+ // This is not so good...
+ assert false : "Got wrong exception '" + e.getClass().getName();
+ assert result == INIT;
+
+ } catch (Throwable t) {
+ // This is not good.
+ assert false;
+ assert result == INIT;
+
+ System.out.println(ExceptionThrower.SO_THEY_SAY + " " + INIT);
+ }
+
+ }
+
+ @Reference
+ public void setExceptionThrower(ExceptionThrower exceptionThrower) {
+ this.exceptionThrower = exceptionThrower;
+ }
+
+ public String getTheGood() {
+ return theGood;
+ }
+
+ public Checked getTheBad() {
+ return theBad;
+ }
+
+ public UnChecked getTheUgly() {
+ return theUgly;
+ }
+
+ public ExceptionThrower getExceptionThrower() {
+ return exceptionThrower;
+ }
+
+ public ServiceRuntimeException getServiceRuntimeException() {
+ return serviceRuntimeException;
+ }
+
+ public ServiceRuntimeException getBindingException() {
+ return null;
+ }
+
+ public ServiceRuntimeException getUncheckedException() {
+ return null;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionRemoteThrowerImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionRemoteThrowerImpl.java
new file mode 100644
index 0000000000..9b26197917
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionRemoteThrowerImpl.java
@@ -0,0 +1,49 @@
+/*
+ * 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.test.exceptions.impl;
+
+import org.apache.tuscany.sca.test.exceptions.Checked;
+import org.apache.tuscany.sca.test.exceptions.ExceptionRemoteThrower;
+import org.oasisopen.sca.ServiceRuntimeException;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ *
+ * @version $Rev$ $Date$
+ */
+@Service(ExceptionRemoteThrower.class)
+public class ExceptionRemoteThrowerImpl implements ExceptionRemoteThrower {
+ public String theBad() throws Checked {
+ throw BAD;
+ }
+
+ public String theGood() throws Checked {
+ return SO_THEY_SAY;
+ }
+
+ public String theUgly() throws Checked {
+ throw UGLY;
+ }
+
+ public String serviceRuntimeException() {
+ throw new ServiceRuntimeException("A service runtime exception");
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionThrowerImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionThrowerImpl.java
new file mode 100644
index 0000000000..2477bece31
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionThrowerImpl.java
@@ -0,0 +1,50 @@
+/*
+ * 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.test.exceptions.impl;
+
+import org.apache.tuscany.sca.test.exceptions.Checked;
+import org.apache.tuscany.sca.test.exceptions.ExceptionThrower;
+import org.oasisopen.sca.ServiceRuntimeException;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ *
+ * @version $Rev$ $Date$
+ */
+@Service(ExceptionThrower.class)
+public class ExceptionThrowerImpl implements ExceptionThrower {
+
+ public String theBad() throws Checked {
+ throw BAD;
+ }
+
+ public String theGood() throws Checked {
+ return SO_THEY_SAY;
+ }
+
+ public String theUgly() throws Checked {
+ throw UGLY;
+ }
+
+ public String serviceRuntimeException() {
+ throw SERVICE_RUNTIME_EXCEPTION;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/RemoteExceptionHandlerImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/RemoteExceptionHandlerImpl.java
new file mode 100644
index 0000000000..c5c2af5b70
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/RemoteExceptionHandlerImpl.java
@@ -0,0 +1,153 @@
+/*
+ * 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.test.exceptions.impl;
+
+import org.apache.tuscany.sca.test.exceptions.Checked;
+import org.apache.tuscany.sca.test.exceptions.ExceptionHandler;
+import org.apache.tuscany.sca.test.exceptions.ExceptionRemoteThrower;
+import org.apache.tuscany.sca.test.exceptions.ExceptionThrower;
+import org.apache.tuscany.sca.test.exceptions.UnChecked;
+import org.oasisopen.sca.ServiceRuntimeException;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Scope;
+
+@Scope("COMPOSITE")
+public class RemoteExceptionHandlerImpl implements ExceptionHandler {
+ static final String INIT = "INIT";
+
+ private ExceptionRemoteThrower exceptionThrower;
+
+ private String theGood;
+
+ private Checked theBad;
+
+ private UnChecked theUgly;
+
+ private ServiceRuntimeException serviceRuntimeException;
+
+ public void testing() {
+
+ assert exceptionThrower != null : "'exceptionThrower' never wired";
+ String result = INIT;
+ try {
+ theGood = result = exceptionThrower.theGood();
+ assert result.equals(ExceptionThrower.SO_THEY_SAY);
+ } catch (Throwable e) {
+ assert result == INIT;
+ assert false;
+ e.printStackTrace();
+ }
+
+ result = INIT;
+ try {
+ result = exceptionThrower.theBad();
+ // incredible
+ assert false : "Expected 'Check' Exception";
+
+ } catch (Checked e) {
+ // This is good...
+ assert result == INIT;
+ theBad = e;
+ } catch (Throwable t) {
+ // This is not so good.
+ t.printStackTrace();
+ assert result == INIT;
+ assert false : "Got wrong exception '" + t.getClass().getName();
+ }
+
+ result = INIT;
+ try {
+ result = exceptionThrower.theUgly();
+ // incredible
+ assert false : "Expected 'UnCheck' Exception";
+
+ } catch (Checked e) {
+ // This is not so good...
+ assert false : "Got wrong exception '" + e.getClass().getName();
+ assert result == INIT;
+ } catch (UnChecked e) {
+ theUgly = e;
+
+ } catch (Throwable t) {
+ // This is not good.
+ assert false;
+ assert result == INIT;
+
+ System.out.println(ExceptionThrower.SO_THEY_SAY + " " + INIT);
+ }
+
+ result = INIT;
+ try {
+ result = exceptionThrower.serviceRuntimeException();
+ // incredible
+ assert false : "Expected 'ServiceRuntimeException' Exception";
+
+ } catch (ServiceRuntimeException e) {
+
+ serviceRuntimeException = e;
+
+ } catch (UnChecked e) {
+ // This is not so good...
+ assert false : "Got wrong exception '" + e.getClass().getName();
+ assert result == INIT;
+
+ } catch (Throwable t) {
+ // This is not good.
+ assert false;
+ assert result == INIT;
+
+ System.out.println(ExceptionThrower.SO_THEY_SAY + " " + INIT);
+ }
+
+ }
+
+ @Reference
+ public void setExceptionThrower(ExceptionRemoteThrower exceptionThrower) {
+ this.exceptionThrower = exceptionThrower;
+ }
+
+ public String getTheGood() {
+ return theGood;
+ }
+
+ public Checked getTheBad() {
+ return theBad;
+ }
+
+ public UnChecked getTheUgly() {
+ return theUgly;
+ }
+
+ public ExceptionRemoteThrower getExceptionThrower() {
+ return exceptionThrower;
+ }
+
+ public ServiceRuntimeException getServiceRuntimeException() {
+ return serviceRuntimeException;
+ }
+
+ public ServiceRuntimeException getBindingException() {
+ return null;
+ }
+
+ public ServiceRuntimeException getUncheckedException() {
+ return null;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/RemoteWSExceptionHandlerImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/RemoteWSExceptionHandlerImpl.java
new file mode 100644
index 0000000000..896ff4ab2e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/RemoteWSExceptionHandlerImpl.java
@@ -0,0 +1,176 @@
+/*
+ * 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.test.exceptions.impl;
+
+import org.apache.tuscany.sca.test.exceptions.Checked;
+import org.apache.tuscany.sca.test.exceptions.ExceptionHandler;
+import org.apache.tuscany.sca.test.exceptions.ExceptionRemoteThrower;
+import org.apache.tuscany.sca.test.exceptions.ExceptionThrower;
+import org.apache.tuscany.sca.test.exceptions.UnChecked;
+import org.oasisopen.sca.ServiceRuntimeException;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Scope;
+
+@Scope("COMPOSITE")
+public class RemoteWSExceptionHandlerImpl implements ExceptionHandler {
+ static final String INIT = "INIT";
+
+ private ExceptionRemoteThrower exceptionThrower;
+
+ @Reference
+ private ExceptionRemoteThrower exceptionThrowerDuff;
+
+ private String theGood;
+
+ private Checked theBad;
+
+ private UnChecked theUgly;
+
+ private ServiceRuntimeException uncheckedException;
+
+ private ServiceRuntimeException serviceRuntimeException;
+
+ private ServiceRuntimeException bindingException;
+
+ public void testing() {
+
+ assert exceptionThrower != null : "'exceptionThrower' never wired";
+ String result = INIT;
+ try {
+ theGood = result = exceptionThrower.theGood();
+ assert result.equals(ExceptionThrower.SO_THEY_SAY);
+ } catch (Throwable e) {
+ assert result == INIT;
+ assert false;
+ e.printStackTrace();
+ }
+
+ result = INIT;
+ try {
+ result = exceptionThrower.theBad();
+ // incredible
+ assert false : "Expected 'Check' Exception";
+
+ } catch (Checked e) {
+ // This is good...
+ assert result == INIT;
+ theBad = e;
+ } catch (Throwable t) {
+ // This is not so good.
+ t.printStackTrace();
+ assert result == INIT;
+ assert false : "Got wrong exception '" + t.getClass().getName();
+ }
+
+ result = INIT;
+ try {
+ result = exceptionThrower.theUgly();
+ // incredible
+ assert false : "Expected 'UnCheck' Exception";
+
+ } catch (ServiceRuntimeException e) {
+
+ uncheckedException = e;
+
+ } catch (Checked e) {
+ // This is not so good...
+ assert false : "Got wrong exception '" + e.getClass().getName();
+ assert result == INIT;
+ } catch (UnChecked e) {
+ theUgly = e;
+
+ } catch (Throwable t) {
+ // This is not good.
+ assert false;
+ assert result == INIT;
+
+ System.out.println(ExceptionThrower.SO_THEY_SAY + " " + INIT);
+ }
+
+ result = INIT;
+ try {
+ result = exceptionThrower.serviceRuntimeException();
+ // incredible
+ assert false : "Expected 'ServiceRuntimeException' Exception";
+
+ } catch (ServiceRuntimeException e) {
+
+ serviceRuntimeException = e;
+
+ } catch (UnChecked e) {
+ // This is not so good...
+ assert false : "Got wrong exception '" + e.getClass().getName();
+ assert result == INIT;
+
+ } catch (Throwable t) {
+ // This is not good.
+ assert false;
+ assert result == INIT;
+
+ System.out.println(ExceptionThrower.SO_THEY_SAY + " " + INIT);
+ }
+
+ result = INIT;
+ try {
+ theGood = result = exceptionThrowerDuff.theGood();
+ assert result.equals(ExceptionThrower.SO_THEY_SAY);
+ } catch (ServiceRuntimeException e) {
+ bindingException = e;
+ } catch (Throwable e) {
+ assert result == INIT;
+ assert false;
+ e.printStackTrace();
+ }
+
+ }
+
+ @Reference
+ public void setExceptionThrower(ExceptionRemoteThrower exceptionThrower) {
+ this.exceptionThrower = exceptionThrower;
+ }
+
+ public String getTheGood() {
+ return theGood;
+ }
+
+ public Checked getTheBad() {
+ return theBad;
+ }
+
+ public UnChecked getTheUgly() {
+ return theUgly;
+ }
+
+ public ExceptionRemoteThrower getExceptionThrower() {
+ return exceptionThrower;
+ }
+
+ public ServiceRuntimeException getServiceRuntimeException() {
+ return serviceRuntimeException;
+ }
+
+ public ServiceRuntimeException getBindingException() {
+ return bindingException;
+ }
+
+ public ServiceRuntimeException getUncheckedException() {
+ return uncheckedException;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/resources/ExceptionTest.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/resources/ExceptionTest.composite
new file mode 100644
index 0000000000..d5ce88d041
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/main/resources/ExceptionTest.composite
@@ -0,0 +1,55 @@
+<?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:foo="http://foo" targetNamespace="http://foo"
+ name="ExceptionTest">
+ <component name="main">
+ <implementation.java class="org.apache.tuscany.sca.test.exceptions.impl.ExceptionHandlerImpl" />
+ <reference name="exceptionThrower" target="exceptionThrower" />
+ </component>
+
+ <component name="exceptionThrower">
+ <implementation.java class="org.apache.tuscany.sca.test.exceptions.impl.ExceptionThrowerImpl" />
+ </component>
+
+ <component name="mainRemote">
+ <implementation.java class="org.apache.tuscany.sca.test.exceptions.impl.RemoteExceptionHandlerImpl" />
+ <reference name="exceptionThrower" target="exceptionThrowerRemote" />
+ </component>
+
+ <component name="exceptionThrowerRemote">
+ <implementation.java class="org.apache.tuscany.sca.test.exceptions.impl.ExceptionRemoteThrowerImpl" />
+ </component>
+
+ <component name="mainRemoteWS">
+ <implementation.java class="org.apache.tuscany.sca.test.exceptions.impl.RemoteWSExceptionHandlerImpl" />
+ <reference name="exceptionThrower" target="exceptionThrowerRemoteWS/ExceptionRemoteThrower" />
+ <reference name="exceptionThrowerDuff">
+ <binding.ws uri="http://localhost:9086/ADuffURL"/>
+ </reference>
+ </component>
+
+ <component name="exceptionThrowerRemoteWS">
+ <implementation.java class="org.apache.tuscany.sca.test.exceptions.impl.ExceptionRemoteThrowerImpl" />
+ <service name="ExceptionRemoteThrower">
+ <binding.ws/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/test/java/org/apache/tuscany/sca/test/exceptions/ExceptionsTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/test/java/org/apache/tuscany/sca/test/exceptions/ExceptionsTestCase.java
new file mode 100644
index 0000000000..44585e4c83
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/exceptions/src/test/java/org/apache/tuscany/sca/test/exceptions/ExceptionsTestCase.java
@@ -0,0 +1,109 @@
+/*
+ * 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.test.exceptions;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertSame;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.oasisopen.sca.ServiceRuntimeException;
+
+public class ExceptionsTestCase {
+
+ private static Node node;
+
+ /**
+ * Test exception handling over a local interface
+ */
+ @Test
+ public void testLocal() {
+ ExceptionHandler exceptionHandler = node.getService(ExceptionHandler.class, "main");
+ exceptionHandler.testing();
+ assertEquals(ExceptionThrower.SO_THEY_SAY, exceptionHandler.getTheGood());
+ assertNotNull(exceptionHandler.getTheBad());
+ assertEquals(Checked.class, exceptionHandler.getTheBad().getClass());
+ assertSame(ExceptionThrower.BAD, exceptionHandler.getTheBad());
+ assertNotNull(exceptionHandler.getTheUgly());
+ assertEquals(UnChecked.class, exceptionHandler.getTheUgly().getClass());
+ assertSame(ExceptionThrower.UGLY, exceptionHandler.getTheUgly());
+ assertEquals(ServiceRuntimeException.class, exceptionHandler.getServiceRuntimeException().getClass());
+ assertEquals(ExceptionThrower.SERVICE_RUNTIME_EXCEPTION.getMessage(), exceptionHandler.getServiceRuntimeException().getMessage());
+ }
+
+ /**
+ * Test exception handling over a remotable interface
+ */
+ @Test
+ public void testRemote() {
+ ExceptionHandler exceptionHandler = node.getService(ExceptionHandler.class, "mainRemote");
+ exceptionHandler.testing();
+ assertEquals(ExceptionThrower.SO_THEY_SAY, exceptionHandler.getTheGood());
+ assertNotNull(exceptionHandler.getTheBad());
+ assertEquals(Checked.class, exceptionHandler.getTheBad().getClass());
+ assertNotSame(ExceptionThrower.BAD, exceptionHandler.getTheBad());
+ assertNotNull(exceptionHandler.getTheUgly());
+ assertEquals(UnChecked.class, exceptionHandler.getTheUgly().getClass());
+ assertEquals(ServiceRuntimeException.class, exceptionHandler.getServiceRuntimeException().getClass());
+ assertEquals(ExceptionThrower.SERVICE_RUNTIME_EXCEPTION.getMessage(), exceptionHandler.getServiceRuntimeException().getMessage());
+
+ // [rfeng] We're not in a position to copy non business exceptions
+ // assertNotSame(ExceptionThrower.UGLY, exceptionHandler.getTheUgly());
+
+ }
+
+ /**
+ * Test exception handling over a remote binding
+ */
+ @Test
+ public void testRemoteWS() {
+ ExceptionHandler exceptionHandler = node.getService(ExceptionHandler.class, "mainRemoteWS");
+ exceptionHandler.testing();
+ assertEquals(ExceptionThrower.SO_THEY_SAY, exceptionHandler.getTheGood());
+ assertNotNull(exceptionHandler.getTheBad());
+ assertEquals(Checked.class, exceptionHandler.getTheBad().getClass());
+ assertNotSame(ExceptionThrower.BAD, exceptionHandler.getTheBad());
+ assertNotNull(exceptionHandler.getUncheckedException());
+ assertEquals(ServiceRuntimeException.class, exceptionHandler.getUncheckedException().getClass());
+ assertEquals(ServiceRuntimeException.class, exceptionHandler.getServiceRuntimeException().getClass());
+ assertEquals("org.apache.tuscany.sca.interfacedef.util.FaultException: " + ExceptionThrower.SERVICE_RUNTIME_EXCEPTION.getMessage(), exceptionHandler.getServiceRuntimeException().getMessage());
+ assertEquals(ServiceRuntimeException.class, exceptionHandler.getBindingException().getClass());
+ assertEquals("org.apache.tuscany.sca.interfacedef.util.FaultException: " + ExceptionThrower.SERVICE_RUNTIME_EXCEPTION.getMessage(), exceptionHandler.getServiceRuntimeException().getMessage());
+ }
+
+ @BeforeClass
+ public static void setUp() throws Exception {
+ String location = ContributionLocationHelper.getContributionLocation("ExceptionTest.composite");
+ node = NodeFactory.newInstance().createNode("ExceptionTest.composite", new Contribution("c1", location));
+ node.start();
+ }
+
+ @AfterClass
+ public static void tearDown() throws Exception {
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/pom.xml
new file mode 100644
index 0000000000..765eea8976
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/pom.xml
@@ -0,0 +1,59 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-implementation-composite</artifactId>
+ <name>Apache Tuscany SCA iTest implementation-composite</name>
+ <version>2.0.1</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-policy-logging</artifactId>
+ <version>2.0.1</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/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/policy/Target.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/policy/Target.java
new file mode 100644
index 0000000000..3ff7a7929c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/policy/Target.java
@@ -0,0 +1,26 @@
+/*
+ * 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 policy;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface Target {
+ String hello(String arg);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/policy/TargetClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/policy/TargetClientImpl.java
new file mode 100644
index 0000000000..7a88fe526f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/policy/TargetClientImpl.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package policy;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(Target.class)
+public class TargetClientImpl implements Target {
+
+ @Reference
+ protected Target targetService1;
+
+ @Reference(required=false)
+ protected Target targetService2;
+
+ public String hello(String arg) {
+ String returnString = "Target: Hello " + targetService1.hello(arg + "1");
+
+ if(targetService2 != null){
+ returnString += " " + targetService2.hello(arg + "2");
+ }
+
+ returnString += "!";
+
+ return returnString;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/policy/TargetServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/policy/TargetServiceImpl.java
new file mode 100644
index 0000000000..4868821723
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/policy/TargetServiceImpl.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package policy;
+
+import org.oasisopen.sca.annotation.Service;
+
+@Service(Target.class)
+public class TargetServiceImpl implements Target {
+
+ public String hello(String arg) {
+ return "Target: Hello " + arg + "!";
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/recursive/Composer.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/recursive/Composer.java
new file mode 100644
index 0000000000..88f20cf879
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/recursive/Composer.java
@@ -0,0 +1,26 @@
+/*
+ * 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 recursive;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface Composer {
+ public String Compose(String s);
+} \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/recursive/ComposerClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/recursive/ComposerClient.java
new file mode 100644
index 0000000000..6b7d7c82bb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/recursive/ComposerClient.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package recursive;
+
+import java.io.File;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.Contribution;
+
+/**
+ * For testing purpose
+ */
+public class ComposerClient {
+
+ public final static void main(String[] args) throws Exception {
+ NodeFactory factory = NodeFactory.newInstance();
+ Node node = factory.createNode(new File("src/main/resources/Client.composite").toURI().toURL().toString(),
+ new Contribution("TestContribution", new File("src/main/resources/").toURI().toURL().toString()));
+ node.start();
+ Composer composer = node.getService(Composer.class, "ClientComponent/Composer");
+ System.out.println(composer.Compose("ABC"));
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/recursive/ComposerClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/recursive/ComposerClientImpl.java
new file mode 100644
index 0000000000..bf6c8037e4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/recursive/ComposerClientImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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 recursive;
+
+import org.oasisopen.sca.annotation.Reference;
+
+/**
+ * @version $Rev: 905603 $ $Date: 2010-02-02 12:18:47 +0000 (Tue, 02 Feb 2010) $
+ */
+public class ComposerClientImpl implements Composer {
+ @Reference
+ protected Composer composerWS;
+
+ /**
+ * @see recursive.Composer#Compose(java.lang.String)
+ */
+ public String Compose(String s) {
+ return composerWS.Compose(s);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/recursive/ComposerImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/recursive/ComposerImpl.java
new file mode 100644
index 0000000000..a9c2251e2c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/recursive/ComposerImpl.java
@@ -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 recursive;
+
+/**
+ * Composer Component Implementation
+ *
+ */
+
+public class ComposerImpl implements Composer {
+
+ public String Compose(String s) {
+ System.out.println("Composing " + s + "...");
+ return "Composed: " + s;
+
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/recursive/ComposerServer.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/recursive/ComposerServer.java
new file mode 100644
index 0000000000..018651ae26
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/java/recursive/ComposerServer.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package recursive;
+
+import java.io.File;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.Contribution;
+
+/**
+ * For testing purpose
+ */
+public class ComposerServer {
+
+ public final static void main(String[] args) throws Exception {
+ NodeFactory factory = NodeFactory.newInstance();
+ Node node = factory.createNode(new File("src/main/resources/Outer.composite").toURI().toURL().toString(),
+ new Contribution("TestContribution", new File("src/main/resources/").toURI().toURL().toString()));
+ node.start();
+ System.out.println("Press Enter to exit...");
+ System.in.read();
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions
new file mode 100644
index 0000000000..8ca579a99f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions
@@ -0,0 +1,17 @@
+# 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.
+policy/definitions.xml \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/bindingoverride/InnerComposite.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/bindingoverride/InnerComposite.composite
new file mode 100644
index 0000000000..cb6e0cc358
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/bindingoverride/InnerComposite.composite
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://bindingoverride"
+ xmlns:bindingoverride="http://bindingoverride"
+ name="BindingOverrideInnerComposite">
+
+ <service name="InnerService" promote="InnerServiceComponent">
+ <interface.java interface="policy.Target"/>
+ </service>
+
+ <component name="InnerServiceComponent">
+ <implementation.java class="policy.TargetServiceImpl"/>
+ <service name="Target">
+ <interface.java interface="policy.Target"/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/bindingoverride/OuterComposite.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/bindingoverride/OuterComposite.composite
new file mode 100644
index 0000000000..8c13415639
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/bindingoverride/OuterComposite.composite
@@ -0,0 +1,38 @@
+<?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"
+ targetNamespace="http://bindingoverride"
+ xmlns:bindingoverride="http://bindingoverride"
+ name="BindingOverrideOuterComposite">
+
+ <component name="OuterClientComponent">
+ <implementation.java class="policy.TargetClientImpl"/>
+ <reference name="targetService1" target="OuterServiceComponent"/>
+ </component>
+
+ <component name="OuterServiceComponent">
+ <implementation.composite name="bindingoverride:BindingOverrideInnerComposite"/>
+ <service name="InnerService">
+ <interface.java interface="policy.Target"/>
+ <binding.ws uri="http://localhost:8085/OuterTargetServiceComponent"/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/policy/PolicyInnerComposite.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/policy/PolicyInnerComposite.composite
new file mode 100644
index 0000000000..585ee7f801
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/policy/PolicyInnerComposite.composite
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://policy"
+ xmlns:policy="http://policy"
+ name="PolicyInnerComposite">
+
+ <service name="TargetService" promote="TargetServiceComponent">
+ <interface.java interface="policy.Target"/>
+ </service>
+
+ <component name="TargetServiceComponent">
+ <implementation.java class="policy.TargetServiceImpl"/>
+ <service name="Target">
+ <interface.java interface="policy.Target"/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/policy/PolicyOuterComposite.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/policy/PolicyOuterComposite.composite
new file mode 100644
index 0000000000..23c39fce82
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/policy/PolicyOuterComposite.composite
@@ -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"
+ targetNamespace="http://policy"
+ xmlns:policy="http://policy"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ name="PolicyOuterComposite">
+
+ <component name="TargetClientComponent">
+ <implementation.java class="policy.TargetClientImpl"/>
+ <reference name="targetService1" target="OuterTargetService1Component"/>
+ <reference name="targetService2" target="OuterTargetService2Component"/>
+ </component>
+
+ <component name="OuterTargetService1Component">
+ <implementation.composite name="policy:PolicyInnerComposite"/>
+ <service name="TargetService" requires="tuscany:logging">
+ <interface.java interface="policy.Target"/>
+ <binding.ws uri="http://localhost:8085/OuterTargetService1Component"/>
+ </service>
+ </component>
+
+ <component name="OuterTargetService2Component">
+ <implementation.composite name="policy:PolicyInnerComposite"/>
+ <service name="TargetService" requires="tuscany:logging">
+ <interface.java interface="policy.Target"/>
+ <binding.ws uri="http://localhost:8085/OuterTargetService2Component"/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/policy/definitions.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/policy/definitions.xml
new file mode 100644
index 0000000000..d67603c8ce
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/policy/definitions.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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 xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://policy"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:policy="http://policy"
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" >
+
+ <policySet name="JDKLoggingPolicy"
+ provides="tuscany:logging"
+ appliesTo="//sca:binding.ws"
+ attachTo="//sca:reference | //sca:service">
+ <tuscany:jdkLogger name="test.logger">
+ <tuscany:logLevel>FINE</tuscany:logLevel>
+ <tuscany:resourceBundle>LoggingMessages.properties</tuscany:resourceBundle>
+ </tuscany:jdkLogger>
+
+ </policySet>
+
+</definitions> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/recursive/Client.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/recursive/Client.composite
new file mode 100644
index 0000000000..50cbaa5086
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/recursive/Client.composite
@@ -0,0 +1,29 @@
+<?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"
+ targetNamespace="http://client" name="Client">
+ <component name="ClientComponent">
+ <implementation.java class="recursive.ComposerClientImpl" />
+ <reference name="composerWS">
+ <binding.ws uri="http://localhost:8085/OuterService"/>
+ </reference>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/recursive/Inner.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/recursive/Inner.composite
new file mode 100644
index 0000000000..df7130ba99
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/recursive/Inner.composite
@@ -0,0 +1,27 @@
+<?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"
+ targetNamespace="http://inner" name="Inner">
+ <component name="InnerComponent">
+ <implementation.java class="recursive.ComposerImpl" />
+ </component>
+ <service name="OuterService" promote="InnerComponent"/>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/recursive/Outer.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/recursive/Outer.composite
new file mode 100644
index 0000000000..1c7d49f1c0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/main/resources/recursive/Outer.composite
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://outer" xmlns:inner="http://inner"
+ name="Outer">
+ <component name="OuterComponent">
+ <implementation.composite name="inner:Inner" />
+ <service name="OuterService">
+ <interface.java interface="recursive.Composer" />
+ <binding.ws uri="http://localhost:8085/OuterService" />
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/test/java/bindingoverride/BindingOverrideTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/test/java/bindingoverride/BindingOverrideTestCase.java
new file mode 100644
index 0000000000..e25517b110
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/test/java/bindingoverride/BindingOverrideTestCase.java
@@ -0,0 +1,62 @@
+/*
+ * 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 bindingoverride;
+
+import java.io.File;
+
+import junit.framework.Assert;
+
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.Contribution;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import policy.Target;
+
+public class BindingOverrideTestCase{
+
+ private Node node;
+ private Target targetClient;
+
+ @Before
+ public void setUp() throws Exception {
+ try {
+ NodeFactory factory = NodeFactory.newInstance();
+ node = factory.createNode(new File("src/main/resources/bindingoverride/OuterComposite.composite").toURI().toURL().toString(),
+ new Contribution("TestContribution", new File("src/main/resources/bindingoverride/").toURI().toURL().toString()));
+ node.start();
+ targetClient = node.getService(Target.class, "OuterClientComponent");
+ } catch(Exception ex) {
+ System.out.println(ex.toString());
+ }
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void test() throws Exception {
+ Assert.assertEquals("Target: Hello Target: Hello Fred1!!", targetClient.hello("Fred"));
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/test/java/policy/PolicyTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/test/java/policy/PolicyTestCase.java
new file mode 100644
index 0000000000..9580b3a2a2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/test/java/policy/PolicyTestCase.java
@@ -0,0 +1,87 @@
+/*
+ * 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 policy;
+
+import java.io.File;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.assembly.Component;
+import org.apache.tuscany.sca.assembly.impl.CompositeImpl;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.policy.PolicySet;
+import org.apache.tuscany.sca.policy.PolicySubject;
+import org.apache.tuscany.sca.runtime.RuntimeComponent;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+
+public class PolicyTestCase{
+
+ private Node node;
+ private Target targetClient;
+
+ @Before
+ public void setUp() throws Exception {
+ try {
+ NodeFactory factory = NodeFactory.newInstance();
+ node = factory.createNode(new File("src/main/resources/policy/PolicyOuterComposite.composite").toURI().toURL().toString(),
+ new Contribution("TestContribution", new File("src/main/resources/policy/").toURI().toURL().toString()));
+ node.start();
+ targetClient = node.getService(Target.class, "TargetClientComponent");
+ } catch(Exception ex) {
+ System.out.println(ex.toString());
+ }
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void test() throws Exception {
+ //Check that the binding policy sets do flow down to the component but not down to the
+ //component inside implementation.composite
+ Component outerComponent = ((NodeImpl)node).getDomainComposite().getComponent("OuterTargetService1Component");
+
+ // The outer component service bindings should have policy sets attached
+ Assert.assertEquals(1, outerComponent.getServices().get(0).getPolicySets().size());
+
+ Component component = ((CompositeImpl)outerComponent.getImplementation()).getComponents().get(0);
+
+ // The original inner component service binding should not have policy sets attached
+ Assert.assertEquals(0, ((PolicySubject)component.getServices().get(0).getBindings().get(0)).getPolicySets().size());
+
+ // The promoted inner component service binding should have policy sets attached
+ Assert.assertEquals(1, outerComponent.getServices().get(0).getEndpoints().get(0).getPolicySets().size());
+
+ // TUSCANY-3988
+ // The inner component should have a single set of policy providers
+ Assert.assertEquals(3, ((RuntimeComponent)component).getPolicyProviders().size());
+
+ String result = targetClient.hello("Fred");
+
+ System.out.println(result);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/test/java/recursive/ComposerClientTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/test/java/recursive/ComposerClientTestCase.java
new file mode 100644
index 0000000000..aeac1950f6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/test/java/recursive/ComposerClientTestCase.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package recursive;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import recursive.Composer;
+
+/**
+ * Test case for hweb service client
+ */
+public class ComposerClientTestCase {
+
+ private Node node;
+ private Composer composer;
+
+ @Before
+ public void startClient() throws Exception {
+ try {
+ TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();
+ node = tuscanyRuntime.createNode("myDomain");
+
+ node.installContribution("contrib1", "src/main/resources/recursive", null, null);
+ node.startComposite("contrib1", "Outer.composite");
+ node.startComposite("contrib1", "Client.composite");
+
+ composer = node.getService(Composer.class, "ClientComponent/Composer");
+
+ } catch (Throwable e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ public void testWSClient() throws Exception {
+ String msg = composer.Compose("ABC");
+ Assert.assertEquals("Composed: ABC", msg);
+ }
+
+ @After
+ public void stopClient() throws Exception {
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/test/java/recursive/CompositeMulitStartTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/test/java/recursive/CompositeMulitStartTestCase.java
new file mode 100644
index 0000000000..8e5a2af5d7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-composite/src/test/java/recursive/CompositeMulitStartTestCase.java
@@ -0,0 +1,73 @@
+/*
+ * 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 recursive;
+
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import recursive.Composer;
+
+/**
+ * TUSCANY-3907
+ * Tests that a composite can be started at the top level and as a nested composite without
+ * have the fact the the composite will be built twice mess things up
+ */
+public class CompositeMulitStartTestCase {
+
+ private Node node;
+ private Composer composer;
+
+ @Before
+ public void startClient() throws Exception {
+ try {
+ TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();
+ node = tuscanyRuntime.createNode("myDomain");
+
+ node.installContribution("contrib1", "src/main/resources/recursive", null, null);
+
+ node.startComposite("contrib1", "Inner.composite");
+ node.startComposite("contrib1", "Outer.composite");
+ node.startComposite("contrib1", "Client.composite");
+
+ composer = node.getService(Composer.class, "ClientComponent/Composer");
+
+ } catch (Throwable e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ public void testWSClient() throws Exception {
+ String msg = composer.Compose("ABC");
+ Assert.assertEquals("Composed: ABC", msg);
+ }
+
+ @After
+ public void stopClient() throws Exception {
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/pom.xml
new file mode 100644
index 0000000000..6df1c39e64
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/pom.xml
@@ -0,0 +1,57 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-implementation-spring</artifactId>
+ <name>Apache Tuscany SCA iTest Spring Implementation</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-spring-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</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/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/bigbank/stockquote/StockQuoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/bigbank/stockquote/StockQuoteImpl.java
new file mode 100644
index 0000000000..bd7770ca7d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/bigbank/stockquote/StockQuoteImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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 bigbank.stockquote;
+
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements the StockQuote service.
+ */
+@Service(StockQuoteService.class)
+public class StockQuoteImpl implements StockQuoteService {
+
+ public double getQuote(String symbol) {
+ double price = 104.0 + Math.random();
+ price = ((int)(price * 100)) / 100.0;
+
+ System.out.println("Getting stock quote for: " + symbol + ", value: "+ price);
+
+ return price;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/bigbank/stockquote/StockQuoteService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/bigbank/stockquote/StockQuoteService.java
new file mode 100644
index 0000000000..747433a9e7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/bigbank/stockquote/StockQuoteService.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package bigbank.stockquote;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the StockQuote service.
+ */
+@Remotable
+public interface StockQuoteService {
+
+ public double getQuote(String symbol);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/AddService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/AddService.java
new file mode 100644
index 0000000000..dd7ecb827d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/AddService.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * The Add service interface
+ */
+@Remotable
+public interface AddService {
+
+ double add(double n1, double n2);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/AddServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/AddServiceImpl.java
new file mode 100644
index 0000000000..eae607a7ca
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/AddServiceImpl.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * An implementation of the Add service
+ */
+public class AddServiceImpl implements AddService {
+
+ public double add(double n1, double n2) {
+ Logger logger = Logger.getLogger("calculator");
+ logger.log(Level.FINEST, "Adding " + n1 + " and " + n2);
+ return n1 + n2;
+ }
+
+} \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/CalculatorService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/CalculatorService.java
new file mode 100644
index 0000000000..ce1cdaae5a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/CalculatorService.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * The Calculator service interface.
+ */
+@Remotable
+public interface CalculatorService {
+
+ double add(double n1, double n2);
+
+ double subtract(double n1, double n2);
+
+ double multiply(double n1, double n2);
+
+ double divide(double n1, double n2);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/CalculatorServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/CalculatorServiceImpl.java
new file mode 100644
index 0000000000..b033516c1b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/CalculatorServiceImpl.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+/**
+ * An implementation of the Calculator service.
+ */
+public class CalculatorServiceImpl implements CalculatorService {
+
+ private AddService addService;
+ private SubtractService subtractService;
+ private MultiplyService multiplyService;
+ private DivideService divideService;
+
+ public void setAddService(AddService addService) {
+ this.addService = addService;
+ }
+
+ public AddService getAddService() {
+ return addService;
+ }
+
+ public void setSubtractService(SubtractService subtractService) {
+ this.subtractService = subtractService;
+ }
+
+ public SubtractService getSubtractService() {
+ return subtractService;
+ }
+
+ public void setDivideService(DivideService divideService) {
+ this.divideService = divideService;
+ }
+
+ public DivideService getDivideService() {
+ return divideService;
+ }
+
+ public void setMultiplyService(MultiplyService multiplyService) {
+ this.multiplyService = multiplyService;
+ }
+
+ public MultiplyService getMultiplyService() {
+ return multiplyService;
+ }
+
+ public double add(double n1, double n2) {
+ return addService.add(n1, n2);
+ }
+
+ public double subtract(double n1, double n2) {
+ return subtractService.subtract(n1, n2);
+ }
+
+ public double multiply(double n1, double n2) {
+ return multiplyService.multiply(n1, n2);
+ }
+
+ public double divide(double n1, double n2) {
+ return divideService.divide(n1, n2);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/DivideService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/DivideService.java
new file mode 100644
index 0000000000..30d248208b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/DivideService.java
@@ -0,0 +1,28 @@
+/*
+ * 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 calculator;
+
+/**
+ * The divide service interface
+ */
+public interface DivideService {
+
+ double divide(double n1, double n2);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/DivideServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/DivideServiceImpl.java
new file mode 100644
index 0000000000..1323edf55a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/DivideServiceImpl.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * An implementation of the Divide service.
+ */
+public class DivideServiceImpl implements DivideService {
+
+ public double divide(double n1, double n2) {
+ Logger logger = Logger.getLogger("calculator");
+ logger.log(Level.FINEST, "Dividing " + n1 + " with " + n2);
+ return n1 / n2;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/MultiplyService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/MultiplyService.java
new file mode 100644
index 0000000000..5290605938
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/MultiplyService.java
@@ -0,0 +1,28 @@
+/*
+ * 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 calculator;
+
+/**
+ * The interface for the multiply service
+ */
+public interface MultiplyService {
+
+ double multiply(double n1, double n2);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/MultiplyServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/MultiplyServiceImpl.java
new file mode 100644
index 0000000000..91b803bc9e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/MultiplyServiceImpl.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * An implementation of the Multiply service.
+ */
+public class MultiplyServiceImpl implements MultiplyService {
+
+ public double multiply(double n1, double n2) {
+ Logger logger = Logger.getLogger("calculator");
+ logger.log(Level.FINEST, "Multiplying " + n1 + " with " + n2);
+ return n1 * n2;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/SubtractService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/SubtractService.java
new file mode 100644
index 0000000000..bf0d1882b6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/SubtractService.java
@@ -0,0 +1,28 @@
+/*
+ * 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 calculator;
+
+/**
+ * The interface for the multiply service
+ */
+public interface SubtractService {
+
+ double subtract(double n1, double n2);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/SubtractServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/SubtractServiceImpl.java
new file mode 100644
index 0000000000..58cc4a3547
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/SubtractServiceImpl.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * An implementation of the subtract service.
+ */
+public class SubtractServiceImpl implements SubtractService {
+
+ public double subtract(double n1, double n2) {
+ Logger logger = Logger.getLogger("calculator");
+ logger.log(Level.FINEST, "Subtracting " + n1 + " from " + n2);
+ return n1 - n2;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/security/CalculatorCallbackHandler.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/security/CalculatorCallbackHandler.java
new file mode 100644
index 0000000000..4f063993a3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/security/CalculatorCallbackHandler.java
@@ -0,0 +1,50 @@
+/*
+ * 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 calculator.security;
+
+import java.io.IOException;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.NameCallback;
+import javax.security.auth.callback.PasswordCallback;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class CalculatorCallbackHandler implements CallbackHandler {
+
+ public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
+ for (int i = 0; i < callbacks.length; i++) {
+ if (callbacks[i] instanceof NameCallback) {
+ NameCallback nc = (NameCallback)callbacks[i];
+ nc.setName("CalculatorUser");
+ } else if (callbacks[i] instanceof PasswordCallback) {
+ PasswordCallback pc = (PasswordCallback)callbacks[i];
+ pc.setPassword("CalculatorUserPasswd".toCharArray());
+ } else {
+ throw new UnsupportedCallbackException
+ (callbacks[i], "Unsupported Callback!");
+ }
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/security/JaasLoginModule.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/security/JaasLoginModule.java
new file mode 100644
index 0000000000..b3ef6e7312
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/security/JaasLoginModule.java
@@ -0,0 +1,178 @@
+/*
+ * 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 calculator.security;
+
+import java.security.Principal;
+import java.util.Map;
+
+import javax.security.auth.Subject;
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.NameCallback;
+import javax.security.auth.callback.PasswordCallback;
+import javax.security.auth.login.LoginException;
+import javax.security.auth.spi.LoginModule;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class JaasLoginModule implements LoginModule {
+
+ private CallbackHandler callbackHandler;
+ private Subject subject;
+ private Principal userPrincipal;
+ private String userId;
+ private String password;
+ private boolean succeeded;
+ private boolean commitSucceeded;
+
+ public void initialize(Subject subject,
+ CallbackHandler callbackHandler,
+ Map<String, ?> sharedState,
+ Map<String, ?> options) {
+ this.callbackHandler = callbackHandler;
+ this.subject = subject;
+ }
+
+ public boolean login() throws LoginException {
+ Callback[] callbacks = new Callback[2];
+ callbacks[0] = new NameCallback("UserId:");
+ callbacks[1] = new PasswordCallback("Password:", false);
+
+ try {
+ callbackHandler.handle(callbacks);
+ userId = ((NameCallback)callbacks[0]).getName();
+ password = new String(((PasswordCallback)callbacks[1]).getPassword());
+
+ if (userId.equals("CalculatorUser") && password.equals("CalculatorUserPasswd")) {
+ System.out.println("Successfully AUTHENTICATED!!");
+ succeeded = true;
+ return true;
+ } else {
+ System.out.println("Incorrect userId / password! AUTHENTICATION FAILED!!");
+ return false;
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ return false;
+ }
+ }
+
+ /**
+ * <p> This method is called if the LoginContext's
+ * overall authentication succeeded
+ * (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules
+ * succeeded).
+ *
+ * <p> If this LoginModule's own authentication attempt
+ * succeeded (checked by retrieving the private state saved by the
+ * <code>login</code> method), then this method associates a
+ * <code>UserPrincipal</code>
+ * with the <code>Subject</code> located in the
+ * <code>LoginModule</code>. If this LoginModule's own
+ * authentication attempted failed, then this method removes
+ * any state that was originally saved.
+ *
+ * <p>
+ *
+ * @exception LoginException if the commit fails.
+ *
+ * @return true if this LoginModule's own login and commit
+ * attempts succeeded, or false otherwise.
+ */
+ public boolean commit() throws LoginException {
+ if (succeeded == false) {
+ return false;
+ } else {
+ // add a Principal (authenticated identity) to the Subject
+
+ // assume the user we authenticated is the UserPrincipal
+ userPrincipal = new UserPrincipal(userId);
+ if (!subject.getPrincipals().contains(userPrincipal))
+ subject.getPrincipals().add(userPrincipal);
+
+ // in any case, clean out state
+ userId = null;
+ password = null;
+ commitSucceeded = true;
+ return true;
+ }
+ }
+
+ /**
+ * <p> This method is called if the LoginContext's
+ * overall authentication failed.
+ * (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules
+ * did not succeed).
+ *
+ * <p> If this LoginModule's own authentication attempt
+ * succeeded (checked by retrieving the private state saved by the
+ * <code>login</code> and <code>commit</code> methods),
+ * then this method cleans up any state that was originally saved.
+ *
+ * <p>
+ *
+ * @exception LoginException if the abort fails.
+ *
+ * @return false if this LoginModule's own login and/or commit attempts
+ * failed, and true otherwise.
+ */
+ public boolean abort() throws LoginException {
+ if (succeeded == false) {
+ return false;
+ } else if (succeeded == true && commitSucceeded == false) {
+ // login succeeded but overall authentication failed
+ succeeded = false;
+ userId = null;
+ password = null;
+ userPrincipal = null;
+ } else {
+ // overall authentication succeeded and commit succeeded,
+ // but someone else's commit failed
+ logout();
+ }
+ return true;
+ }
+
+ /**
+ * Logout the user.
+ *
+ * <p> This method removes the <code>SimplePrincipal</code>
+ * that was added by the <code>commit</code> method.
+ *
+ * <p>
+ *
+ * @exception LoginException if the logout fails.
+ *
+ * @return true in all cases since this <code>LoginModule</code>
+ * should not be ignored.
+ */
+ public boolean logout() throws LoginException {
+ subject.getPrincipals().remove(userPrincipal);
+ succeeded = false;
+ succeeded = commitSucceeded;
+ userId = null;
+ if (password != null)
+ password = null;
+ userPrincipal = null;
+ return true;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/security/UserPrincipal.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/security/UserPrincipal.java
new file mode 100644
index 0000000000..595626e672
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/calculator/security/UserPrincipal.java
@@ -0,0 +1,66 @@
+/**
+ * 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 calculator.security;
+
+import java.security.Principal;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class UserPrincipal implements Principal {
+
+ private final String name;
+
+ public UserPrincipal(String name) {
+ if (name == null)
+ throw new IllegalArgumentException("name cannot be null");
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String toString() {
+ return name;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((name == null) ? 0 : name.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ final UserPrincipal other = (UserPrincipal)obj;
+ if (name == null) {
+ if (other.name != null)
+ return false;
+ } else if (!name.equals(other.name))
+ return false;
+ return true;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/context/access/SCAApplicationContextProvider.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/context/access/SCAApplicationContextProvider.java
new file mode 100644
index 0000000000..968d420fc8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/context/access/SCAApplicationContextProvider.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package context.access;
+
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+
+public class SCAApplicationContextProvider implements ApplicationContextAware {
+
+ private static ApplicationContext ctx;
+
+ public void setApplicationContext(ApplicationContext appContext) throws BeansException {
+ // Wiring the ApplicationContext into a static method
+ ctx = appContext;
+ }
+
+ public static ApplicationContext getApplicationContext() {
+ return ctx;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/helloworld/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/helloworld/HelloWorld.java
new file mode 100644
index 0000000000..8bb3006d12
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/helloworld/HelloWorld.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * Interface for the "hello world" service - predictably simple with a single operation
+ * "sayHello"
+ *
+ * @version $Rev$ $Date$
+ */
+@Remotable
+public interface HelloWorld {
+
+ String sayHello(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/helloworld/HelloWorldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/helloworld/HelloWorldImpl.java
new file mode 100644
index 0000000000..f68134702b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/helloworld/HelloWorldImpl.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld;
+
+/**
+ * A simple proxy Java class which implements the HelloWorld interface but which uses
+ * a reference "delegate" to actually provide the HelloWorld service
+ *
+ * @version $Rev$ $Date$
+ */
+public class HelloWorldImpl implements HelloWorld {
+
+ static String hello = "Hello ";
+
+ public String sayHello(String s) {
+ // Simply call the reference to satisfy the service request...
+ System.out.println("HelloWorldImpl - sayHello called");
+ return (hello + s);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/helloworld/HelloWorldProxy.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/helloworld/HelloWorldProxy.java
new file mode 100644
index 0000000000..78b3649b5b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/helloworld/HelloWorldProxy.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+/**
+ * A simple proxy Java class which implements the HelloWorld interface but which uses
+ * a reference "delegate" to actually provide the HelloWorld service
+ *
+ * @version $Rev$ $Date$
+ */
+public class HelloWorldProxy implements HelloWorld {
+
+ // Here is the reference "delegate" - it implements the HelloWorld interface...
+ @Reference
+ public HelloWorld delegate;
+
+ public String sayHello(String s) {
+ // Simply call the reference to satisfy the service request...
+ System.out.println("HelloWorldProxy - calling sayHello");
+ return delegate.sayHello(s);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/mock/TestBean.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/mock/TestBean.java
new file mode 100644
index 0000000000..1a0abd7f8f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/mock/TestBean.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package mock;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface TestBean {
+ String echo(String msg);
+
+ TestBean getBean();
+
+ void setBean(TestBean bean);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/mock/TestBeanImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/mock/TestBeanImpl.java
new file mode 100644
index 0000000000..e3d9a36bb8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/mock/TestBeanImpl.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package mock;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class TestBeanImpl implements TestBean {
+
+ private TestBean bean;
+
+ public TestBeanImpl() {
+ }
+
+ public String echo(String msg) {
+ return msg;
+ }
+
+ public TestBean getBean() {
+ return bean;
+ }
+
+ public void setBean(TestBean bean) {
+ this.bean = bean;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/mock/TestHelloWorldBean.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/mock/TestHelloWorldBean.java
new file mode 100644
index 0000000000..47342fded8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/mock/TestHelloWorldBean.java
@@ -0,0 +1,39 @@
+/*
+ * 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 mock;
+
+/**
+ * A simple test Spring bean which provides the HelloWorld service
+ *
+ * @version $Rev$ $Date$
+ */
+
+import helloworld.HelloWorld;
+
+public class TestHelloWorldBean implements HelloWorld {
+
+ static String hello = "Hello ";
+
+ // Classic "Hello xxx" response to any input message
+ public String sayHello(String message) {
+ System.out.println("TestHelloWorldBean - sayHello called");
+ return (hello + message);
+ }
+
+} // end class TestHelloWorldBean
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/mock/TestReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/mock/TestReference.java
new file mode 100644
index 0000000000..6f5b280f31
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/mock/TestReference.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package mock;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface TestReference {
+ String echo(String msg);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/mock/TestReferenceBean.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/mock/TestReferenceBean.java
new file mode 100644
index 0000000000..dea7933e1a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/mock/TestReferenceBean.java
@@ -0,0 +1,57 @@
+/*
+ * 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 mock;
+
+/**
+ * A test Spring bean which provides the HelloWorld service by calling a reference
+ * to provide the content of the response
+ *
+ * @version $Rev$ $Date$
+ */
+
+import helloworld.HelloWorld;
+
+public class TestReferenceBean implements HelloWorld {
+
+ // The reference
+ private HelloWorld bean;
+
+ // Classic "Hello xxx" response to any input message
+ public String sayHello(String message) {
+ System.out.println("TestReferenceBean - sayHello called");
+ return (bean.sayHello(message));
+ }
+
+ /**
+ * Setter for the bean reference
+ * @param theBean
+ */
+ public void setBean(HelloWorld theBean) {
+ this.bean = theBean;
+ }
+
+ /**
+ * Getter for the reference
+ * @return
+ */
+ public HelloWorld getBean() {
+ return this.bean;
+ }
+
+} // end class TestReferenceBean
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/mock/TestSCAPropertyBean.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/mock/TestSCAPropertyBean.java
new file mode 100644
index 0000000000..b80b05dc08
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/mock/TestSCAPropertyBean.java
@@ -0,0 +1,55 @@
+/*
+ * 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 mock;
+
+/**
+ * A test Spring bean which provides the HelloWorld service.
+ * This bean has a single String property called "hello" which must be set through
+ * external configuration to give the correct response message, otherwise an (incorrect)
+ * default message is generated
+ *
+ * @version $Rev$ $Date$
+ */
+
+import helloworld.HelloWorld;
+
+public class TestSCAPropertyBean implements HelloWorld {
+
+ private String hello = "Go away";
+
+ /**
+ * Provides the operation of the "HelloWorld" interface - a simple string response
+ * to a string input message, where the response is a greeting followed by the original
+ * input message.
+ */
+ public String sayHello(String message) {
+ System.out.println("TestHelloWorldBean - sayHello called");
+ return (hello + " " + message);
+ }
+
+ /**
+ * Public setter for the (unannotated) field "hello" which constitutes an SCA
+ * property
+ * @param message - the message to use for the response to "sayHello"
+ */
+ public void setHello(String message) {
+ hello = message;
+ }
+
+} // end class TestSCAPropertyBean
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/spring/annotations/CalculatorServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/spring/annotations/CalculatorServiceImpl.java
new file mode 100644
index 0000000000..544b39ad58
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/java/spring/annotations/CalculatorServiceImpl.java
@@ -0,0 +1,131 @@
+/*
+ * 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 spring.annotations;
+
+import org.oasisopen.sca.annotation.ComponentName;
+import org.oasisopen.sca.annotation.Destroy;
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Property;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+import calculator.AddService;
+import calculator.CalculatorService;
+import calculator.DivideService;
+import calculator.MultiplyService;
+import calculator.SubtractService;
+
+/**
+ * An implementation of the Calculator service.
+ */
+@Service(CalculatorService.class)
+public class CalculatorServiceImpl implements AddService, SubtractService, MultiplyService, DivideService {
+
+ public AddService addService; // setter injection
+
+ @Reference
+ public SubtractService subtractService; // field injection
+
+ @Reference(name="multiplyService", required=false)
+ public MultiplyService multiply; // field injection (different reference and field name)
+
+ public DivideService divide; // setter injection (different reference and field name)
+
+ public String message; // setter injection
+
+ @Property(name="message", required=false)
+ public String message2; // field injection
+
+ public String componentName;
+
+ @Init
+ public void initMethod () {
+ System.out.println("Init method is sucessfully called.....");
+ // Property value should be null here.
+ System.out.println("Property Value message is...." + message);
+ }
+
+ @Destroy
+ public void destroyMethod () {
+ System.out.println("Component Name is...." + componentName);
+ System.out.println("Property Value message is...." + message);
+ System.out.println("Property Value message2 is...." + message2);
+ System.out.println("Destroy method is sucessfully called.....");
+ }
+
+ @Reference
+ public void setAddService(AddService addService) {
+ this.addService = addService;
+ }
+
+ public AddService getAddService() {
+ return addService;
+ }
+
+ /*public void setSubtractService(SubtractService subtractService) {
+ this.subtractService = subtractService;
+ }
+
+ public SubtractService getSubtractService() {
+ return subtractService;
+ }*/
+
+ @Reference(name="divideService", required=false)
+ public void setDivideService(DivideService divide) {
+ this.divide = divide;
+ }
+
+ public DivideService getDivideService() {
+ return divide;
+ }
+
+ /*public void setMultiplyService(MultiplyService multiplyService) {
+ this.multiplyService = multiplyService;
+ }
+
+ public MultiplyService getMultiplyService() {
+ return multiplyService;
+ }*/
+
+ @ComponentName
+ public void setComponentName(String componentName) {
+ this.componentName = componentName;
+ }
+
+ @Property
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public double add(double n1, double n2) {
+ return addService.add(n1, n2);
+ }
+
+ public double subtract(double n1, double n2) {
+ return subtractService.subtract(n1, n2);
+ }
+
+ public double multiply(double n1, double n2) {
+ return multiply.multiply(n1, n2);
+ }
+
+ public double divide(double n1, double n2) {
+ return divide.divide(n1, n2);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/access/CalculatorService-context.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/access/CalculatorService-context.xml
new file mode 100644
index 0000000000..81d59432b8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/access/CalculatorService-context.xml
@@ -0,0 +1,45 @@
+<?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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:sca="http://www.springframework.org/schema/sca"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd">
+
+ <sca:service name="CalculatorService"
+ type="calculator.CalculatorService" target="CalculatorServiceBean"/>
+
+ <bean id="CalculatorServiceBean" class="calculator.CalculatorServiceImpl">
+ <property name="addService" ref="addService"/>
+ <property name="subtractService" ref="subtractService"/>
+ <property name="multiplyService" ref="multiplyService"/>
+ <property name="divideService" ref="divideService"/>
+ </bean>
+
+ <bean id="contextAccess" class="context.access.SCAApplicationContextProvider">
+ </bean>
+
+ <sca:reference name="addService" type="calculator.AddService"/>
+ <sca:reference name="subtractService" type="calculator.SubtractService"/>
+ <sca:reference name="multiplyService" type="calculator.MultiplyService"/>
+ <sca:reference name="divideService" type="calculator.DivideService"/>
+
+</beans> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/access/ContextAccess.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/access/ContextAccess.composite
new file mode 100644
index 0000000000..f5514bad0a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/access/ContextAccess.composite
@@ -0,0 +1,49 @@
+<?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"
+ targetNamespace="http://contextaccess"
+ xmlns:sample="http://contextaccess"
+ name="ContextAccess"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
+
+ <component name="CalculatorServiceComponent">
+ <implementation.spring location="CalculatorService-context.xml"/>
+ <reference name="addService" target="AddServiceComponent" />
+ <reference name="subtractService" target="SubtractServiceComponent" />
+ <reference name="multiplyService" target="MultiplyServiceComponent" />
+ <reference name="divideService" target="DivideServiceComponent" />
+ </component>
+
+ <component name="AddServiceComponent">
+ <implementation.java class="calculator.AddServiceImpl"/>
+ </component>
+
+ <component name="SubtractServiceComponent">
+ <implementation.java class="calculator.SubtractServiceImpl"/>
+ </component>
+
+ <component name="MultiplyServiceComponent">
+ <implementation.java class="calculator.MultiplyServiceImpl"/>
+ </component>
+
+ <component name="DivideServiceComponent">
+ <implementation.java class="calculator.DivideServiceImpl"/>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/imports/ContextImports.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/imports/ContextImports.composite
new file mode 100644
index 0000000000..27df510da8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/imports/ContextImports.composite
@@ -0,0 +1,49 @@
+<?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"
+ targetNamespace="http://contextimports"
+ xmlns:sample="http://contextimports"
+ name="ContextImports"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
+
+ <component name="CalculatorServiceComponent">
+ <implementation.spring location="META-INF/spring/SpringImport-context.xml"/>
+ <reference name="addService" target="AddServiceComponent" />
+ <reference name="subtractService" target="SubtractServiceComponent" />
+ <reference name="multiplyService" target="MultiplyServiceComponent" />
+ <reference name="divideService" target="DivideServiceComponent" />
+ </component>
+
+ <component name="AddServiceComponent">
+ <implementation.java class="calculator.AddServiceImpl"/>
+ </component>
+
+ <component name="SubtractServiceComponent">
+ <implementation.java class="calculator.SubtractServiceImpl"/>
+ </component>
+
+ <component name="MultiplyServiceComponent">
+ <implementation.java class="calculator.MultiplyServiceImpl"/>
+ </component>
+
+ <component name="DivideServiceComponent">
+ <implementation.java class="calculator.DivideServiceImpl"/>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/CalculatorService-context.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/CalculatorService-context.xml
new file mode 100644
index 0000000000..c50f0ef4d9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/CalculatorService-context.xml
@@ -0,0 +1,39 @@
+<?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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:sca="http://www.springframework.org/schema/sca"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd">
+
+ <bean id="CalculatorServiceBean" class="calculator.CalculatorServiceImpl">
+ <property name="addService" ref="addService"/>
+ <property name="subtractService" ref="subtractService"/>
+ <property name="multiplyService" ref="multiplyService"/>
+ <property name="divideService" ref="divideService"/>
+ </bean>
+
+ <sca:reference name="addService" type="calculator.AddService"/>
+ <sca:reference name="subtractService" type="calculator.SubtractService"/>
+ <sca:reference name="multiplyService" type="calculator.MultiplyService"/>
+ <sca:reference name="divideService" type="calculator.DivideService"/>
+
+</beans>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/SpringImport-context.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/SpringImport-context.xml
new file mode 100644
index 0000000000..a0bb10e8dd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/imports/META-INF/spring/SpringImport-context.xml
@@ -0,0 +1,29 @@
+<?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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:sca="http://www.springframework.org/schema/sca"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd">
+
+ <import resource="CalculatorService-context.xml"/>
+
+</beans> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite
new file mode 100644
index 0000000000..5973484f6e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite
@@ -0,0 +1,30 @@
+<?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://stockquote"
+ xmlns:hw="http://stockquote"
+ name="MultipleContext">
+
+ <component name="StockQuoteServiceComponent">
+ <implementation.spring location="springapp"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/MANIFEST.MF b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..9267f28e83
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Spring-Context: META-INF/spring/beanRefContext.xml; META-INF/spring/StockQuoteService-context.xml
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/SpringHelloWorld-context.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/SpringHelloWorld-context.xml
new file mode 100644
index 0000000000..62e4e077b6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/SpringHelloWorld-context.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<!-- Application context for the SpringHelloWorld testcase -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:sca="http://www.springframework.org/schema/sca"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd">
+
+ <bean id="testBean" class="org.apache.tuscany.sca.itest.spring.TestHelloWorldBean" lazy-init="true">
+ </bean>
+
+</beans> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/StockQuoteService-context.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/StockQuoteService-context.xml
new file mode 100644
index 0000000000..5b1885d6b3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/StockQuoteService-context.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:sca="http://www.springframework.org/schema/sca"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd">
+
+ <sca:service name="StockQuoteService"
+ type="bigbank.stockquote.StockQuoteService" target="StockQuoteServiceBean"/>
+
+ <bean id="StockQuoteServiceBean" class="bigbank.stockquote.StockQuoteImpl">
+ </bean>
+
+ <bean id="applicationContextProvider" class="context.access.SCAApplicationContextProvider">
+ </bean>
+
+</beans> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/beanRefContext.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/beanRefContext.xml
new file mode 100644
index 0000000000..dcc88f6770
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/beanRefContext.xml
@@ -0,0 +1,34 @@
+<?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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:sca="http://www.springframework.org/schema/sca"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd">
+
+ <bean id="beanRefFactory" class="org.springframework.context.support.ClassPathXmlApplicationContext">
+ <constructor-arg>
+ <list>
+ <value>context/multiple/springapp/META-INF/spring/SpringHelloWorld-context.xml</value>
+ </list>
+ </constructor-arg>
+ </bean>
+</beans> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorJass.config b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorJass.config
new file mode 100644
index 0000000000..0e7cb86633
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorJass.config
@@ -0,0 +1,3 @@
+Calculator {
+ calculator.security.JaasLoginModule required debug=true;
+};
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorLogMessages.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorLogMessages.properties
new file mode 100644
index 0000000000..0238f0b013
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/implementation/policies/CalculatorLogMessages.properties
@@ -0,0 +1,18 @@
+# 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.
+CALLING_OPERATION=Inovoking operation {0} with arguments {1}
+OPERATION_RETURNED=Returning from operation {0} with return value {1} \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/implementation/policies/ImplementationPolicies.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/implementation/policies/ImplementationPolicies.composite
new file mode 100644
index 0000000000..5ffeda11df
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/implementation/policies/ImplementationPolicies.composite
@@ -0,0 +1,58 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ name="Calculator">
+
+ <component name="CalculatorServiceComponent">
+ <implementation.spring location="META-INF/spring/CalculatorService-context.xml"/>
+ <reference name="addService" target="AddServiceComponent" />
+ <reference name="subtractService" target="SubtractServiceComponent" />
+ <reference name="multiplyService" target="MultiplyServiceComponent" policySets="tuscany:JaasPolicy"/>
+ <reference name="divideService" target="DivideServiceComponent" />
+ </component>
+
+ <component name="AddServiceComponent">
+ <implementation.java class="calculator.AddServiceImpl"/>
+ </component>
+
+ <component name="SubtractServiceComponent">
+ <implementation.java class="calculator.SubtractServiceImpl"/>
+ </component>
+
+ <component name="MultiplyServiceComponent" policySets="tuscany:JaasPolicy">
+ <implementation.java class="calculator.MultiplyServiceImpl" />
+ </component>
+
+ <component name="DivideServiceComponent">
+ <implementation.java class="calculator.DivideServiceImpl"/>
+ </component>
+
+ <component name="AnotherCalculatorServiceComponent">
+ <implementation.spring location="META-INF/spring/CalculatorService-context.xml" requires="tuscany:logging"/>
+ <reference name="addService" target="AddServiceComponent" />
+ <reference name="subtractService" target="SubtractServiceComponent" />
+ <reference name="multiplyService" target="MultiplyServiceComponent" policySets="tuscany:JaasPolicy"/>
+ <reference name="divideService" target="DivideServiceComponent" />
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/implementation/policies/META-INF/definitions.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/implementation/policies/META-INF/definitions.xml
new file mode 100644
index 0000000000..efc2464425
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/implementation/policies/META-INF/definitions.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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 xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:calc="http://calculator">
+
+ <intent name="logging" constrains="sca:implementation" intentType="implementation"/>
+
+ <!-- PolicySets -->
+ <policySet name="JaasPolicy" provides="tuscany:jaasAuthentication" appliesTo="//sca:binding">
+<!-- empty policy set so that intents are resolved and match works but without including
+ any actual policy runtime artifacts
+ <tuscany:jaasAuthentication>
+ <tuscany:configurationName>Calculator</tuscany:configurationName>
+ <tuscany:callbackHandler>calculator.security.CalculatorCallbackHandler</tuscany:callbackHandler>
+ </tuscany:jaasAuthentication>
+-->
+ </policySet>
+
+
+ <!-- PolicySets -->
+
+ <policySet name="JDKLoggingPolicy"
+ provides="tuscany:logging"
+ appliesTo="//sca:implementation.spring"
+ attachTo="//sca:implementation.spring">
+<!-- empty policy set so that intents are resolved and match works but without including
+ any actual policy runtime artifacts
+ <tuscany:jdkLogger name="calculator">
+ <logLevel>FINER</logLevel>
+ </tuscany:jdkLogger>
+-->
+ </policySet>
+
+</definitions> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/implementation/policies/META-INF/spring/CalculatorService-context.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/implementation/policies/META-INF/spring/CalculatorService-context.xml
new file mode 100644
index 0000000000..c50f0ef4d9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/implementation/policies/META-INF/spring/CalculatorService-context.xml
@@ -0,0 +1,39 @@
+<?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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:sca="http://www.springframework.org/schema/sca"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd">
+
+ <bean id="CalculatorServiceBean" class="calculator.CalculatorServiceImpl">
+ <property name="addService" ref="addService"/>
+ <property name="subtractService" ref="subtractService"/>
+ <property name="multiplyService" ref="multiplyService"/>
+ <property name="divideService" ref="divideService"/>
+ </bean>
+
+ <sca:reference name="addService" type="calculator.AddService"/>
+ <sca:reference name="subtractService" type="calculator.SubtractService"/>
+ <sca:reference name="multiplyService" type="calculator.MultiplyService"/>
+ <sca:reference name="divideService" type="calculator.DivideService"/>
+
+</beans>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/location/folder/SpringFolderLocation.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/location/folder/SpringFolderLocation.composite
new file mode 100644
index 0000000000..e889d84544
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/location/folder/SpringFolderLocation.composite
@@ -0,0 +1,40 @@
+<?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 for the SpringSCAPropertyTestCase
+ * This composite has the HelloWorldComponent implemented with a Spring implementation where
+ * the Spring application context uses an explicit SCA property. The value of the property
+ * is set in this composite and is used to compute the response to a service invocation from
+ * the ClientComponent.
+ -->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://SpringFolderLocation"
+ name="SpringFolderLocation">
+
+ <component name="ClientComponent">
+ <implementation.java class="helloworld.HelloWorldProxy"/>
+ <reference name="delegate" target="HelloWorldComponent"/>
+ </component>
+
+ <component name="HelloWorldComponent">
+ <implementation.spring location="springapp"/>
+ <property name="TestProperty">Hello</property>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/MANIFEST.MF b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..950dbeba4c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Spring-Context: META-INF/spring/SpringSCAProperty-context.xml
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/spring/SpringSCAProperty-context.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/spring/SpringSCAProperty-context.xml
new file mode 100644
index 0000000000..8613e6c82a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/location/folder/springapp/META-INF/spring/SpringSCAProperty-context.xml
@@ -0,0 +1,34 @@
+<?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.
+-->
+<!-- Application context for the SpringHelloWorld testcase -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:sca="http://www.springframework.org/schema/sca"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd">
+
+ <bean id="testBean" class="mock.TestSCAPropertyBean" lazy-init="true">
+ <property name="hello" ref="TestProperty"/>
+ </bean>
+
+ <sca:property id="foo" name="TestProperty" type="java.lang.String"/>
+
+</beans> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/location/jar/SpringJarLocation.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/location/jar/SpringJarLocation.composite
new file mode 100644
index 0000000000..b7281272da
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/location/jar/SpringJarLocation.composite
@@ -0,0 +1,40 @@
+<?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 for the SpringSCAPropertyTestCase
+ * This composite has the HelloWorldComponent implemented with a Spring implementation where
+ * the Spring application context uses an explicit SCA property. The value of the property
+ * is set in this composite and is used to compute the response to a service invocation from
+ * the ClientComponent.
+ -->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://SpringJarLocation"
+ name="SpringJarLocation">
+
+ <component name="ClientComponent">
+ <implementation.java class="helloworld.HelloWorldProxy"/>
+ <reference name="delegate" target="HelloWorldComponent"/>
+ </component>
+
+ <component name="HelloWorldComponent">
+ <implementation.spring location="spring-context.jar"/>
+ <property name="TestProperty">Hello</property>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/location/jar/spring-context.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/location/jar/spring-context.jar
new file mode 100644
index 0000000000..504d59e5ff
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/location/jar/spring-context.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringDelegationHelloWorld-context.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringDelegationHelloWorld-context.xml
new file mode 100644
index 0000000000..9912624870
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringDelegationHelloWorld-context.xml
@@ -0,0 +1,39 @@
+<?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.
+-->
+<!-- Application context for the SpringHelloWorld testcase -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:sca="http://www.springframework.org/schema/sca"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd">
+
+ <sca:service name="HelloWorld" type="helloworld.HelloWorld" target="testBean"/>
+
+ <bean id="delegateBean"
+ class="org.apache.tuscany.sca.itest.spring.TestHelloWorldBean" lazy-init="true">
+ </bean>
+
+ <bean id="testBean"
+ class="org.apache.tuscany.sca.itest.spring.TestHelloWorldDelegatorBean" lazy-init="true">
+ <property name="delegate"><ref bean="delegateBean"/></property>
+ </bean>
+
+</beans> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringHelloWorld-context.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringHelloWorld-context.xml
new file mode 100644
index 0000000000..62e4e077b6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/META-INF/spring/SpringHelloWorld-context.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<!-- Application context for the SpringHelloWorld testcase -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:sca="http://www.springframework.org/schema/sca"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd">
+
+ <bean id="testBean" class="org.apache.tuscany.sca.itest.spring.TestHelloWorldBean" lazy-init="true">
+ </bean>
+
+</beans> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite
new file mode 100644
index 0000000000..e9f8bb888b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorld.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://SpringDelegationHelloWorld"
+ name="SpringDelegationHelloWorld">
+
+ <component name="ClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.spring.HelloWorldProxy"/>
+ <reference name="delegate" target="HelloWorldComponent"/>
+ </component>
+
+ <component name="HelloWorldComponent">
+ <implementation.spring location="META-INF/spring/SpringDelegationHelloWorld-context.xml"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite
new file mode 100644
index 0000000000..30719684a9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/org/apache/tuscany/sca/itest/spring/SpringHelloWorld.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="SpringHelloWorld"
+ name="SpringHelloWorld">
+
+ <component name="ClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.spring.HelloWorldProxy"/>
+ <reference name="delegate" target="HelloWorldComponent"/>
+ </component>
+
+ <component name="HelloWorldComponent">
+ <implementation.spring location="META-INF/spring/SpringHelloWorld-context.xml"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringExplicitReference-context.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringExplicitReference-context.xml
new file mode 100644
index 0000000000..1705164104
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringExplicitReference-context.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:sca="http://www.springframework.org/schema/sca"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd">
+
+ <bean id="testBean" class="mock.TestReferenceBean">
+ <property name="bean" ref="testReference"/>
+ </bean>
+
+ <sca:reference name="testReference" type="helloworld.HelloWorld"/>
+
+</beans>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringImplicitReference-context.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringImplicitReference-context.xml
new file mode 100644
index 0000000000..539dfa6e32
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/references/META-INF/spring/SpringImplicitReference-context.xml
@@ -0,0 +1,34 @@
+<?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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:sca="http://www.springframework.org/schema/sca"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd">
+
+ <bean id="testBean" class="mock.TestReferenceBean">
+ <!-- Here is the implicit reference - a property with a ref not satisifed within the
+ * Spring application context.
+ -->
+ <property name="bean" ref="testReference"/>
+ </bean>
+
+</beans>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/references/SpringExplicitReference.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/references/SpringExplicitReference.composite
new file mode 100644
index 0000000000..fcbafad27d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/references/SpringExplicitReference.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://SpringExplicitReference"
+ name="SpringExplicitReference">
+
+ <component name="ClientComponent">
+ <implementation.spring location="META-INF/spring/SpringExplicitReference-context.xml"/>
+ <reference name="testReference" target="ExplicitReferenceComponent"/>
+ </component>
+
+ <component name="ExplicitReferenceComponent">
+ <implementation.java class="helloworld.HelloWorldImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/references/SpringImplicitReference.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/references/SpringImplicitReference.composite
new file mode 100644
index 0000000000..4204b75b48
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/references/SpringImplicitReference.composite
@@ -0,0 +1,40 @@
+<?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 for the SpringImplicitReferenceTestCase
+ * This composite has a ClientComponent implemented with a Spring implementation where
+ * Spring application context uses an implicit reference definition through a Bean with
+ * a property with an unsatisfied ref attribute, which forms the reference.
+ * The reference is satisified by a wire to a ReferenceComponent which is implemented
+ * by a plain Java POJO.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://SpringImplicitReference"
+ name="SpringImplicitReference">
+
+ <component name="ClientComponent">
+ <implementation.spring location="META-INF/spring/SpringImplicitReference-context.xml"/>
+ <reference name="testReference" target="ImplicitReferenceComponent"/>
+ </component>
+
+ <component name="ImplicitReferenceComponent">
+ <implementation.java class="helloworld.HelloWorldImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringExplicitService-context.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringExplicitService-context.xml
new file mode 100644
index 0000000000..5fe57ed733
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringExplicitService-context.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<!-- Application context for the SpringExplicitHelloWorld testcase
+In this case, the service offered by the Spring application is specified
+explicitly using an sca:service element -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:sca="http://www.springframework.org/schema/sca"
+ xmlns:spec="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd">
+
+ <sca:service name="fooService"
+ type="helloworld.HelloWorld"
+ target="testBean"/>
+ <!-- requires="spec:serverAuthentication" -->
+
+ <bean id="testBean"
+ class="mock.TestHelloWorldBean"
+ lazy-init="true">
+ </bean>
+
+</beans> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringImplicitService-context.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringImplicitService-context.xml
new file mode 100644
index 0000000000..83558e8abc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/services/META-INF/spring/SpringImplicitService-context.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<!-- Application context for the SpringHelloWorld testcase -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:sca="http://www.springframework.org/schema/sca"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd">
+
+ <bean id="testBean" class="mock.TestHelloWorldBean" lazy-init="true">
+ </bean>
+
+</beans> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/services/SpringExplicitService.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/services/SpringExplicitService.composite
new file mode 100644
index 0000000000..c9bb5b9e3e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/services/SpringExplicitService.composite
@@ -0,0 +1,34 @@
+<?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:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://SpringExplicitService"
+ name="SpringExplicitService">
+
+ <component name="ClientComponent">
+ <implementation.java class="helloworld.HelloWorldProxy"/>
+ <reference name="delegate" target="ExplicitServiceComponent"/>
+ </component>
+
+ <component name="ExplicitServiceComponent">
+ <implementation.spring location="META-INF/spring/SpringExplicitService-context.xml"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/services/SpringImplicitService.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/services/SpringImplicitService.composite
new file mode 100644
index 0000000000..856b41f897
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/sca/services/SpringImplicitService.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://SpringImplicitService"
+ name="SpringImplicitService">
+
+ <component name="ClientComponent">
+ <implementation.java class="helloworld.HelloWorldProxy"/>
+ <reference name="delegate" target="ImplicitServiceComponent"/>
+ </component>
+
+ <component name="ImplicitServiceComponent">
+ <implementation.spring location="META-INF/spring/SpringImplicitService-context.xml"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/spring/annotations/Calculator.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/spring/annotations/Calculator.composite
new file mode 100644
index 0000000000..b59114bd31
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/spring/annotations/Calculator.composite
@@ -0,0 +1,60 @@
+<?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 targetNamespace="http://sample"
+ xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:sample="http://sample"
+ name="Calculator"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
+
+ <component name="CalculatorServiceComponent">
+ <implementation.spring location="CalculatorService-context.xml"/>
+ <property name="message">HelloWorld</property>
+ <reference name="addService" target="AddServiceComponent" />
+ <reference name="subtractService" target="SubtractServiceComponent" />
+ <reference name="multiplyService" target="MultiplyServiceComponent" />
+ <reference name="divideService" target="DivideServiceComponent" />
+ </component>
+
+ <component name="AddServiceComponent">
+ <implementation.java class="calculator.AddServiceImpl"/>
+ </component>
+
+ <component name="SubtractServiceComponent">
+ <implementation.java class="calculator.SubtractServiceImpl"/>
+ </component>
+
+ <component name="MultiplyServiceComponent">
+ <implementation.java class="calculator.MultiplyServiceImpl"/>
+ </component>
+
+ <component name="DivideServiceComponent">
+ <implementation.java class="calculator.DivideServiceImpl"/>
+ </component>
+
+ <!--<component name="AnotherCalculatorServiceComponent">
+ <implementation.spring location="CalculatorService-context.xml"/>
+ <property name="message">HelloWorld</property>
+ <reference name="addService" target="AddServiceComponent" />
+ <reference name="subtractService" target="SubtractServiceComponent" />
+ <reference name="multiplyService" target="MultiplyServiceComponent" />
+ <reference name="divideService" target="DivideServiceComponent" />
+ </component>
+
+--></composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/spring/annotations/CalculatorService-context.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/spring/annotations/CalculatorService-context.xml
new file mode 100644
index 0000000000..4a873f2424
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/main/resources/spring/annotations/CalculatorService-context.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:sca="http://www.springframework.org/schema/sca"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd">
+
+ <bean id="CalculatorServiceBean" class="spring.annotations.CalculatorServiceImpl">
+ <property name="addService" ref="addService"/>
+ <!-- <property name="subtractService" ref="subtractService"/>
+ <property name="multiplyService" ref="multiplyService"/> -->
+ <property name="divideService" ref="divideService"/>
+ </bean>
+
+ <sca:reference name="addService" type="calculator.AddService"/>
+ <sca:reference name="subtractService" type="calculator.SubtractService"/>
+ <sca:reference name="multiplyService" type="calculator.MultiplyService"/>
+ <sca:reference name="divideService" type="calculator.DivideService"/>
+
+ <sca:property id="msg" name="message" type="java.lang.String"/>
+
+</beans>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/context/access/CalculatorClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/context/access/CalculatorClient.java
new file mode 100644
index 0000000000..a346e290b9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/context/access/CalculatorClient.java
@@ -0,0 +1,59 @@
+/*
+ * 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 context.access;
+
+import java.io.File;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.springframework.context.ApplicationContext;
+
+import calculator.CalculatorService;
+
+/**
+ * This client program shows how to create an SCA runtime, start it,
+ * and locate and invoke a SCA component
+ */
+public class CalculatorClient {
+ public static void main(String[] args) throws Exception {
+
+ NodeFactory factory = NodeFactory.newInstance();
+ Node node = factory.createNode(new File("src/main/resources/context/access/ContextAccess.composite").toURI().toURL().toString(),
+ new Contribution("TestContribution", new File("src/main/resources/context/access/").toURI().toURL().toString()));
+ node.start();
+
+ // Code: To access the Spring Application Context instance
+ ApplicationContext ctx = SCAApplicationContextProvider.getApplicationContext();
+ if (ctx.containsBean("CalculatorServiceBean"))
+ System.out.println("CalculatorServiceBean is now available for use...");
+
+ CalculatorService calculatorService =
+ node.getService(CalculatorService.class, "CalculatorServiceComponent");
+
+ System.out.println("3 + 2=" + calculatorService.add(3, 2));
+ System.out.println("3 - 2=" + calculatorService.subtract(3, 2));
+ System.out.println("3 * 2=" + calculatorService.multiply(3, 2));
+ System.out.println("3 / 2=" + calculatorService.divide(3, 2));
+
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/context/access/ContextAccessTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/context/access/ContextAccessTestCase.java
new file mode 100644
index 0000000000..2602839d1d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/context/access/ContextAccessTestCase.java
@@ -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 context.access;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests out the big bank service
+ *
+ */
+public class ContextAccessTestCase extends TestCase {
+
+ public void testServer() throws Exception {
+ CalculatorClient.main(new String[] {""});
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/context/imports/CalculatorClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/context/imports/CalculatorClient.java
new file mode 100644
index 0000000000..c029b06a8c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/context/imports/CalculatorClient.java
@@ -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 context.imports;
+
+import java.io.File;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+import calculator.CalculatorService;
+
+/**
+ * This client program shows how to create an SCA runtime, start it,
+ * and locate and invoke a SCA component
+ */
+public class CalculatorClient {
+ public static void main(String[] args) throws Exception {
+
+ NodeFactory factory = NodeFactory.newInstance();
+ Node node = factory.createNode(new File("src/main/resources/context/imports/ContextImports.composite").toURI().toURL().toString(),
+ new Contribution("TestContribution", new File("src/main/resources/context/imports/").toURI().toURL().toString()));
+ node.start();
+
+ CalculatorService calculatorService =
+ node.getService(CalculatorService.class, "CalculatorServiceComponent");
+
+ System.out.println("3 + 2=" + calculatorService.add(3, 2));
+ System.out.println("3 - 2=" + calculatorService.subtract(3, 2));
+ System.out.println("3 * 2=" + calculatorService.multiply(3, 2));
+ System.out.println("3 / 2=" + calculatorService.divide(3, 2));
+
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/context/imports/ContextImportsTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/context/imports/ContextImportsTestCase.java
new file mode 100644
index 0000000000..8df60c5bab
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/context/imports/ContextImportsTestCase.java
@@ -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 context.imports;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests out the big bank service
+ *
+ */
+public class ContextImportsTestCase extends TestCase {
+
+ public void testServer() throws Exception {
+ CalculatorClient.main(new String[] {""});
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/context/multiple/MultipleContextTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/context/multiple/MultipleContextTestCase.java
new file mode 100644
index 0000000000..f5261c85bb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/context/multiple/MultipleContextTestCase.java
@@ -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 context.multiple;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests out the big bank service
+ *
+ */
+public class MultipleContextTestCase extends TestCase {
+
+ public void testServer() throws Exception {
+ StockQuoteServer.main(new String[] {"1000"});
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.java
new file mode 100644
index 0000000000..83875e0b0a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.java
@@ -0,0 +1,54 @@
+/*
+ * 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 context.multiple;
+
+import java.io.File;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.springframework.context.ApplicationContext;
+
+import context.access.SCAApplicationContextProvider;
+
+/**
+ * This server program shows how to bootstrap SCA from a simple J2SE program
+ * and start it which activates the StockQuote Web service endpoint.
+ */
+public class StockQuoteServer {
+
+ public static void main(String[] args) throws Exception {
+
+ NodeFactory factory = NodeFactory.newInstance();
+ Node node = factory.createNode(new File("src/main/resources/context/multiple/MultipleContext.composite").toURI().toURL().toString(),
+ new Contribution("TestContribution", new File("src/main/resources/context/multiple/").toURI().toURL().toString()));
+ node.start();
+
+ // Method 1: To access the Spring Application Context instance
+ ApplicationContext ctx = SCAApplicationContextProvider.getApplicationContext();
+ if (ctx.containsBean("StockQuoteServiceBean"))
+ System.out.println("StockQuoteServiceBean is now available for use...");
+
+ System.out.println("Press Enter to Exit...");
+ Thread.sleep(1000);
+
+ node.stop();
+ System.out.println("Bye");
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java
new file mode 100644
index 0000000000..19892597c1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java
@@ -0,0 +1,77 @@
+/*
+ * 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 implementation.policies;
+
+import java.io.File;
+
+import javax.security.auth.login.Configuration;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+import calculator.CalculatorService;
+
+
+/**
+ * This client program shows how to create an SCA runtime, start it,
+ * and locate and invoke a SCA component
+ */
+public class CalculatorClient {
+ public static void main(String[] args) throws Exception {
+ try {
+ Configuration secConf = Configuration.getConfiguration();
+ } catch (java.lang.SecurityException e) {
+ System.setProperty("java.security.auth.login.config", CalculatorClient.class.getClassLoader()
+ .getResource("implementation/policies/CalculatorJass.config").toString());
+ }
+
+ NodeFactory factory = NodeFactory.newInstance();
+ Node node = factory.createNode(new File("src/main/resources/implementation/policies/ImplementationPolicies.composite").toURI().toURL().toString(),
+ new Contribution("TestContribution", new File("src/main/resources/implementation/policies/").toURI().toURL().toString()));
+ node.start();
+
+ CalculatorService calculatorService =
+ node.getService(CalculatorService.class, "CalculatorServiceComponent");
+
+ // Calculate
+ System.out.println("Calling CalculatorServiceComponent configured with 'logging' " +
+ "policy for subtract and divide operations...");
+ System.out.println("3 + 2=" + calculatorService.add(3, 2));
+ System.out.println("3 - 2=" + calculatorService.subtract(3, 2));
+ System.out.println("3 * 2=" + calculatorService.multiply(3, 2));
+ System.out.println("3 / 2=" + calculatorService.divide(3, 2));
+
+ calculatorService =
+ node.getService(CalculatorService.class, "AnotherCalculatorServiceComponent");
+
+ // Calculate
+ System.out.println("Calling CalculatorServiceComponent configured with 'logging' " +
+ "for all operations in the implementation...");
+ System.out.println("3 + 2=" + calculatorService.add(3, 2));
+ System.out.println("3 - 2=" + calculatorService.subtract(3, 2));
+ System.out.println("3 * 2=" + calculatorService.multiply(3, 2));
+ System.out.println("3 / 2=" + calculatorService.divide(3, 2));
+
+ node.stop();
+ System.out.println("Bye");
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/implementation/policies/ImplementationPoliciesTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/implementation/policies/ImplementationPoliciesTestCase.java
new file mode 100644
index 0000000000..a44ae38d24
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/implementation/policies/ImplementationPoliciesTestCase.java
@@ -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 implementation.policies;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests out the big bank service
+ *
+ */
+public class ImplementationPoliciesTestCase extends TestCase {
+
+ public void testServer() throws Exception {
+ CalculatorClient.main(new String[] {""});
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/location/folder/SpringFolderLocationTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/location/folder/SpringFolderLocationTestCase.java
new file mode 100644
index 0000000000..d54f0544d8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/location/folder/SpringFolderLocationTestCase.java
@@ -0,0 +1,45 @@
+/*
+ * 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 location.folder;
+
+import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase;
+
+/**
+ * A test case designed to test the implementation of Properties from a Spring application
+ * context, where the properties are explicit, through the presence of an sca:property
+ * element within the Spring application context
+ *
+ * The artifacts involved in this test are:
+ *
+ * 1) A composite containing a component with a Spring implementation
+ * 2) The <implementation.spring.../> element references an application context that
+ * uses an explicit sca:property element which is used to compute the response to an invocation
+ * of the service of the implementation
+ *
+ * @version $Rev$ $Date$
+ */
+public class SpringFolderLocationTestCase extends AbstractHelloWorldTestCase {
+ // super class does it all getting composite based on this class name
+
+ public SpringFolderLocationTestCase() {
+ super("SpringFolderLocation.composite", "location/folder/");
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/location/jar/SpringJarLocationTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/location/jar/SpringJarLocationTestCase.java
new file mode 100644
index 0000000000..71768f5a7b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/location/jar/SpringJarLocationTestCase.java
@@ -0,0 +1,45 @@
+/*
+ * 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 location.jar;
+
+import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase;
+
+/**
+ * A test case designed to test the implementation of Properties from a Spring application
+ * context, where the properties are explicit, through the presence of an sca:property
+ * element within the Spring application context
+ *
+ * The artifacts involved in this test are:
+ *
+ * 1) A composite containing a component with a Spring implementation
+ * 2) The <implementation.spring.../> element references an application context that
+ * uses an explicit sca:property element which is used to compute the response to an invocation
+ * of the service of the implementation
+ *
+ * @version $Rev$ $Date$
+ */
+public class SpringJarLocationTestCase extends AbstractHelloWorldTestCase {
+ // super class does it all getting composite based on this class name
+
+ public SpringJarLocationTestCase() {
+ super("SpringJarLocation.composite", "location/jar/");
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractHelloWorldTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractHelloWorldTestCase.java
new file mode 100644
index 0000000000..0c6f8d2e84
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractHelloWorldTestCase.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.spring;
+
+
+/**
+ * Basic "hello world" style test case for testing Spring component implementation
+ *
+ */
+public abstract class AbstractHelloWorldTestCase extends AbstractSCATestCase<HelloWorld> {
+
+ /**
+ * Calls the hello world service and checks that it gives the right response...
+ */
+ public AbstractHelloWorldTestCase(String compositeName, String contributionLocation) {
+ super(compositeName, contributionLocation);
+ }
+
+ public void testHello() throws Exception {
+ assertEquals("Hello petra", service.sayHello("petra"));
+ }
+
+ @Override
+ protected Class<HelloWorld> getServiceClass() {
+ return HelloWorld.class;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java
new file mode 100644
index 0000000000..53cc094aca
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java
@@ -0,0 +1,58 @@
+/*
+ * 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.itest.spring;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+public abstract class AbstractSCATestCase<T> extends TestCase {
+
+ protected Node node;
+ protected T service;
+ protected String compositeName;
+ protected String contributionLocation;
+
+ public AbstractSCATestCase(String compositeName, String contributionLocation) {
+ super();
+ this.compositeName = compositeName;
+ this.contributionLocation = contributionLocation;
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ NodeFactory factory = NodeFactory.newInstance();
+ node = factory.createNode(new File("src/main/resources/" + contributionLocation + compositeName).toURI().toURL().toString(),
+ new Contribution("TestContribution", new File("src/main/resources/" + contributionLocation).toURI().toURL().toString()));
+ node.start();
+ service = node.getService(getServiceClass(), "ClientComponent");
+ }
+
+ abstract protected Class<T> getServiceClass();
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorld.java
new file mode 100644
index 0000000000..5869d344f6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorld.java
@@ -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.itest.spring;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * Interface for the "hello world" service - predictably simple with a single operation
+ * "sayHello"
+ *
+ */
+@Remotable
+public interface HelloWorld {
+
+ public String sayHello(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorldProxy.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorldProxy.java
new file mode 100644
index 0000000000..90d26dd89f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/HelloWorldProxy.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.spring;
+
+import org.oasisopen.sca.annotation.Reference;
+
+/**
+ * A simple proxy Java class which implements the HelloWorld interface but which uses
+ * a reference "delegate" to actually provide the HelloWorld service
+ *
+ */
+public class HelloWorldProxy implements HelloWorld {
+
+ // Here is the reference "delegate" - it implements the HelloWorld interface...
+ @Reference
+ public HelloWorld delegate;
+
+ public String sayHello(String s) {
+ // Simply call the reference to satisfy the service request...
+ System.out.println("HelloWorldProxy - calling sayHello");
+ return delegate.sayHello(s);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java
new file mode 100644
index 0000000000..f28dace31a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringDelegationHelloWorldTestCase.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.spring;
+
+/**
+ * A basic test case of:
+ * 1) A composite containing a component with a Spring implementation
+ * 2) The composite has a component with a Java POJO implementation which uses the
+ * Spring implementation to satisfy a reference
+ *
+ */
+public class SpringDelegationHelloWorldTestCase extends AbstractHelloWorldTestCase {
+ // super class does it all getting composite based on this class name
+
+ public SpringDelegationHelloWorldTestCase() {
+ super("SpringDelegationHelloWorld.composite", "org/apache/tuscany/sca/itest/spring/");
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringHelloWorldTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringHelloWorldTestCase.java
new file mode 100644
index 0000000000..def30b3ea0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/SpringHelloWorldTestCase.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.spring;
+
+/**
+ * A basic test case of:
+ * 1) A composite containing a component with a Spring implementation
+ * 2) The composite has a component with a Java POJO implementation which uses the
+ * Spring implementation to satisfy a reference
+ * 3) The Spring component delegates function to a second spring bean
+ *
+ */
+public class SpringHelloWorldTestCase extends AbstractHelloWorldTestCase {
+
+ // super class does it all getting composite based on this class name
+ public SpringHelloWorldTestCase() {
+ super("SpringHelloWorld.composite", "org/apache/tuscany/sca/itest/spring/");
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldBean.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldBean.java
new file mode 100644
index 0000000000..fa7967c964
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldBean.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.spring;
+
+/**
+ * A simple test Spring bean which provides the HelloWorld service
+ *
+ */
+
+public class TestHelloWorldBean implements HelloWorld {
+
+ static String hello = "Hello ";
+
+ // Classic "Hello xxx" response to any input message
+ public String sayHello(String message) {
+ System.out.println("TestHelloWorldBean - sayHello called");
+ return (hello + message);
+ }
+
+} // end class TestHelloWorldBean
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldDelegatorBean.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldDelegatorBean.java
new file mode 100644
index 0000000000..b57cc7f366
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/TestHelloWorldDelegatorBean.java
@@ -0,0 +1,40 @@
+/*
+ * 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.itest.spring;
+
+/**
+ * A simple test Spring bean which delgates to another bean
+ *
+ */
+
+public class TestHelloWorldDelegatorBean implements HelloWorld {
+
+ HelloWorld delegate;
+
+ public void setDelegate(HelloWorld delegate) {
+ this.delegate = delegate;
+ }
+
+ // Classic "Hello xxx" response to any input message
+ public String sayHello(String message) {
+ System.out.println("TestHelloWorldDelegatorBean - sayHello called");
+ return delegate.sayHello(message);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/sca/references/SpringExplicitReferenceTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/sca/references/SpringExplicitReferenceTestCase.java
new file mode 100644
index 0000000000..0c2e1daa81
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/sca/references/SpringExplicitReferenceTestCase.java
@@ -0,0 +1,45 @@
+/*
+ * 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 sca.references;
+
+import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase;
+
+/**
+ * A test case designed to test the implementation of References from a Spring application
+ * context, where the references are explicit, through the presence of an sca:reference
+ * element within the Spring application context
+ *
+ * The artifacts involved in this test are:
+ *
+ * 1) A composite containing a component with a Spring implementation which makes
+ * a reference to a second component
+ * 2) The composite has a component with a Java POJO implementation which satisfies the reference
+ * 3) The <implementation.spring.../> element references an application context that
+ * uses an explicit sca:reference element to identify the reference made by the Spring application
+ *
+ * @version $Rev$ $Date$
+ */
+public class SpringExplicitReferenceTestCase extends AbstractHelloWorldTestCase {
+ // super class does it all getting composite based on this class name
+
+ public SpringExplicitReferenceTestCase() {
+ super("SpringExplicitReference.composite", "sca/references/");
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/sca/references/SpringImplicitReferenceTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/sca/references/SpringImplicitReferenceTestCase.java
new file mode 100644
index 0000000000..8d0c548899
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/sca/references/SpringImplicitReferenceTestCase.java
@@ -0,0 +1,48 @@
+/*
+ * 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 sca.references;
+
+import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase;
+
+/**
+ * A test case designed to test the implementation of References from a Spring application
+ * context, where the references are implicit, through the presence of Bean properties with a
+ * ref attribute which is not satisfied by a Bean within the application context.
+ *
+ * The artifacts involved in this test are:
+ *
+ * 1) A composite containing a component with a Spring implementation which makes
+ * a reference to a second component
+ * 2) The composite has a component with a Java POJO implementation which satisfies the reference
+ * 3) The <implementation.spring.../> element references an application context that
+ * does not use an explicit sca:reference element to identify the reference made by the
+ * Spring application, but relies on an unsatisfied Bean property with a ref attribute.
+ *
+ * @version $Rev$ $Date$
+ */
+public class SpringImplicitReferenceTestCase extends AbstractHelloWorldTestCase {
+ // super class does it all getting composite based on this class name
+
+ public SpringImplicitReferenceTestCase() {
+ super("SpringImplicitReference.composite", "sca/references/");
+ }
+}
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/sca/services/SpringExplicitServiceTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/sca/services/SpringExplicitServiceTestCase.java
new file mode 100644
index 0000000000..f4bd53876c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/sca/services/SpringExplicitServiceTestCase.java
@@ -0,0 +1,40 @@
+/*
+ * 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 sca.services;
+
+import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase;
+
+/**
+ * A basic test case of:
+ * 1) A composite containing a component with a Spring implementation
+ * 2) The composite has a component with a Java POJO implementation which uses the
+ * Spring implementation to satisfy a reference
+ * 3) The <implementation.spring.../> element references an application context that
+ * uses an explicit sca: element to identify the service offered by the Spring application
+ *
+ * @version $Rev$ $Date$
+ */
+public class SpringExplicitServiceTestCase extends AbstractHelloWorldTestCase {
+ // super class does it all getting composite based on this class name
+
+ public SpringExplicitServiceTestCase() {
+ super("SpringExplicitService.composite", "sca/services/");
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/sca/services/SpringImplicitServiceTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/sca/services/SpringImplicitServiceTestCase.java
new file mode 100644
index 0000000000..0907985d7f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/sca/services/SpringImplicitServiceTestCase.java
@@ -0,0 +1,38 @@
+/*
+ * 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 sca.services;
+
+import org.apache.tuscany.sca.itest.spring.AbstractHelloWorldTestCase;
+
+/**
+ * A basic test case of:
+ * 1) A composite containing a component with a Spring implementation
+ * 2) The composite has a component with a Java POJO implementation which uses the
+ * Spring implementation to satisfy a reference
+ *
+ * @version $Rev$ $Date$
+ */
+public class SpringImplicitServiceTestCase extends AbstractHelloWorldTestCase {
+ // super class does it all getting composite based on this class name
+
+ public SpringImplicitServiceTestCase() {
+ super("SpringImplicitService.composite", "sca/services/");
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.java
new file mode 100644
index 0000000000..c2dfbf247f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.java
@@ -0,0 +1,55 @@
+/*
+ * 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 spring.annotations;
+
+import java.io.File;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+import calculator.CalculatorService;
+
+
+/**
+ * This client program shows how to create an SCA runtime, start it,
+ * and locate and invoke a SCA component
+ */
+public class CalculatorClient {
+ public static void main(String[] args) throws Exception {
+
+ NodeFactory factory = NodeFactory.newInstance();
+ Node node = factory.createNode(new File("src/main/resources/spring/annotations/Calculator.composite").toURI().toURL().toString(),
+ new Contribution("TestContribution", new File("src/main/resources/spring/annotations/").toURI().toURL().toString()));
+ node.start();
+
+ CalculatorService calculatorService =
+ node.getService(CalculatorService.class, "CalculatorServiceComponent");
+
+ System.out.println("3 + 2=" + calculatorService.add(3, 2));
+ System.out.println("3 - 2=" + calculatorService.subtract(3, 2));
+ System.out.println("3 * 2=" + calculatorService.multiply(3, 2));
+ System.out.println("3 / 2=" + calculatorService.divide(3, 2));
+
+ node.stop();
+ System.out.println("Bye");
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/spring/annotations/SpringAnnotationsTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/spring/annotations/SpringAnnotationsTestCase.java
new file mode 100644
index 0000000000..5db9c84c00
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/implementation-spring/src/test/java/spring/annotations/SpringAnnotationsTestCase.java
@@ -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 spring.annotations;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests out the big bank service
+ *
+ */
+public class SpringAnnotationsTestCase extends TestCase {
+
+ public void testServer() throws Exception {
+ CalculatorClient.main(new String[] {""});
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/exports/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/exports/pom.xml
new file mode 100644
index 0000000000..757dfe582c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/exports/pom.xml
@@ -0,0 +1,40 @@
+<?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-import-export</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-import-export-export</artifactId>
+ <name>Apache Tuscany SCA iTest Import Export Exports</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/exports/src/main/java/org/apache/tuscany/sca/itest/exports/Helloworld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/exports/src/main/java/org/apache/tuscany/sca/itest/exports/Helloworld.java
new file mode 100644
index 0000000000..186e42da39
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/exports/src/main/java/org/apache/tuscany/sca/itest/exports/Helloworld.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.exports;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface Helloworld {
+ String sayHello(String s);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/exports/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/exports/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..9a0edcba68
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/exports/src/main/resources/META-INF/sca-contribution.xml
@@ -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://itest">
+ <export.java package="org.apache.tuscany.sca.itest.exports"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/imports/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/imports/pom.xml
new file mode 100644
index 0000000000..74f8fcf352
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/imports/pom.xml
@@ -0,0 +1,46 @@
+<?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-import-export</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-import-export-imports</artifactId>
+ <name>Apache Tuscany SCA iTest Import Export Imports</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-import-export-export</artifactId>
+ <version>2.0.1</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/imports/src/main/java/org/apache/tuscany/sca/itest/imports/HelloworldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/imports/src/main/java/org/apache/tuscany/sca/itest/imports/HelloworldImpl.java
new file mode 100644
index 0000000000..4c7bc92b4f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/imports/src/main/java/org/apache/tuscany/sca/itest/imports/HelloworldImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.imports;
+
+import org.apache.tuscany.sca.itest.exports.Helloworld;
+
+public class HelloworldImpl implements Helloworld {
+
+ public String sayHello(String name) {
+ return "Hello " + name;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/imports/src/main/resources/Helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/imports/src/main/resources/Helloworld.composite
new file mode 100644
index 0000000000..b4e2ff8868
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/imports/src/main/resources/Helloworld.composite
@@ -0,0 +1,29 @@
+<?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:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://itest"
+ name="HelloworldImpl">
+
+ <component name="HelloworldComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.imports.HelloworldImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/imports/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/imports/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..c136923ab4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/imports/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:itest="http://itest">
+ <deployable composite="itest:Helloworld"/>
+ <import.java package="org.apache.tuscany.sca.itest.exports"/>
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/pom.xml
new file mode 100644
index 0000000000..6fa52ba55e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/pom.xml
@@ -0,0 +1,38 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <packaging>pom</packaging>
+ <artifactId>itest-import-export</artifactId>
+ <name>Apache Tuscany SCA iTest Import Export</name>
+
+ <modules>
+ <module>imports</module>
+ <module>exports</module>
+ <module>tests</module>
+ </modules>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/tests/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/tests/pom.xml
new file mode 100644
index 0000000000..88971032ef
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/tests/pom.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-import-export</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-import-export-tests</artifactId>
+ <name>Apache Tuscany SCA iTest Import Export Tests</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/tests/src/test/java/org/apache/tuscany/sca/itests/TestTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/tests/src/test/java/org/apache/tuscany/sca/itests/TestTestCase.java
new file mode 100644
index 0000000000..ea76a23c03
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/import-export/tests/src/test/java/org/apache/tuscany/sca/itests/TestTestCase.java
@@ -0,0 +1,60 @@
+/*
+ * 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.itests;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.After;
+import org.junit.Test;
+
+public class TestTestCase {
+
+ private Node node;
+ private Node node2;
+
+ @Test
+ public void testOneNode() throws Exception {
+
+ node = NodeFactory.newInstance().createNode((String)null, new String[] {"../exports/target/classes", "../imports/target/classes"});
+ node.start();
+
+ }
+
+ @Test
+ public void testSeparateNodes() throws Exception {
+
+ node = NodeFactory.newInstance().createNode((String)null, new String[] {"../exports/target/classes"});
+ node.start();
+
+ node2 = NodeFactory.newInstance().createNode((String)null, new String[] {"../imports/target/classes"});
+ node2.start();
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ if (node2 != null) {
+ node2.stop();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/pom.xml
new file mode 100644
index 0000000000..95abe93bb7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/pom.xml
@@ -0,0 +1,92 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-interface-matching</artifactId>
+ <name>Apache Tuscany SCA iTest Interface Matching</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-domain-hazelcast</artifactId>
+ <version>2.0.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- Going with web services delegate for majority of tests -->
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.19</version>
+ </dependency>
+
+ <!-- Use RMI delegate for non-JAXB test -->
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-rmi-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-rmi</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-policy-security-jsr250</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>wstx-asl</artifactId>
+ <version>3.2.9</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>stax</groupId>
+ <artifactId>stax-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/CallbackInterface.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/CallbackInterface.java
new file mode 100644
index 0000000000..4db5531aca
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/CallbackInterface.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * only for callBack
+ */
+@Remotable
+public interface CallbackInterface {
+
+ void callbackMethod(String str);
+
+ void callbackMethod1(String str);
+
+ void modifyParameter(ParameterObject po);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/CallbackMissmatchInterface.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/CallbackMissmatchInterface.java
new file mode 100644
index 0000000000..9d9362f4d5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/CallbackMissmatchInterface.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * only for callBack
+ */
+@Remotable
+public interface CallbackMissmatchInterface {
+
+ void callbackMethod(ParameterObject po);
+
+ void callbackMethod1(ParameterObject po, String str);
+
+ void modifyParameter(ParameterObject po);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ClientClientComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ClientClientComponentImpl.java
new file mode 100644
index 0000000000..66988094e7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ClientClientComponentImpl.java
@@ -0,0 +1,81 @@
+/*
+ * 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.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/*
+ * Test that a client can be reference using a target name containing only the component
+ * name when the client has callback services registered.
+ */
+@Service(ClientComponent.class)
+public class ClientClientComponentImpl implements ClientComponent{
+
+ @Reference
+ protected ClientComponent aClient;
+
+ public String foo(ParameterObject po) {
+ return aClient.foo(po);
+ }
+
+ public String foo1(ParameterObject po) {
+ return aClient.foo1(po);
+ }
+
+ public String foo2(String str) throws Exception {
+ return str + "AComponent";
+ }
+
+ public String foo3(String str, int i) {
+ return str + "AComponent" + i;
+ }
+
+ public String foo4(int i, String str) throws Exception {
+ return str + "AComponent" + i;
+ }
+
+ public void callback(String str) {
+ }
+
+ public void callbackMethod(String str) {
+ }
+
+ public void callbackMethod1(String str) {
+ }
+
+ public void callModifyParameter() {
+ }
+
+ public String getCallbackValue() {
+ return null;
+ }
+
+ public void onewayMethod(String str) {
+ }
+
+ public String getOnewayValue() {
+ return null;
+ }
+
+ public void modifyParameter(ParameterObject po) {
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ClientComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ClientComponent.java
new file mode 100644
index 0000000000..c6a6499126
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ClientComponent.java
@@ -0,0 +1,51 @@
+/*
+ * 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.itest.interfaces;
+
+import org.oasisopen.sca.annotation.OneWay;
+import org.oasisopen.sca.annotation.Remotable;
+
+/*
+ * itest for interface: local,method-overloading
+ */
+@Remotable
+public interface ClientComponent {
+
+ String foo(ParameterObject po);
+
+ String foo1(ParameterObject po);
+
+ String foo2(String str) throws Exception;
+
+ String foo3(String str, int i);
+
+ String foo4(int i, String str) throws Exception;
+
+ void callback(String str);
+
+ void callModifyParameter();
+
+ @OneWay
+ void onewayMethod(String str);
+
+ String getCallbackValue();
+
+ String getOnewayValue();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ClientComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ClientComponentImpl.java
new file mode 100644
index 0000000000..4a414f870f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ClientComponentImpl.java
@@ -0,0 +1,92 @@
+/*
+ * 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.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(ClientComponent.class)
+public class ClientComponentImpl implements ClientComponent, CallbackInterface {
+
+ @Reference
+ protected ServiceComponent aCallBackService;
+ private static String callbackValue;
+ private static String onewayValue;
+
+ public String foo(ParameterObject po) {
+ po.field1 = "AComponent";
+ return aCallBackService.foo("AComponent");
+ }
+
+ public String foo1(ParameterObject po) {
+ po.field1 = "AComponent";
+ return aCallBackService.foo1("AComponent");
+ }
+
+ public String foo2(String str) throws Exception {
+ return str + "AComponent";
+ }
+
+ public String foo3(String str, int i) {
+ return str + "AComponent" + i;
+ }
+
+ public String foo4(int i, String str) throws Exception {
+ return str + "AComponent" + i;
+ }
+
+ public void callback(String str) {
+ aCallBackService.callback(str);
+ }
+
+ public void callbackMethod(String str) {
+ callbackValue = str;
+ }
+
+ public void callbackMethod1(String str) {
+ callbackValue = str;
+ }
+
+ public void callModifyParameter() {
+ this.aCallBackService.modifyParameter();
+ }
+
+ public String getCallbackValue() {
+ return callbackValue;
+ }
+
+ public void onewayMethod(String str) {
+ onewayValue = str;
+ try {
+ Thread.sleep(200);
+ } catch (Exception e) {
+ //do nothing
+ }
+ }
+
+ public String getOnewayValue() {
+ return onewayValue;
+ }
+
+ public void modifyParameter(ParameterObject po) {
+ po.field1 = "AComponent";
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackInterface.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackInterface.java
new file mode 100644
index 0000000000..a41875b2b6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackInterface.java
@@ -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.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * only for callBack
+ */
+public interface LocalCallbackInterface {
+
+ void callbackMethod(String str);
+
+ void modifyParameter(ParameterObject po);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackMissmatchInterface.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackMissmatchInterface.java
new file mode 100644
index 0000000000..fbb81ae5c1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackMissmatchInterface.java
@@ -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.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * only for callBack
+ */
+public interface LocalCallbackMissmatchInterface {
+
+ void callbackMethod(ParameterObject po);
+
+ void modifyParameter(ParameterObject po);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponentImpl.java
new file mode 100644
index 0000000000..9a8ad9ed8d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponentImpl.java
@@ -0,0 +1,88 @@
+/*
+ * 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.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(ClientComponent.class)
+public class LocalClientComponentImpl implements ClientComponent, LocalCallbackInterface {
+
+ @Reference
+ protected LocalServiceComponent aCallBackService;
+ private static String callbackValue;
+ private static String onewayValue;
+
+ public String foo(ParameterObject po) {
+ po.field1 = "AComponent";
+ return aCallBackService.foo("AComponent");
+ }
+
+ public String foo1(ParameterObject po) {
+ po.field1 = "AComponent";
+ return aCallBackService.foo("AComponent");
+ }
+
+ public String foo2(String str) throws Exception {
+ return str + "AComponent";
+ }
+
+ public String foo3(String str, int i) {
+ return str + "AComponent" + i;
+ }
+
+ public String foo4(int i, String str) throws Exception {
+ return str + "AComponent" + i;
+ }
+
+ public void callback(String str) {
+ aCallBackService.callback(str);
+ }
+
+ public void callbackMethod(String str) {
+ callbackValue = str;
+ }
+
+ public void callModifyParameter() {
+ this.aCallBackService.modifyParameter();
+ }
+
+ public String getCallbackValue() {
+ return callbackValue;
+ }
+
+ public void onewayMethod(String str) {
+ onewayValue = str;
+ try {
+ Thread.sleep(200);
+ } catch (Exception e) {
+ //do nothing
+ }
+ }
+
+ public String getOnewayValue() {
+ return onewayValue;
+ }
+
+ public void modifyParameter(ParameterObject po) {
+ po.field1 = "AComponent";
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceCallbackMissmatchComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceCallbackMissmatchComponent.java
new file mode 100644
index 0000000000..7a66b2d900
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceCallbackMissmatchComponent.java
@@ -0,0 +1,38 @@
+/*
+ * 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.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * Local be-directional callBackService
+ */
+@Callback(LocalCallbackMissmatchInterface.class)
+public interface LocalServiceCallbackMissmatchComponent {
+
+ String foo(String str);
+
+ void callback(String str);
+
+ void modifyParameter();
+
+ ParameterObject getPO();
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceCallbackMissmatchComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceCallbackMissmatchComponentImpl.java
new file mode 100644
index 0000000000..7ef6c04a9c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceCallbackMissmatchComponentImpl.java
@@ -0,0 +1,50 @@
+/*
+ * 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.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(LocalServiceCallbackMissmatchComponent.class)
+public class LocalServiceCallbackMissmatchComponentImpl implements LocalServiceCallbackMissmatchComponent {
+
+ @Callback
+ protected LocalCallbackMissmatchInterface callback;
+
+ private static ParameterObject po;
+
+ public void callback(String str) {
+ po = new ParameterObject("CallBack");
+ callback.callbackMethod(po);
+ }
+
+ public void modifyParameter() {
+ po = new ParameterObject("CallBack");
+ callback.modifyParameter(po);
+ }
+
+ public String foo(String str) {
+ return po.field1;
+ }
+
+ public ParameterObject getPO() {
+ return po;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponent.java
new file mode 100644
index 0000000000..92ed0434e4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponent.java
@@ -0,0 +1,38 @@
+/*
+ * 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.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * Local be-directional callBackService
+ */
+@Callback(LocalCallbackInterface.class)
+public interface LocalServiceComponent {
+
+ String foo(String str);
+
+ void callback(String str);
+
+ void modifyParameter();
+
+ ParameterObject getPO();
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponentImpl.java
new file mode 100644
index 0000000000..1d8995ccc6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponentImpl.java
@@ -0,0 +1,49 @@
+/*
+ * 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.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(LocalServiceComponent.class)
+public class LocalServiceComponentImpl implements LocalServiceComponent {
+
+ @Callback
+ protected LocalCallbackInterface callback;
+
+ private static ParameterObject po;
+
+ public void callback(String str) {
+ callback.callbackMethod(str);
+ }
+
+ public void modifyParameter() {
+ po = new ParameterObject("CallBack");
+ callback.modifyParameter(po);
+ }
+
+ public String foo(String str) {
+ return str;
+ }
+
+ public ParameterObject getPO() {
+ return po;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceMissmatchComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceMissmatchComponent.java
new file mode 100644
index 0000000000..fb722b2699
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceMissmatchComponent.java
@@ -0,0 +1,38 @@
+/*
+ * 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.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * Local be-directional callBackService
+ */
+@Callback(LocalCallbackInterface.class)
+public interface LocalServiceMissmatchComponent {
+
+ String foo(ParameterObject po);
+
+ void callback(String str);
+
+ void modifyParameter();
+
+ ParameterObject getPO();
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceMissmatchComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceMissmatchComponentImpl.java
new file mode 100644
index 0000000000..78626a3add
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceMissmatchComponentImpl.java
@@ -0,0 +1,49 @@
+/*
+ * 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.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(LocalServiceMissmatchComponent.class)
+public class LocalServiceMissmatchComponentImpl implements LocalServiceMissmatchComponent {
+
+ @Callback
+ protected LocalCallbackInterface callback;
+
+ private static ParameterObject po;
+
+ public void callback(String str) {
+ callback.callbackMethod(str);
+ }
+
+ public void modifyParameter() {
+ po = new ParameterObject("CallBack");
+ callback.modifyParameter(po);
+ }
+
+ public String foo(ParameterObject po) {
+ return po.field1;
+ }
+
+ public ParameterObject getPO() {
+ return po;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBClientComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBClientComponentImpl.java
new file mode 100644
index 0000000000..f3048a9098
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBClientComponentImpl.java
@@ -0,0 +1,92 @@
+/*
+ * 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.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(ClientComponent.class)
+public class NonJAXBClientComponentImpl implements ClientComponent, CallbackInterface {
+
+ @Reference
+ protected NonJAXBServiceComponent aCallBackService;
+ private static String callbackValue;
+ private static String onewayValue;
+
+ public String foo(ParameterObject po) {
+ po.field1 = "AComponent";
+ return aCallBackService.foo("AComponent");
+ }
+
+ public String foo1(ParameterObject po) {
+ NonJAXBParameterObject nonJAXBPO = new NonJAXBParameterObject(po.field1);
+ return aCallBackService.foo1(nonJAXBPO);
+ }
+
+ public String foo2(String str) throws Exception {
+ return str + "AComponent";
+ }
+
+ public String foo3(String str, int i) {
+ return str + "AComponent" + i;
+ }
+
+ public String foo4(int i, String str) throws Exception {
+ return str + "AComponent" + i;
+ }
+
+ public void callback(String str) {
+ aCallBackService.callback(str);
+ }
+
+ public void callbackMethod(String str) {
+ callbackValue = str;
+ }
+
+ public void callbackMethod1(String str) {
+ callbackValue = str;
+ }
+
+ public void callModifyParameter() {
+ this.aCallBackService.modifyParameter();
+ }
+
+ public String getCallbackValue() {
+ return callbackValue;
+ }
+
+ public void onewayMethod(String str) {
+ onewayValue = str;
+ try {
+ Thread.sleep(200);
+ } catch (Exception e) {
+ //do nothing
+ }
+ }
+
+ public String getOnewayValue() {
+ return onewayValue;
+ }
+
+ public void modifyParameter(ParameterObject po) {
+ po.field1 = "AComponent";
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBParameterObject.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBParameterObject.java
new file mode 100644
index 0000000000..8acef311a9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBParameterObject.java
@@ -0,0 +1,51 @@
+/*
+ * 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.itest.interfaces;
+
+import java.io.Serializable;
+
+/**
+ *
+ * A bean that cannont be converted to/from XML using JAXB as there is no
+ * default constructor
+ *
+ */
+public class NonJAXBParameterObject implements Serializable {
+ private static final long serialVersionUID = 1L;
+ public String field1;
+
+
+ public NonJAXBParameterObject(String field1) {
+ this.field1 = field1;
+ }
+
+ public boolean equals(Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (o instanceof NonJAXBParameterObject) {
+ NonJAXBParameterObject other = (NonJAXBParameterObject)o;
+ if (field1 != null) {
+ return field1.equals(other.field1);
+ }
+ }
+ return false;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBServiceComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBServiceComponent.java
new file mode 100644
index 0000000000..d097394721
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBServiceComponent.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * Local be-directional callBackService
+ */
+@Remotable
+@Callback(CallbackInterface.class)
+public interface NonJAXBServiceComponent {
+
+ String foo(String str);
+
+ String foo1(NonJAXBParameterObject po);
+
+ void callback(String str);
+
+ void modifyParameter();
+
+ ParameterObject getPO();
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBServiceComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBServiceComponentImpl.java
new file mode 100644
index 0000000000..d50feafd0e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBServiceComponentImpl.java
@@ -0,0 +1,60 @@
+/*
+ * 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.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(NonJAXBServiceComponent.class)
+public class NonJAXBServiceComponentImpl implements NonJAXBServiceComponent {
+
+ @Callback
+ protected CallbackInterface callback;
+
+/*
+ @Reference
+ protected ServiceComponent chainedCallbackReference;
+*/
+ private static ParameterObject po;
+
+ public String foo(String str) {
+ return str;
+ }
+
+ public String foo1(NonJAXBParameterObject po){
+ return po.field1;
+ }
+
+ public void callback(String str) {
+ callback.callbackMethod(str);
+ }
+
+ public void modifyParameter() {
+ po = new ParameterObject("CallBack");
+ callback.modifyParameter(po);
+ }
+
+
+
+ public ParameterObject getPO() {
+ return po;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ParameterObject.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ParameterObject.java
new file mode 100644
index 0000000000..9c980e01c8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ParameterObject.java
@@ -0,0 +1,48 @@
+/*
+ * 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.itest.interfaces;
+
+import java.io.Serializable;
+
+public class ParameterObject implements Serializable {
+ private static final long serialVersionUID = 1L;
+ public String field1;
+
+ public ParameterObject() {
+ this.field1 = null;
+ }
+
+ public ParameterObject(String field1) {
+ this.field1 = field1;
+ }
+
+ public boolean equals(Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (o instanceof ParameterObject) {
+ ParameterObject other = (ParameterObject)o;
+ if (field1 != null) {
+ return field1.equals(other.field1);
+ }
+ }
+ return false;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceCallbackMissmatchComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceCallbackMissmatchComponent.java
new file mode 100644
index 0000000000..81d4b3816a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceCallbackMissmatchComponent.java
@@ -0,0 +1,39 @@
+/*
+ * 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.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * Local be-directional callBackService
+ */
+@Remotable
+@Callback(CallbackMissmatchInterface.class)
+public interface ServiceCallbackMissmatchComponent {
+
+ String foo(ParameterObject po);
+
+ void callback(String str);
+
+ void modifyParameter();
+
+ ParameterObject getPO();
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceCallbackMissmatchComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceCallbackMissmatchComponentImpl.java
new file mode 100644
index 0000000000..4dbfd55535
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceCallbackMissmatchComponentImpl.java
@@ -0,0 +1,49 @@
+/*
+ * 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.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(ServiceCallbackMissmatchComponent.class)
+public class ServiceCallbackMissmatchComponentImpl implements ServiceCallbackMissmatchComponent {
+
+ @Callback
+ protected CallbackMissmatchInterface callback;
+
+ private static ParameterObject po;
+
+ public void callback(String str) {
+ callback.callbackMethod1(po, str);
+ }
+
+ public void modifyParameter() {
+ po = new ParameterObject("CallBack");
+ callback.modifyParameter(po);
+ }
+
+ public String foo(ParameterObject po) {
+ return po.field1;
+ }
+
+ public ParameterObject getPO() {
+ return po;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceComponent.java
new file mode 100644
index 0000000000..355db43089
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceComponent.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * Local be-directional callBackService
+ */
+@Remotable
+@Callback(CallbackInterface.class)
+public interface ServiceComponent {
+
+ String foo(String str);
+
+ String foo1(String str);
+
+ void callback(String str);
+
+ void modifyParameter();
+
+ ParameterObject getPO();
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceComponentImpl.java
new file mode 100644
index 0000000000..aee96e4737
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceComponentImpl.java
@@ -0,0 +1,57 @@
+/*
+ * 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.itest.interfaces;
+
+import javax.annotation.security.RolesAllowed;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Service;
+
+@RolesAllowed({"Role1"})
+@Service(ServiceComponent.class)
+public class ServiceComponentImpl implements ServiceComponent {
+
+ @Callback
+ protected CallbackInterface callback;
+
+ private static ParameterObject po;
+
+ @RolesAllowed({"Role2", "Role3"})
+ public String foo(String str) {
+ return str;
+ }
+
+ public String foo1(String str){
+ return str;
+ }
+
+ public void callback(String str) {
+ callback.callbackMethod(str);
+ }
+
+ public void modifyParameter() {
+ po = new ParameterObject("CallBack");
+ callback.modifyParameter(po);
+ }
+
+ public ParameterObject getPO() {
+ return po;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceMissmatchComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceMissmatchComponent.java
new file mode 100644
index 0000000000..a1c933716e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceMissmatchComponent.java
@@ -0,0 +1,52 @@
+/*
+ * 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.itest.interfaces;
+
+import java.util.List;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * Local be-directional callBackService
+ */
+@Remotable
+@Callback(CallbackInterface.class)
+public interface ServiceMissmatchComponent {
+
+ // infrastructure won't detect difference between String and ParameterObject
+ String foo(ParameterObject po);
+
+ // Infrastructure will detect difference between parameter numbers
+ String foo1(ParameterObject po, String str);
+
+ void callback(String str);
+
+ void modifyParameter();
+
+ ParameterObject getPO();
+
+ void inArray(String[] stringArray);
+
+ String[] outArray();
+
+ void inCollection(List<String> stringArray);
+
+ List<String> outCollection();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceMissmatchComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceMissmatchComponentImpl.java
new file mode 100644
index 0000000000..0e0966da79
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceMissmatchComponentImpl.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.interfaces;
+
+import java.util.List;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(ServiceMissmatchComponent.class)
+public class ServiceMissmatchComponentImpl implements ServiceMissmatchComponent {
+
+ @Callback
+ protected CallbackInterface callback;
+
+ private static ParameterObject po;
+
+ public String foo(ParameterObject po) {
+ return po.field1;
+ }
+
+ public String foo1(ParameterObject po, String str){
+ return str;
+ }
+
+ public void callback(String str) {
+ callback.callbackMethod(str);
+ }
+
+ public void modifyParameter() {
+ po = new ParameterObject("CallBack");
+ callback.modifyParameter(po);
+ }
+
+ public ParameterObject getPO() {
+ return po;
+ }
+
+ public void inArray(String[] stringArray) {
+ }
+
+ public String[] outArray() {
+ return null;
+ }
+
+ public void inCollection(List<String> stringArray) {
+ }
+
+ public List<String> outCollection() {
+ return null;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions
new file mode 100644
index 0000000000..39b298a665
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions
@@ -0,0 +1,17 @@
+# 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.
+org/apache/tuscany/sca/itest/interfaces/definitions.xml \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/definitions.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/definitions.xml
new file mode 100644
index 0000000000..f462f81388
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/definitions.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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 xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://www.tuscany.apache.org/itests/interface/match"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" >
+
+
+ <sca:policySet name="BasicAuthenticationPolicySet"
+ attachTo="//sca:binding.ws"
+ provides="clientAuthentication.transport"
+ appliesTo="//sca:binding.ws">
+ <tuscany:basicAuthentication>
+ <tuscany:userName>myname</tuscany:userName>
+ <tuscany:password>mypassword</tuscany:password>
+ </tuscany:basicAuthentication>
+ </sca:policySet>
+
+</definitions> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchDistributedClient.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchDistributedClient.composite
new file mode 100644
index 0000000000..7a373f2f31
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchDistributedClient.composite
@@ -0,0 +1,34 @@
+<?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
+ * 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:foo="http://foo" targetNamespace="http://foo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ name="MatchDistributedClient" >
+
+ <component name="LocalClientClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.ClientClientComponentImpl" />
+ <reference name="aClient" target="DistributedClientComponent" />
+ </component>
+
+ <component name="DistributedClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.ClientComponentImpl" />
+ <reference name="aCallBackService" target="DistributedServiceComponent" />
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchDistributedClientClient.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchDistributedClientClient.composite
new file mode 100644
index 0000000000..d0f2bc25ba
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchDistributedClientClient.composite
@@ -0,0 +1,29 @@
+<?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
+ * 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:foo="http://foo" targetNamespace="http://foo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ name="MatchDistributedClientClient" >
+
+ <component name="DistributedClientClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.ClientClientComponentImpl" />
+ <reference name="aClient" target="DistributedClientComponent" />
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchDistributedService.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchDistributedService.composite
new file mode 100644
index 0000000000..f13cc8657b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchDistributedService.composite
@@ -0,0 +1,27 @@
+<?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
+ * 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:foo="http://foo" targetNamespace="http://foo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ name="MatchDistributedService" >
+
+ <component name="DistributedServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.ServiceComponentImpl" />
+ </component>
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchNonJAXBDistributedClient.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchNonJAXBDistributedClient.composite
new file mode 100644
index 0000000000..4d39fc2ec7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchNonJAXBDistributedClient.composite
@@ -0,0 +1,29 @@
+<?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
+ * 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:foo="http://foo" targetNamespace="http://foo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ name="MatchNonJAXBDistributedClient" >
+
+ <component name="DistributedClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.NonJAXBClientComponentImpl" />
+ <reference name="aCallBackService" target="DistributedServiceComponent" />
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchNonJAXBDistributedService.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchNonJAXBDistributedService.composite
new file mode 100644
index 0000000000..ffb609daee
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchNonJAXBDistributedService.composite
@@ -0,0 +1,27 @@
+<?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
+ * 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:foo="http://foo" targetNamespace="http://foo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ name="MatchNonJAXBDistributedService" >
+
+ <component name="DistributedServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.NonJAXBServiceComponentImpl" />
+ </component>
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchPolicyDistributedClient.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchPolicyDistributedClient.composite
new file mode 100644
index 0000000000..e5591f2e93
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchPolicyDistributedClient.composite
@@ -0,0 +1,29 @@
+<?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
+ * 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:foo="http://foo" targetNamespace="http://foo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ name="MatchPolicyDistributedClient" >
+
+ <component name="DistributedClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.ClientComponentImpl" />
+ <reference name="aCallBackService" target="DistributedServiceComponent"/>
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchPolicyDistributedService.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchPolicyDistributedService.composite
new file mode 100644
index 0000000000..7340a2d6e6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchPolicyDistributedService.composite
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * 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"
+ xmlns:foo="http://foo" targetNamespace="http://foo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ name="MatchPolicyDistributedService" >
+
+ <component name="DistributedServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.ServiceComponentImpl" />
+ <service name="ServiceComponent" requires="authentication">
+ <binding.ws requires="sca:SOAP.v1_2"/>
+ </service>
+ </component>
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchWSDistributedClient.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchWSDistributedClient.composite
new file mode 100644
index 0000000000..44074bf719
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchWSDistributedClient.composite
@@ -0,0 +1,29 @@
+<?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
+ * 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:foo="http://foo" targetNamespace="http://foo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ name="MatchWSDistributedClient" >
+
+ <component name="DistributedClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.ClientComponentImpl" />
+ <reference name="aCallBackService" target="DistributedServiceComponent" />
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchWSDistributedService.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchWSDistributedService.composite
new file mode 100644
index 0000000000..981f5d172c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchWSDistributedService.composite
@@ -0,0 +1,30 @@
+<?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
+ * 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:foo="http://foo" targetNamespace="http://foo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ name="MatchWSDistributedService" >
+
+ <component name="DistributedServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.ServiceComponentImpl" />
+ <service name="ServiceComponent">
+ <binding.ws/>
+ </service>
+ </component>
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/local/MatchLocal.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/local/MatchLocal.composite
new file mode 100644
index 0000000000..6c728f8bd3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/local/MatchLocal.composite
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * 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:foo="http://foo" targetNamespace="http://foo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ name="MatchLocal" >
+
+ <component name="LocalClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.LocalClientComponentImpl" />
+ <reference name="aCallBackService" target="LocalServiceComponent" />
+ </component>
+
+ <component name="LocalServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.LocalServiceComponentImpl" />
+ </component>
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchCallbackDistributedService.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchCallbackDistributedService.composite
new file mode 100644
index 0000000000..808ffa45f0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchCallbackDistributedService.composite
@@ -0,0 +1,27 @@
+<?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
+ * 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:foo="http://foo" targetNamespace="http://foo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ name="MissmatchCallbackDistributedService" >
+
+ <component name="DistributedServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.ServiceCallbackMissmatchComponentImpl" />
+ </component>
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchDistributedClient.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchDistributedClient.composite
new file mode 100644
index 0000000000..dcfe3bf3c3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchDistributedClient.composite
@@ -0,0 +1,29 @@
+<?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
+ * 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:foo="http://foo" targetNamespace="http://foo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ name="MissmatchDistributedClient" >
+
+ <component name="DistributedClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.ClientComponentImpl" />
+ <reference name="aCallBackService" target="DistributedServiceComponent" />
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchDistributedService.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchDistributedService.composite
new file mode 100644
index 0000000000..9424f66d56
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchDistributedService.composite
@@ -0,0 +1,27 @@
+<?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
+ * 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:foo="http://foo" targetNamespace="http://foo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ name="MissmatchDistributedService" >
+
+ <component name="DistributedServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.ServiceMissmatchComponentImpl" />
+ </component>
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchPolicyDistributedClient.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchPolicyDistributedClient.composite
new file mode 100644
index 0000000000..b8f51c9afc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchPolicyDistributedClient.composite
@@ -0,0 +1,30 @@
+<?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
+ * 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"
+ xmlns:foo="http://foo" targetNamespace="http://foo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ name="MissmatchPolicyDistributedClient" >
+
+ <component name="DistributedClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.ClientComponentImpl" />
+ <reference name="aCallBackService" target="DistributedServiceComponent" requires="sca:SOAP.v1_2"/>
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchPolicyDistributedService.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchPolicyDistributedService.composite
new file mode 100644
index 0000000000..a90d9e0a3f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchPolicyDistributedService.composite
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * 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"
+ xmlns:foo="http://foo" targetNamespace="http://foo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ name="MissmatchPolicyDistributedService" >
+
+ <component name="DistributedServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.ServiceComponentImpl" />
+ <service name="ServiceComponent" requires="authentication">
+ <binding.ws/>
+ </service>
+ </component>
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/local/MissmatchCallbackLocal.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/local/MissmatchCallbackLocal.composite
new file mode 100644
index 0000000000..2c673054a6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/local/MissmatchCallbackLocal.composite
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * 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:foo="http://foo" targetNamespace="http://foo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ name="MissmatchCallbackLocal" >
+
+ <component name="LocalClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.LocalClientComponentImpl" />
+ <reference name="aCallBackService" target="LocalServiceComponent" />
+ </component>
+
+ <component name="LocalServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.LocalServiceCallbackMissmatchComponentImpl" />
+ </component>
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/local/MissmatchLocal.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/local/MissmatchLocal.composite
new file mode 100644
index 0000000000..4a128015f8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/local/MissmatchLocal.composite
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * 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:foo="http://foo" targetNamespace="http://foo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ name="MissmatchLocal" >
+
+ <component name="LocalClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.LocalClientComponentImpl" />
+ <reference name="aCallBackService" target="LocalServiceComponent" />
+ </component>
+
+ <component name="LocalServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.LocalServiceMissmatchComponentImpl" />
+ </component>
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/local/MissmatchRemoteable.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/local/MissmatchRemoteable.composite
new file mode 100644
index 0000000000..7b3ff13e4f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/missmatch/local/MissmatchRemoteable.composite
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * 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:foo="http://foo" targetNamespace="http://foo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ name="MissmatchRemoteable" >
+
+ <component name="LocalClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.ClientComponentImpl" />
+ <reference name="aCallBackService" target="LocalServiceComponent" />
+ </component>
+
+ <component name="LocalServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.ServiceMissmatchComponentImpl" />
+ </component>
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/test/java/org/apache/tuscany/sca/itest/interfaces/InerfaceMatchTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/test/java/org/apache/tuscany/sca/itest/interfaces/InerfaceMatchTestCase.java
new file mode 100644
index 0000000000..ade96178d2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/test/java/org/apache/tuscany/sca/itest/interfaces/InerfaceMatchTestCase.java
@@ -0,0 +1,369 @@
+/*
+ * 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.itest.interfaces;
+
+import java.net.URI;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.apache.tuscany.sca.assembly.SCABinding;
+import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.oasisopen.sca.ServiceRuntimeException;
+import org.oasisopen.sca.client.SCAClientFactory;
+
+public class InerfaceMatchTestCase {
+
+ /**
+ * Non-remotable client and service interfaces where the interfaces match.
+ * Components running in the same composite/JVM, i.e. no remote registry
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testLocal() throws Exception {
+ String [] contributions = {"./target/classes"};
+ Node node1 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
+ "org/apache/tuscany/sca/itest/interfaces/match/local/MatchLocal.composite",
+ contributions);
+ node1.start();
+
+ ClientComponent local = node1.getService(ClientComponent.class, "LocalClientComponent");
+ ParameterObject po = new ParameterObject();
+
+ try {
+ String response = local.foo1(po);
+ Assert.assertEquals("AComponent", response);
+ } catch (ServiceRuntimeException ex){
+ Assert.fail("Unexpected exception " + ex.toString());
+ }
+
+ node1.stop();
+ }
+
+ /**
+ * Remotable client and service interfaces where the interfaces match.
+ * Components running in the separate composite/JVM, i.e. there is a remote registry
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testDistributedRemotable() throws Exception {
+
+ // Force the remote default binding to be web services
+ System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding",
+ "{http://docs.oasis-open.org/ns/opencsa/sca/200912}binding.ws");
+
+ String [] contributions = {"./target/classes"};
+ Node node1 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
+ "org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchDistributedClient.composite",
+ contributions);
+ node1.start();
+
+ Node node2 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
+ "org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchDistributedService.composite",
+ contributions);
+
+ // force default binding on node2 to use a different port from node 1(which will default to 8080
+ ((NodeImpl)node2).getConfiguration().addBinding(WebServiceBinding.TYPE, "http://localhost:8081/");
+ ((NodeImpl)node2).getConfiguration().addBinding(SCABinding.TYPE, "http://localhost:8081/");
+ node2.start();
+
+ ClientComponent local = node1.getService(ClientComponent.class, "DistributedClientComponent");
+ ParameterObject po = new ParameterObject();
+
+ try {
+ String response = local.foo1(po);
+ Assert.assertEquals("AComponent", response);
+ } catch (ServiceRuntimeException ex){
+ Assert.fail("Unexpected exception with foo " + ex.toString());
+ }
+
+ try {
+ local.callback("Callback");
+ String response = local.getCallbackValue();
+ Assert.assertEquals("Callback", response);
+ } catch (ServiceRuntimeException ex){
+ Assert.fail("Unexpected exception with callback" + ex.toString());
+ }
+
+ node1.stop();
+ node2.stop();
+ }
+
+ /**
+ * Remotable client and service interfaces where the interfaces match but
+ * where there is a parameter that can't be converted to/from XML using JAXB
+ * Components running in the separate composite/JVM, i.e. there is a remote registry
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testDistributedRemotableNonJAXB() throws Exception {
+
+ // Force the remote default binding to be rmi as I want something that doesn't depend on
+ // WSDL so that I can test what happens when the registry tries to generate WSDL
+ System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding",
+ "{http://tuscany.apache.org/xmlns/sca/1.1}binding.rmi");
+
+ String [] contributions = {"./target/classes"};
+ Node node1 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
+ "org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchNonJAXBDistributedClient.composite",
+ contributions);
+ node1.start();
+
+ Node node2 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
+ "org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchNonJAXBDistributedService.composite",
+ contributions);
+
+ // force default binding on node2 to use a different port from node 1(which will default to 8080
+ // Don't need to do this as not testing callbacks here
+ //((NodeImpl)node2).getConfiguration().addBinding(WebServiceBinding.TYPE, "http://localhost:8081/");
+ //((NodeImpl)node2).getConfiguration().addBinding(SCABinding.TYPE, "http://localhost:8081/");
+ node2.start();
+
+ ClientComponent local = node1.getService(ClientComponent.class, "DistributedClientComponent");
+ ParameterObject po = new ParameterObject();
+ po.field1 = "Test String";
+
+ try {
+ String response = local.foo1(po);
+ Assert.assertEquals("Test String", response);
+ } catch (ServiceRuntimeException ex){
+ Assert.fail("Unexpected exception with foo " + ex.toString());
+ }
+
+ node1.stop();
+ node2.stop();
+ }
+
+ /**
+ * Remotable client and service interfaces where the interfaces match and the service has policy.
+ * Components running in the separate composite/JVM, i.e. there is a remote registry
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testPolicyDistributedRemotable() throws Exception {
+
+
+ String [] contributions = {"./target/classes"};
+ Node node1 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
+ "org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchPolicyDistributedClient.composite",
+ contributions);
+ node1.start();
+
+ Node node2 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
+ "org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchPolicyDistributedService.composite",
+ contributions);
+ // force binding.ws on node2 to use a different port from node 1(which will default to 8080
+ ((NodeImpl)node2).getConfiguration().addBinding(WebServiceBinding.TYPE, "http://localhost:8081/");
+ node2.start();
+
+ ClientComponent local = node1.getService(ClientComponent.class, "DistributedClientComponent");
+ ParameterObject po = new ParameterObject();
+
+ try {
+ String response = local.foo1(po);
+ Assert.assertEquals("AComponent", response);
+ } catch (ServiceRuntimeException ex){
+ Assert.fail("Unexpected exception with foo " + ex.toString());
+ }
+
+ try {
+ local.callback("Callback");
+ String response = local.getCallbackValue();
+ Assert.assertEquals("Callback", response);
+ } catch (ServiceRuntimeException ex){
+ Assert.fail("Unexpected exception with callback" + ex.toString());
+ }
+
+ node1.stop();
+ node2.stop();
+ }
+
+ /**
+ * Remotable client and service interfaces where the interfaces match.
+ * Components running in the separate composite/JVM, i.e. there is a remote registry
+ * and with binding.ws explicitly configured at the service
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testWSDistributedRemotable() throws Exception {
+
+
+ String [] contributions = {"./target/classes"};
+ Node node1 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
+ "org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchWSDistributedClient.composite",
+ contributions);
+ node1.start();
+
+ Node node2 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
+ "org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchWSDistributedService.composite",
+ contributions);
+
+ // force default binding on node2 to use a different port from node 1(which will default to 8080)
+ ((NodeImpl)node2).getConfiguration().addBinding(WebServiceBinding.TYPE, "http://localhost:8081/");
+ ((NodeImpl)node2).getConfiguration().addBinding(SCABinding.TYPE, "http://localhost:8081/");
+ node2.start();
+
+ ClientComponent local = node1.getService(ClientComponent.class, "DistributedClientComponent");
+ ParameterObject po = new ParameterObject();
+
+ try {
+ String response = local.foo1(po);
+ Assert.assertEquals("AComponent", response);
+ } catch (ServiceRuntimeException ex){
+ Assert.fail("Unexpected exception with foo " + ex.toString());
+ }
+
+ try {
+ local.callback("Callback");
+ String response = local.getCallbackValue();
+ Assert.assertEquals("Callback", response);
+ } catch (ServiceRuntimeException ex){
+ Assert.fail("Unexpected exception with callback" + ex.toString());
+ }
+
+ node1.stop();
+ node2.stop();
+ }
+
+ /**
+ * Remotable client and service interfaces where the interfaces match.
+ * Components running in the separate composite/JVM, i.e. there is a remote registry
+ * Access from an SCALient call to make sure that it is able to connect to the remote
+ * registry.
+ *
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testDistributedRemotableSCAClient() throws Exception {
+
+ // Force the remote default binding to be web services
+ System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding",
+ "{http://docs.oasis-open.org/ns/opencsa/sca/200912}binding.ws");
+
+ TuscanyRuntime runtime = TuscanyRuntime.newInstance();
+
+/*
+ org.apache.tuscany.sca.Node nodeA = runtime.createNode("default");
+ nodeA.installContribution("nodeAContrib", "./target/classes", null, null);
+ nodeA.startComposite("node1Contrib", "org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchDistributedClient.composite");
+
+ org.apache.tuscany.sca.Node nodeB = runtime.createNode("default");
+ nodeB.installContribution("nodeAContrib", "./target/classes", null, null);
+ nodeB.startComposite("node1Contrib", "org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchDistributedService.composite");
+*/
+
+ String [] contributions = {"./target/classes"};
+ Node node1 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
+ "org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchDistributedClient.composite",
+ contributions);
+ node1.start();
+
+ Node node2 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
+ "org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchDistributedService.composite",
+ contributions);
+
+ // force default binding on node2 to use a different port from node 1(which will default to 8080
+ ((NodeImpl)node2).getConfiguration().addBinding(WebServiceBinding.TYPE, "http://localhost:8081/");
+ ((NodeImpl)node2).getConfiguration().addBinding(SCABinding.TYPE, "http://localhost:8081/");
+ node2.start();
+
+ SCAClientFactory clientFactory = SCAClientFactory.newInstance(URI.create("default"));
+ ClientComponent local = clientFactory.getService(ClientComponent.class, "LocalClientClientComponent");
+
+ ParameterObject po = new ParameterObject();
+
+ try {
+ String response = local.foo1(po);
+ Assert.assertEquals("AComponent", response);
+ } catch (ServiceRuntimeException ex){
+ Assert.fail("Unexpected exception with foo " + ex.toString());
+ }
+
+/* Used to keep the composites alive when running the next (ignored) test manually
+ System.out.println("Press a key to end");
+ try {
+ System.in.read();
+ } catch (Exception ex) {
+ }
+ System.out.println("Continuing");
+*/
+ node1.stop();
+ node2.stop();
+ }
+
+ /**
+ * Allows you to manually call the previous test from a separate VM to
+ * ensure that endpoint serialization to the client work OK. It's not
+ * intended to run as part of the test suite.
+ *
+ *
+ * @throws Exception
+ */
+ @Test
+ @Ignore
+ public void testDistributedRemotableSCAClientSeparateVM() throws Exception {
+ // Force the remote default binding to be web services
+ System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding",
+ "{http://docs.oasis-open.org/ns/opencsa/sca/200912}binding.ws");
+
+ // Make a reference target point across VMs to a component that has callback services
+ String [] contributions = {"./target/classes"};
+
+ Node node3 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
+ "org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchDistributedClientClient.composite",
+ contributions);
+ node3.start();
+
+ SCAClientFactory clientFactory = SCAClientFactory.newInstance(URI.create("default"));
+ ClientComponent clientClient = clientFactory.getService(ClientComponent.class, "DistributedClientClientComponent");
+
+ ParameterObject po = new ParameterObject();
+
+ try {
+ String response = clientClient.foo1(po);
+ Assert.assertEquals("AComponent", response);
+ } catch (ServiceRuntimeException ex){
+ Assert.fail("Unexpected exception with foo " + ex.toString());
+ }
+
+ // Make an SCAClient point across VMs to a component that has callback services
+ ClientComponent client = clientFactory.getService(ClientComponent.class, "DistributedClientComponent");
+
+ try {
+ String response = client.foo1(po);
+ Assert.assertEquals("AComponent", response);
+ } catch (ServiceRuntimeException ex){
+ Assert.fail("Unexpected exception with foo " + ex.toString());
+ }
+
+ node3.stop();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/test/java/org/apache/tuscany/sca/itest/interfaces/InerfaceMissmatchTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/test/java/org/apache/tuscany/sca/itest/interfaces/InerfaceMissmatchTestCase.java
new file mode 100644
index 0000000000..636f6cb789
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/test/java/org/apache/tuscany/sca/itest/interfaces/InerfaceMissmatchTestCase.java
@@ -0,0 +1,246 @@
+/*
+ * 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.itest.interfaces;
+
+import java.net.URI;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.assembly.SCABinding;
+import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.oasisopen.sca.ServiceRuntimeException;
+
+public class InerfaceMissmatchTestCase {
+
+ /**
+ * Non-remoteable client and service interfaces where the parameter types of one of the operations don't match.
+ * Components running in the same composite/JVM, i.e. no remote registry
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testLocal() throws Exception {
+ String [] contributions = {"./target/classes"};
+ Node node1 = NodeFactory.newInstance().createNode(URI.create("tuscany:InerfaceMissmatchTestCase"),
+ "org/apache/tuscany/sca/itest/interfaces/missmatch/local/MissmatchLocal.composite",
+ contributions);
+ node1.start();
+
+ ClientComponent local = node1.getService(ClientComponent.class, "LocalClientComponent");
+ ParameterObject po = new ParameterObject();
+
+ try {
+ local.foo1(po);
+ Assert.fail("Expection exteption indicating that interfaces don't match");
+ } catch (ServiceRuntimeException ex){
+ Assert.assertTrue(ex.getMessage().startsWith("Unable to bind []"));
+ }
+
+ node1.stop();
+ }
+
+ /**
+ * Non-remoteable client and service interfaces where the parameter types of one of the callback operations don't match.
+ * Components running in the same composite/JVM, i.e. no remote registry
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testCallbackLocal() throws Exception {
+ String [] contributions = {"./target/classes"};
+ Node node1 = NodeFactory.newInstance().createNode(URI.create("tuscany:InerfaceMissmatchTestCase"),
+ "org/apache/tuscany/sca/itest/interfaces/missmatch/local/MissmatchCallbackLocal.composite",
+ contributions);
+ node1.start();
+
+ ClientComponent local = node1.getService(ClientComponent.class, "LocalClientComponent");
+ ParameterObject po = new ParameterObject();
+
+ try {
+ local.foo1(po);
+ Assert.fail("Expection exteption indicating that interfaces don't match");
+ } catch (ServiceRuntimeException ex){
+ Assert.assertTrue(ex.getMessage().startsWith("Unable to bind []"));
+ }
+
+ node1.stop();
+ }
+
+ /**
+ * Remoteable client and service interfaces where the parameter types of one of the operations don't match.
+ * Components running in the same composite/JVM, i.e. no remote registry
+ * Tuscany is not able to detect miss-match here?
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testNonDistributedRemotable() throws Exception {
+
+ String [] contributions = {"./target/classes"};
+ Node node1 = NodeFactory.newInstance().createNode(URI.create("tuscany:InerfaceMissmatchTestCase"),
+ "org/apache/tuscany/sca/itest/interfaces/missmatch/local/MissmatchRemoteable.composite",
+ contributions);
+ node1.start();
+
+ ClientComponent local = node1.getService(ClientComponent.class, "LocalClientComponent");
+ ParameterObject po = new ParameterObject();
+
+ try {
+ local.foo1(po);
+ } catch (ServiceRuntimeException ex){
+ Assert.assertTrue(ex.getMessage().startsWith("Unable to bind []"));
+ }
+
+ node1.stop();
+ }
+
+ /**
+ * Remoteable client and service interfaces where the parameter types of one of the operations don't match.
+ * Components running in the seaprate composite/JVM, i.e. there is a remote registry
+ * Both of the interfaces are converted to WSDL and Tuscany is able to detect miss-match.
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testDistributedRemotable() throws Exception {
+
+ // Force the remote default binding to be web services
+ System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding",
+ "{http://docs.oasis-open.org/ns/opencsa/sca/200912}binding.ws");
+
+ String [] contributions = {"./target/classes"};
+ Node node1 = NodeFactory.newInstance().createNode(URI.create("tuscany:InerfaceMissmatchTestCase"),
+ "org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchDistributedClient.composite",
+ contributions);
+ node1.start();
+
+ Node node2 = NodeFactory.newInstance().createNode(URI.create("tuscany:InerfaceMissmatchTestCase"),
+ "org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchDistributedService.composite",
+ contributions);
+ // for default binding on node2 to use a different port from node 1(which will default to 8080
+ ((NodeImpl)node2).getConfiguration().addBinding(WebServiceBinding.TYPE, "http://localhost:8081/");
+ ((NodeImpl)node2).getConfiguration().addBinding(SCABinding.TYPE, "http://localhost:8081/");
+ node2.start();
+
+ ClientComponent local = node1.getService(ClientComponent.class, "DistributedClientComponent");
+ ParameterObject po = new ParameterObject();
+
+ try {
+ local.foo1(po);
+ node1.stop();
+ node2.stop();
+ Assert.fail("Expected exception indicating that interfaces don't match");
+ } catch (ServiceRuntimeException ex){
+ node1.stop();
+ node2.stop();
+ Assert.assertTrue(ex.getMessage().startsWith("Unable to bind []"));
+ }
+
+
+ }
+
+ /**
+ * Remoteable client and service interfaces where the parameter types of one of the operations don't match.
+ * Components running in the seaprate composite/JVM, i.e. there is a remote registry
+ * Both of the interfaces are converted to WSDL and Tuscany is able to detect miss-match.
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testCallbackDistributedRemotable() throws Exception {
+
+ // Force the remote default binding to be web services
+ System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding",
+ "{http://docs.oasis-open.org/ns/opencsa/sca/200912}binding.ws");
+
+ String [] contributions = {"./target/classes"};
+ Node node1 = NodeFactory.newInstance().createNode(URI.create("tuscany:InerfaceMissmatchTestCase"),
+ "org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchDistributedClient.composite",
+ contributions);
+ node1.start();
+
+ Node node2 = NodeFactory.newInstance().createNode(URI.create("tuscany:InerfaceMissmatchTestCase"),
+ "org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchCallbackDistributedService.composite",
+ contributions);
+ // for default binding on node2 to use a different port from node 1(which will default to 8080
+ ((NodeImpl)node2).getConfiguration().addBinding(WebServiceBinding.TYPE, "http://localhost:8081/");
+ ((NodeImpl)node2).getConfiguration().addBinding(SCABinding.TYPE, "http://localhost:8081/");
+ node2.start();
+
+ ClientComponent local = node1.getService(ClientComponent.class, "DistributedClientComponent");
+ ParameterObject po = new ParameterObject();
+
+ try {
+ local.foo1(po);
+ node1.stop();
+ node2.stop();
+ Assert.fail("Expected exception indicating that interfaces don't match");
+ } catch (ServiceRuntimeException ex){
+ node1.stop();
+ node2.stop();
+ Assert.assertTrue(ex.getMessage().startsWith("Unable to bind []"));
+ }
+ }
+
+ /**
+ * Remotable client and service interfaces where the interfaces match and the service and reference
+ * have missmatching policy.
+ * Components running in the separate composite/JVM, i.e. there is a remote registry
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testPolicyDistributedRemotable() throws Exception {
+
+
+ String [] contributions = {"./target/classes"};
+ Node node1 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
+ "org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchPolicyDistributedClient.composite",
+ contributions);
+ node1.start();
+
+ Node node2 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
+ "org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchPolicyDistributedService.composite",
+ contributions);
+ // force binding.ws on node2 to use a different port from node 1(which will default to 8080
+ ((NodeImpl)node2).getConfiguration().addBinding(WebServiceBinding.TYPE, "http://localhost:8081/");
+ node2.start();
+
+ ClientComponent local = node1.getService(ClientComponent.class, "DistributedClientComponent");
+ ParameterObject po = new ParameterObject();
+
+ try {
+ String response = local.foo1(po);
+ node1.stop();
+ node2.stop();
+ Assert.fail("Expected exception indicating that interfaces don't match");
+ } catch (ServiceRuntimeException ex){
+ node1.stop();
+ node2.stop();
+ Assert.assertTrue(ex.getMessage().startsWith("Unable to bind []"));
+ }
+
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfaceWriteTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfaceWriteTestCase.java
new file mode 100644
index 0000000000..9f6c1edbb0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interface-matching/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfaceWriteTestCase.java
@@ -0,0 +1,110 @@
+/*
+ * 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.itest.interfaces;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.net.URI;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import junit.framework.Assert;
+
+
+
+import org.apache.tuscany.sca.assembly.Component;
+import org.apache.tuscany.sca.assembly.Service;
+import org.apache.tuscany.sca.assembly.xml.InterfaceContractProcessor;
+import org.apache.tuscany.sca.contribution.processor.ProcessorContext;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+
+import org.apache.tuscany.sca.interfacedef.InterfaceContract;
+import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
+import org.apache.tuscany.sca.interfacedef.impl.InterfaceContractMapperImpl;
+import org.apache.tuscany.sca.interfacedef.util.Audit;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+import org.junit.Test;
+
+public class InterfaceWriteTestCase {
+
+ /**
+ * Looks at writing and reading the Tuscany interface model
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testInterfaceWriteRead() throws Exception {
+ String [] contributions = {"./target/classes"};
+ NodeImpl node1 = (NodeImpl)NodeFactory.newInstance().createNode(URI.create("uri:default"),
+ "org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchDistributedService.composite",
+ contributions);
+ node1.start();
+
+ Component serviceComponent = node1.getDomainComposite().getComponents().get(0);
+ Service service = serviceComponent.getServices().get(0);
+
+ InterfaceContractProcessor processor = new InterfaceContractProcessor(node1.getExtensionPointRegistry());
+ ProcessorContext context = new ProcessorContext();
+
+ FactoryExtensionPoint modelFactories = node1.getExtensionPointRegistry().getExtensionPoint(FactoryExtensionPoint.class);
+
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ XMLOutputFactory outputFactory = modelFactories.getFactory(XMLOutputFactory.class);
+ XMLStreamWriter writer = outputFactory.createXMLStreamWriter(bos);
+ processor.write(service.getInterfaceContract(), writer, context);
+ writer.close();
+
+ String xml = bos.toString();
+ System.out.println("Written ouput is:\n" + xml);
+
+ ByteArrayInputStream bis = new ByteArrayInputStream(xml.getBytes());
+ XMLInputFactory inputFactory = modelFactories.getFactory(XMLInputFactory.class);
+ XMLStreamReader reader = inputFactory.createXMLStreamReader(bis);
+ InterfaceContract interfaceContract = processor.read(reader, context);
+
+ bos = new ByteArrayOutputStream();
+ writer = outputFactory.createXMLStreamWriter(bos);
+ processor.write(interfaceContract, writer, context);
+ writer.close();
+
+ System.out.println("Read ouput is:\n" + bos);
+
+ InterfaceContractMapper interfaceContractMapper = new InterfaceContractMapperImpl(node1.getExtensionPointRegistry());
+
+ Audit matchAudit = new Audit();
+ boolean match = false;
+ match = interfaceContractMapper.isCompatibleSubset(service.getInterfaceContract(),
+ interfaceContract,
+ matchAudit);
+
+ if (!match){
+ System.out.println(matchAudit.toString());
+ }
+
+ Assert.assertTrue(match);
+
+ node1.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/pom.xml
new file mode 100644
index 0000000000..aac4bd81f6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/pom.xml
@@ -0,0 +1,39 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-interfaces</artifactId>
+ <name>Apache Tuscany SCA iTest Interface</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/Helloworld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/Helloworld.java
new file mode 100644
index 0000000000..1129b16310
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/Helloworld.java
@@ -0,0 +1,25 @@
+/*
+ * 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.itest.interfaces;
+
+public interface Helloworld {
+
+ String sayHello(String name);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/HelloworldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/HelloworldImpl.java
new file mode 100644
index 0000000000..c21a305e40
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/HelloworldImpl.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.interfaces;
+
+public class HelloworldImpl implements Helloworld {
+
+ public String sayHello(String name) {
+ return "Hello " + name;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackInterface.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackInterface.java
new file mode 100644
index 0000000000..f4131593d5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackInterface.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.interfaces;
+
+/**
+ * only for callBack
+ */
+public interface LocalCallbackInterface {
+
+ void callbackMethod(String str);
+
+ void modifyParameter(ParameterObject po);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponent.java
new file mode 100644
index 0000000000..3c7a398abd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponent.java
@@ -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.itest.interfaces;
+
+import org.oasisopen.sca.annotation.OneWay;
+
+/*
+ * itest for interface: local,method-overloading
+ */
+public interface LocalClientComponent {
+
+ String foo1(ParameterObject po);
+
+ String foo2(String str) throws Exception;
+
+ String foo3(String str, int i);
+
+ String foo4(int i, String str) throws Exception;
+
+ void callback(String str);
+
+ void callModifyParameter();
+
+ @OneWay
+ void onewayMethod(String str);
+
+ String getCallbackValue();
+
+ String getOnewayValue();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponentImpl.java
new file mode 100644
index 0000000000..fc88c4f119
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponentImpl.java
@@ -0,0 +1,83 @@
+/*
+ * 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.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(LocalClientComponent.class)
+public class LocalClientComponentImpl implements LocalClientComponent, LocalCallbackInterface {
+
+ @Reference
+ protected LocalServiceComponent aCallBackService;
+ private static String callbackValue;
+ private static String onewayValue;
+
+ public String foo1(ParameterObject po) {
+ po.field1 = "AComponent";
+ return "AComponent";
+ }
+
+ public String foo2(String str) throws Exception {
+ return str + "AComponent";
+ }
+
+ public String foo3(String str, int i) {
+ return str + "AComponent" + i;
+ }
+
+ public String foo4(int i, String str) throws Exception {
+ return str + "AComponent" + i;
+ }
+
+ public void callback(String str) {
+ aCallBackService.callback(str);
+ }
+
+ public void callbackMethod(String str) {
+ callbackValue = str;
+ }
+
+ public void callModifyParameter() {
+ this.aCallBackService.modifyParameter();
+ }
+
+ public String getCallbackValue() {
+ return callbackValue;
+ }
+
+ public void onewayMethod(String str) {
+ onewayValue = str;
+ try {
+ Thread.sleep(200);
+ } catch (Exception e) {
+ //do nothing
+ }
+ }
+
+ public String getOnewayValue() {
+ return onewayValue;
+ }
+
+ public void modifyParameter(ParameterObject po) {
+ po.field1 = "AComponent";
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponent.java
new file mode 100644
index 0000000000..05a9d09bdd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponent.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Callback;
+
+/**
+ * Local be-directional callBackService
+ */
+@Callback(LocalCallbackInterface.class)
+public interface LocalServiceComponent {
+
+ String foo(String str);
+
+ void callback(String str);
+
+ void modifyParameter();
+
+ ParameterObject getPO();
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponentImpl.java
new file mode 100644
index 0000000000..ab0b18191c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponentImpl.java
@@ -0,0 +1,49 @@
+/*
+ * 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.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(LocalServiceComponent.class)
+public class LocalServiceComponentImpl implements LocalServiceComponent {
+
+ @Callback
+ protected LocalCallbackInterface callback;
+
+ private static ParameterObject po;
+
+ public void callback(String str) {
+ callback.callbackMethod(str);
+ }
+
+ public void modifyParameter() {
+ po = new ParameterObject("CallBack");
+ callback.modifyParameter(po);
+ }
+
+ public String foo(String str) {
+ return str;
+ }
+
+ public ParameterObject getPO() {
+ return po;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/ParameterObject.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/ParameterObject.java
new file mode 100644
index 0000000000..724d94dffb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/ParameterObject.java
@@ -0,0 +1,48 @@
+/*
+ * 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.itest.interfaces;
+
+import java.io.Serializable;
+
+public class ParameterObject implements Serializable {
+ private static final long serialVersionUID = 1L;
+ public String field1;
+
+ public ParameterObject() {
+ this.field1 = null;
+ }
+
+ public ParameterObject(String field1) {
+ this.field1 = field1;
+ }
+
+ public boolean equals(Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (o instanceof ParameterObject) {
+ ParameterObject other = (ParameterObject)o;
+ if (field1 != null) {
+ return field1.equals(other.field1);
+ }
+ }
+ return false;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteCallbackInterface.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteCallbackInterface.java
new file mode 100644
index 0000000000..be3fa4c15a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteCallbackInterface.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * only for callBack
+ */
+@Remotable
+public interface RemoteCallbackInterface {
+
+ void callbackMethod(String str);
+
+ void modifyParameter(ParameterObject po);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponent.java
new file mode 100644
index 0000000000..9f34dfd274
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponent.java
@@ -0,0 +1,64 @@
+/*
+ * 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.
+ */
+/*
+ * 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.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/*
+ * different signatures
+ */
+
+@Remotable
+public interface RemoteClientComponent {
+
+ String foo1(ParameterObject po);
+
+ String foo3(ParameterObject po);
+
+ String foo2(int i, String str1) throws Exception;
+
+ void callback(String str);
+
+ void callModifyParameter();
+
+ String getCallbackValue();
+
+ void onewayMethod(String str);
+
+ String getOnewayValue();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponentImpl.java
new file mode 100644
index 0000000000..efeb6f91fe
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteClientComponentImpl.java
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.interfaces;
+
+import org.oasisopen.sca.annotation.AllowsPassByReference;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(RemoteClientComponent.class)
+public class RemoteClientComponentImpl implements RemoteClientComponent, RemoteCallbackInterface {
+
+ @Reference
+ @AllowsPassByReference
+ protected RemoteServiceComponent aCallBackService;
+ private static String callbackValue;
+ private static String onewayValue;
+
+ public String foo1(ParameterObject po) {
+ po.field1 = "BComponent";
+ return "BComponent";
+ }
+
+ @AllowsPassByReference
+ public String foo3(ParameterObject po) {
+ po.field1 = "BComponent";
+ return "BComponent";
+ }
+
+ public String foo2(int i, String str) throws Exception {
+ return str + "BComponent" + i;
+ }
+
+ public void callback(String str) {
+ aCallBackService.callback(str);
+ }
+
+ public void callModifyParameter() {
+ this.aCallBackService.modifyParameter();
+ }
+
+ public void callbackMethod(String str) {
+ callbackValue = str;
+ }
+
+ public String getCallbackValue() {
+ return callbackValue;
+ }
+
+ public void onewayMethod(String str) {
+ onewayValue = str;
+ try {
+ Thread.sleep(200);
+ } catch (Exception e) {
+ //do nothing
+ }
+ }
+
+ public String getOnewayValue() {
+ return onewayValue;
+ }
+
+ public void modifyParameter(ParameterObject po) {
+ po.field1 = "BComponent";
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponent.java
new file mode 100644
index 0000000000..b29b298ab6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponent.java
@@ -0,0 +1,38 @@
+/*
+ * 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.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+@Callback(RemoteCallbackInterface.class)
+public interface RemoteServiceComponent {
+
+ String foo(String str);
+
+ void callback(String str);
+
+ void modifyParameter();
+
+ ParameterObject getPO();
+
+ String[] bar(int[][] intArray);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponentImpl.java
new file mode 100644
index 0000000000..00a0f5645b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/java/org/apache/tuscany/sca/itest/interfaces/RemoteServiceComponentImpl.java
@@ -0,0 +1,54 @@
+/*
+ * 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.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(RemoteServiceComponent.class)
+public class RemoteServiceComponentImpl implements RemoteServiceComponent {
+
+ @Callback
+ protected RemoteCallbackInterface callback;
+
+ private static ParameterObject po;
+
+ public void callback(String str) {
+ callback.callbackMethod(str);
+ }
+
+ public void modifyParameter() {
+ po = new ParameterObject("CallBack");
+ callback.modifyParameter(po);
+ }
+
+ public String foo(String str) {
+ return str;
+ }
+
+ public ParameterObject getPO() {
+ return po;
+ }
+
+ public String[] bar(int[][] intArray) {
+ return new String[] {"int"};
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/resources/org/apache/tuscany/sca/itest/interfaces/invalid/InvalidRemoteAttribute.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/resources/org/apache/tuscany/sca/itest/interfaces/invalid/InvalidRemoteAttribute.composite
new file mode 100644
index 0000000000..da5700aa35
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/resources/org/apache/tuscany/sca/itest/interfaces/invalid/InvalidRemoteAttribute.composite
@@ -0,0 +1,28 @@
+<?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
+ * 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:foo="http://foo" targetNamespace="http://foo"
+ name="InvalidRemoteAttribute" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <component name="RemoteServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.RemoteServiceComponentImpl" />
+ <service name="RemoteServiceComponent">
+ <interface.java interface="org.apache.tuscany.sca.itest.interfaces.RemoteServiceComponent" remotable="false"/>
+ </service>
+ </component>
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/resources/org/apache/tuscany/sca/itest/interfaces/remoteoverride/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/resources/org/apache/tuscany/sca/itest/interfaces/remoteoverride/helloworld.composite
new file mode 100644
index 0000000000..cbeee0abd4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/resources/org/apache/tuscany/sca/itest/interfaces/remoteoverride/helloworld.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://sample"
+ name="helloworld-contribution">
+
+ <component name="HelloworldComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.HelloworldImpl"/>
+ <service name="HelloworldImpl">
+ <interface.java interface="org.apache.tuscany.sca.itest.interfaces.Helloworld" remotable="true"/>
+ <binding.ws/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/resources/org/apache/tuscany/sca/itest/interfaces/valid/InterfacesTest.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/resources/org/apache/tuscany/sca/itest/interfaces/valid/InterfacesTest.composite
new file mode 100644
index 0000000000..e9267b75d3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/main/resources/org/apache/tuscany/sca/itest/interfaces/valid/InterfacesTest.composite
@@ -0,0 +1,40 @@
+<?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
+ * 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:foo="http://foo" targetNamespace="http://foo"
+ name="InterfacesTest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <component name="LocalClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.LocalClientComponentImpl" />
+ <reference name="aCallBackService" target="LocalServiceComponent" />
+ </component>
+
+ <component name="RemoteClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.RemoteClientComponentImpl" />
+ <reference name="aCallBackService" target="RemoteServiceComponent" />
+ </component>
+
+ <component name="LocalServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.LocalServiceComponentImpl" />
+ </component>
+
+ <component name="RemoteServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.RemoteServiceComponentImpl" />
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java
new file mode 100644
index 0000000000..1bc047092a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InterfacesTestCase.java
@@ -0,0 +1,136 @@
+/*
+ * 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.itest.interfaces;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.io.File;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class InterfacesTestCase {
+ private static final String PKG = "org/apache/tuscany/sca/itest/interfaces/valid";
+ private static String ROOT = new File("target/classes/" + PKG).toURI().toString();
+
+ private static Node node;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ String location = ROOT;
+ node = NodeFactory.newInstance().createNode("InterfacesTest.composite", new Contribution("c1", location));
+ node.start();
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testLocalClient() {
+ LocalServiceComponent service = node.getService(LocalServiceComponent.class, "LocalServiceComponent");
+ LocalClientComponent local = node.getService(LocalClientComponent.class, "LocalClientComponent");
+
+ try {
+ ParameterObject po = new ParameterObject();
+ assertEquals("AComponent", local.foo1(po));
+ assertEquals("AComponent", po.field1);
+
+ assertEquals("AAComponent", local.foo2("A"));
+
+ assertEquals("AAComponent1", local.foo3("A", 1));
+ assertEquals("AAComponent1", local.foo4(1, "A"));
+ } catch (Exception e) {
+ fail();
+ }
+
+ try {
+ // test local callback
+ local.callback("CallBack");
+ Thread.sleep(100);
+ assertEquals("CallBack", local.getCallbackValue());
+
+ local.callModifyParameter();
+ Thread.sleep(100);
+ assertEquals("AComponent", service.getPO().field1);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("CallBack failed");
+ }
+
+ try {
+ local.onewayMethod("OneWay");
+ Thread.sleep(100);
+ assertEquals("OneWay", local.getOnewayValue());
+ } catch (Exception e) {
+ fail("OneWay failed");
+ }
+ }
+
+ @Test
+ public void testRemoteClient() {
+ RemoteServiceComponent service = node.getService(RemoteServiceComponent.class, "RemoteServiceComponent");
+ RemoteClientComponent remote = node.getService(RemoteClientComponent.class, "RemoteClientComponent");
+
+ try {
+ // Test Pass By Value
+ ParameterObject po = new ParameterObject("NotBComponent");
+ assertEquals("BComponent", remote.foo1(po));
+ assertEquals("NotBComponent", po.field1);
+
+ assertEquals("BBComponent1", remote.foo2(1, "B"));
+
+// TODO: TUSCANY-3479, investigate Node/SCAClient pass by reference
+ // Test allowsPassByReference
+// assertEquals("BComponent", remote.foo3(po));
+// assertEquals("BComponent", po.field1);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+
+ try {
+ remote.callback("CallBack");
+ Thread.sleep(100);
+ assertEquals("CallBack", remote.getCallbackValue());
+
+ remote.callModifyParameter();
+ Thread.sleep(100);
+ assertEquals("CallBack", service.getPO().field1);
+ } catch (Exception e) {
+ fail("CallBack failed");
+ }
+
+ try {
+ remote.onewayMethod("OneWay");
+ Thread.sleep(100);
+ assertEquals("OneWay", remote.getOnewayValue());
+ } catch (Exception e) {
+ fail("OneWay failed");
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InvalidRemoteAttributeTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InvalidRemoteAttributeTestCase.java
new file mode 100644
index 0000000000..5aa8be2f04
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/InvalidRemoteAttributeTestCase.java
@@ -0,0 +1,52 @@
+/*
+ * 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.itest.interfaces;
+
+import java.io.File;
+
+import org.apache.tuscany.sca.interfacedef.InvalidAnnotationException;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.Test;
+
+public class InvalidRemoteAttributeTestCase {
+ private static final String PKG = "org/apache/tuscany/sca/itest/interfaces/invalid";
+ private static String ROOT = new File("target/classes/" + PKG).toURI().toString();
+
+ @Test
+ public void testInvalidRemoteAttribute() throws Exception {
+ Node node = null;
+
+ try {
+ String location = ROOT;
+ node = NodeFactory.newInstance().createNode("InvalidRemoteAttribute.composite", new Contribution("c1", location));
+ node.start();
+ } catch (Exception e) {
+ if (! e.getCause().getClass().equals(InvalidAnnotationException.class)) {
+ throw e;
+ }
+ } finally {
+ if (node != null) {
+ node.stop();
+ }
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/RemoteOverrideTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/RemoteOverrideTestCase.java
new file mode 100644
index 0000000000..ffadeb6dfb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/interfaces/src/test/java/org/apache/tuscany/sca/itest/interfaces/RemoteOverrideTestCase.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.interfaces;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.Assert;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class RemoteOverrideTestCase {
+
+ @Test
+ public void testSayHello() throws NoSuchServiceException, IOException {
+
+ // Run the SCA composite in a Tuscany runtime
+ Node node = TuscanyRuntime.runComposite("helloworld.composite", "target/classes/org/apache/tuscany/sca/itest/interfaces/remoteoverride");
+ try {
+
+ // Get the Helloworld service proxy
+ Helloworld helloworld = node.getService(Helloworld.class, "HelloworldComponent");
+
+ // test that it works as expected
+ Assert.assertEquals("Hello Amelia", helloworld.sayHello("Amelia"));
+
+ // test that has exposed an HTTP endpoint that works as expected
+ // to keep this test simple just do ?wsdl on the endpoint
+ URL url = new URL("http://localhost:8085/HelloworldComponent/HelloworldImpl?wsdl");
+ Assert.assertTrue(read(url.openStream()).contains("address location="));
+
+ } finally {
+ // Stop the Tuscany runtime Node
+ node.stop();
+ }
+ }
+
+ private static String read(InputStream is) throws IOException {
+ BufferedReader reader = null;
+ try {
+ reader = new BufferedReader(new InputStreamReader(is));
+ StringBuffer sb = new StringBuffer();
+ String str;
+ while ((str = reader.readLine()) != null) {
+ sb.append(str);
+ }
+ return sb.toString();
+ } finally {
+ if (reader != null) {
+ reader.close();
+ }
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/pom.xml
new file mode 100644
index 0000000000..679908d163
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/pom.xml
@@ -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.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-java-lifecycle-exceptions</artifactId>
+ <name>Apache Tuscany SCA iTest Java Lifecycle Exceptions</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ </dependencies>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/main/java/itest/ConstructorException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/main/java/itest/ConstructorException.java
new file mode 100644
index 0000000000..bae0bdcd0f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/main/java/itest/ConstructorException.java
@@ -0,0 +1,49 @@
+/*
+ * 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 itest;
+
+import org.oasisopen.sca.annotation.Destroy;
+import org.oasisopen.sca.annotation.Init;
+
+public class ConstructorException implements Service {
+
+ public static boolean initRun;
+ public static boolean destroyRun;
+ public static boolean doitRun;
+
+ public ConstructorException() {
+ throw new RuntimeException();
+ }
+
+ public void doit() {
+ doitRun = true;
+ }
+
+ @Init
+ public void init() {
+ initRun = true;
+ }
+
+ @Destroy
+ public void destroy() {
+ destroyRun = true;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/main/java/itest/DestroyCompositeScopeException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/main/java/itest/DestroyCompositeScopeException.java
new file mode 100644
index 0000000000..b5d463a1aa
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/main/java/itest/DestroyCompositeScopeException.java
@@ -0,0 +1,58 @@
+/*
+ * 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 itest;
+
+import org.oasisopen.sca.annotation.Destroy;
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Scope;
+
+@Scope("COMPOSITE")
+public class DestroyCompositeScopeException implements Service {
+
+ public static boolean initRun;
+ public static boolean destroyRun;
+ public static boolean doitRun;
+ public static int count = 0;
+
+ public void doit() {
+ doitRun = true;
+ if (!initRun) {
+ throw new RuntimeException("initRun false");
+ }
+ if (destroyRun) {
+ throw new RuntimeException("destroyRun true");
+ }
+ }
+
+ @Init
+ public void init() {
+ initRun = true;
+ }
+
+ @Destroy
+ public void destroy() {
+ destroyRun = true;
+ if (count++ < 1) {
+ throw new NullPointerException();
+ // throw new RuntimeException("bang");
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/main/java/itest/InitCompositeScopeException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/main/java/itest/InitCompositeScopeException.java
new file mode 100644
index 0000000000..58aeb96c3c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/main/java/itest/InitCompositeScopeException.java
@@ -0,0 +1,57 @@
+/*
+ * 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 itest;
+
+import org.oasisopen.sca.annotation.Destroy;
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Scope;
+
+@Scope("COMPOSITE")
+public class InitCompositeScopeException implements Service {
+
+ public static boolean initRun;
+ public static boolean destroyRun;
+ public static boolean doitRun;
+ public static int count = 0;
+
+ public void doit() {
+ doitRun = true;
+ if (!initRun) {
+ throw new RuntimeException("initRun false");
+ }
+ if (destroyRun) {
+ throw new RuntimeException("destroyRun true");
+ }
+ }
+
+ @Init
+ public void init() {
+ initRun = true;
+ if (count++ < 1) {
+ throw new RuntimeException("bang");
+ }
+ }
+
+ @Destroy
+ public void destroy() {
+ destroyRun = true;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/main/java/itest/InitStatelessScopeException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/main/java/itest/InitStatelessScopeException.java
new file mode 100644
index 0000000000..a976f805a0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/main/java/itest/InitStatelessScopeException.java
@@ -0,0 +1,57 @@
+/*
+ * 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 itest;
+
+import org.oasisopen.sca.annotation.Destroy;
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Scope;
+
+@Scope("STATELESS")
+public class InitStatelessScopeException implements Service {
+
+ public static boolean initRun;
+ public static boolean destroyRun;
+ public static boolean doitRun;
+ public static int count = 0;
+
+ public void doit() {
+ doitRun = true;
+ if (!initRun) {
+ throw new RuntimeException("initRun false");
+ }
+ if (destroyRun) {
+ throw new RuntimeException("destroyRun true");
+ }
+ }
+
+ @Init
+ public void init() {
+ initRun = true;
+ if (count++ < 1) {
+ throw new RuntimeException("bang");
+ }
+ }
+
+ @Destroy
+ public void destroy() {
+ destroyRun = true;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/main/java/itest/OkImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/main/java/itest/OkImpl.java
new file mode 100644
index 0000000000..823b771923
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/main/java/itest/OkImpl.java
@@ -0,0 +1,52 @@
+/*
+ * 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 itest;
+
+import org.oasisopen.sca.annotation.Destroy;
+import org.oasisopen.sca.annotation.Init;
+
+public class OkImpl implements Service {
+
+ public static boolean initRun;
+ public static boolean destroyRun;
+
+ public OkImpl() {
+ }
+
+ public void doit() {
+ if (!initRun) {
+ throw new RuntimeException("initRun false");
+ }
+ if (destroyRun) {
+ throw new RuntimeException("destroyRun true");
+ }
+ }
+
+ @Init
+ public void init() {
+ initRun = true;
+ }
+
+ @Destroy
+ public void destroy() {
+ destroyRun = true;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/main/java/itest/Service.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/main/java/itest/Service.java
new file mode 100644
index 0000000000..f6f292c4c8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/main/java/itest/Service.java
@@ -0,0 +1,26 @@
+/*
+ * 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 itest;
+
+public interface Service {
+
+ void doit();
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/main/resources/test.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/main/resources/test.composite
new file mode 100644
index 0000000000..fa93989fa0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/main/resources/test.composite
@@ -0,0 +1,49 @@
+<?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"
+ targetNamespace="http://itest"
+ xmlns:itest="http://itest"
+ name="Test">
+
+ <component name="OkService">
+ <implementation.java class="itest.OkImpl"/>
+ </component>
+
+ <component name="ConstructorException">
+ <implementation.java class="itest.ConstructorException"/>
+ </component>
+
+ <component name="InitCompositeScopeException">
+ <implementation.java class="itest.InitCompositeScopeException"/>
+ </component>
+
+ <component name="InitStatelessScopeException">
+ <implementation.java class="itest.InitStatelessScopeException"/>
+ </component>
+
+ <component name="DestroyCompositeScopeException">
+ <implementation.java class="itest.DestroyCompositeScopeException"/>
+ </component>
+
+ <component name="DestroyCompositeScopeException2">
+ <implementation.java class="itest.DestroyCompositeScopeException"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/test/java/itest/InitTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/test/java/itest/InitTestCase.java
new file mode 100644
index 0000000000..afb6b5fad8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/java-lifecycle-exceptions/src/test/java/itest/InitTestCase.java
@@ -0,0 +1,161 @@
+/*
+ * 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 itest;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import junit.framework.Assert;
+
+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;
+
+/**
+ */
+public class InitTestCase {
+
+ private Node node;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode("test.composite", new Contribution("test", "target/classes"));
+ node.start();
+ }
+
+ @Test
+ public void testOk() throws Exception {
+ Service client1 = node.getService(Service.class, "OkService");
+ client1.doit();
+ assertTrue(OkImpl.initRun);
+ assertTrue(OkImpl.destroyRun); // its stateless so destory is called after every service invocations
+ }
+
+ @Test
+ public void testConstructorException() throws Exception {
+ Service client1 = node.getService(Service.class, "ConstructorException");
+ try {
+ client1.doit();
+ fail();
+ } catch (RuntimeException e) {
+ // expected
+ }
+ assertFalse(ConstructorException.initRun);
+ assertFalse(ConstructorException.doitRun);
+ assertFalse(ConstructorException.destroyRun);
+ }
+
+ @Test
+ public void testInitCompositeScopeException() throws Exception {
+ Service client1 = node.getService(Service.class, "InitCompositeScopeException");
+ try {
+ client1.doit();
+ fail();
+ } catch (RuntimeException e) {
+ // expected
+ }
+ assertTrue(InitCompositeScopeException.initRun);
+ assertFalse(InitCompositeScopeException.doitRun);
+ assertTrue(InitCompositeScopeException.destroyRun);
+
+ // reset and try again to verify init init still gets run again
+ InitCompositeScopeException.initRun = false;
+ InitCompositeScopeException.doitRun = false;
+ InitCompositeScopeException.destroyRun = false;
+
+ client1.doit();
+
+ assertTrue(InitCompositeScopeException.initRun);
+ assertTrue(InitCompositeScopeException.doitRun);
+ node.stop();
+ node = null;
+ assertTrue(InitCompositeScopeException.destroyRun);
+ }
+
+ @Test
+ public void testInitStatelessScopeException() throws Exception {
+ Service client1 = node.getService(Service.class, "InitStatelessScopeException");
+ try {
+ client1.doit();
+ fail();
+ } catch (RuntimeException e) {
+ // expected
+ }
+ assertTrue(InitStatelessScopeException.initRun);
+ assertFalse(InitStatelessScopeException.doitRun);
+ assertTrue(InitStatelessScopeException.destroyRun);
+
+ // reset and try again to verify init init still gets run again
+ InitStatelessScopeException.initRun = false;
+ InitStatelessScopeException.doitRun = false;
+ InitStatelessScopeException.destroyRun = false;
+
+ client1.doit();
+
+ assertTrue(InitStatelessScopeException.initRun);
+ assertTrue(InitStatelessScopeException.doitRun);
+ node.stop();
+ node = null;
+ assertTrue(InitStatelessScopeException.destroyRun);
+ }
+
+ @Test
+ public void testDestroyCompositeScopeException() throws Exception {
+ Service client1 = node.getService(Service.class, "DestroyCompositeScopeException");
+ try {
+ client1.doit();
+ } catch (RuntimeException e) {
+ fail();
+ }
+ assertTrue(DestroyCompositeScopeException.initRun);
+ assertTrue(DestroyCompositeScopeException.doitRun);
+ assertFalse(DestroyCompositeScopeException.destroyRun);
+
+ Service client2 = node.getService(Service.class, "DestroyCompositeScopeException2");
+ try {
+ client2.doit();
+ } catch (RuntimeException e) {
+ fail();
+ }
+
+ // close the domain to case @Destroy to run
+ try {
+ node.stop();
+ } catch (RuntimeException e) {
+ e.printStackTrace();
+ fail();
+ }
+ node = null;
+
+ // check that it has run twice
+ // The first run having caused an exception
+ assertTrue(DestroyCompositeScopeException.destroyRun);
+ Assert.assertEquals(2, DestroyCompositeScopeException.count);
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/pom.xml
new file mode 100644
index 0000000000..3e74054bcc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/pom.xml
@@ -0,0 +1,53 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jaxws-asyncclient</artifactId>
+ <name>Apache Tuscany JAX-WS Integration Tests</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0.1</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/src/main/java/stock/StockQuote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/src/main/java/stock/StockQuote.java
new file mode 100644
index 0000000000..4e55bae98d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/src/main/java/stock/StockQuote.java
@@ -0,0 +1,36 @@
+package stock;
+/*
+ * 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.
+ */
+
+
+
+import javax.jws.WebService;
+
+/**
+ * JAX-WS Async style Stock quote interface
+ *
+ * @version $Rev: 828277 $ $Date: 2009-10-22 02:40:52 +0100 (Thu, 22 Oct 2009) $
+ */
+
+@WebService
+public interface StockQuote {
+
+ float getPrice(String ticker);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteClient.java
new file mode 100644
index 0000000000..0bf3328c31
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteClient.java
@@ -0,0 +1,69 @@
+/*
+ * 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 stock;
+
+import java.util.concurrent.ExecutionException;
+
+import javax.xml.ws.AsyncHandler;
+import javax.xml.ws.Response;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class StockQuoteClient {
+
+ @Reference public StockQuoteRef stockQuote;
+
+ public float getPrice(String ticker) {
+ return stockQuote.getPrice(ticker);
+ }
+
+ public float getPriceAsyncPoll(String ticker) throws InterruptedException, ExecutionException {
+ Response<Float> response = stockQuote.getPriceAsync("foo");
+ return response.get();
+ }
+
+ float price = 0f;
+ Object mutex = new Object();
+ Exception exception;
+
+ public float getPriceAsyncCallback(String ticker) throws Exception {
+ AsyncHandler<Float> callback = new AsyncHandler<Float>() {
+ public void handleResponse(Response<Float> arg) {
+ synchronized (mutex) {
+ try {
+ price = arg.get();
+ } catch (Exception e) {
+ exception = e;
+ }
+ mutex.notify();
+ }
+ }
+ };
+ stockQuote.getPriceAsync("foo", callback);
+ synchronized (mutex) {
+ if (price == 0f)
+ mutex.wait(5000); // wait for up to 5 seconds
+ }
+
+ if (exception != null) throw exception;
+ return price;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteImpl.java
new file mode 100644
index 0000000000..a43b85361b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteImpl.java
@@ -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 stock;
+
+
+/**
+ * Stock quote impl
+ *
+ * @version $Rev: 828277 $ $Date: 2009-10-22 02:40:52 +0100 (Thu, 22 Oct 2009) $
+ */
+public class StockQuoteImpl implements StockQuote {
+
+ public float getPrice(String ticker) {
+ return 10;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteRef.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteRef.java
new file mode 100644
index 0000000000..b15ab6be08
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/src/main/java/stock/StockQuoteRef.java
@@ -0,0 +1,39 @@
+package stock;
+/*
+ * 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.
+ */
+
+
+
+import java.util.concurrent.Future;
+
+import javax.xml.ws.AsyncHandler;
+import javax.xml.ws.Response;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * JAX-WS Async style Stock quote interface
+ */
+@Remotable
+public interface StockQuoteRef extends StockQuote {
+
+ Response<Float> getPriceAsync(String ticker);
+
+ Future<?> getPriceAsync(String ticker, AsyncHandler<Float> callback);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..b30367319d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/src/main/resources/META-INF/sca-contribution.xml
@@ -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://itest/jaxws">
+ <deployable composite="itest:jaxwsAsync"/>
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/src/main/resources/StockQuote.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/src/main/resources/StockQuote.composite
new file mode 100644
index 0000000000..548b7a9da5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/src/main/resources/StockQuote.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * 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:foo="http://itest/jaxws"
+ targetNamespace="http://itest/jaxws"
+ name="jaxwsAsync">
+
+ <component name="StockQuote">
+ <implementation.java class="stock.StockQuoteImpl" />
+ </component>
+
+ <component name="StockQuoteClient">
+ <implementation.java class="stock.StockQuoteClient" />
+ <reference name="stockQuote" target="StockQuote" />
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/src/test/java/itest/AsyncServiceTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/src/test/java/itest/AsyncServiceTestCase.java
new file mode 100644
index 0000000000..eb72924093
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws-asyncclient/src/test/java/itest/AsyncServiceTestCase.java
@@ -0,0 +1,67 @@
+package itest;
+import java.util.concurrent.ExecutionException;
+
+import junit.framework.Assert;
+
+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 stock.StockQuoteClient;
+
+/*
+ * 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.
+ */
+
+public class AsyncServiceTestCase {
+
+ private Node node;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+
+ @Test
+ public void invokeRPC() {
+ StockQuoteClient sc = node.getService(StockQuoteClient.class, "StockQuoteClient");
+ Assert.assertEquals(10.0f, sc.getPrice("foo"));
+ }
+
+ @Test
+ public void invokeAsyncPoll() throws InterruptedException, ExecutionException {
+ StockQuoteClient sc = node.getService(StockQuoteClient.class, "StockQuoteClient");
+ Assert.assertEquals(10.0f, sc.getPriceAsyncPoll("foo"));
+ }
+
+ @Test
+ public void invokeAsyncCallback() throws Exception {
+ StockQuoteClient sc = node.getService(StockQuoteClient.class, "StockQuoteClient");
+ Assert.assertEquals(10.0f, sc.getPriceAsyncCallback("foo"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws/pom.xml
new file mode 100644
index 0000000000..8d062d9c38
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws/pom.xml
@@ -0,0 +1,53 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jaxws</artifactId>
+ <name>Apache Tuscany SCA iTest JAX-WS Integration Tests</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0.1</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws/src/test/java/stock/AsyncServiceTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws/src/test/java/stock/AsyncServiceTestCase.java
new file mode 100644
index 0000000000..e1c2bedea3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws/src/test/java/stock/AsyncServiceTestCase.java
@@ -0,0 +1,42 @@
+package stock;
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.Test;
+
+/*
+ * 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.
+ */
+
+public class AsyncServiceTestCase {
+
+ @Test
+ public void init() throws Exception {
+ try{
+ String location = ContributionLocationHelper.getContributionLocation("StockQuote.composite");
+ Node node = NodeFactory.newInstance().createNode("StockQuote.composite", new Contribution("c1", location));
+ node.start();
+ node.stop();
+ } catch (Exception e) {
+ Assert.assertTrue(e.getMessage().contains("[JCA100006]"));
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws/src/test/java/stock/StockQuote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws/src/test/java/stock/StockQuote.java
new file mode 100644
index 0000000000..74e25bb3bd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws/src/test/java/stock/StockQuote.java
@@ -0,0 +1,45 @@
+package stock;
+/*
+ * 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.
+ */
+
+
+
+import java.util.concurrent.Future;
+
+import javax.jws.WebService;
+import javax.xml.ws.AsyncHandler;
+import javax.xml.ws.Response;
+
+/**
+ * JAX-WS Async style Stock quote interface
+ *
+ * @version $Rev$ $Date$
+ */
+
+@WebService
+public interface StockQuote {
+
+ float getPrice(String ticker);
+
+ Response<Float> getPriceAsync(String ticker);
+
+ Future<?> getPriceAsync(String ticker, AsyncHandler<Float> callback);
+
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws/src/test/java/stock/StockQuoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws/src/test/java/stock/StockQuoteImpl.java
new file mode 100644
index 0000000000..516c63d864
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws/src/test/java/stock/StockQuoteImpl.java
@@ -0,0 +1,46 @@
+/*
+ * 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 stock;
+
+import java.util.concurrent.Future;
+
+import javax.xml.ws.AsyncHandler;
+import javax.xml.ws.Response;
+
+/**
+ * Stock quote impl
+ *
+ * @version $Rev$ $Date$
+ */
+public class StockQuoteImpl implements StockQuote {
+
+ public float getPrice(String ticker) {
+ return 10;
+ }
+
+ public Response<Float> getPriceAsync(String ticker) {
+ return null;
+ }
+
+ public Future<?> getPriceAsync(String ticker, AsyncHandler<Float> callback) {
+ return null;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws/src/test/resources/StockQuote.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws/src/test/resources/StockQuote.composite
new file mode 100644
index 0000000000..c8c7719dfa
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jaxws/src/test/resources/StockQuote.composite
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * 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:foo="http://itest/jaxws"
+ targetNamespace="http://itest/jaxws"
+ name="jaxwsAsync">
+
+ <component name="StockQuote">
+ <implementation.java class="stock.StockQuoteImpl" />
+ <service name="StockQuote">
+ <interface.java interface="stock.StockQuote"/>
+ </service>
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/pom.xml
new file mode 100644
index 0000000000..4ab10f0843
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/pom.xml
@@ -0,0 +1,35 @@
+<?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-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jms-dynamic-replyq</artifactId>
+ <name>Apache Tuscany SCA iTest JMS with dynamic replyq</name>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java
new file mode 100644
index 0000000000..9aef6ba1a3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements the HelloWorld service.
+ */
+@Service(HelloWorldService.class)
+public class HelloWorldClientImpl implements HelloWorldService {
+
+ private HelloWorldService serviceA;
+
+ @Reference
+ public void setServiceA(HelloWorldService service) {
+ this.serviceA = service;
+ }
+
+ public String sayHello(String name) {
+ return serviceA.sayHello(name);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java
new file mode 100644
index 0000000000..430c71aaef
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java
@@ -0,0 +1,26 @@
+/*
+ * 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.jms;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorldService {
+ String sayHello(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..2c6d9d0d17
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ public String sayHello(String name) {
+ if ("bang".equals(name)) {
+ throw new RuntimeException("blem wit");
+ }
+ return "jmsHello " + name;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ce6a9514af
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:itest="http://itest">
+ <deployable composite="itest:SimpleServiceComposite"/>
+ <deployable composite="itest:DynamicComposite"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/main/resources/dynamic/client.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/main/resources/dynamic/client.composite
new file mode 100644
index 0000000000..7f9ed9612f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/main/resources/dynamic/client.composite
@@ -0,0 +1,34 @@
+<?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"
+ targetNamespace="http://itest"
+ name="DynamicComposite">
+
+ <component name="HelloWorldClient">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.HelloWorldClientImpl"/>
+ <reference name="serviceA">
+ <binding.jms>
+ <destination jndiName="DestQueueA"/>
+ <!-- No response destination defined means a temporary queue will be used -->
+ </binding.jms>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..4d6acc037b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/main/resources/jndi.properties
@@ -0,0 +1,39 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+queue.RequestQueue = RequestQueue
+queue.ResponseQueue = ResponseQueue
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/main/resources/simple/service.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/main/resources/simple/service.composite
new file mode 100644
index 0000000000..33364f61c0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/main/resources/simple/service.composite
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://itest"
+ name="SimpleServiceComposite">
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.HelloWorldServiceImpl"/>
+ <service name="HelloWorldService">
+ <binding.jms>
+ <destination jndiName="DestQueueA" create="always">
+ </destination>
+ <response>
+ <destination jndiName="RespQueueA" create="always"/>
+ </response>
+ </binding.jms>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/test/java/org/apache/tuscany/sca/binding/jms/DynamicReplyQTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/test/java/org/apache/tuscany/sca/binding/jms/DynamicReplyQTestCase.java
new file mode 100644
index 0000000000..3bf4e0bc30
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/DynamicReplyQ/src/test/java/org/apache/tuscany/sca/binding/jms/DynamicReplyQTestCase.java
@@ -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.jms;
+
+import static org.junit.Assert.assertEquals;
+
+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;
+
+/**
+ * This shows how to test the JMS binding using a simple HelloWorld application.
+ */
+public class DynamicReplyQTestCase {
+
+ private static Node node;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testHelloWorldCreate() throws Exception {
+ HelloWorldService helloWorldService = node.getService(HelloWorldService.class, "HelloWorldClient");
+ assertEquals("jmsHello Beate", helloWorldService.sayHello("Beate"));
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/pom.xml
new file mode 100644
index 0000000000..f63ba63adf
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/pom.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jms-args</artifactId>
+ <name>Apache Tuscany SCA iTest JMS Args</name>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java
new file mode 100644
index 0000000000..68506b857b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements the OneWay service.
+ */
+@Service(MyService.class)
+public class ClientImpl implements MyService {
+
+ private MyService serviceA;
+
+ @Reference
+ public void setServiceA(MyService service) {
+ this.serviceA = service;
+ }
+
+ public void sayHello(String name, String n2) {
+ serviceA.sayHello(name, n2);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/MyService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/MyService.java
new file mode 100644
index 0000000000..5f19aa1fa5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/MyService.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+import org.oasisopen.sca.annotation.OneWay;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface MyService {
+
+ @OneWay
+ void sayHello(String name, String n2);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/ServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/ServiceImpl.java
new file mode 100644
index 0000000000..18324d5d1d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/src/main/java/org/apache/tuscany/sca/binding/jms/ServiceImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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.jms;
+
+
+public class ServiceImpl implements MyService {
+
+ public static Object lock = new Object();
+ public static String name;
+ public static String n2;
+
+ public void sayHello(String name, String n2) {
+ System.out.println("SelectorServiceImpl1 " + name + n2);
+ ServiceImpl.name = name;
+ ServiceImpl.n2 = n2;
+ synchronized (ServiceImpl.lock) {
+ ServiceImpl.lock.notify();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ac6e94ca21
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/src/main/resources/META-INF/sca-contribution.xml
@@ -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://itest">
+ <deployable composite="itest:DefinitionsTests"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..7f82eb48d3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/src/main/resources/jndi.properties
@@ -0,0 +1,38 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false&broker.useJmx=false&broker.useShutdownHook=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory, ConnectionFactory2
+
+# register some queues in JNDI using the form
+queue.MyService = MyService
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+topic.ServiceTopic = ServiceTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/src/main/resources/selectors/selectors.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/src/main/resources/selectors/selectors.composite
new file mode 100644
index 0000000000..fcda648f1c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/src/main/resources/selectors/selectors.composite
@@ -0,0 +1,38 @@
+<?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"
+ targetNamespace="http://itest"
+ name="DefinitionsTests">
+
+ <component name="Client1">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.ClientImpl"/>
+ <reference name="serviceA">
+ <binding.jms uri="jms:jndi:MyService" />
+ </reference>
+ </component>
+
+ <component name="Service1">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.ServiceImpl"/>
+ <service name="MyService">
+ <binding.jms />
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/src/test/java/org/apache/tuscany/sca/binding/jms/ArgsTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/src/test/java/org/apache/tuscany/sca/binding/jms/ArgsTestCase.java
new file mode 100644
index 0000000000..28e0b530c1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/args/src/test/java/org/apache/tuscany/sca/binding/jms/ArgsTestCase.java
@@ -0,0 +1,62 @@
+/*
+ * 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.jms;
+
+import static org.junit.Assert.assertEquals;
+
+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;
+
+/**
+ */
+public class ArgsTestCase {
+
+ private Node node;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testSayHello() throws Exception {
+ MyService client1 = node.getService(MyService.class, "Client1");
+
+ client1.sayHello("petra", "beate");
+
+ synchronized(ServiceImpl.lock) {
+ if (ServiceImpl.name == null) {
+ ServiceImpl.lock.wait(5000);
+ }
+ }
+
+ assertEquals("petra", ServiceImpl.name);
+ assertEquals("beate", ServiceImpl.n2);
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/pom.xml
new file mode 100644
index 0000000000..4f7ce83392
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/pom.xml
@@ -0,0 +1,34 @@
+<?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-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-jms-callbacks</artifactId>
+ <name>Apache Tuscany SCA iTest JMS Tests For Callbacks</name>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java
new file mode 100644
index 0000000000..d4cd5df431
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms;
+
+
+/**
+ * The client interface
+ */
+public interface JMSClient {
+
+ void aClientMethod();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClientImpl.java
new file mode 100644
index 0000000000..f90db55dda
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClientImpl.java
@@ -0,0 +1,50 @@
+/*
+ * 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.jms;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * Remote Web service client with callback interface
+ */
+@Service(JMSClient.class)
+public class JMSClientImpl implements JMSClient, JMSServiceCallback {
+
+ @Reference protected JMSService myService;
+
+ public static String result;
+ public static Object lock = new Object();
+
+ public void aClientMethod() {
+ System.out.println("aClientMethod " + this + " on thread " + Thread.currentThread());
+ myService.someMethod("-> someMethod"); // calls the server
+ System.out.println("aClientMethod return from someMethod on thread " + Thread.currentThread());
+ }
+
+ public void receiveResult(String result) {
+ System.out.println("receiveResult " + this + " '" + result + "' on thread " + Thread.currentThread());
+ JMSClientImpl.result = result;
+
+ // wakeup the waiting testcase
+ synchronized (lock) {
+ lock.notifyAll();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSService.java
new file mode 100644
index 0000000000..b78feab413
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSService.java
@@ -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.jms;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.OneWay;
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * The remote service that will be invoked by the client
+ */
+@Remotable
+@Callback(JMSServiceCallback.class)
+public interface JMSService {
+
+ @OneWay
+ void someMethod(String arg);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSServiceCallback.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSServiceCallback.java
new file mode 100644
index 0000000000..20b74ccc1a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSServiceCallback.java
@@ -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.jms;
+
+import org.oasisopen.sca.annotation.OneWay;
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * The callback interface for {@link JMSService}.
+ */
+@Remotable
+public interface JMSServiceCallback {
+
+ @OneWay
+ void receiveResult(String result);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSServiceImpl.java
new file mode 100644
index 0000000000..cec4e6fa6d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/java/org/apache/tuscany/sca/binding/jms/JMSServiceImpl.java
@@ -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.binding.jms;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements MyService and uses a callback.
+ */
+@Service(JMSService.class)
+public class JMSServiceImpl implements JMSService {
+
+ private JMSServiceCallback myServiceCallback;
+
+ @Callback
+ public void setMyServiceCallback(JMSServiceCallback myServiceCallback) {
+ System.out.println("setMyServiceCallback on thread " + Thread.currentThread() + " cb: " + myServiceCallback);
+ this.myServiceCallback = myServiceCallback;
+ }
+
+ public void someMethod(String arg) {
+ System.out.println("someMethod '" + arg + "' on thread " + Thread.currentThread());
+ try {
+ myServiceCallback.receiveResult(arg + "-> receiveResult");
+ } catch(Exception e) {
+ System.out.println("RuntimeException invoking receiveResult: " + e.toString());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..68c3bfa4e0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:itest="http://itest">
+ <deployable composite="itest:CallbackClientComposite"/>
+ <deployable composite="itest:CallbackTempQComposite"/>
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..b8c4b1c6aa
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/resources/jndi.properties
@@ -0,0 +1,40 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false&broker.useJmx=false&broker.useShutdownHook=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+queue.ServiceQueue = ServiceQueue
+queue.TQServiceQueue = TQServiceQueue
+queue.CallbackQueue = CallbackQueue
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/resources/simple/client.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/resources/simple/client.composite
new file mode 100644
index 0000000000..64d45f1816
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/resources/simple/client.composite
@@ -0,0 +1,44 @@
+<?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"
+ targetNamespace="http://itest"
+ name="CallbackClientComposite">
+
+ <component name="ClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.JMSClientImpl" />
+ <reference name="myService">
+ <binding.jms uri="jms:jndi:ServiceQueue"/>
+ <callback>
+ <binding.jms uri="jms:jndi:CallbackQueue"/>
+ </callback>
+ </reference>
+ </component>
+
+ <component name="ServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.JMSServiceImpl" />
+ <service name="JMSService">
+ <binding.jms uri="jms:jndi:ServiceQueue"/>
+ <callback>
+ <binding.jms uri="jms:jndi:CallbackQueue"/>
+ </callback>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/resources/simple/tempq.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/resources/simple/tempq.composite
new file mode 100644
index 0000000000..f9bccedfe9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/main/resources/simple/tempq.composite
@@ -0,0 +1,50 @@
+<?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"
+ targetNamespace="http://itest"
+ name="CallbackTempQComposite">
+
+<!--
+
+The client component does not define the callback destination so a temporary queue should be used
+
+-->
+
+ <component name="TQClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.JMSClientImpl" />
+ <reference name="myService">
+ <binding.jms uri="jms:jndi:TQServiceQueue"/>
+ <callback>
+ <binding.jms />
+ </callback>
+ </reference>
+ </component>
+
+ <component name="TQServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.JMSServiceImpl" />
+ <service name="JMSService">
+ <binding.jms uri="jms:jndi:TQServiceQueue"/>
+ <callback>
+ <binding.jms />
+ </callback>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/test/java/org/apache/tuscany/sca/binding/jms/CallbackTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/test/java/org/apache/tuscany/sca/binding/jms/CallbackTestCase.java
new file mode 100644
index 0000000000..1661a4614c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/test/java/org/apache/tuscany/sca/binding/jms/CallbackTestCase.java
@@ -0,0 +1,61 @@
+/*
+ * 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.jms;
+
+import static org.junit.Assert.assertEquals;
+
+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;
+
+/**
+ * This shows how to test the JMS binding using a simple HelloWorld application.
+ */
+public class CallbackTestCase {
+
+ private Node node;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testHelloWorldCreate() throws Exception {
+ JMSClient client = node.getService(JMSClient.class, "ClientComponent");
+
+ client.aClientMethod();
+
+ // wait for up to 5 seconds but should wake up as soon as done
+ synchronized(JMSClientImpl.lock) {
+ JMSClientImpl.lock.wait(5000);
+ }
+
+ assertEquals("-> someMethod-> receiveResult", JMSClientImpl.result);
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/test/java/org/apache/tuscany/sca/binding/jms/TempCallbackQTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/test/java/org/apache/tuscany/sca/binding/jms/TempCallbackQTestCase.java
new file mode 100644
index 0000000000..5897df6784
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/callbacks/src/test/java/org/apache/tuscany/sca/binding/jms/TempCallbackQTestCase.java
@@ -0,0 +1,64 @@
+/*
+ * 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.jms;
+
+import static org.junit.Assert.assertEquals;
+
+import java.net.MalformedURLException;
+
+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;
+
+/**
+ * This shows how to test the JMS binding using a simple HelloWorld application.
+ */
+public class TempCallbackQTestCase {
+
+ private Node node;
+
+ @Before
+ public void init() throws MalformedURLException {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testHelloWorldCreate() throws Exception {
+ JMSClient client = node.getService(JMSClient.class, "ClientComponent");
+
+ client.aClientMethod();
+
+ // wait for up to 5 seconds but should wake up as soon as done
+ synchronized (JMSClientImpl.lock) {
+ JMSClientImpl.lock.wait(5000);
+ }
+
+ assertEquals("-> someMethod-> receiveResult", JMSClientImpl.result);
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/pom.xml
new file mode 100644
index 0000000000..28ceac76fe
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/pom.xml
@@ -0,0 +1,35 @@
+<?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-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jms-defaults</artifactId>
+ <name>Apache Tuscany SCA iTest JMS with Defaults</name>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java
new file mode 100644
index 0000000000..9aef6ba1a3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements the HelloWorld service.
+ */
+@Service(HelloWorldService.class)
+public class HelloWorldClientImpl implements HelloWorldService {
+
+ private HelloWorldService serviceA;
+
+ @Reference
+ public void setServiceA(HelloWorldService service) {
+ this.serviceA = service;
+ }
+
+ public String sayHello(String name) {
+ return serviceA.sayHello(name);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java
new file mode 100644
index 0000000000..430c71aaef
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java
@@ -0,0 +1,26 @@
+/*
+ * 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.jms;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorldService {
+ String sayHello(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..2c6d9d0d17
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ public String sayHello(String name) {
+ if ("bang".equals(name)) {
+ throw new RuntimeException("blem wit");
+ }
+ return "jmsHello " + name;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..f4da034c55
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:itest="http://itest">
+ <deployable composite="itest:DefaultServiceComposite"/>
+ <deployable composite="itest:DefaultClientComposite"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/main/resources/defaults/client.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/main/resources/defaults/client.composite
new file mode 100644
index 0000000000..ebafbb6bcd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/main/resources/defaults/client.composite
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://itest"
+ name="DefaultClientComposite">
+
+ <component name="HelloWorldClient">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.HelloWorldClientImpl"/>
+ <reference name="serviceA">
+ <binding.jms uri="jms:jndi:HelloWorldService" />
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/main/resources/defaults/service.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/main/resources/defaults/service.composite
new file mode 100644
index 0000000000..5354afb130
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/main/resources/defaults/service.composite
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://itest"
+ name="DefaultServiceComposite">
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.HelloWorldServiceImpl"/>
+ <service name="HelloWorldService">
+ <binding.jms />
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..c8b186a83c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/main/resources/jndi.properties
@@ -0,0 +1,38 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+queue.HelloWorldService = HelloWorldService
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/test/java/org/apache/tuscany/sca/binding/jms/DefaultsTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/test/java/org/apache/tuscany/sca/binding/jms/DefaultsTestCase.java
new file mode 100644
index 0000000000..d2b1a5fe59
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/defaults/src/test/java/org/apache/tuscany/sca/binding/jms/DefaultsTestCase.java
@@ -0,0 +1,54 @@
+/*
+ * 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.jms;
+
+import static org.junit.Assert.assertEquals;
+
+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;
+
+/**
+ * This shows how to test the JMS binding using a simple HelloWorld application.
+ */
+public class DefaultsTestCase {
+
+ private Node node;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testHelloWorldCreate() throws Exception {
+ HelloWorldService helloWorldService = node.getService(HelloWorldService.class, "HelloWorldClient");
+ assertEquals("jmsHello Petra", helloWorldService.sayHello("Petra"));
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/pom.xml
new file mode 100644
index 0000000000..dcf7604cff
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/pom.xml
@@ -0,0 +1,35 @@
+<?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-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jms-definitions</artifactId>
+ <name>Apache Tuscany SCA iTest JMS Tests For Properties</name>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java
new file mode 100644
index 0000000000..b572b1012a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements the OneWay service.
+ */
+@Service(OneWayService.class)
+public class OneWayClientImpl implements OneWayService {
+
+ private OneWayService serviceA;
+
+ @Reference
+ public void setServiceA(OneWayService service) {
+ this.serviceA = service;
+ }
+
+ public void sayHello(String name) {
+ serviceA.sayHello(name);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java
new file mode 100644
index 0000000000..9cec2d9b3e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+import org.oasisopen.sca.annotation.OneWay;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface OneWayService {
+
+ @OneWay
+ void sayHello(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java
new file mode 100644
index 0000000000..6b763874df
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java
@@ -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.jms;
+
+public class OneWayServiceImpl implements OneWayService {
+
+ public static Object lock = new Object();
+ public static String name;
+
+ public void sayHello(String name) {
+ OneWayServiceImpl.name = name;
+ synchronized (OneWayServiceImpl.lock) {
+ OneWayServiceImpl.lock.notify();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..a57e5befe2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/main/resources/META-INF/sca-contribution.xml
@@ -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://itest">
+ <deployable composite="itest:DefinitionsTests"/>
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/main/resources/definitions.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/main/resources/definitions.xml
new file mode 100644
index 0000000000..07b9f4aaa8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/main/resources/definitions.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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 xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://jms" >
+
+ <binding.jms name="TestService" >
+ <destination name="MyServiceQueue" create="never"/>
+ <connectionFactory name="MyConnectionFactory"/>
+ </binding.jms>
+
+ </definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/main/resources/definitions/definitions.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/main/resources/definitions/definitions.composite
new file mode 100644
index 0000000000..6e478e067d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/main/resources/definitions/definitions.composite
@@ -0,0 +1,39 @@
+<?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:itest="http://itest"
+ targetNamespace="http://itest"
+ name="DefinitionsTests">
+
+ <component name="OneWayClient">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.OneWayClientImpl"/>
+ <reference name="serviceA">
+ <binding.jms requestConnection="itest:TestService" />
+ </reference>
+ </component>
+
+ <component name="OneWayService">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.OneWayServiceImpl"/>
+ <service name="OneWayService">
+ <binding.jms requestConnection="itest:TestService" />
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..d7f64fda62
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/main/resources/jndi.properties
@@ -0,0 +1,38 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false&broker.useJmx=false&broker.useShutdownHook=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = MyConnectionFactory
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+queue.MyServiceQueue= MyServiceQueue
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/test/java/org/apache/tuscany/sca/binding/jms/DefinitionsTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/test/java/org/apache/tuscany/sca/binding/jms/DefinitionsTestCase.java
new file mode 100644
index 0000000000..729ad072b7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/definitions/src/test/java/org/apache/tuscany/sca/binding/jms/DefinitionsTestCase.java
@@ -0,0 +1,62 @@
+/*
+ * 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.jms;
+
+import static org.junit.Assert.assertEquals;
+
+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;
+
+/**
+ */
+public class DefinitionsTestCase {
+
+ private Node node;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testSayHello() throws Exception {
+ OneWayService client = node.getService(OneWayService.class, "OneWayClient");
+
+ client.sayHello("petra");
+
+ // wait for up to 5 seconds but should wake up as soon as done
+ synchronized(OneWayServiceImpl.lock) {
+ if (OneWayServiceImpl.name == null) {
+ OneWayServiceImpl.lock.wait(5000);
+ }
+ }
+
+ assertEquals("petra", OneWayServiceImpl.name);
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/pom.xml
new file mode 100644
index 0000000000..1bbb6bb9ca
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/pom.xml
@@ -0,0 +1,35 @@
+<?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-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jms-nonscaclient-exceptions</artifactId>
+ <name>Apache Tuscany SCA iTest JMS NonSCA Client Exceptions</name>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion.java
new file mode 100644
index 0000000000..469882f3b3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms;
+
+public class CheckedExcpetion extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public CheckedExcpetion(String s) {
+ super(s);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion2Args.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion2Args.java
new file mode 100644
index 0000000000..19b584950a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion2Args.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms;
+
+public class CheckedExcpetion2Args extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public CheckedExcpetion2Args(String s, Throwable e) {
+ super(s, e);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionChained.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionChained.java
new file mode 100644
index 0000000000..b12e3a562e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionChained.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms;
+
+public class CheckedExcpetionChained extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public CheckedExcpetionChained(Throwable e) {
+ super(e);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionNoArgs.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionNoArgs.java
new file mode 100644
index 0000000000..b23db73c01
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionNoArgs.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms;
+
+public class CheckedExcpetionNoArgs extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public CheckedExcpetionNoArgs() {
+ super();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionService.java
new file mode 100644
index 0000000000..9e4c4c46d4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionService.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.jms;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface ExceptionService {
+
+ public void throwChecked() throws CheckedExcpetion;
+ public void throwCheckedNoArgs() throws CheckedExcpetionNoArgs;
+ public void throwChecked2Args() throws CheckedExcpetion2Args;
+ public void throwCheckedChained() throws CheckedExcpetionChained;
+
+ public void throwUnChecked();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceImpl.java
new file mode 100644
index 0000000000..866acf1ce1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceImpl.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.jms;
+
+public class ExceptionServiceImpl implements ExceptionService {
+
+ public void throwChecked() throws CheckedExcpetion {
+ throw new CheckedExcpetion("foo");
+ }
+
+ public void throwChecked2Args() throws CheckedExcpetion2Args {
+ throw new CheckedExcpetion2Args("foo", new Exception("bla"));
+ }
+
+ public void throwCheckedChained() throws CheckedExcpetionChained {
+ throw new CheckedExcpetionChained(new Exception("bla"));
+ }
+
+ public void throwCheckedNoArgs() throws CheckedExcpetionNoArgs {
+ throw new CheckedExcpetionNoArgs();
+ }
+
+ public void throwUnChecked() {
+ throw new RuntimeException("bla");
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..865bb39b4c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/resources/META-INF/sca-contribution.xml
@@ -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://itest">
+ <deployable composite="itest:ExceptionServiceComposite"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/resources/exceptions/service.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/resources/exceptions/service.composite
new file mode 100644
index 0000000000..42e33330d7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/resources/exceptions/service.composite
@@ -0,0 +1,44 @@
+<?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"
+ targetNamespace="http://itest"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ name="ExceptionServiceComposite">
+
+ <component name="TextExceptionService">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.ExceptionServiceImpl"/>
+ <service name="ExceptionService">
+ <binding.jms>
+ <destination jndiName="TextExceptionService"/>
+ </binding.jms>
+ </service>
+ </component>
+
+ <component name="ObjectExceptionService">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.ExceptionServiceImpl"/>
+ <service name="ExceptionService">
+ <binding.jms>
+ <tuscany:wireFormat.jmsObject/>
+ <destination jndiName="ObjectExceptionService"/>
+ </binding.jms>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..72d5457faf
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/main/resources/jndi.properties
@@ -0,0 +1,40 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+queue.TextExceptionService = TextRequestQueue
+queue.ObjectExceptionService = ObjectRequestQueue
+queue.ResponseQueue = ResponseQueue
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/test/java/org/apache/tuscany/sca/binding/jms/ExceptionsTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/test/java/org/apache/tuscany/sca/binding/jms/ExceptionsTestCase.java
new file mode 100644
index 0000000000..4ba10f3d71
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions/src/test/java/org/apache/tuscany/sca/binding/jms/ExceptionsTestCase.java
@@ -0,0 +1,210 @@
+/*
+ * 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.jms;
+
+import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.util.Properties;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.ObjectMessage;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+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.xml.sax.SAXException;
+
+/**
+ * This shows how to test the JMS binding using a simple HelloWorld application.
+ */
+public class ExceptionsTestCase {
+
+ private Node node;
+ private Session session;
+ private InitialContext context;
+ private Connection connection;
+
+ private static final String CHECKED_XML =
+ "<ns2:CheckedExcpetion xmlns:ns2=\"http://jms.binding.sca.tuscany.apache.org/\"><message>foo</message></ns2:CheckedExcpetion>";
+ private static final String CHECKED_NOARGS_XML = "<ns2:CheckedExcpetionNoArgs xmlns:ns2=\"http://jms.binding.sca.tuscany.apache.org/\" />";
+ private static final String CHECKED_2ARGS_XML =
+ "<ns2:CheckedExcpetion2Args xmlns:ns2=\"http://jms.binding.sca.tuscany.apache.org/\"><message>foo</message></ns2:CheckedExcpetion2Args>";
+ private static final String CHECKED_CHAINED_XML =
+ "<ns2:CheckedExcpetionChained xmlns:ns2=\"http://jms.binding.sca.tuscany.apache.org/\"><message>java.lang.Exception: bla</message></ns2:CheckedExcpetionChained>";
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testTextChecked() throws NamingException, JMSException, SAXException, IOException {
+ sendJMSTextRequest("throwChecked");
+ Message m = receiveJMSResponse();
+ assertXMLEqual(CHECKED_XML, ((TextMessage)m).getText());
+ }
+
+ @Test
+ public void testTextCheckedNoArgs() throws NamingException, JMSException, SAXException, IOException {
+ sendJMSTextRequest("throwCheckedNoArgs");
+ Message m = receiveJMSResponse();
+ assertXMLEqual(CHECKED_NOARGS_XML, ((TextMessage)m).getText());
+ }
+
+ @Test
+ public void testTextChecked2Args() throws NamingException, JMSException, SAXException, IOException {
+ sendJMSTextRequest("throwChecked2Args");
+ Message m = receiveJMSResponse();
+ assertXMLEqual(CHECKED_2ARGS_XML, ((TextMessage)m).getText());
+ }
+
+ @Test
+ public void testTextCheckedChained() throws NamingException, JMSException, SAXException, IOException {
+ sendJMSTextRequest("throwCheckedChained");
+ Message m = receiveJMSResponse();
+ assertXMLEqual(CHECKED_CHAINED_XML, ((TextMessage)m).getText());
+ }
+
+ @Test
+ public void testTextUnChecked() throws NamingException, JMSException, SAXException, IOException {
+ sendJMSTextRequest("throwUnChecked");
+ Message m = receiveJMSResponse();
+
+ // FIXME: what should the response message be for unchecked exceptions with wireFormat.textXML???
+ Object o = ((ObjectMessage)m).getObject();
+ assertTrue(o instanceof RuntimeException);
+ assertTrue(((RuntimeException)o).getMessage().startsWith("Message = java.lang.RuntimeException: bla"));
+ }
+
+ @Test
+ public void testObjectChecked() throws NamingException, JMSException {
+ sendJMSObjectRequest("throwChecked");
+ Message m = receiveJMSResponse();
+ Object o = ((ObjectMessage)m).getObject();
+ assertTrue(o instanceof CheckedExcpetion);
+ assertEquals("foo", ((CheckedExcpetion)o).getMessage());
+ }
+
+ @Test
+ public void testObjectCheckedNoArgs() throws NamingException, JMSException {
+ sendJMSObjectRequest("throwCheckedNoArgs");
+ Message m = receiveJMSResponse();
+ Object o = ((ObjectMessage)m).getObject();
+ assertTrue(o instanceof CheckedExcpetionNoArgs);
+ }
+
+ @Test
+ public void testObjectChecked2Args() throws NamingException, JMSException {
+ sendJMSObjectRequest("throwChecked2Args");
+ Message m = receiveJMSResponse();
+ Object o = ((ObjectMessage)m).getObject();
+ assertTrue(o instanceof CheckedExcpetion2Args);
+ assertEquals("foo", ((CheckedExcpetion2Args)o).getMessage());
+ assertEquals("bla", ((CheckedExcpetion2Args)o).getCause().getMessage());
+ }
+
+ @Test
+ public void testObjectCheckedChained() throws NamingException, JMSException {
+ sendJMSObjectRequest("throwCheckedChained");
+ Message m = receiveJMSResponse();
+ Object o = ((ObjectMessage)m).getObject();
+ assertTrue(o instanceof CheckedExcpetionChained);
+ assertEquals("bla", ((CheckedExcpetionChained)o).getCause().getMessage());
+ }
+
+ @Test
+ public void testObjectUnChecked() throws NamingException, JMSException {
+ sendJMSObjectRequest("throwUnChecked");
+ Message m = receiveJMSResponse();
+ Object o = ((ObjectMessage)m).getObject();
+ assertTrue(o instanceof RuntimeException);
+ assertTrue(((RuntimeException)o).getMessage().startsWith("Message = java.lang.RuntimeException: bla"));
+ }
+
+ @After
+ public void end() throws JMSException {
+ if (node != null) {
+ node.stop();
+ }
+ if (connection != null) {
+ connection.close();
+ }
+ }
+
+ private void sendJMSTextRequest(String operationName) throws NamingException, JMSException {
+ context = new InitialContext(new Properties());
+ ConnectionFactory cf = (ConnectionFactory)context.lookup("ConnectionFactory");
+ connection = cf.createConnection();
+ connection.start();
+
+ session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ Destination toDest = (Destination)context.lookup("TextExceptionService");
+
+ TextMessage m = session.createTextMessage();
+ m.setStringProperty("scaOperationName", operationName);
+ m.setJMSReplyTo((Destination)context.lookup("ResponseQueue"));
+ m.setText("<_ns_:" + operationName + " xmlns:_ns_=\"http://jms.binding.sca.tuscany.apache.org/\" />");
+
+ MessageProducer producer = session.createProducer(toDest);
+ producer.send(m);
+ }
+
+ private void sendJMSObjectRequest(String operationName) throws NamingException, JMSException {
+ context = new InitialContext(new Properties());
+ ConnectionFactory cf = (ConnectionFactory)context.lookup("ConnectionFactory");
+ connection = cf.createConnection();
+ connection.start();
+
+ session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ Destination toDest = (Destination)context.lookup("ObjectExceptionService");
+
+ ObjectMessage m = session.createObjectMessage();
+ m.setStringProperty("scaOperationName", operationName);
+ m.setJMSReplyTo((Destination)context.lookup("ResponseQueue"));
+ m.setObject(new Object[0]);
+
+ MessageProducer producer = session.createProducer(toDest);
+ producer.send(m);
+ }
+
+ private Message receiveJMSResponse() throws NamingException, JMSException {
+ Destination replyDest = (Destination)context.lookup("ResponseQueue");
+ MessageConsumer consumer = session.createConsumer(replyDest);
+ Message m = consumer.receive(5000);
+ if (m == null) {
+ throw new RuntimeException("No reply message received");
+ }
+ return m;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/pom.xml
new file mode 100644
index 0000000000..b8f2e0ceee
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/pom.xml
@@ -0,0 +1,35 @@
+<?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-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jms-exceptions1</artifactId>
+ <name>Apache Tuscany SCA iTest JMS with Exceptions1</name>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion.java
new file mode 100644
index 0000000000..469882f3b3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms;
+
+public class CheckedExcpetion extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public CheckedExcpetion(String s) {
+ super(s);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion2Args.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion2Args.java
new file mode 100644
index 0000000000..19b584950a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetion2Args.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms;
+
+public class CheckedExcpetion2Args extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public CheckedExcpetion2Args(String s, Throwable e) {
+ super(s, e);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionChained.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionChained.java
new file mode 100644
index 0000000000..b12e3a562e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionChained.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms;
+
+public class CheckedExcpetionChained extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public CheckedExcpetionChained(Throwable e) {
+ super(e);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionNoArgs.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionNoArgs.java
new file mode 100644
index 0000000000..b23db73c01
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/CheckedExcpetionNoArgs.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms;
+
+public class CheckedExcpetionNoArgs extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public CheckedExcpetionNoArgs() {
+ super();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionService.java
new file mode 100644
index 0000000000..9e4c4c46d4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionService.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.jms;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface ExceptionService {
+
+ public void throwChecked() throws CheckedExcpetion;
+ public void throwCheckedNoArgs() throws CheckedExcpetionNoArgs;
+ public void throwChecked2Args() throws CheckedExcpetion2Args;
+ public void throwCheckedChained() throws CheckedExcpetionChained;
+
+ public void throwUnChecked();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceClient.java
new file mode 100644
index 0000000000..02426936d2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceClient.java
@@ -0,0 +1,57 @@
+/*
+ * 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.jms;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements the HelloWorld service.
+ */
+@Service(ExceptionService.class)
+public class ExceptionServiceClient implements ExceptionService {
+
+ private ExceptionService service;
+
+ @Reference
+ public void setService(ExceptionService service) {
+ this.service = service;
+ }
+
+ public void throwChecked() throws CheckedExcpetion {
+ service.throwChecked();
+ }
+
+ public void throwChecked2Args() throws CheckedExcpetion2Args {
+ service.throwChecked2Args();
+ }
+
+ public void throwCheckedChained() throws CheckedExcpetionChained {
+ service.throwCheckedChained();
+ }
+
+ public void throwCheckedNoArgs() throws CheckedExcpetionNoArgs {
+ service.throwCheckedNoArgs();
+ }
+
+ public void throwUnChecked() {
+ service.throwUnChecked();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceImpl.java
new file mode 100644
index 0000000000..866acf1ce1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/java/org/apache/tuscany/sca/binding/jms/ExceptionServiceImpl.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.jms;
+
+public class ExceptionServiceImpl implements ExceptionService {
+
+ public void throwChecked() throws CheckedExcpetion {
+ throw new CheckedExcpetion("foo");
+ }
+
+ public void throwChecked2Args() throws CheckedExcpetion2Args {
+ throw new CheckedExcpetion2Args("foo", new Exception("bla"));
+ }
+
+ public void throwCheckedChained() throws CheckedExcpetionChained {
+ throw new CheckedExcpetionChained(new Exception("bla"));
+ }
+
+ public void throwCheckedNoArgs() throws CheckedExcpetionNoArgs {
+ throw new CheckedExcpetionNoArgs();
+ }
+
+ public void throwUnChecked() {
+ throw new RuntimeException("bla");
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..53504398bf
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:itest="http://itest">
+ <deployable composite="itest:ExceptionServiceComposite"/>
+ <deployable composite="itest:ExceptionClientComposite"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/resources/exceptions/client.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/resources/exceptions/client.composite
new file mode 100644
index 0000000000..86451dcf02
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/resources/exceptions/client.composite
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://itest"
+ name="ExceptionClientComposite">
+
+ <component name="ExceptionServiceClient">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.ExceptionServiceClient"/>
+ <reference name="service">
+ <binding.jms uri="jms:jndi:ExceptionService" />
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/resources/exceptions/service.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/resources/exceptions/service.composite
new file mode 100644
index 0000000000..dce41b86ac
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/resources/exceptions/service.composite
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://itest"
+ name="ExceptionServiceComposite">
+
+ <component name="ExceptionService">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.ExceptionServiceImpl"/>
+ <service name="ExceptionService">
+ <binding.jms />
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..f7875b52a2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/main/resources/jndi.properties
@@ -0,0 +1,38 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+queue.ExceptionService = ExceptionService
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/test/java/org/apache/tuscany/sca/binding/jms/ExceptionsTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/test/java/org/apache/tuscany/sca/binding/jms/ExceptionsTestCase.java
new file mode 100644
index 0000000000..e5fd4ba3e6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/exceptions1/src/test/java/org/apache/tuscany/sca/binding/jms/ExceptionsTestCase.java
@@ -0,0 +1,111 @@
+/*
+ * 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.jms;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+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;
+
+/**
+ * This shows how to test the JMS binding using a simple HelloWorld application.
+ */
+public class ExceptionsTestCase {
+
+ private static Node node;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testChecked() {
+ ExceptionService service = node.getService(ExceptionService.class, "ExceptionServiceClient");
+ try {
+ service.throwChecked();
+ fail();
+ } catch (CheckedExcpetion e) {
+ assertEquals("foo", e.getMessage());
+ } catch (Throwable e) {
+ fail();
+ }
+ }
+
+ @Test
+ public void testCheckedNoArgs() {
+ ExceptionService service = node.getService(ExceptionService.class, "ExceptionServiceClient");
+ try {
+ service.throwCheckedNoArgs();
+ fail();
+ } catch (CheckedExcpetionNoArgs e) {
+ // ok
+ }
+ }
+
+ @Test
+ public void testChecked2Args() {
+ ExceptionService service = node.getService(ExceptionService.class, "ExceptionServiceClient");
+ try {
+ service.throwChecked2Args();
+ fail();
+ } catch (CheckedExcpetion2Args e) {
+ assertEquals("foo", e.getMessage());
+// FIXME: TUSCANY-2848: lost the cause!
+// assertNotNull(e.getCause());
+// assertEquals("bla", e.getCause().getMessage());
+ }
+ }
+
+ @Test
+ public void testCheckedChained() {
+ ExceptionService service = node.getService(ExceptionService.class, "ExceptionServiceClient");
+ try {
+ service.throwCheckedChained();
+ fail();
+ } catch (CheckedExcpetionChained e) {
+ // FIXME: TUSCANY-2848: lost the cause!
+// assertNotNull(e.getCause());
+// assertEquals("bla", e.getCause().getMessage());
+ }
+ }
+
+ @Test
+ public void testUnChecked() {
+ ExceptionService service = node.getService(ExceptionService.class, "ExceptionServiceClient");
+ try {
+ service.throwUnChecked();
+ fail();
+ } catch (Exception e) {
+ assertTrue(e.getCause().getMessage().startsWith("Message = java.lang.RuntimeException: bla"));
+ }
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/pom.xml
new file mode 100644
index 0000000000..45a8f3420d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/pom.xml
@@ -0,0 +1,35 @@
+<?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-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jms-external-broker</artifactId>
+ <name>Apache Tuscany SCA iTest JMS with External JMS Broker</name>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java
new file mode 100644
index 0000000000..9aef6ba1a3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements the HelloWorld service.
+ */
+@Service(HelloWorldService.class)
+public class HelloWorldClientImpl implements HelloWorldService {
+
+ private HelloWorldService serviceA;
+
+ @Reference
+ public void setServiceA(HelloWorldService service) {
+ this.serviceA = service;
+ }
+
+ public String sayHello(String name) {
+ return serviceA.sayHello(name);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java
new file mode 100644
index 0000000000..430c71aaef
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java
@@ -0,0 +1,26 @@
+/*
+ * 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.jms;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorldService {
+ String sayHello(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..2c6d9d0d17
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ public String sayHello(String name) {
+ if ("bang".equals(name)) {
+ throw new RuntimeException("blem wit");
+ }
+ return "jmsHello " + name;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..5883e9a2d8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:itest="http://itest">
+ <deployable composite="itest:ExternalServiceComposite"/>
+ <deployable composite="itest:ExternalClientComposite"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/main/resources/external/client.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/main/resources/external/client.composite
new file mode 100644
index 0000000000..e27e3818f8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/main/resources/external/client.composite
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://itest"
+ name="ExternalClientComposite">
+
+ <component name="HelloWorldClient">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.HelloWorldClientImpl"/>
+ <reference name="serviceA">
+ <binding.jms initialContextFactory="org.apache.activemq.jndi.ActiveMQInitialContextFactory" jndiURL="tcp://localhost:61606">
+ <destination jndiName="DestQueueA"/>
+ <response>
+ <destination jndiName="RespQueueA"/>
+ </response>
+ </binding.jms>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/main/resources/external/service.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/main/resources/external/service.composite
new file mode 100644
index 0000000000..d5ab03e688
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/main/resources/external/service.composite
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://itest"
+ name="ExternalServiceComposite">
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.HelloWorldServiceImpl"/>
+ <service name="HelloWorldService">
+ <binding.jms initialContextFactory="org.apache.activemq.jndi.ActiveMQInitialContextFactory" jndiURL="tcp://localhost:61606">
+ <destination jndiName="DestQueueA" create="always"/>
+ <response>
+ <destination jndiName="RespQueueA" create="always"/>
+ </response>
+ </binding.jms>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..4d6acc037b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/main/resources/jndi.properties
@@ -0,0 +1,39 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+queue.RequestQueue = RequestQueue
+queue.ResponseQueue = ResponseQueue
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/test/java/org/apache/tuscany/sca/binding/jms/ExternalBrokerTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/test/java/org/apache/tuscany/sca/binding/jms/ExternalBrokerTestCase.java
new file mode 100644
index 0000000000..53acb22e64
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/externalBroker/src/test/java/org/apache/tuscany/sca/binding/jms/ExternalBrokerTestCase.java
@@ -0,0 +1,71 @@
+/*
+ * 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.jms;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.activemq.broker.BrokerService;
+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;
+
+/**
+ * Tests using the JMS binding with an external JMS broker
+ */
+public class ExternalBrokerTestCase {
+
+ private static Node node;
+ private BrokerService broker;
+
+ @Before
+ public void init() throws Exception {
+ startBroker();
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testHelloWorldCreate() throws Exception {
+ HelloWorldService helloWorldService = node.getService(HelloWorldService.class, "HelloWorldClient");
+ assertEquals("jmsHello Petra", helloWorldService.sayHello("Petra"));
+ }
+
+ @After
+ public void end() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ stopBroker();
+ }
+
+ protected void startBroker() throws Exception {
+ broker = new BrokerService();
+ broker.setPersistent(false);
+ broker.setUseJmx(false);
+ broker.addConnector("tcp://localhost:61606");
+ broker.start();
+ }
+ protected void stopBroker() throws Exception {
+ if (broker != null) {
+ broker.stop();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/pom.xml
new file mode 100644
index 0000000000..d7d4aa493c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/pom.xml
@@ -0,0 +1,35 @@
+<?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-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jms-format-jmsbytes</artifactId>
+ <name>Apache Tuscany SCA iTest JMS Message Format jmsbytes</name>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java
new file mode 100644
index 0000000000..1acbfbd5ae
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms.format.jmsbytes.helloworld;
+
+public class CheckedException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public CheckedException(String s) {
+ super(s);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java
new file mode 100644
index 0000000000..2d19d4bd82
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java
@@ -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.jms.format.jmsbytes.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldReference {
+
+ public String getGreetings(String message);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java
new file mode 100644
index 0000000000..3ccd54e9bd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java
@@ -0,0 +1,50 @@
+/*
+ * 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.jms.format.jmsbytes.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+
+public class HelloWorldReferenceImpl implements HelloWorldReference {
+
+ @Reference
+ protected HelloWorldServiceReference helloWorldService1;
+
+ public String getGreetings(String name){
+ byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes());
+ String stringValue = new String(bytesValue);
+
+ try {
+ helloWorldService1.throwChecked(name.getBytes());
+ } catch (Exception e) {
+ // Test to see what happens if we talk to a service
+ // that declares a checked exception through an
+ // interface that doesn't
+ stringValue += " " + e.getCause().getMessage();
+ }
+
+ try {
+ helloWorldService1.throwUnChecked(name.getBytes());
+ } catch (Exception e) {
+ stringValue += " " + e.getMessage();
+ }
+ return stringValue;
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..b9a1ffd5ef
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+ public byte[] getByteArrayGreetings(byte[] msg);
+
+ public void throwChecked(byte[] msg) throws CheckedException;
+ public void throwUnChecked(byte[] msg);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..b92959cfd3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java
@@ -0,0 +1,40 @@
+/*
+ * 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.jms.format.jmsbytes.helloworld;
+
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ public byte[] getByteArrayGreetings(byte[] msg){
+
+ String name = new String(msg);
+ name = "Hello " + name;
+
+ return name.getBytes();
+ }
+
+ public void throwChecked(byte[] msg) throws CheckedException {
+ throw new CheckedException("foo");
+ }
+
+ public void throwUnChecked(byte[] msg) {
+ throw new RuntimeException("bla");
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java
new file mode 100644
index 0000000000..ff5cf617f2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldServiceReference {
+
+ public byte[] getByteArrayGreetings(byte[] msg);
+
+ public void throwChecked(byte[] msg) ;
+ public void throwUnChecked(byte[] msg);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ced023ecdd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/resources/META-INF/sca-contribution.xml
@@ -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://itest">
+ <deployable composite="itest:helloworld" />
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/resources/jmsbytes/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/resources/jmsbytes/helloworld.composite
new file mode 100644
index 0000000000..cdd079810e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/resources/jmsbytes/helloworld.composite
@@ -0,0 +1,45 @@
+<?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"
+ targetNamespace="http://itest"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:hw="http://helloworld"
+ name="helloworld">
+
+ <component name="HelloWorldReferenceComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld.HelloWorldReferenceImpl" />
+ <reference name="helloWorldService1" >
+ <binding.jms>
+ <tuscany:wireFormat.jmsBytes/>
+ <destination jndiName="HelloWorldService1"/>
+ </binding.jms>
+ </reference>
+ </component>
+
+ <component name="HelloWorldServiceComponent1">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld.HelloWorldServiceImpl" />
+ <service name="HelloWorldService">
+ <binding.jms>
+ <tuscany:wireFormat.jmsBytes/>
+ <destination jndiName="HelloWorldService1"/>
+ </binding.jms>
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..4d6acc037b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/main/resources/jndi.properties
@@ -0,0 +1,39 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+queue.RequestQueue = RequestQueue
+queue.ResponseQueue = ResponseQueue
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesTestCase.java
new file mode 100644
index 0000000000..49cb0a69ab
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytes/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesTestCase.java
@@ -0,0 +1,69 @@
+/*
+ * 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.jms.format;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld.HelloWorldReference;
+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;
+
+
+/**
+ * This shows how to test the JMS binding using a simple HelloWorld application.
+ */
+public class FormatJMSBytesTestCase {
+
+ private Node node;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testHelloWorldCreate() throws Exception {
+ HelloWorldReference helloWorldService = node.getService(HelloWorldReference.class, "HelloWorldReferenceComponent");
+
+ System.out.println(helloWorldService.getGreetings("Fred Bloggs"));
+/* TUSCANY-2967 - disable this change while we decide what to do and
+ * return faults as JMSObject messages to be consistent
+ * again with other wire formats
+ assertEquals("Hello Fred Bloggs " +
+ "org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld.CheckedException: foo " +
+ "org.osoa.sca.ServiceRuntimeException: java.lang.RuntimeException: bla",
+ helloWorldService.getGreetings("Fred Bloggs"));
+*/
+ assertEquals("Hello Fred Bloggs " +
+ "foo " +
+ "remote service exception, see nested exception" ,
+ helloWorldService.getGreetings("Fred Bloggs"));
+
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/pom.xml
new file mode 100644
index 0000000000..b369f4bc9b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/pom.xml
@@ -0,0 +1,35 @@
+<?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-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jms-format-jmsbytesxml</artifactId>
+ <name>Apache Tuscany SCA iTest JMS Message Format jmsbytesxml</name>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/CheckedException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/CheckedException.java
new file mode 100644
index 0000000000..1684c19c50
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/CheckedException.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms.format.jmsbytesxml.helloworld;
+
+public class CheckedException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public CheckedException(String s) {
+ super(s);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReference.java
new file mode 100644
index 0000000000..cc7b7b11e4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReference.java
@@ -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.jms.format.jmsbytesxml.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldReference {
+
+ public String getGreetings(String message);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReferenceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReferenceImpl.java
new file mode 100644
index 0000000000..3742bd6ac6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReferenceImpl.java
@@ -0,0 +1,46 @@
+/*
+ * 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.jms.format.jmsbytesxml.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldReferenceImpl implements HelloWorldReference {
+
+ @Reference
+ protected HelloWorldService helloWorldService1;
+
+ public String getGreetings(String name){
+ byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes());
+ String stringValue = new String(bytesValue);
+
+ try {
+ helloWorldService1.throwChecked(name.getBytes());
+ } catch (CheckedException e) {
+ stringValue += " " + e.getMessage();
+ }
+
+ try {
+ helloWorldService1.throwUnChecked(name.getBytes());
+ } catch (Exception e) {
+ stringValue += " " + e.getMessage();
+ }
+ return stringValue;
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..eae95b4201
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldService.java
@@ -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.jms.format.jmsbytesxml.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+ public byte[] getByteArrayGreetings(byte[] msg);
+
+ public void throwChecked(byte[] msg) throws CheckedException;
+ public void throwUnChecked(byte[] msg);
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..a37a03d994
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldServiceImpl.java
@@ -0,0 +1,39 @@
+/*
+ * 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.jms.format.jmsbytesxml.helloworld;
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ public byte[] getByteArrayGreetings(byte[] msg){
+
+ String name = new String(msg);
+ name = "Hello " + name;
+
+ return name.getBytes();
+ }
+
+ public void throwChecked(byte[] msg) throws CheckedException {
+ throw new CheckedException("foo");
+ }
+
+ public void throwUnChecked(byte[] msg) {
+ throw new RuntimeException("bla");
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ced023ecdd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/resources/META-INF/sca-contribution.xml
@@ -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://itest">
+ <deployable composite="itest:helloworld" />
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/resources/jmsbytesxml/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/resources/jmsbytesxml/helloworld.composite
new file mode 100644
index 0000000000..f74ab86a14
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/resources/jmsbytesxml/helloworld.composite
@@ -0,0 +1,45 @@
+<?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"
+ targetNamespace="http://itest"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:hw="http://helloworld"
+ name="helloworld">
+
+ <component name="HelloWorldReferenceComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsbytesxml.helloworld.HelloWorldReferenceImpl" />
+ <reference name="helloWorldService1" >
+ <binding.jms>
+ <tuscany:wireFormat.jmsBytesXML/>
+ <destination jndiName="HelloWorldService1"/>
+ </binding.jms>
+ </reference>
+ </component>
+
+ <component name="HelloWorldServiceComponent1">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsbytesxml.helloworld.HelloWorldServiceImpl" />
+ <service name="HelloWorldService">
+ <binding.jms>
+ <tuscany:wireFormat.jmsBytesXML/>
+ <destination jndiName="HelloWorldService1"/>
+ </binding.jms>
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..4d6acc037b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/main/resources/jndi.properties
@@ -0,0 +1,39 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+queue.RequestQueue = RequestQueue
+queue.ResponseQueue = ResponseQueue
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesXMLTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesXMLTestCase.java
new file mode 100644
index 0000000000..53498ce44d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSBytesXMLTestCase.java
@@ -0,0 +1,58 @@
+/*
+ * 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.jms.format;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld.HelloWorldReference;
+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;
+
+
+/**
+ * This shows how to test the JMS binding using a simple HelloWorld application.
+ */
+public class FormatJMSBytesXMLTestCase {
+
+ private static Node node;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testHelloWorldCreate() throws Exception {
+ HelloWorldReference helloWorldService = node.getService(HelloWorldReference.class, "HelloWorldReferenceComponent");
+
+ System.out.println(helloWorldService.getGreetings("Fred Bloggs"));
+ assertEquals("Hello Fred Bloggs foo remote service exception, see nested exception", helloWorldService.getGreetings("Fred Bloggs"));
+
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java
new file mode 100644
index 0000000000..1acbfbd5ae
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms.format.jmsbytes.helloworld;
+
+public class CheckedException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public CheckedException(String s) {
+ super(s);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java
new file mode 100644
index 0000000000..2d19d4bd82
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java
@@ -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.jms.format.jmsbytes.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldReference {
+
+ public String getGreetings(String message);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java
new file mode 100644
index 0000000000..3ccd54e9bd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java
@@ -0,0 +1,50 @@
+/*
+ * 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.jms.format.jmsbytes.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+
+public class HelloWorldReferenceImpl implements HelloWorldReference {
+
+ @Reference
+ protected HelloWorldServiceReference helloWorldService1;
+
+ public String getGreetings(String name){
+ byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes());
+ String stringValue = new String(bytesValue);
+
+ try {
+ helloWorldService1.throwChecked(name.getBytes());
+ } catch (Exception e) {
+ // Test to see what happens if we talk to a service
+ // that declares a checked exception through an
+ // interface that doesn't
+ stringValue += " " + e.getCause().getMessage();
+ }
+
+ try {
+ helloWorldService1.throwUnChecked(name.getBytes());
+ } catch (Exception e) {
+ stringValue += " " + e.getMessage();
+ }
+ return stringValue;
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..b9a1ffd5ef
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+ public byte[] getByteArrayGreetings(byte[] msg);
+
+ public void throwChecked(byte[] msg) throws CheckedException;
+ public void throwUnChecked(byte[] msg);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..b92959cfd3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java
@@ -0,0 +1,40 @@
+/*
+ * 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.jms.format.jmsbytes.helloworld;
+
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ public byte[] getByteArrayGreetings(byte[] msg){
+
+ String name = new String(msg);
+ name = "Hello " + name;
+
+ return name.getBytes();
+ }
+
+ public void throwChecked(byte[] msg) throws CheckedException {
+ throw new CheckedException("foo");
+ }
+
+ public void throwUnChecked(byte[] msg) {
+ throw new RuntimeException("bla");
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java
new file mode 100644
index 0000000000..ff5cf617f2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsbytesxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldServiceReference {
+
+ public byte[] getByteArrayGreetings(byte[] msg);
+
+ public void throwChecked(byte[] msg) ;
+ public void throwUnChecked(byte[] msg);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/pom.xml
new file mode 100644
index 0000000000..830cf879f2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/pom.xml
@@ -0,0 +1,35 @@
+<?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-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jms-format-jmsdefault</artifactId>
+ <name>Apache Tuscany SCA iTest JMS Message Format jmsdefault</name>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java
new file mode 100644
index 0000000000..1acbfbd5ae
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms.format.jmsbytes.helloworld;
+
+public class CheckedException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public CheckedException(String s) {
+ super(s);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java
new file mode 100644
index 0000000000..2d19d4bd82
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java
@@ -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.jms.format.jmsbytes.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldReference {
+
+ public String getGreetings(String message);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java
new file mode 100644
index 0000000000..3ccd54e9bd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java
@@ -0,0 +1,50 @@
+/*
+ * 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.jms.format.jmsbytes.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+
+public class HelloWorldReferenceImpl implements HelloWorldReference {
+
+ @Reference
+ protected HelloWorldServiceReference helloWorldService1;
+
+ public String getGreetings(String name){
+ byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes());
+ String stringValue = new String(bytesValue);
+
+ try {
+ helloWorldService1.throwChecked(name.getBytes());
+ } catch (Exception e) {
+ // Test to see what happens if we talk to a service
+ // that declares a checked exception through an
+ // interface that doesn't
+ stringValue += " " + e.getCause().getMessage();
+ }
+
+ try {
+ helloWorldService1.throwUnChecked(name.getBytes());
+ } catch (Exception e) {
+ stringValue += " " + e.getMessage();
+ }
+ return stringValue;
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..b9a1ffd5ef
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+ public byte[] getByteArrayGreetings(byte[] msg);
+
+ public void throwChecked(byte[] msg) throws CheckedException;
+ public void throwUnChecked(byte[] msg);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..b92959cfd3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java
@@ -0,0 +1,40 @@
+/*
+ * 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.jms.format.jmsbytes.helloworld;
+
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ public byte[] getByteArrayGreetings(byte[] msg){
+
+ String name = new String(msg);
+ name = "Hello " + name;
+
+ return name.getBytes();
+ }
+
+ public void throwChecked(byte[] msg) throws CheckedException {
+ throw new CheckedException("foo");
+ }
+
+ public void throwUnChecked(byte[] msg) {
+ throw new RuntimeException("bla");
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java
new file mode 100644
index 0000000000..ff5cf617f2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldServiceReference {
+
+ public byte[] getByteArrayGreetings(byte[] msg);
+
+ public void throwChecked(byte[] msg) ;
+ public void throwUnChecked(byte[] msg);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/CheckedException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/CheckedException.java
new file mode 100644
index 0000000000..530eac3d00
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/CheckedException.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms.format.jmsdefault.helloworld;
+
+public class CheckedException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public CheckedException(String s) {
+ super(s);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReference.java
new file mode 100644
index 0000000000..1768816247
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReference.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldReference {
+
+ public String getGreetings(String name);
+
+ public String getPersonGreetings(Person person);
+
+ public void nullInVoidOut();
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReferenceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReferenceImpl.java
new file mode 100644
index 0000000000..d0a5faaef7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReferenceImpl.java
@@ -0,0 +1,85 @@
+/*
+ * 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.jms.format.jmsdefault.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldReferenceImpl implements HelloWorldReference {
+
+ @Reference
+ protected HelloWorldService helloWorldService1;
+
+ @Reference
+ protected HelloWorldService helloWorldService2;
+
+ @Reference
+ protected HelloWorldService helloWorldService3;
+
+ @Reference
+ protected HelloWorldService helloWorldService4;
+
+ public String getGreetings(String name){
+ String stringValue = helloWorldService1.getGreetings(name) + " " +
+ helloWorldService2.getGreetings(name) + " " +
+ helloWorldService3.getGreetings(name) + " " +
+ helloWorldService4.getGreetings(name);
+
+ try {
+ helloWorldService3.throwChecked(name);
+ } catch (CheckedException e) {
+ stringValue += " " + e.getMessage();
+ }
+
+ try {
+ helloWorldService3.throwUnChecked(name);
+ } catch (Exception e) {
+ stringValue += " " + e.getMessage();
+ }
+
+ try {
+ helloWorldService4.throwChecked(name);
+ } catch (CheckedException e) {
+ stringValue += " " + e.getMessage();
+ }
+
+ try {
+ helloWorldService4.throwUnChecked(name);
+ } catch (Exception e) {
+ stringValue += " " + e.getMessage();
+ }
+
+ return stringValue;
+ }
+
+ public String getPersonGreetings(Person person){
+ return helloWorldService1.getPersonGreetings(person) + " " +
+ helloWorldService2.getPersonGreetings(person) + " " +
+ helloWorldService3.getPersonGreetings(person) + " " +
+ helloWorldService4.getPersonGreetings(person);
+ }
+
+ public void nullInVoidOut() {
+ helloWorldService1.nullInVoidOut();
+ helloWorldService2.nullInVoidOut();
+ helloWorldService3.nullInVoidOut();
+ helloWorldService4.nullInVoidOut();
+
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..204863423d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldService.java
@@ -0,0 +1,38 @@
+/*
+ * 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.jms.format.jmsdefault.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+ public String getGreetings(String name);
+
+ public String getPersonGreetings(Person person);
+
+ public void nullInVoidOut();
+
+ public void throwChecked(String msg) throws CheckedException;
+ public void throwUnChecked(String msg);
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..b143079fe3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldServiceImpl.java
@@ -0,0 +1,51 @@
+/*
+ * 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.jms.format.jmsdefault.helloworld;
+
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ public static int nullInVoidOutCalled = 0;
+
+ public String getGreetings(String name){
+ String response = "Hello " + name;
+ System.out.println("getGreetings: " + response);
+ return response;
+ }
+
+ public String getPersonGreetings(Person person){
+ String response = "Hello " + person.getFirstName() + " " + person.getLastName();
+ System.out.println("getPersonGreetings: " + response);
+ return response;
+ }
+
+ public void nullInVoidOut() {
+ System.out.println("nullInVoidOut");
+ nullInVoidOutCalled++;
+ }
+
+ public void throwChecked(String msg) throws CheckedException {
+ throw new CheckedException("foo");
+ }
+
+ public void throwUnChecked(String msg) {
+ throw new RuntimeException("bla");
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/Person.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/Person.java
new file mode 100644
index 0000000000..b62d1b1f1d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/Person.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld;
+
+public class Person {
+ String firstName;
+ String lastName;
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ced023ecdd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/resources/META-INF/sca-contribution.xml
@@ -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://itest">
+ <deployable composite="itest:helloworld" />
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/resources/jmsdefault/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/resources/jmsdefault/helloworld.composite
new file mode 100644
index 0000000000..56285ad234
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/resources/jmsdefault/helloworld.composite
@@ -0,0 +1,94 @@
+<?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"
+ targetNamespace="http://itest"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:hw="http://helloworld"
+ name="helloworld">
+
+ <component name="HelloWorldReferenceComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld.HelloWorldReferenceImpl" />
+ <reference name="helloWorldService1" >
+ <binding.jms>
+ <destination jndiName="HelloWorldService1"/>
+ </binding.jms>
+ </reference>
+ <reference name="helloWorldService2" >
+ <binding.jms>
+ <wireFormat.jmsDefault/>
+ <destination jndiName="HelloWorldService2"/>
+ </binding.jms>
+ </reference>
+ <reference name="helloWorldService3" >
+ <binding.jms>
+ <wireFormat.jmsDefault/>
+ <destination jndiName="HelloWorldService3"/>
+ </binding.jms>
+ </reference>
+ <reference name="helloWorldService4" >
+ <binding.jms>
+ <wireFormat.jmsDefault/>
+ <destination jndiName="HelloWorldService4"/>
+ </binding.jms>
+ </reference>
+ </component>
+
+ <component name="HelloWorldServiceComponent1">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld.HelloWorldServiceImpl" />
+ <service name="HelloWorldService">
+ <binding.jms>
+ <destination jndiName="HelloWorldService1"/>
+ </binding.jms>
+ </service>
+ </component>
+
+ <component name="HelloWorldServiceComponent2">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld.HelloWorldServiceImpl" />
+ <service name="HelloWorldService">
+ <interface.java interface="org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld.HelloWorldService" />
+ <binding.jms>
+ <destination jndiName="HelloWorldService2"/>
+ </binding.jms>
+ </service>
+ </component>
+
+ <component name="HelloWorldServiceComponent3">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld.HelloWorldServiceImpl" />
+ <service name="HelloWorldService">
+ <!--interface.wsdl interface="http://helloworld/textxml#wsdl.interface(HelloWorld)" /-->
+ <binding.jms>
+ <wireFormat.jmsDefault />
+ <destination jndiName="HelloWorldService3"/>
+ </binding.jms>
+ </service>
+ </component>
+
+ <component name="HelloWorldServiceComponent4">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld.HelloWorldServiceImpl" />
+ <service name="HelloWorldService">
+ <!--interface.wsdl interface="http://helloworld/textxml#wsdl.interface(HelloWorld)" /-->
+ <binding.jms>
+ <wireFormat.jmsDefault />
+ <destination jndiName="HelloWorldService4"/>
+ </binding.jms>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/resources/jmsdefault/helloworld.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/resources/jmsdefault/helloworld.wsdl
new file mode 100644
index 0000000000..935a2e73c5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/resources/jmsdefault/helloworld.wsdl
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld/textxml" xmlns:tns="http://helloworld/textxml" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld/textxml" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld/textxml" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:complexType name="PersonType">
+ <xsd:sequence>
+ <xsd:element name="firstName" type="xsd:string"/>
+ <xsd:element name="lastName" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <element name="getPersonGreetings">
+ <complexType>
+ <sequence>
+ <element name="person" type="PersonType"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getPersonGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getPersonGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getPersonGreetingsRequest">
+ <wsdl:part element="tns:getPersonGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getPersonGreetingsResponse">
+ <wsdl:part element="tns:getPersonGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ <wsdl:operation name="getPersonGreetings">
+ <wsdl:input message="tns:getPersonGreetingsRequest" name="getPersonGreetingsRequest"/>
+ <wsdl:output message="tns:getPersonGreetingsResponse" name="getPersonGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getPersonGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getPersonGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getPersonGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <!-- wsdl:binding name="HelloWorldSoapJmsBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/jms"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding-->
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
+ <wsdlsoap:address location="http://localhost:8085/HelloWorldService"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..4d6acc037b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/main/resources/jndi.properties
@@ -0,0 +1,39 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+queue.RequestQueue = RequestQueue
+queue.ResponseQueue = ResponseQueue
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSDefaultTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSDefaultTestCase.java
new file mode 100644
index 0000000000..78c0239f0d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsdefault/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSDefaultTestCase.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld.HelloWorldReference;
+import org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld.HelloWorldServiceImpl;
+import org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld.Person;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+
+/**
+ * This shows how to test the JMS binding using a simple HelloWorld application.
+ */
+public class FormatJMSDefaultTestCase {
+
+ private static Node node;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testHelloWorldCreate() throws Exception {
+ HelloWorldReference helloWorldService = node.getService(HelloWorldReference.class, "HelloWorldReferenceComponent");
+
+ assertEquals("Hello Fred Bloggs Hello Fred Bloggs Hello Fred Bloggs Hello Fred Bloggs foo remote service exception, see nested exception foo remote service exception, see nested exception", helloWorldService.getGreetings("Fred Bloggs"));
+
+ Person person = new Person();
+ person.setFirstName("Fred");
+ person.setLastName("Bloggs");
+ assertEquals("Hello Fred Bloggs Hello Fred Bloggs Hello Fred Bloggs Hello Fred Bloggs", helloWorldService.getPersonGreetings(person));
+
+ // this just makes sure that there are no exceptions thrown for this case
+ helloWorldService.nullInVoidOut();
+ Assert.assertEquals(4, HelloWorldServiceImpl.nullInVoidOutCalled);
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/pom.xml
new file mode 100644
index 0000000000..d7d1a85c2a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/pom.xml
@@ -0,0 +1,35 @@
+<?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-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jms-format-jmsmessage</artifactId>
+ <name>Apache Tuscany SCA iTest JMS Message Format jmsmessage</name>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java
new file mode 100644
index 0000000000..1acbfbd5ae
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms.format.jmsbytes.helloworld;
+
+public class CheckedException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public CheckedException(String s) {
+ super(s);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java
new file mode 100644
index 0000000000..2d19d4bd82
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java
@@ -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.jms.format.jmsbytes.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldReference {
+
+ public String getGreetings(String message);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java
new file mode 100644
index 0000000000..3ccd54e9bd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java
@@ -0,0 +1,50 @@
+/*
+ * 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.jms.format.jmsbytes.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+
+public class HelloWorldReferenceImpl implements HelloWorldReference {
+
+ @Reference
+ protected HelloWorldServiceReference helloWorldService1;
+
+ public String getGreetings(String name){
+ byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes());
+ String stringValue = new String(bytesValue);
+
+ try {
+ helloWorldService1.throwChecked(name.getBytes());
+ } catch (Exception e) {
+ // Test to see what happens if we talk to a service
+ // that declares a checked exception through an
+ // interface that doesn't
+ stringValue += " " + e.getCause().getMessage();
+ }
+
+ try {
+ helloWorldService1.throwUnChecked(name.getBytes());
+ } catch (Exception e) {
+ stringValue += " " + e.getMessage();
+ }
+ return stringValue;
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..b9a1ffd5ef
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+ public byte[] getByteArrayGreetings(byte[] msg);
+
+ public void throwChecked(byte[] msg) throws CheckedException;
+ public void throwUnChecked(byte[] msg);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..b92959cfd3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java
@@ -0,0 +1,40 @@
+/*
+ * 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.jms.format.jmsbytes.helloworld;
+
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ public byte[] getByteArrayGreetings(byte[] msg){
+
+ String name = new String(msg);
+ name = "Hello " + name;
+
+ return name.getBytes();
+ }
+
+ public void throwChecked(byte[] msg) throws CheckedException {
+ throw new CheckedException("foo");
+ }
+
+ public void throwUnChecked(byte[] msg) {
+ throw new RuntimeException("bla");
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java
new file mode 100644
index 0000000000..ff5cf617f2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldServiceReference {
+
+ public byte[] getByteArrayGreetings(byte[] msg);
+
+ public void throwChecked(byte[] msg) ;
+ public void throwUnChecked(byte[] msg);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReference.java
new file mode 100644
index 0000000000..490bd5d4a3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReference.java
@@ -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.jms.format.jmsmessage.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldReference {
+
+ public String getGreetings(String message);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReferenceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReferenceImpl.java
new file mode 100644
index 0000000000..5aed6b12d7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReferenceImpl.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+
+public class HelloWorldReferenceImpl implements HelloWorldReference {
+
+ @Reference
+ protected HelloWorldServiceReferenceSide helloWorldService1;
+
+ public String getGreetings(String name){
+ helloWorldService1.getGreetings(name);
+
+ try {
+ Thread.sleep(2000);
+ } catch (Exception ex) {
+ // do nothing
+ }
+
+ return HelloWorldServiceImpl.getGreetings();
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..efe2f1a4dc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldService.java
@@ -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.jms.format.jmsmessage.helloworld;
+
+import org.oasisopen.sca.annotation.OneWay;
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+ @OneWay
+ public void onMessage(javax.jms.Message message);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..c1011ce6fb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java
@@ -0,0 +1,51 @@
+/*
+ * 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.jms.format.jmsmessage.helloworld;
+
+import javax.jms.TextMessage;
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ private static String greetings = "not set";
+
+ public void onMessage(javax.jms.Message message){
+
+ String name = null;
+
+ try {
+ name = ((TextMessage)message).getText();
+ } catch (Exception ex) {
+ name = "EXCEPTION";
+ }
+ greetings = "Hello " + name;
+ }
+
+ public static String getGreetings(){
+ return greetings;
+ }
+
+ // javax.jms.BytesMessage
+ // javax.jms.MapMessage
+ // javax.jms.ObjectMessage
+ // javax.jms.StreamMessage
+ // javax.jms.TextMessage
+
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceReferenceSide.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceReferenceSide.java
new file mode 100644
index 0000000000..d863b3a0a3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceReferenceSide.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld;
+
+import javax.jws.soap.SOAPBinding;
+
+import org.oasisopen.sca.annotation.OneWay;
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldServiceReferenceSide {
+
+ @OneWay
+ @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.BARE)
+ public void getGreetings(String message);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/README b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/README
new file mode 100644
index 0000000000..0f7a730b91
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/README
@@ -0,0 +1,3 @@
+This test uses an SCA composite to fake a scenario where the reference is an SCA reference but the
+service is a non-SCA JMS endpoint. This gives us the opportunity to play about with the interface
+configuration at the reference to see how the contents of the JMS message can be controlled. \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ced023ecdd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/resources/META-INF/sca-contribution.xml
@@ -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://itest">
+ <deployable composite="itest:helloworld" />
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/resources/jmsmessage/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/resources/jmsmessage/helloworld.composite
new file mode 100644
index 0000000000..48608ba9b3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/resources/jmsmessage/helloworld.composite
@@ -0,0 +1,46 @@
+<?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"
+ targetNamespace="http://itest"
+ xmlns:hw="http://helloworld"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ name="helloworld">
+
+ <component name="HelloWorldReferenceComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld.HelloWorldReferenceImpl" />
+ <reference name="helloWorldService1" >
+ <!--interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)"/-->
+ <interface.java interface="org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld.HelloWorldServiceReferenceSide"/>
+ <binding.jms>
+ <tuscany:wireFormat.jmsText/>
+ <destination jndiName="HelloWorldService1"/>
+ </binding.jms>
+ </reference>
+ </component>
+
+ <component name="HelloWorldServiceComponent1">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld.HelloWorldServiceImpl" />
+ <service name="HelloWorldService">
+ <binding.jms>
+ <destination jndiName="HelloWorldService1"/>
+ </binding.jms>
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/resources/jmsmessage/helloworld.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/resources/jmsmessage/helloworld.wsdl
new file mode 100644
index 0000000000..f72ce434fa
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/resources/jmsmessage/helloworld.wsdl
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld" xmlns:tns="http://helloworld" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:complexType name="PersonType">
+ <xsd:sequence>
+ <xsd:element name="firstName" type="xsd:string"/>
+ <xsd:element name="lastName" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <element name="getPersonGreetings">
+ <complexType>
+ <sequence>
+ <element name="person" type="PersonType"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getPersonGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getPersonGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <!-- wsdl:part element="tns:getGreetings" name="parameters"/-->
+ <wsdl:part type="xsd:string" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <!-- wsdl:part element="tns:getGreetingsResponse" name="parameters"/-->
+ <wsdl:part type="xsd:string" name="parameters"/>
+ </wsdl:message>
+
+ <!-- wsdl:message name="getPersonGreetingsRequest">
+ <wsdl:part element="tns:getPersonGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getPersonGreetingsResponse">
+ <wsdl:part element="tns:getPersonGreetingsResponse" name="parameters"/>
+ </wsdl:message-->
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ <!-- wsdl:operation name="getPersonGreetings">
+ <wsdl:input message="tns:getPersonGreetingsRequest" name="getPersonGreetingsRequest"/>
+ <wsdl:output message="tns:getPersonGreetingsResponse" name="getPersonGreetingsResponse"/>
+ </wsdl:operation-->
+ </wsdl:portType>
+
+ <!-- wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding-->
+
+ <!-- wsdl:binding name="HelloWorldSoapJmsBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/jms"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding-->
+
+ <!-- wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
+ <wsdlsoap:address location="http://localhost:8085/HelloWorldService"/>
+ </wsdl:port>
+ </wsdl:service-->
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..4d6acc037b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/main/resources/jndi.properties
@@ -0,0 +1,39 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+queue.RequestQueue = RequestQueue
+queue.ResponseQueue = ResponseQueue
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSMessageTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSMessageTestCase.java
new file mode 100644
index 0000000000..f47031da10
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsmessage/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSMessageTestCase.java
@@ -0,0 +1,58 @@
+/*
+ * 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.jms.format;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld.HelloWorldReference;
+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;
+
+
+/**
+ * This shows how to test the JMS binding using a simple HelloWorld application.
+ */
+public class FormatJMSMessageTestCase {
+
+ private static Node node;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testHelloWorldCreate() throws Exception {
+ HelloWorldReference helloWorldService = node.getService(HelloWorldReference.class, "HelloWorldReferenceComponent");
+
+ System.out.println(helloWorldService.getGreetings("Fred Bloggs"));
+ assertEquals("Hello Fred Bloggs", helloWorldService.getGreetings("Fred Bloggs"));
+
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/pom.xml
new file mode 100644
index 0000000000..1df222c26f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/pom.xml
@@ -0,0 +1,35 @@
+<?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-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jms-format-jmsobject</artifactId>
+ <name>Apache Tuscany SCA iTest JMS Message Format jmsobject</name>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java
new file mode 100644
index 0000000000..1acbfbd5ae
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms.format.jmsbytes.helloworld;
+
+public class CheckedException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public CheckedException(String s) {
+ super(s);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java
new file mode 100644
index 0000000000..2d19d4bd82
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java
@@ -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.jms.format.jmsbytes.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldReference {
+
+ public String getGreetings(String message);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java
new file mode 100644
index 0000000000..3ccd54e9bd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java
@@ -0,0 +1,50 @@
+/*
+ * 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.jms.format.jmsbytes.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+
+public class HelloWorldReferenceImpl implements HelloWorldReference {
+
+ @Reference
+ protected HelloWorldServiceReference helloWorldService1;
+
+ public String getGreetings(String name){
+ byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes());
+ String stringValue = new String(bytesValue);
+
+ try {
+ helloWorldService1.throwChecked(name.getBytes());
+ } catch (Exception e) {
+ // Test to see what happens if we talk to a service
+ // that declares a checked exception through an
+ // interface that doesn't
+ stringValue += " " + e.getCause().getMessage();
+ }
+
+ try {
+ helloWorldService1.throwUnChecked(name.getBytes());
+ } catch (Exception e) {
+ stringValue += " " + e.getMessage();
+ }
+ return stringValue;
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..b9a1ffd5ef
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+ public byte[] getByteArrayGreetings(byte[] msg);
+
+ public void throwChecked(byte[] msg) throws CheckedException;
+ public void throwUnChecked(byte[] msg);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..b92959cfd3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java
@@ -0,0 +1,40 @@
+/*
+ * 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.jms.format.jmsbytes.helloworld;
+
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ public byte[] getByteArrayGreetings(byte[] msg){
+
+ String name = new String(msg);
+ name = "Hello " + name;
+
+ return name.getBytes();
+ }
+
+ public void throwChecked(byte[] msg) throws CheckedException {
+ throw new CheckedException("foo");
+ }
+
+ public void throwUnChecked(byte[] msg) {
+ throw new RuntimeException("bla");
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java
new file mode 100644
index 0000000000..ff5cf617f2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldServiceReference {
+
+ public byte[] getByteArrayGreetings(byte[] msg);
+
+ public void throwChecked(byte[] msg) ;
+ public void throwUnChecked(byte[] msg);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.java
new file mode 100644
index 0000000000..a1c38f7295
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms.format.jmsobject.helloworld;
+
+public class CheckedException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public CheckedException(String s) {
+ super(s);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.java
new file mode 100644
index 0000000000..3b34dbae85
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.java
@@ -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.jms.format.jmsobject.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldReference {
+
+ public String getGreetingsWrapSingle(String firstName, String lastName);
+ public String getGreetingsDontWrapSingle(String firstName, String lastName);
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.java
new file mode 100644
index 0000000000..d93a1e51a2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.java
@@ -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.jms.format.jmsobject.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+
+public class HelloWorldReferenceImpl implements HelloWorldReference {
+
+ @Reference
+ protected HelloWorldService helloWorldServiceWrapSingle;
+
+ @Reference
+ protected HelloWorldService helloWorldServiceDontWrapSingle;
+
+ public String getGreetingsWrapSingle(String firstName, String lastName){
+ Person person = new Person();
+ person.setFirstName(firstName);
+ person.setLastName(lastName);
+
+ String returnString = "";
+
+ Person returnPerson = helloWorldServiceWrapSingle.getPersonGreetings(person);
+ returnString = returnPerson.getFirstName() + " " + returnPerson.getLastName();
+
+ Person returnNullPerson = helloWorldServiceWrapSingle.getNullReturnGreetings(person);
+
+ if (returnNullPerson == null){
+ returnString += " Hello2 null";
+ }
+
+ String returnGreeting = helloWorldServiceWrapSingle.getArrayGreeting(new String[]{firstName, lastName});
+ returnString += " " + returnGreeting;
+
+ returnGreeting = helloWorldServiceWrapSingle.getMultiArrayGreetings(new String[]{firstName, firstName},new String[]{lastName, lastName});
+ returnString += " " + returnGreeting;
+
+ returnGreeting = helloWorldServiceWrapSingle.getMultiGreetings(firstName, lastName);
+ returnString += " " + returnGreeting;
+
+ returnGreeting = helloWorldServiceWrapSingle.getObjectGreeting(person);
+ returnString += " " + returnGreeting;
+
+ returnGreeting = helloWorldServiceWrapSingle.getObjectArrayGreeting(new Object[]{person});
+ returnString += " " + returnGreeting;
+
+ return returnString;
+ }
+
+ public String getGreetingsDontWrapSingle(String firstName, String lastName){
+ Person person = new Person();
+ person.setFirstName(firstName);
+ person.setLastName(lastName);
+
+ String returnString = "";
+
+ Person returnPerson = helloWorldServiceDontWrapSingle.getPersonGreetings(person);
+ returnString = returnPerson.getFirstName() + " " + returnPerson.getLastName();
+
+ Person returnNullPerson = helloWorldServiceDontWrapSingle.getNullReturnGreetings(person);
+
+ if (returnNullPerson == null){
+ returnString += " Hello2 null";
+ }
+
+ String returnGreeting = helloWorldServiceDontWrapSingle.getArrayGreeting(new String[]{firstName, lastName});
+ returnString += " " + returnGreeting;
+
+ returnGreeting = helloWorldServiceDontWrapSingle.getMultiArrayGreetings(new String[]{firstName, firstName},new String[]{lastName, lastName});
+ returnString += " " + returnGreeting;
+
+ returnGreeting = helloWorldServiceDontWrapSingle.getMultiGreetings(firstName, lastName);
+ returnString += " " + returnGreeting;
+
+ returnGreeting = helloWorldServiceDontWrapSingle.getObjectGreeting(person);
+ returnString += " " + returnGreeting;
+
+ returnGreeting = helloWorldServiceDontWrapSingle.getObjectArrayGreeting(new Object[]{person});
+ returnString += " " + returnGreeting;
+
+ try {
+ helloWorldServiceDontWrapSingle.throwChecked(person);
+ } catch (CheckedException e) {
+ returnString += " " + e.getMessage();
+ }
+
+ try {
+ helloWorldServiceDontWrapSingle.throwUnChecked(person);
+ } catch (Exception e) {
+ returnString += " " + (e.getCause().getMessage().startsWith("Message = java.lang.RuntimeException: bla") ? "bla" : e.getCause().getMessage());
+ }
+
+ return returnString;
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..b179a86f52
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+ public Person getPersonGreetings(Person person);
+ public Person getNullReturnGreetings(Person person);
+ public String getArrayGreeting(String[] names);
+ public String getMultiArrayGreetings(String[] firstName, String[] lastName);
+ public String getMultiGreetings(String firstName, String lastName);
+ public String getObjectGreeting(Object person);
+ public String getObjectArrayGreeting(Object[] pearson);
+
+ public void throwChecked(Person person) throws CheckedException;
+ public void throwUnChecked(Person person);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..fa9e9eb1cb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.java
@@ -0,0 +1,63 @@
+/*
+ * 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.jms.format.jmsobject.helloworld;
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ public Person getPersonGreetings(Person person){
+
+ person.setFirstName("Hello1 " + person.getFirstName());
+ person.setLastName("Hello1 " + person.getLastName());
+
+ return person;
+ }
+
+ public Person getNullReturnGreetings(Person person){
+ return null;
+ }
+
+ public String getArrayGreeting(String[] names) {
+ return "Hello3 " + names[0];
+ }
+
+ public String getMultiArrayGreetings(String[] firstName, String[] lastName) {
+ return "Hello4 " + firstName[0] + " " + lastName[0];
+ }
+
+ public String getMultiGreetings(String firstName, String lastName) {
+ return "Hello5 " + firstName + " " + lastName;
+ }
+
+ public String getObjectGreeting(Object person) {
+ return "Hello6 " + ((Person)person).getFirstName() + " " + ((Person)person).getLastName();
+ }
+
+ public String getObjectArrayGreeting(Object[] person) {
+ return "Hello7 " + ((Person)person[0]).getFirstName() + " " + ((Person)person[0]).getLastName();
+ }
+
+ public void throwChecked(Person person) throws CheckedException {
+ throw new CheckedException("foo");
+ }
+
+ public void throwUnChecked(Person person) {
+ throw new RuntimeException("bla");
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.java
new file mode 100644
index 0000000000..29233d74a9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.java
@@ -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.binding.jms.format.jmsobject.helloworld;
+
+import java.io.Serializable;
+
+public class Person implements Serializable {
+
+ private static final long serialVersionUID = -6842761353978551779L;
+
+ String firstName;
+ String lastName;
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ced023ecdd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/resources/META-INF/sca-contribution.xml
@@ -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://itest">
+ <deployable composite="itest:helloworld" />
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/resources/jmsobject/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/resources/jmsobject/helloworld.composite
new file mode 100644
index 0000000000..7950309b07
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/resources/jmsobject/helloworld.composite
@@ -0,0 +1,61 @@
+<?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"
+ targetNamespace="http://itest"
+ xmlns:hw="http://helloworld"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ name="helloworld">
+
+ <component name="HelloWorldReferenceComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld.HelloWorldReferenceImpl" />
+ <reference name="helloWorldServiceWrapSingle" >
+ <binding.jms>
+ <tuscany:wireFormat.jmsObject wrapSingle="true"/>
+ <destination jndiName="HelloWorldService1"/>
+ </binding.jms>
+ </reference>
+ <reference name="helloWorldServiceDontWrapSingle" >
+ <binding.jms>
+ <tuscany:wireFormat.jmsObject wrapSingle="false" />
+ <destination jndiName="HelloWorldService2"/>
+ </binding.jms>
+ </reference>
+ </component>
+
+ <component name="HelloWorldServiceComponent1">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld.HelloWorldServiceImpl" />
+ <service name="HelloWorldService">
+ <binding.jms>
+ <tuscany:wireFormat.jmsObject wrapSingle="true"/>
+ <destination jndiName="HelloWorldService1"/>
+ </binding.jms>
+ </service>
+ </component>
+
+ <component name="HelloWorldServiceComponent2">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld.HelloWorldServiceImpl" />
+ <service name="HelloWorldService">
+ <binding.jms>
+ <tuscany:wireFormat.jmsObject /> <!-- test that wrapSingle default works -->
+ <destination jndiName="HelloWorldService2"/>
+ </binding.jms>
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..4d6acc037b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/main/resources/jndi.properties
@@ -0,0 +1,39 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+queue.RequestQueue = RequestQueue
+queue.ResponseQueue = ResponseQueue
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSObjectTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSObjectTestCase.java
new file mode 100644
index 0000000000..a2bfc0ca8a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmsobject/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSObjectTestCase.java
@@ -0,0 +1,73 @@
+/*
+ * 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.jms.format;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld.HelloWorldReference;
+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;
+
+
+/**
+ * This shows how to test the JMS binding using a simple HelloWorld application.
+ */
+public class FormatJMSObjectTestCase {
+
+ private static Node node;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testHelloWorldCreate() throws Exception {
+ HelloWorldReference helloWorldService = node.getService(HelloWorldReference.class, "HelloWorldReferenceComponent");
+
+ assertEquals("Hello1 Fred Hello1 Bloggs Hello2 null Hello3 Fred Hello4 Fred Bloggs Hello5 Fred Bloggs Hello6 Fred Bloggs Hello7 Fred Bloggs",
+ helloWorldService.getGreetingsWrapSingle("Fred", "Bloggs"));
+
+ assertEquals("Hello1 Fred Hello1 Bloggs Hello2 null Hello3 Fred Hello4 Fred Bloggs Hello5 Fred Bloggs Hello6 Fred Bloggs Hello7 Fred Bloggs foo bla",
+ helloWorldService.getGreetingsDontWrapSingle("Fred", "Bloggs"));
+
+ }
+
+ @Ignore
+ @Test
+ public void testWaitForInput() {
+ System.out.println("Press a key to end");
+ try {
+ System.in.read();
+ } catch (Exception ex) {
+ }
+ System.out.println("Shutting down");
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/pom.xml
new file mode 100644
index 0000000000..af349524cf
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/pom.xml
@@ -0,0 +1,35 @@
+<?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-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jms-format-jmstext</artifactId>
+ <name>Apache Tuscany SCA iTest JMS Message Format jmstext</name>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java
new file mode 100644
index 0000000000..1acbfbd5ae
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms.format.jmsbytes.helloworld;
+
+public class CheckedException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public CheckedException(String s) {
+ super(s);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java
new file mode 100644
index 0000000000..2d19d4bd82
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java
@@ -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.jms.format.jmsbytes.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldReference {
+
+ public String getGreetings(String message);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java
new file mode 100644
index 0000000000..3ccd54e9bd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java
@@ -0,0 +1,50 @@
+/*
+ * 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.jms.format.jmsbytes.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+
+public class HelloWorldReferenceImpl implements HelloWorldReference {
+
+ @Reference
+ protected HelloWorldServiceReference helloWorldService1;
+
+ public String getGreetings(String name){
+ byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes());
+ String stringValue = new String(bytesValue);
+
+ try {
+ helloWorldService1.throwChecked(name.getBytes());
+ } catch (Exception e) {
+ // Test to see what happens if we talk to a service
+ // that declares a checked exception through an
+ // interface that doesn't
+ stringValue += " " + e.getCause().getMessage();
+ }
+
+ try {
+ helloWorldService1.throwUnChecked(name.getBytes());
+ } catch (Exception e) {
+ stringValue += " " + e.getMessage();
+ }
+ return stringValue;
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..b9a1ffd5ef
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+ public byte[] getByteArrayGreetings(byte[] msg);
+
+ public void throwChecked(byte[] msg) throws CheckedException;
+ public void throwUnChecked(byte[] msg);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..b92959cfd3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java
@@ -0,0 +1,40 @@
+/*
+ * 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.jms.format.jmsbytes.helloworld;
+
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ public byte[] getByteArrayGreetings(byte[] msg){
+
+ String name = new String(msg);
+ name = "Hello " + name;
+
+ return name.getBytes();
+ }
+
+ public void throwChecked(byte[] msg) throws CheckedException {
+ throw new CheckedException("foo");
+ }
+
+ public void throwUnChecked(byte[] msg) {
+ throw new RuntimeException("bla");
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java
new file mode 100644
index 0000000000..ff5cf617f2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldServiceReference {
+
+ public byte[] getByteArrayGreetings(byte[] msg);
+
+ public void throwChecked(byte[] msg) ;
+ public void throwUnChecked(byte[] msg);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/CheckedException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/CheckedException.java
new file mode 100644
index 0000000000..57ad23e064
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/CheckedException.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms.format.jmstext.helloworld;
+
+public class CheckedException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public CheckedException(String s) {
+ super(s);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReference.java
new file mode 100644
index 0000000000..ea8d5ffd28
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReference.java
@@ -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.jms.format.jmstext.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldReference {
+
+ public String getGreetings(String message);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReferenceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReferenceImpl.java
new file mode 100644
index 0000000000..afcd391009
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReferenceImpl.java
@@ -0,0 +1,46 @@
+/*
+ * 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.jms.format.jmstext.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+
+public class HelloWorldReferenceImpl implements HelloWorldReference {
+
+ @Reference
+ protected HelloWorldService helloWorldService1;
+
+ public String getGreetings(String name){
+ String stringValue = helloWorldService1.getStringGreetings(name);
+
+ try {
+ helloWorldService1.throwChecked(name);
+ } catch (Exception e) {
+ stringValue += " " + e.getMessage();
+ }
+
+ try {
+ helloWorldService1.throwUnChecked(name);
+ } catch (Exception e) {
+ stringValue += " " + e.getMessage();
+ }
+ return stringValue;
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..8af585c13c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldService.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+ public String getStringGreetings(String msg);
+
+ public void throwChecked(String msg) throws CheckedException;
+ public void throwUnChecked(String msg);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..4f0a6fe4c5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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.jms.format.jmstext.helloworld;
+
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ public String getStringGreetings(String msg){
+
+ msg = "Hello " + msg;
+ return msg;
+ }
+
+ public void throwChecked(String msg) throws CheckedException {
+ throw new CheckedException("foo");
+ }
+
+ public void throwUnChecked(String msg) {
+ throw new RuntimeException("bla");
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceReference.java
new file mode 100644
index 0000000000..a8dd686725
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceReference.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldServiceReference {
+
+ public String getStringGreetings(String msg);
+
+ public void throwChecked(String msg) ;
+ public void throwUnChecked(String msg);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ced023ecdd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/resources/META-INF/sca-contribution.xml
@@ -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://itest">
+ <deployable composite="itest:helloworld" />
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/resources/jmstext/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/resources/jmstext/helloworld.composite
new file mode 100644
index 0000000000..a9e8782f94
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/resources/jmstext/helloworld.composite
@@ -0,0 +1,45 @@
+<?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"
+ targetNamespace="http://itest"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:hw="http://helloworld"
+ name="helloworld">
+
+ <component name="HelloWorldReferenceComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld.HelloWorldReferenceImpl" />
+ <reference name="helloWorldService1" >
+ <binding.jms>
+ <tuscany:wireFormat.jmsText/>
+ <destination jndiName="HelloWorldService1"/>
+ </binding.jms>
+ </reference>
+ </component>
+
+ <component name="HelloWorldServiceComponent1">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld.HelloWorldServiceImpl" />
+ <service name="HelloWorldService">
+ <binding.jms>
+ <tuscany:wireFormat.jmsText/>
+ <destination jndiName="HelloWorldService1"/>
+ </binding.jms>
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..4d6acc037b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/main/resources/jndi.properties
@@ -0,0 +1,39 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+queue.RequestQueue = RequestQueue
+queue.ResponseQueue = ResponseQueue
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextTestCase.java
new file mode 100644
index 0000000000..b887aa18fd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstext/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextTestCase.java
@@ -0,0 +1,60 @@
+/*
+ * 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.jms.format;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld.HelloWorldReference;
+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;
+
+
+/**
+ * This shows how to test the JMS binding using a simple HelloWorld application.
+ */
+public class FormatJMSTextTestCase {
+
+ private static Node node;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testHelloWorldCreate() throws Exception {
+ HelloWorldReference helloWorldService = node.getService(HelloWorldReference.class, "HelloWorldReferenceComponent");
+
+ System.out.println(helloWorldService.getGreetings("Fred Bloggs"));
+ assertEquals("Hello Fred Bloggs " +
+ "foo remote service exception, see nested exception",
+ helloWorldService.getGreetings("Fred Bloggs"));
+
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/pom.xml
new file mode 100644
index 0000000000..5b072d4717
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/pom.xml
@@ -0,0 +1,35 @@
+<?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-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jms-format-jmstextxml</artifactId>
+ <name>Apache Tuscany SCA iTest JMS Message Format jmstextxml</name>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/CheckedException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/CheckedException.java
new file mode 100644
index 0000000000..5e9a7a316e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/CheckedException.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms.format.jmstextxml.helloworld;
+
+public class CheckedException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public CheckedException(String s) {
+ super(s);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReference.java
new file mode 100644
index 0000000000..768b293380
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReference.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldReference {
+
+ public String getGreetings(String name);
+ public String getPersonGreetings(Person person);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReferenceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReferenceImpl.java
new file mode 100644
index 0000000000..2bac5db5ab
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReferenceImpl.java
@@ -0,0 +1,62 @@
+/*
+ * 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.jms.format.jmstextxml.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldReferenceImpl implements HelloWorldReference {
+
+ @Reference
+ protected HelloWorldService helloWorldService1;
+
+ @Reference
+ protected HelloWorldService helloWorldService2;
+
+ @Reference
+ protected HelloWorldService helloWorldService3;
+
+ public String getGreetings(String name){
+ String stringValue = helloWorldService1.getGreetings(name) + " " +
+ helloWorldService2.getGreetings(name) + " " +
+ helloWorldService3.getGreetings(name);
+
+ return stringValue;
+ }
+
+ public String getPersonGreetings(Person person){
+ String stringValue = helloWorldService1.getPersonGreetings(person) + " " +
+ helloWorldService2.getPersonGreetings(person) + " " +
+ helloWorldService3.getPersonGreetings(person);
+
+ try {
+ helloWorldService1.throwChecked(person.getLastName());
+ } catch (CheckedException e) {
+ stringValue += " " + e.getMessage();
+ }
+
+ try {
+ helloWorldService1.throwUnChecked(person.getLastName());
+ } catch (Exception e) {
+ stringValue += " " + e.getMessage();
+ }
+
+ return stringValue;
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..fe200e3cbe
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldService.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+ public String getGreetings(String name);
+ public String getPersonGreetings(Person person);
+
+ public String throwChecked(String msg) throws CheckedException;
+ public String throwUnChecked(String msg);
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..80624ee770
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldServiceImpl.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld;
+
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ public String getGreetings(String name){
+ String response = "Hello " + name;
+ System.out.println("getGreetings: " + response);
+ return response;
+ }
+
+ public String getPersonGreetings(Person person){
+ String response = "Hello " + person.getFirstName() + " " + person.getLastName();
+ System.out.println("getPersonGreetings: " + response);
+ return response;
+ }
+
+ public String throwChecked(String msg) throws CheckedException {
+ throw new CheckedException("foo");
+ }
+
+ public String throwUnChecked(String msg) {
+ throw new RuntimeException("bla");
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/Person.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/Person.java
new file mode 100644
index 0000000000..175b482c81
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/Person.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld;
+
+public class Person {
+ String firstName;
+ String lastName;
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ced023ecdd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/resources/META-INF/sca-contribution.xml
@@ -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://itest">
+ <deployable composite="itest:helloworld" />
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/resources/jmstextxml/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/resources/jmstextxml/helloworld.composite
new file mode 100644
index 0000000000..c15d99550e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/resources/jmstextxml/helloworld.composite
@@ -0,0 +1,80 @@
+<?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"
+ targetNamespace="http://itest"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:hw="http://helloworld"
+ name="helloworld">
+
+ <component name="HelloWorldReferenceComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld.HelloWorldReferenceImpl" />
+ <reference name="helloWorldService1" >
+ <binding.jms>
+ <tuscany:wireFormat.jmsTextXML/>
+ <destination jndiName="HelloWorldService1"/>
+ </binding.jms>
+ </reference>
+ <reference name="helloWorldService2" >
+ <binding.jms>
+ <tuscany:wireFormat.jmsTextXML/>
+ <destination jndiName="HelloWorldService2"/>
+ </binding.jms>
+ </reference>
+ <reference name="helloWorldService3" >
+ <binding.jms>
+ <tuscany:wireFormat.jmsTextXML/>
+ <destination jndiName="HelloWorldService3"/>
+ </binding.jms>
+ </reference>
+ </component>
+
+ <component name="HelloWorldServiceComponent1">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld.HelloWorldServiceImpl" />
+ <service name="HelloWorldService">
+ <binding.jms>
+ <tuscany:wireFormat.jmsTextXML/>
+ <destination jndiName="HelloWorldService1"/>
+ </binding.jms>
+ </service>
+ </component>
+
+ <component name="HelloWorldServiceComponent2">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld.HelloWorldServiceImpl" />
+ <service name="HelloWorldService">
+ <interface.java interface="org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld.HelloWorldService" />
+ <binding.jms>
+ <tuscany:wireFormat.jmsTextXML/>
+ <destination jndiName="HelloWorldService2"/>
+ </binding.jms>
+ </service>
+ </component>
+
+ <component name="HelloWorldServiceComponent3">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld.HelloWorldServiceImpl" />
+ <service name="HelloWorldService">
+ <interface.wsdl interface="http://helloworld/textxml#wsdl.interface(HelloWorld)" />
+ <binding.jms>
+ <tuscany:wireFormat.jmsTextXML/>
+ <destination jndiName="HelloWorldService3"/>
+ </binding.jms>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/resources/jmstextxml/helloworld.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/resources/jmstextxml/helloworld.wsdl
new file mode 100644
index 0000000000..ac68c85fd5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/resources/jmstextxml/helloworld.wsdl
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld/textxml" xmlns:tns="http://helloworld/textxml" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld/textxml" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld/textxml" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:complexType name="PersonType">
+ <xsd:sequence>
+ <xsd:element name="firstName" type="xsd:string"/>
+ <xsd:element name="lastName" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <element name="getPersonGreetings">
+ <complexType>
+ <sequence>
+ <element name="person" type="PersonType"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getPersonGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getPersonGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="CheckedException" type="CheckedException" />
+
+ <complexType name="CheckedException">
+ <sequence>
+ <element minOccurs="0" name="message" type="xsd:string" />
+ </sequence>
+ </complexType>
+
+ </schema>
+
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getPersonGreetingsRequest">
+ <wsdl:part element="tns:getPersonGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getPersonGreetingsResponse">
+ <wsdl:part element="tns:getPersonGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="CheckedException">
+ <wsdl:part element="tns:CheckedException" name="fault" />
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ <wsdl:operation name="getPersonGreetings">
+ <wsdl:input message="tns:getPersonGreetingsRequest" name="getPersonGreetingsRequest"/>
+ <wsdl:output message="tns:getPersonGreetingsResponse" name="getPersonGreetingsResponse"/>
+ </wsdl:operation>
+ <wsdl:operation name="throwChecked">
+ <wsdl:input message="tns:getPersonGreetingsRequest" name="getPersonGreetingsRequest"/>
+ <wsdl:output message="tns:getPersonGreetingsResponse" name="getPersonGreetingsResponse"/>
+ <wsdl:fault message="tns:CheckedException" name="CheckedException"/>
+ </wsdl:operation>
+ <wsdl:operation name="throwUnChecked">
+ <wsdl:input message="tns:getPersonGreetingsRequest" name="getPersonGreetingsRequest"/>
+ <wsdl:output message="tns:getPersonGreetingsResponse" name="getPersonGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getPersonGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getPersonGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getPersonGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <!-- wsdl:binding name="HelloWorldSoapJmsBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/jms"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding-->
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
+ <wsdlsoap:address location="http://localhost:8085/HelloWorldService"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..4d6acc037b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/main/resources/jndi.properties
@@ -0,0 +1,39 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+queue.RequestQueue = RequestQueue
+queue.ResponseQueue = ResponseQueue
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLTestCase.java
new file mode 100644
index 0000000000..6054050a5d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxml/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLTestCase.java
@@ -0,0 +1,62 @@
+/*
+ * 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.jms.format;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld.HelloWorldReference;
+import org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld.Person;
+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;
+
+
+/**
+ * This shows how to test the JMS binding using a simple HelloWorld application.
+ */
+public class FormatJMSTextXMLTestCase {
+
+ private static Node node;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testHelloWorldCreate() throws Exception {
+ HelloWorldReference helloWorldService = node.getService(HelloWorldReference.class, "HelloWorldReferenceComponent");
+
+ assertEquals("Hello Fred Bloggs Hello Fred Bloggs Hello Fred Bloggs", helloWorldService.getGreetings("Fred Bloggs"));
+
+ Person person = new Person();
+ person.setFirstName("Fred");
+ person.setLastName("Bloggs");
+ assertEquals("Hello Fred Bloggs Hello Fred Bloggs Hello Fred Bloggs foo remote service exception, see nested exception", helloWorldService.getPersonGreetings(person));
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/pom.xml
new file mode 100644
index 0000000000..59f1f74eb5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/pom.xml
@@ -0,0 +1,35 @@
+<?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-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jms-format-jmstextxmlinjmsobjectout</artifactId>
+ <name>Apache Tuscany SCA iTest JMS Message Format jmstextxmlinjmsobjectout</name>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java
new file mode 100644
index 0000000000..1acbfbd5ae
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/CheckedException.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms.format.jmsbytes.helloworld;
+
+public class CheckedException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public CheckedException(String s) {
+ super(s);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java
new file mode 100644
index 0000000000..2d19d4bd82
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReference.java
@@ -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.jms.format.jmsbytes.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldReference {
+
+ public String getGreetings(String message);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java
new file mode 100644
index 0000000000..3ccd54e9bd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldReferenceImpl.java
@@ -0,0 +1,50 @@
+/*
+ * 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.jms.format.jmsbytes.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+
+public class HelloWorldReferenceImpl implements HelloWorldReference {
+
+ @Reference
+ protected HelloWorldServiceReference helloWorldService1;
+
+ public String getGreetings(String name){
+ byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes());
+ String stringValue = new String(bytesValue);
+
+ try {
+ helloWorldService1.throwChecked(name.getBytes());
+ } catch (Exception e) {
+ // Test to see what happens if we talk to a service
+ // that declares a checked exception through an
+ // interface that doesn't
+ stringValue += " " + e.getCause().getMessage();
+ }
+
+ try {
+ helloWorldService1.throwUnChecked(name.getBytes());
+ } catch (Exception e) {
+ stringValue += " " + e.getMessage();
+ }
+ return stringValue;
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..b9a1ffd5ef
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldService.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+ public byte[] getByteArrayGreetings(byte[] msg);
+
+ public void throwChecked(byte[] msg) throws CheckedException;
+ public void throwUnChecked(byte[] msg);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..b92959cfd3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceImpl.java
@@ -0,0 +1,40 @@
+/*
+ * 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.jms.format.jmsbytes.helloworld;
+
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ public byte[] getByteArrayGreetings(byte[] msg){
+
+ String name = new String(msg);
+ name = "Hello " + name;
+
+ return name.getBytes();
+ }
+
+ public void throwChecked(byte[] msg) throws CheckedException {
+ throw new CheckedException("foo");
+ }
+
+ public void throwUnChecked(byte[] msg) {
+ throw new RuntimeException("bla");
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java
new file mode 100644
index 0000000000..ff5cf617f2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytes/helloworld/HelloWorldServiceReference.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsbytes.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldServiceReference {
+
+ public byte[] getByteArrayGreetings(byte[] msg);
+
+ public void throwChecked(byte[] msg) ;
+ public void throwUnChecked(byte[] msg);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/CheckedException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/CheckedException.java
new file mode 100644
index 0000000000..1684c19c50
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/CheckedException.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms.format.jmsbytesxml.helloworld;
+
+public class CheckedException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public CheckedException(String s) {
+ super(s);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReference.java
new file mode 100644
index 0000000000..cc7b7b11e4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReference.java
@@ -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.jms.format.jmsbytesxml.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldReference {
+
+ public String getGreetings(String message);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReferenceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReferenceImpl.java
new file mode 100644
index 0000000000..3742bd6ac6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldReferenceImpl.java
@@ -0,0 +1,46 @@
+/*
+ * 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.jms.format.jmsbytesxml.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldReferenceImpl implements HelloWorldReference {
+
+ @Reference
+ protected HelloWorldService helloWorldService1;
+
+ public String getGreetings(String name){
+ byte[] bytesValue = helloWorldService1.getByteArrayGreetings(name.getBytes());
+ String stringValue = new String(bytesValue);
+
+ try {
+ helloWorldService1.throwChecked(name.getBytes());
+ } catch (CheckedException e) {
+ stringValue += " " + e.getMessage();
+ }
+
+ try {
+ helloWorldService1.throwUnChecked(name.getBytes());
+ } catch (Exception e) {
+ stringValue += " " + e.getMessage();
+ }
+ return stringValue;
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..eae95b4201
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldService.java
@@ -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.jms.format.jmsbytesxml.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+ public byte[] getByteArrayGreetings(byte[] msg);
+
+ public void throwChecked(byte[] msg) throws CheckedException;
+ public void throwUnChecked(byte[] msg);
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..a37a03d994
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsbytesxml/helloworld/HelloWorldServiceImpl.java
@@ -0,0 +1,39 @@
+/*
+ * 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.jms.format.jmsbytesxml.helloworld;
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ public byte[] getByteArrayGreetings(byte[] msg){
+
+ String name = new String(msg);
+ name = "Hello " + name;
+
+ return name.getBytes();
+ }
+
+ public void throwChecked(byte[] msg) throws CheckedException {
+ throw new CheckedException("foo");
+ }
+
+ public void throwUnChecked(byte[] msg) {
+ throw new RuntimeException("bla");
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/CheckedException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/CheckedException.java
new file mode 100644
index 0000000000..530eac3d00
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/CheckedException.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms.format.jmsdefault.helloworld;
+
+public class CheckedException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public CheckedException(String s) {
+ super(s);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReference.java
new file mode 100644
index 0000000000..1768816247
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReference.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldReference {
+
+ public String getGreetings(String name);
+
+ public String getPersonGreetings(Person person);
+
+ public void nullInVoidOut();
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReferenceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReferenceImpl.java
new file mode 100644
index 0000000000..d0a5faaef7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldReferenceImpl.java
@@ -0,0 +1,85 @@
+/*
+ * 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.jms.format.jmsdefault.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldReferenceImpl implements HelloWorldReference {
+
+ @Reference
+ protected HelloWorldService helloWorldService1;
+
+ @Reference
+ protected HelloWorldService helloWorldService2;
+
+ @Reference
+ protected HelloWorldService helloWorldService3;
+
+ @Reference
+ protected HelloWorldService helloWorldService4;
+
+ public String getGreetings(String name){
+ String stringValue = helloWorldService1.getGreetings(name) + " " +
+ helloWorldService2.getGreetings(name) + " " +
+ helloWorldService3.getGreetings(name) + " " +
+ helloWorldService4.getGreetings(name);
+
+ try {
+ helloWorldService3.throwChecked(name);
+ } catch (CheckedException e) {
+ stringValue += " " + e.getMessage();
+ }
+
+ try {
+ helloWorldService3.throwUnChecked(name);
+ } catch (Exception e) {
+ stringValue += " " + e.getMessage();
+ }
+
+ try {
+ helloWorldService4.throwChecked(name);
+ } catch (CheckedException e) {
+ stringValue += " " + e.getMessage();
+ }
+
+ try {
+ helloWorldService4.throwUnChecked(name);
+ } catch (Exception e) {
+ stringValue += " " + e.getMessage();
+ }
+
+ return stringValue;
+ }
+
+ public String getPersonGreetings(Person person){
+ return helloWorldService1.getPersonGreetings(person) + " " +
+ helloWorldService2.getPersonGreetings(person) + " " +
+ helloWorldService3.getPersonGreetings(person) + " " +
+ helloWorldService4.getPersonGreetings(person);
+ }
+
+ public void nullInVoidOut() {
+ helloWorldService1.nullInVoidOut();
+ helloWorldService2.nullInVoidOut();
+ helloWorldService3.nullInVoidOut();
+ helloWorldService4.nullInVoidOut();
+
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..204863423d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldService.java
@@ -0,0 +1,38 @@
+/*
+ * 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.jms.format.jmsdefault.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+ public String getGreetings(String name);
+
+ public String getPersonGreetings(Person person);
+
+ public void nullInVoidOut();
+
+ public void throwChecked(String msg) throws CheckedException;
+ public void throwUnChecked(String msg);
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..b143079fe3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/HelloWorldServiceImpl.java
@@ -0,0 +1,51 @@
+/*
+ * 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.jms.format.jmsdefault.helloworld;
+
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ public static int nullInVoidOutCalled = 0;
+
+ public String getGreetings(String name){
+ String response = "Hello " + name;
+ System.out.println("getGreetings: " + response);
+ return response;
+ }
+
+ public String getPersonGreetings(Person person){
+ String response = "Hello " + person.getFirstName() + " " + person.getLastName();
+ System.out.println("getPersonGreetings: " + response);
+ return response;
+ }
+
+ public void nullInVoidOut() {
+ System.out.println("nullInVoidOut");
+ nullInVoidOutCalled++;
+ }
+
+ public void throwChecked(String msg) throws CheckedException {
+ throw new CheckedException("foo");
+ }
+
+ public void throwUnChecked(String msg) {
+ throw new RuntimeException("bla");
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/Person.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/Person.java
new file mode 100644
index 0000000000..b62d1b1f1d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsdefault/helloworld/Person.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsdefault.helloworld;
+
+public class Person {
+ String firstName;
+ String lastName;
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReference.java
new file mode 100644
index 0000000000..490bd5d4a3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReference.java
@@ -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.jms.format.jmsmessage.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldReference {
+
+ public String getGreetings(String message);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReferenceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReferenceImpl.java
new file mode 100644
index 0000000000..5aed6b12d7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldReferenceImpl.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+
+public class HelloWorldReferenceImpl implements HelloWorldReference {
+
+ @Reference
+ protected HelloWorldServiceReferenceSide helloWorldService1;
+
+ public String getGreetings(String name){
+ helloWorldService1.getGreetings(name);
+
+ try {
+ Thread.sleep(2000);
+ } catch (Exception ex) {
+ // do nothing
+ }
+
+ return HelloWorldServiceImpl.getGreetings();
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..efe2f1a4dc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldService.java
@@ -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.jms.format.jmsmessage.helloworld;
+
+import org.oasisopen.sca.annotation.OneWay;
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+ @OneWay
+ public void onMessage(javax.jms.Message message);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..c1011ce6fb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceImpl.java
@@ -0,0 +1,51 @@
+/*
+ * 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.jms.format.jmsmessage.helloworld;
+
+import javax.jms.TextMessage;
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ private static String greetings = "not set";
+
+ public void onMessage(javax.jms.Message message){
+
+ String name = null;
+
+ try {
+ name = ((TextMessage)message).getText();
+ } catch (Exception ex) {
+ name = "EXCEPTION";
+ }
+ greetings = "Hello " + name;
+ }
+
+ public static String getGreetings(){
+ return greetings;
+ }
+
+ // javax.jms.BytesMessage
+ // javax.jms.MapMessage
+ // javax.jms.ObjectMessage
+ // javax.jms.StreamMessage
+ // javax.jms.TextMessage
+
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceReferenceSide.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceReferenceSide.java
new file mode 100644
index 0000000000..d863b3a0a3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/HelloWorldServiceReferenceSide.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsmessage.helloworld;
+
+import javax.jws.soap.SOAPBinding;
+
+import org.oasisopen.sca.annotation.OneWay;
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldServiceReferenceSide {
+
+ @OneWay
+ @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.BARE)
+ public void getGreetings(String message);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/README b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/README
new file mode 100644
index 0000000000..0f7a730b91
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsmessage/helloworld/README
@@ -0,0 +1,3 @@
+This test uses an SCA composite to fake a scenario where the reference is an SCA reference but the
+service is a non-SCA JMS endpoint. This gives us the opportunity to play about with the interface
+configuration at the reference to see how the contents of the JMS message can be controlled. \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.java
new file mode 100644
index 0000000000..a1c38f7295
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/CheckedException.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms.format.jmsobject.helloworld;
+
+public class CheckedException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public CheckedException(String s) {
+ super(s);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.java
new file mode 100644
index 0000000000..3b34dbae85
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReference.java
@@ -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.jms.format.jmsobject.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldReference {
+
+ public String getGreetingsWrapSingle(String firstName, String lastName);
+ public String getGreetingsDontWrapSingle(String firstName, String lastName);
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.java
new file mode 100644
index 0000000000..443d2aa746
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldReferenceImpl.java
@@ -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.jms.format.jmsobject.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+
+public class HelloWorldReferenceImpl implements HelloWorldReference {
+
+ @Reference
+ protected HelloWorldService helloWorldServiceWrapSingle;
+
+ @Reference
+ protected HelloWorldService helloWorldServiceDontWrapSingle;
+
+ public String getGreetingsWrapSingle(String firstName, String lastName){
+ Person person = new Person();
+ person.setFirstName(firstName);
+ person.setLastName(lastName);
+
+ String returnString = "";
+
+ Person returnPerson = helloWorldServiceWrapSingle.getPersonGreetings(person);
+ returnString = returnPerson.getFirstName() + " " + returnPerson.getLastName();
+
+ Person returnNullPerson = helloWorldServiceWrapSingle.getNullReturnGreetings(person);
+
+ if (returnNullPerson == null){
+ returnString += " Hello2 null";
+ }
+
+ String returnGreeting = helloWorldServiceWrapSingle.getArrayGreeting(new String[]{firstName, lastName});
+ returnString += " " + returnGreeting;
+
+ returnGreeting = helloWorldServiceWrapSingle.getMultiArrayGreetings(new String[]{firstName, firstName},new String[]{lastName, lastName});
+ returnString += " " + returnGreeting;
+
+ returnGreeting = helloWorldServiceWrapSingle.getMultiGreetings(firstName, lastName);
+ returnString += " " + returnGreeting;
+
+ returnGreeting = helloWorldServiceWrapSingle.getObjectGreeting(person);
+ returnString += " " + returnGreeting;
+
+ returnGreeting = helloWorldServiceWrapSingle.getObjectArrayGreeting(new Object[]{person});
+ returnString += " " + returnGreeting;
+
+ return returnString;
+ }
+
+ public String getGreetingsDontWrapSingle(String firstName, String lastName){
+ Person person = new Person();
+ person.setFirstName(firstName);
+ person.setLastName(lastName);
+
+ String returnString = "";
+
+ Person returnPerson = helloWorldServiceDontWrapSingle.getPersonGreetings(person);
+ returnString = returnPerson.getFirstName() + " " + returnPerson.getLastName();
+
+ Person returnNullPerson = helloWorldServiceDontWrapSingle.getNullReturnGreetings(person);
+
+ if (returnNullPerson == null){
+ returnString += " Hello2 null";
+ }
+
+ String returnGreeting = helloWorldServiceDontWrapSingle.getArrayGreeting(new String[]{firstName, lastName});
+ returnString += " " + returnGreeting;
+
+ returnGreeting = helloWorldServiceDontWrapSingle.getMultiArrayGreetings(new String[]{firstName, firstName},new String[]{lastName, lastName});
+ returnString += " " + returnGreeting;
+
+ returnGreeting = helloWorldServiceDontWrapSingle.getMultiGreetings(firstName, lastName);
+ returnString += " " + returnGreeting;
+
+ returnGreeting = helloWorldServiceDontWrapSingle.getObjectGreeting(person);
+ returnString += " " + returnGreeting;
+
+ returnGreeting = helloWorldServiceDontWrapSingle.getObjectArrayGreeting(new Object[]{person});
+ returnString += " " + returnGreeting;
+
+ try {
+ helloWorldServiceDontWrapSingle.throwChecked(person);
+ } catch (CheckedException e) {
+ returnString += " " + e.getMessage();
+ }
+
+ try {
+ helloWorldServiceDontWrapSingle.throwUnChecked(person);
+ } catch (Exception e) {
+ returnString += " " + e.getCause().getMessage();
+ }
+
+ return returnString;
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..b179a86f52
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldService.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmsobject.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+ public Person getPersonGreetings(Person person);
+ public Person getNullReturnGreetings(Person person);
+ public String getArrayGreeting(String[] names);
+ public String getMultiArrayGreetings(String[] firstName, String[] lastName);
+ public String getMultiGreetings(String firstName, String lastName);
+ public String getObjectGreeting(Object person);
+ public String getObjectArrayGreeting(Object[] pearson);
+
+ public void throwChecked(Person person) throws CheckedException;
+ public void throwUnChecked(Person person);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..fa9e9eb1cb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/HelloWorldServiceImpl.java
@@ -0,0 +1,63 @@
+/*
+ * 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.jms.format.jmsobject.helloworld;
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ public Person getPersonGreetings(Person person){
+
+ person.setFirstName("Hello1 " + person.getFirstName());
+ person.setLastName("Hello1 " + person.getLastName());
+
+ return person;
+ }
+
+ public Person getNullReturnGreetings(Person person){
+ return null;
+ }
+
+ public String getArrayGreeting(String[] names) {
+ return "Hello3 " + names[0];
+ }
+
+ public String getMultiArrayGreetings(String[] firstName, String[] lastName) {
+ return "Hello4 " + firstName[0] + " " + lastName[0];
+ }
+
+ public String getMultiGreetings(String firstName, String lastName) {
+ return "Hello5 " + firstName + " " + lastName;
+ }
+
+ public String getObjectGreeting(Object person) {
+ return "Hello6 " + ((Person)person).getFirstName() + " " + ((Person)person).getLastName();
+ }
+
+ public String getObjectArrayGreeting(Object[] person) {
+ return "Hello7 " + ((Person)person[0]).getFirstName() + " " + ((Person)person[0]).getLastName();
+ }
+
+ public void throwChecked(Person person) throws CheckedException {
+ throw new CheckedException("foo");
+ }
+
+ public void throwUnChecked(Person person) {
+ throw new RuntimeException("bla");
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.java
new file mode 100644
index 0000000000..29233d74a9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmsobject/helloworld/Person.java
@@ -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.binding.jms.format.jmsobject.helloworld;
+
+import java.io.Serializable;
+
+public class Person implements Serializable {
+
+ private static final long serialVersionUID = -6842761353978551779L;
+
+ String firstName;
+ String lastName;
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/CheckedException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/CheckedException.java
new file mode 100644
index 0000000000..57ad23e064
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/CheckedException.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms.format.jmstext.helloworld;
+
+public class CheckedException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public CheckedException(String s) {
+ super(s);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReference.java
new file mode 100644
index 0000000000..ea8d5ffd28
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReference.java
@@ -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.jms.format.jmstext.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldReference {
+
+ public String getGreetings(String message);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReferenceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReferenceImpl.java
new file mode 100644
index 0000000000..afcd391009
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldReferenceImpl.java
@@ -0,0 +1,46 @@
+/*
+ * 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.jms.format.jmstext.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+
+public class HelloWorldReferenceImpl implements HelloWorldReference {
+
+ @Reference
+ protected HelloWorldService helloWorldService1;
+
+ public String getGreetings(String name){
+ String stringValue = helloWorldService1.getStringGreetings(name);
+
+ try {
+ helloWorldService1.throwChecked(name);
+ } catch (Exception e) {
+ stringValue += " " + e.getMessage();
+ }
+
+ try {
+ helloWorldService1.throwUnChecked(name);
+ } catch (Exception e) {
+ stringValue += " " + e.getMessage();
+ }
+ return stringValue;
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..8af585c13c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldService.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+ public String getStringGreetings(String msg);
+
+ public void throwChecked(String msg) throws CheckedException;
+ public void throwUnChecked(String msg);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..4f0a6fe4c5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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.jms.format.jmstext.helloworld;
+
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ public String getStringGreetings(String msg){
+
+ msg = "Hello " + msg;
+ return msg;
+ }
+
+ public void throwChecked(String msg) throws CheckedException {
+ throw new CheckedException("foo");
+ }
+
+ public void throwUnChecked(String msg) {
+ throw new RuntimeException("bla");
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceReference.java
new file mode 100644
index 0000000000..a8dd686725
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstext/helloworld/HelloWorldServiceReference.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmstext.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldServiceReference {
+
+ public String getStringGreetings(String msg);
+
+ public void throwChecked(String msg) ;
+ public void throwUnChecked(String msg);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/CheckedException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/CheckedException.java
new file mode 100644
index 0000000000..5e9a7a316e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/CheckedException.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms.format.jmstextxml.helloworld;
+
+public class CheckedException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public CheckedException(String s) {
+ super(s);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReference.java
new file mode 100644
index 0000000000..768b293380
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReference.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldReference {
+
+ public String getGreetings(String name);
+ public String getPersonGreetings(Person person);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReferenceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReferenceImpl.java
new file mode 100644
index 0000000000..2bac5db5ab
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldReferenceImpl.java
@@ -0,0 +1,62 @@
+/*
+ * 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.jms.format.jmstextxml.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldReferenceImpl implements HelloWorldReference {
+
+ @Reference
+ protected HelloWorldService helloWorldService1;
+
+ @Reference
+ protected HelloWorldService helloWorldService2;
+
+ @Reference
+ protected HelloWorldService helloWorldService3;
+
+ public String getGreetings(String name){
+ String stringValue = helloWorldService1.getGreetings(name) + " " +
+ helloWorldService2.getGreetings(name) + " " +
+ helloWorldService3.getGreetings(name);
+
+ return stringValue;
+ }
+
+ public String getPersonGreetings(Person person){
+ String stringValue = helloWorldService1.getPersonGreetings(person) + " " +
+ helloWorldService2.getPersonGreetings(person) + " " +
+ helloWorldService3.getPersonGreetings(person);
+
+ try {
+ helloWorldService1.throwChecked(person.getLastName());
+ } catch (CheckedException e) {
+ stringValue += " " + e.getMessage();
+ }
+
+ try {
+ helloWorldService1.throwUnChecked(person.getLastName());
+ } catch (Exception e) {
+ stringValue += " " + e.getMessage();
+ }
+
+ return stringValue;
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..be2af78958
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldService.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+ public String getGreetings(String name);
+ public String getPersonGreetings(Person person);
+
+ public void throwChecked(String msg) throws CheckedException;
+ public void throwUnChecked(String msg);
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..e85d4ca5a4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/HelloWorldServiceImpl.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld;
+
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ public String getGreetings(String name){
+ String response = "Hello " + name;
+ System.out.println("getGreetings: " + response);
+ return response;
+ }
+
+ public String getPersonGreetings(Person person){
+ String response = "Hello " + person.getFirstName() + " " + person.getLastName();
+ System.out.println("getPersonGreetings: " + response);
+ return response;
+ }
+
+ public void throwChecked(String msg) throws CheckedException {
+ throw new CheckedException("foo");
+ }
+
+ public void throwUnChecked(String msg) {
+ throw new RuntimeException("bla");
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/Person.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/Person.java
new file mode 100644
index 0000000000..175b482c81
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxml/helloworld/Person.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmstextxml.helloworld;
+
+public class Person {
+ String firstName;
+ String lastName;
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldReferenceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldReferenceImpl.java
new file mode 100644
index 0000000000..7bb33ae270
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldReferenceImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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.jms.format.jmstextxmlinjmsobjectout.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+
+public class HelloWorldReferenceImpl implements HelloWorldService {
+
+ @Reference
+ protected HelloWorldService helloWorldService1;
+
+ public String getGreetings(String name){
+ return helloWorldService1.getGreetings(name).toString();
+ }
+
+ public String getPersonGreetings(Person person){
+ return helloWorldService1.getPersonGreetings(person).toString();
+ }
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..9f955c278a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldService.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmstextxmlinjmsobjectout.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+ public String getGreetings(String name);
+
+ public String getPersonGreetings(Person person);
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..7c1cce6087
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/HelloWorldServiceImpl.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmstextxmlinjmsobjectout.helloworld;
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ public String getGreetings(String name){
+ String response = "Hello " + name;
+ System.out.println("getGreetings: " + response);
+ return response;
+ }
+
+ public String getPersonGreetings(Person person){
+ String response = "Hello " + person.getFirstName() + " " + person.getLastName();
+ System.out.println("getPersonGreetings: " + response);
+ return response;
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/Person.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/Person.java
new file mode 100644
index 0000000000..3d41f656f9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/java/org/apache/tuscany/sca/binding/jms/format/jmstextxmlinjmsobjectout/helloworld/Person.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.format.jmstextxmlinjmsobjectout.helloworld;
+
+public class Person {
+ String firstName;
+ String lastName;
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ced023ecdd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/META-INF/sca-contribution.xml
@@ -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://itest">
+ <deployable composite="itest:helloworld" />
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jmstextxmlinjmsobjectout/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jmstextxmlinjmsobjectout/helloworld.composite
new file mode 100644
index 0000000000..79dd18b027
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jmstextxmlinjmsobjectout/helloworld.composite
@@ -0,0 +1,52 @@
+<?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"
+ targetNamespace="http://itest"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:hw="http://helloworld"
+ name="helloworld">
+
+ <component name="HelloWorldReferenceComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmstextxmlinjmsobjectout.helloworld.HelloWorldReferenceImpl" />
+ <reference name="helloWorldService1" >
+ <binding.jms>
+ <tuscany:wireFormat.jmsTextXML/>
+ <destination jndiName="HelloWorldService1"/>
+ <response>
+ <tuscany:wireFormat.jmsObject/>
+ </response>
+ </binding.jms>
+ </reference>
+ </component>
+
+ <component name="HelloWorldServiceComponent1">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.format.jmstextxmlinjmsobjectout.helloworld.HelloWorldServiceImpl" />
+ <service name="HelloWorldService">
+ <binding.jms>
+ <tuscany:wireFormat.jmsTextXML/>
+ <destination jndiName="HelloWorldService1"/>
+ <response>
+ <tuscany:wireFormat.jmsObject/>
+ </response>
+ </binding.jms>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jmstextxmlinjmsobjectout/helloworld.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jmstextxmlinjmsobjectout/helloworld.wsdl
new file mode 100644
index 0000000000..935a2e73c5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jmstextxmlinjmsobjectout/helloworld.wsdl
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld/textxml" xmlns:tns="http://helloworld/textxml" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld/textxml" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld/textxml" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:complexType name="PersonType">
+ <xsd:sequence>
+ <xsd:element name="firstName" type="xsd:string"/>
+ <xsd:element name="lastName" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <element name="getPersonGreetings">
+ <complexType>
+ <sequence>
+ <element name="person" type="PersonType"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getPersonGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getPersonGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getPersonGreetingsRequest">
+ <wsdl:part element="tns:getPersonGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getPersonGreetingsResponse">
+ <wsdl:part element="tns:getPersonGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ <wsdl:operation name="getPersonGreetings">
+ <wsdl:input message="tns:getPersonGreetingsRequest" name="getPersonGreetingsRequest"/>
+ <wsdl:output message="tns:getPersonGreetingsResponse" name="getPersonGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="getPersonGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getPersonGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getPersonGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <!-- wsdl:binding name="HelloWorldSoapJmsBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/jms"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding-->
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
+ <wsdlsoap:address location="http://localhost:8085/HelloWorldService"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..4d6acc037b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/main/resources/jndi.properties
@@ -0,0 +1,39 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+queue.RequestQueue = RequestQueue
+queue.ResponseQueue = ResponseQueue
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLInJMSObjectOutTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLInJMSObjectOutTestCase.java
new file mode 100644
index 0000000000..27077cb3c9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-jmstextxmlinjmsobjectout/src/test/java/org/apache/tuscany/sca/binding/jms/format/FormatJMSTextXMLInJMSObjectOutTestCase.java
@@ -0,0 +1,63 @@
+/*
+ * 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.jms.format;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.binding.jms.format.jmstextxmlinjmsobjectout.helloworld.HelloWorldService;
+import org.apache.tuscany.sca.binding.jms.format.jmstextxmlinjmsobjectout.helloworld.Person;
+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;
+
+
+/**
+ * This shows how to test the JMS binding using a simple HelloWorld application.
+ */
+public class FormatJMSTextXMLInJMSObjectOutTestCase {
+
+ private static Node node;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testHelloWorldCreate() throws Exception {
+ HelloWorldService helloWorldService = node.getService(HelloWorldService.class, "HelloWorldReferenceComponent");
+
+ assertEquals("Hello Fred Bloggs", helloWorldService.getGreetings("Fred Bloggs"));
+
+ Person person = new Person();
+ person.setFirstName("Fred");
+ person.setLastName("Bloggs");
+ assertEquals("Hello Fred Bloggs", helloWorldService.getPersonGreetings(person));
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-wf-writing/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-wf-writing/pom.xml
new file mode 100644
index 0000000000..127c59ad3d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-wf-writing/pom.xml
@@ -0,0 +1,35 @@
+<?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-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jms-wf-writing</artifactId>
+ <name>Apache Tuscany SCA iTest JMS wireformat wrriting</name>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-wf-writing/src/test/java/org/apache/tuscany/sca/binding/jms/format/WireFormatWritingTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-wf-writing/src/test/java/org/apache/tuscany/sca/binding/jms/format/WireFormatWritingTestCase.java
new file mode 100644
index 0000000000..adecce0f4b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/format-wf-writing/src/test/java/org/apache/tuscany/sca/binding/jms/format/WireFormatWritingTestCase.java
@@ -0,0 +1,262 @@
+/*
+ * 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.jms.format;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.StringReader;
+
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
+import org.apache.tuscany.sca.contribution.processor.ProcessorContext;
+import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
+import org.apache.tuscany.sca.contribution.processor.ValidatingXMLInputFactory;
+import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+import org.apache.tuscany.sca.monitor.ValidationException;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class WireFormatWritingTestCase {
+
+ public static final String NO_WIRE_FORMAT =
+ "<?xml version=\"1.0\" encoding=\"ASCII\"?>"
+ + "<composite xmlns=\"http://docs.oasis-open.org/ns/opencsa/sca/200912\" targetNamespace=\"http://binding-jms\" xmlns:tuscany=\"http://tuscany.apache.org/xmlns/sca/1.1\" name=\"binding-jms\">"
+ + " <component name=\"HelloWorldComponent\">"
+ + " <implementation.java class=\"services.HelloWorld\"/>"
+ + " <service name=\"HelloWorldService\">"
+ + " <binding.jms >"
+ + " <response>"
+ + " <destination jndiName=\"responseConnectionElementName\"/>"
+ + " </response>"
+ + " </binding.jms>"
+ + " </service>"
+ + " </component>"
+ + "</composite>";
+
+ public static final String REQUEST_WIRE_FORMAT =
+ "<?xml version=\"1.0\" encoding=\"ASCII\"?>"
+ + "<composite xmlns=\"http://docs.oasis-open.org/ns/opencsa/sca/200912\" targetNamespace=\"http://binding-jms\" xmlns:tuscany=\"http://tuscany.apache.org/xmlns/sca/1.1\" name=\"binding-jms\">"
+ + " <component name=\"HelloWorldComponent\">"
+ + " <implementation.java class=\"services.HelloWorld\"/>"
+ + " <service name=\"HelloWorldService\">"
+ + " <binding.jms >"
+ + " <tuscany:wireFormat.jmsObject/>"
+ + " <response>"
+ + " <destination jndiName=\"responseConnectionElementName\"/>"
+ + " </response>"
+ + " </binding.jms>"
+ + " </service>"
+ + " </component>"
+ + "</composite>";
+
+ public static final String INVALID_REQUEST_WIRE_FORMAT =
+ "<?xml version=\"1.0\" encoding=\"ASCII\"?>"
+ + "<composite xmlns=\"http://docs.oasis-open.org/ns/opencsa/sca/200912\" targetNamespace=\"http://binding-jms\" xmlns:tuscany=\"http://tuscany.apache.org/xmlns/sca/1.1\" name=\"binding-jms\">"
+ + " <component name=\"HelloWorldComponent\">"
+ + " <implementation.java class=\"services.HelloWorld\"/>"
+ + " <service name=\"HelloWorldService\">"
+ + " <binding.jms >"
+ + " <response>"
+ + " <destination jndiName=\"responseConnectionElementName\"/>"
+ + " </response>"
+ + " <tuscany:wireFormat.jmsObject/>"
+ + " </binding.jms>"
+ + " </service>"
+ + " </component>"
+ + "</composite>";
+
+ public static final String RESPONSE_WIRE_FORMAT =
+ "<?xml version=\"1.0\" encoding=\"ASCII\"?>"
+ + "<composite xmlns=\"http://docs.oasis-open.org/ns/opencsa/sca/200912\" targetNamespace=\"http://binding-jms\" xmlns:tuscany=\"http://tuscany.apache.org/xmlns/sca/1.1\" name=\"binding-jms\">"
+ + " <component name=\"HelloWorldComponent\">"
+ + " <implementation.java class=\"services.HelloWorld\"/>"
+ + " <service name=\"HelloWorldService\">"
+ + " <binding.jms >"
+ + " <response>"
+ + " <tuscany:wireFormat.jmsBytes/>"
+ + " <destination jndiName=\"responseConnectionElementName\"/>"
+ + " </response>"
+ + " </binding.jms>"
+ + " </service>"
+ + " </component>"
+ + "</composite>";
+
+ public static final String INVALID_RESPONSE_WIRE_FORMAT =
+ "<?xml version=\"1.0\" encoding=\"ASCII\"?>"
+ + "<composite xmlns=\"http://docs.oasis-open.org/ns/opencsa/sca/200912\" targetNamespace=\"http://binding-jms\" xmlns:tuscany=\"http://tuscany.apache.org/xmlns/sca/1.1\" name=\"binding-jms\">"
+ + " <component name=\"HelloWorldComponent\">"
+ + " <implementation.java class=\"services.HelloWorld\"/>"
+ + " <service name=\"HelloWorldService\">"
+ + " <binding.jms >"
+ + " <response>"
+ + " <destination jndiName=\"responseConnectionElementName\"/>"
+ + " <tuscany:wireFormat.jmsBytes/>"
+ + " </response>"
+ + " </binding.jms>"
+ + " </service>"
+ + " </component>"
+ + "</composite>";
+
+ public static final String BOTH_WIRE_FORMAT =
+ "<?xml version=\"1.0\" encoding=\"ASCII\"?>"
+ + "<composite xmlns=\"http://docs.oasis-open.org/ns/opencsa/sca/200912\" targetNamespace=\"http://binding-jms\" xmlns:tuscany=\"http://tuscany.apache.org/xmlns/sca/1.1\" name=\"binding-jms\">"
+ + " <component name=\"HelloWorldComponent\">"
+ + " <implementation.java class=\"services.HelloWorld\"/>"
+ + " <service name=\"HelloWorldService\">"
+ + " <binding.jms >"
+ + " <tuscany:wireFormat.jmsObject/>"
+ + " <response>"
+ + " <tuscany:wireFormat.jmsBytes/>"
+ + " <destination jndiName=\"responseConnectionElementName\"/>"
+ + " </response>"
+ + " </binding.jms>"
+ + " </service>"
+ + " </component>"
+ + "</composite>";
+
+ public static final String WIRE_FORMAT =
+ "<?xml version=\"1.0\" encoding=\"ASCII\"?>"
+ + "<composite xmlns=\"http://docs.oasis-open.org/ns/opencsa/sca/200912\" targetNamespace=\"http://binding-jms\" xmlns:tuscany=\"http://tuscany.apache.org/xmlns/sca/1.1\" name=\"binding-jms\">"
+ + " <component name=\"HelloWorldComponent\">"
+ + " <implementation.java class=\"services.HelloWorld\"/>"
+ + " <service name=\"HelloWorldService\">"
+ + " <binding.jms >"
+ + " <tuscany:wireFormat.jmsObject/>"
+ + " <response>"
+ + " <tuscany:wireFormat.jmsBytes/>"
+ + " <destination jndiName=\"responseConnectionElementName\"/>"
+ + " </response>"
+ + " </binding.jms>"
+ + " </service>"
+ + " </component>"
+ + "</composite>";
+
+ public static final String REQ1_WIRE_FORMAT =
+ "<?xml version=\"1.0\" encoding=\"ASCII\"?>"
+ + "<composite xmlns=\"http://docs.oasis-open.org/ns/opencsa/sca/200912\" targetNamespace=\"http://binding-jms\" xmlns:tuscany=\"http://tuscany.apache.org/xmlns/sca/1.1\" name=\"binding-jms\">"
+ + " <component name=\"HelloWorldComponent\">"
+ + " <implementation.java class=\"services.HelloWorld\"/>"
+ + " <service name=\"HelloWorldService\">"
+ + " <binding.jms >"
+ + " <tuscany:wireFormat.jmsObject/> "
+ + " <response>"
+ + " <destination create=\"never\" jndiName=\"jms/Oasis_JMS_Response\" type=\"queue\"/> "
+ + " <connectionFactory create=\"never\" jndiName=\"jms/Oasis_JMS_CF\"/> "
+ + " </response>"
+ + " </binding.jms>"
+ + " </service>"
+ + " </component>"
+ + "</composite>";
+
+ private ValidatingXMLInputFactory inputFactory;
+ private ExtensibleStAXArtifactProcessor staxProcessor;
+ private ProcessorContext context;
+
+ @Before
+ public void setUp() throws Exception {
+ ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
+ context = new ProcessorContext(extensionPoints);
+
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
+ inputFactory = modelFactories.getFactory(ValidatingXMLInputFactory.class);
+
+ StAXArtifactProcessorExtensionPoint staxProcessors = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
+ staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, XMLOutputFactory.newInstance());
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ @Test
+ public void testRequest1WireFormat() throws Exception {
+ String xml = doit(REQ1_WIRE_FORMAT);
+ assertEquals(1, countWireFromats(xml, "<tuscany:wireFormat.jmsObject"));
+
+ }
+ @Test
+ public void testNoWireFormat() throws Exception {
+ doit(NO_WIRE_FORMAT);
+ }
+ @Test
+ public void testRequestWireFormat() throws Exception {
+ doit(REQUEST_WIRE_FORMAT);
+ }
+ @Test
+ public void testInvalidRequestWireFormat() throws Exception {
+ try {
+ doit(INVALID_REQUEST_WIRE_FORMAT);
+ fail();
+ } catch (ValidationException e) {
+ // expected
+ }
+ }
+ @Test
+ public void testResponseWireFormat() throws Exception {
+ doit(RESPONSE_WIRE_FORMAT);
+ }
+ @Test
+ public void testInvalidResponseWireFormat() throws Exception {
+ try {
+ doit(INVALID_RESPONSE_WIRE_FORMAT);
+ fail();
+ } catch (ValidationException e) {
+ // expected
+ }
+ }
+
+ public String doit(String xml) throws Exception {
+ XMLStreamReader reader = inputFactory.createXMLStreamReader(new StringReader(xml));
+ ValidatingXMLInputFactory.setMonitor(reader, context.getMonitor());
+ Composite composite = (Composite)staxProcessor.read(reader, context);
+ context.getMonitor().analyzeProblems();
+ assertNotNull(composite);
+ reader.close();
+
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ staxProcessor.write(composite, bos, context);
+ bos.close();
+
+ String writtenXML = bos.toString();
+ System.out.println(writtenXML);
+
+ reader = inputFactory.createXMLStreamReader(new StringReader(writtenXML));
+ ValidatingXMLInputFactory.setMonitor(reader, context.getMonitor());
+ composite = (Composite)staxProcessor.read(reader, context);
+ context.getMonitor().analyzeProblems();
+ assertNotNull(composite);
+ reader.close();
+ return writtenXML;
+ }
+
+ public int countWireFromats(String xml, String wf){
+ return xml.split("\\Q" + wf + "\\E", -1).length - 1;
+ }
+} \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/pom.xml
new file mode 100644
index 0000000000..4ff9c05594
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/pom.xml
@@ -0,0 +1,35 @@
+<?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-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jms-non-sca-client-broker</artifactId>
+ <name>Apache Tuscany SCA iTest JMS with Non SCA Client</name>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectService.java
new file mode 100644
index 0000000000..9083ba1d9c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectService.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+import org.oasisopen.sca.annotation.OneWay;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface OneWayObjectService {
+
+ @OneWay
+ void sayHello(Object name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectServiceImpl.java
new file mode 100644
index 0000000000..3149f99a25
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectServiceImpl.java
@@ -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.jms;
+
+public class OneWayObjectServiceImpl implements OneWayObjectService {
+
+ public static Object mutex = new Object();
+ public static Object name;
+
+ public void sayHello(Object name) {
+ OneWayObjectServiceImpl.name = name;
+ synchronized (OneWayObjectServiceImpl.mutex) {
+ OneWayObjectServiceImpl.mutex.notify();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java
new file mode 100644
index 0000000000..9cec2d9b3e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+import org.oasisopen.sca.annotation.OneWay;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface OneWayService {
+
+ @OneWay
+ void sayHello(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java
new file mode 100644
index 0000000000..0036391696
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java
@@ -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.jms;
+
+public class OneWayServiceImpl implements OneWayService {
+
+ public static Object mutex = new Object();
+ public static String name;
+
+ public void sayHello(String name) {
+ OneWayServiceImpl.name = name;
+ synchronized (OneWayServiceImpl.mutex) {
+ OneWayServiceImpl.mutex.notify();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..decff8708f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/main/resources/META-INF/sca-contribution.xml
@@ -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://itest">
+ <deployable composite="itest:ServiceComposite"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..03690b1169
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/main/resources/jndi.properties
@@ -0,0 +1,39 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+queue.TextDest = TextDest
+queue.ObjectDest = ObjectDest
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/main/resources/nonSCAclient/service.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/main/resources/nonSCAclient/service.composite
new file mode 100644
index 0000000000..67d5038a51
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/main/resources/nonSCAclient/service.composite
@@ -0,0 +1,54 @@
+<?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:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://itest"
+ name="ServiceComposite">
+
+ <component name="DefaultService">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.OneWayServiceImpl"/>
+ <service name="OneWayService">
+ <binding.jms initialContextFactory="org.apache.activemq.jndi.ActiveMQInitialContextFactory" jndiURL="tcp://localhost:61623">
+ <tuscany:wireFormat.jmsTextXML/>
+ </binding.jms>
+ </service>
+ </component>
+
+ <component name="TextService">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.OneWayServiceImpl"/>
+ <service name="OneWayService">
+ <binding.jms initialContextFactory="org.apache.activemq.jndi.ActiveMQInitialContextFactory" jndiURL="tcp://localhost:61623"
+ uri="jms:jndi:TextDest">
+ <tuscany:wireFormat.jmsText/>
+ </binding.jms>
+ </service>
+ </component>
+
+ <component name="ObjectService">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.OneWayObjectServiceImpl"/>
+ <service name="OneWayObjectService">
+ <binding.jms initialContextFactory="org.apache.activemq.jndi.ActiveMQInitialContextFactory" jndiURL="tcp://localhost:61623"
+ uri="jms:jndi:ObjectDest">
+ <tuscany:wireFormat.jmsObject /> <!-- test that wrapSingle default works -->
+ </binding.jms>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/test/java/org/apache/tuscany/sca/binding/jms/NonSCAClientTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/test/java/org/apache/tuscany/sca/binding/jms/NonSCAClientTestCase.java
new file mode 100644
index 0000000000..54cfdeb273
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/non-sca-client/src/test/java/org/apache/tuscany/sca/binding/jms/NonSCAClientTestCase.java
@@ -0,0 +1,144 @@
+/*
+ * 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.jms;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.Serializable;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.jms.JMSException;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.naming.NamingException;
+
+import org.apache.activemq.broker.BrokerService;
+import org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactory;
+import org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactoryImpl;
+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;
+
+/**
+ * This shows how to test the JMS binding using a simple HelloWorld application.
+ */
+public class NonSCAClientTestCase {
+
+ private static Node node;
+
+ @Before
+ public void init() throws Exception {
+ startBroker();
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @After
+ public void end() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ stopBroker();
+ }
+
+
+ @Test
+ public void testXMLText() throws Exception {
+
+ synchronized (OneWayServiceImpl.mutex) {
+
+ sendTextMessage("dynamicQueues/OneWayService", "<ns2:sayHello xmlns:ns2=\"http://jms.binding.sca.tuscany.apache.org/\"><arg0>Petra</arg0></ns2:sayHello>");
+
+ // wait up to 10 seconds but it will likely be a lot less
+ // as the service invocation will wake this up earlier
+ if (OneWayServiceImpl.name == null) {
+ OneWayServiceImpl.mutex.wait(10000);
+ }
+ }
+ assertEquals("Petra", OneWayServiceImpl.name);
+ }
+
+ @Test
+ public void testText() throws Exception {
+
+ synchronized (OneWayServiceImpl.mutex) {
+
+ sendTextMessage("dynamicQueues/TextDest", "Petra");
+
+ // wait up to 10 seconds but it will likely be a lot less
+ // as the service invocation will wake this up earlier
+ OneWayServiceImpl.mutex.wait(10000);
+ }
+ assertEquals("Petra", OneWayServiceImpl.name);
+ }
+
+ @Test
+ public void testObject() throws Exception {
+
+ Set<Integer> arg = new HashSet<Integer>();
+ arg.add(new Integer(3));
+
+ synchronized (OneWayObjectServiceImpl.mutex) {
+
+ sendObjectMessage("dynamicQueues/ObjectDest", arg);
+
+ // wait up to 10 seconds but it will likely be a lot less
+ // as the service invocation will wake this up earlier
+ OneWayObjectServiceImpl.mutex.wait(10000);
+ }
+ assertEquals(arg, OneWayObjectServiceImpl.name);
+ }
+
+ private static BrokerService broker;
+ protected static void startBroker() throws Exception {
+ broker = new BrokerService();
+ broker.setPersistent(false);
+ broker.setUseJmx(false);
+ broker.addConnector("tcp://localhost:61623");
+ broker.start();
+ }
+
+ protected static void stopBroker() throws Exception {
+ if (broker != null) {
+ broker.stop();
+ }
+ }
+
+ protected static void sendTextMessage(String destName, String payload) throws JMSException, NamingException {
+ JMSResourceFactory rf = new JMSResourceFactoryImpl(null, null, null, "tcp://localhost:61623");
+ Session session = rf.getConnection().createSession(false, Session.AUTO_ACKNOWLEDGE);
+ MessageProducer p = session.createProducer(rf.lookupDestination(destName));
+ rf.getConnection().start();
+ session.run();
+ p.send(session.createTextMessage(payload));
+ rf.closeConnection();
+ }
+
+ protected static void sendObjectMessage(String destName, Object payload) throws JMSException, NamingException {
+ JMSResourceFactory rf = new JMSResourceFactoryImpl(null, null, null, "tcp://localhost:61623");
+ Session session = rf.getConnection().createSession(false, Session.AUTO_ACKNOWLEDGE);
+ MessageProducer p = session.createProducer(rf.lookupDestination(destName));
+ rf.getConnection().start();
+ session.run();
+ p.send(session.createObjectMessage((Serializable)payload));
+ rf.closeConnection();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/noreplyto/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/noreplyto/pom.xml
new file mode 100644
index 0000000000..0803e63928
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/noreplyto/pom.xml
@@ -0,0 +1,35 @@
+<?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-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jms-noreplyto</artifactId>
+ <name>Apache Tuscany SCA iTest JMS No replyTo</name>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/noreplyto/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/noreplyto/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java
new file mode 100644
index 0000000000..430c71aaef
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/noreplyto/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java
@@ -0,0 +1,26 @@
+/*
+ * 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.jms;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorldService {
+ String sayHello(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/noreplyto/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/noreplyto/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..2c6d9d0d17
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/noreplyto/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ public String sayHello(String name) {
+ if ("bang".equals(name)) {
+ throw new RuntimeException("blem wit");
+ }
+ return "jmsHello " + name;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/noreplyto/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/noreplyto/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..16825fe48f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/noreplyto/src/main/resources/META-INF/sca-contribution.xml
@@ -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://itest">
+ <deployable composite="itest:SimpleServiceComposite"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/noreplyto/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/noreplyto/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..4d6acc037b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/noreplyto/src/main/resources/jndi.properties
@@ -0,0 +1,39 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+queue.RequestQueue = RequestQueue
+queue.ResponseQueue = ResponseQueue
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/noreplyto/src/main/resources/service.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/noreplyto/src/main/resources/service.composite
new file mode 100644
index 0000000000..a712990a9b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/noreplyto/src/main/resources/service.composite
@@ -0,0 +1,38 @@
+<?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"
+ targetNamespace="http://itest"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ name="SimpleServiceComposite">
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.HelloWorldServiceImpl"/>
+ <service name="HelloWorldService">
+ <binding.jms>
+ <tuscany:wireFormat.jmsObject/>
+ <destination jndiName="RequestQueue"/>
+ <response>
+ <destination jndiName="ResponseQueue"/>
+ </response>
+ </binding.jms>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/noreplyto/src/test/java/org/apache/tuscany/sca/binding/jms/NoReplyToTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/noreplyto/src/test/java/org/apache/tuscany/sca/binding/jms/NoReplyToTestCase.java
new file mode 100644
index 0000000000..848e340181
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/noreplyto/src/test/java/org/apache/tuscany/sca/binding/jms/NoReplyToTestCase.java
@@ -0,0 +1,100 @@
+/*
+ * 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.jms;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Properties;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.ObjectMessage;
+import javax.jms.Session;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+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;
+
+/**
+ * Uses a non-Tuscany JMS client to send/receive a JMS request to a Tuscany/SCA JMS service
+ */
+public class NoReplyToTestCase {
+
+ private Node node;
+ private Session session;
+ private InitialContext context;
+ private Connection connection;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testHelloWorldCreate() throws Exception {
+ sendJMSRequest();
+ String response = receiveJMSResponse();
+ assertEquals("jmsHello Petra", response);
+ }
+
+ private void sendJMSRequest() throws NamingException, JMSException {
+ context = new InitialContext(new Properties());
+ ConnectionFactory cf = (ConnectionFactory)context.lookup("ConnectionFactory");
+ connection = cf.createConnection();
+ connection.start();
+
+ session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ Destination toDest = (Destination)context.lookup("RequestQueue");
+
+ ObjectMessage m = session.createObjectMessage();
+ m.setObject("Petra");
+
+ MessageProducer producer = session.createProducer(toDest);
+ producer.send(m);
+ }
+
+ private String receiveJMSResponse() throws NamingException, JMSException {
+ Destination replyDest = (Destination)context.lookup("ResponseQueue");
+ MessageConsumer consumer = session.createConsumer(replyDest);
+ Message m = consumer.receive(5000);
+ if (m == null) {
+ throw new RuntimeException("No reply message received");
+ }
+ return ((ObjectMessage)m).getObject().toString();
+ }
+
+ @After
+ public void end() throws JMSException {
+ if (node != null) {
+ node.stop();
+ }
+ if (connection != null) {
+ connection.close();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/pom.xml
new file mode 100644
index 0000000000..c1614a1f4a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/pom.xml
@@ -0,0 +1,35 @@
+<?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-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jms-nulls</artifactId>
+ <name>Apache Tuscany SCA iTest JMS Nulls</name>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java
new file mode 100644
index 0000000000..7fed36fa77
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements the OneWay service.
+ */
+@Service(MyService.class)
+public class ClientImpl implements MyService {
+
+ private MyService serviceA;
+
+ @Reference
+ public void setServiceA(MyService service) {
+ this.serviceA = service;
+ }
+
+ public void sayHello() {
+ serviceA.sayHello();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/MyService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/MyService.java
new file mode 100644
index 0000000000..7ab6019fd5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/MyService.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface MyService {
+
+ void sayHello();
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/ServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/ServiceImpl.java
new file mode 100644
index 0000000000..89758becff
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/src/main/java/org/apache/tuscany/sca/binding/jms/ServiceImpl.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms;
+
+
+public class ServiceImpl implements MyService {
+
+ public void sayHello() {
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ccb52c8702
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/src/main/resources/META-INF/sca-contribution.xml
@@ -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://itest">
+ <deployable composite="itest:Nulls"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..4bada514fa
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/src/main/resources/jndi.properties
@@ -0,0 +1,39 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false&broker.useJmx=false&broker.useShutdownHook=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory, ConnectionFactory2
+
+# register some queues in JNDI using the form
+queue.MyService = MyService
+queue.MyService2 = MyService2
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+topic.ServiceTopic = ServiceTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/src/main/resources/nulls.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/src/main/resources/nulls.composite
new file mode 100644
index 0000000000..1aa17808bf
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/src/main/resources/nulls.composite
@@ -0,0 +1,57 @@
+<?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:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://itest"
+ name="Nulls">
+
+ <component name="Client1">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.ClientImpl"/>
+ <reference name="serviceA">
+ <binding.jms uri="jms:jndi:MyService" />
+ </reference>
+ </component>
+
+ <component name="Service1">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.ServiceImpl"/>
+ <service name="MyService">
+ <binding.jms />
+ </service>
+ </component>
+
+ <component name="Client2">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.ClientImpl"/>
+ <reference name="serviceA">
+ <binding.jms uri="jms:jndi:MyService2">
+ <tuscany:wireFormat.jmsObject/>
+ </binding.jms>
+ </reference>
+ </component>
+
+ <component name="Service2">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.ServiceImpl"/>
+ <service name="MyService">
+ <binding.jms uri="jms:jndi:MyService2">
+ <tuscany:wireFormat.jmsObject/>
+ </binding.jms>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/src/test/java/org/apache/tuscany/sca/binding/jms/NullsTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/src/test/java/org/apache/tuscany/sca/binding/jms/NullsTestCase.java
new file mode 100644
index 0000000000..ac872f46a6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/nulls/src/test/java/org/apache/tuscany/sca/binding/jms/NullsTestCase.java
@@ -0,0 +1,60 @@
+/*
+ * 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.jms;
+
+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;
+
+/**
+ */
+public class NullsTestCase {
+
+ private Node node;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testSayHello() throws Exception {
+ MyService client1 = node.getService(MyService.class, "Client1");
+
+ client1.sayHello();
+
+ }
+
+ @Test
+ public void testSayHelloObjectFormat() throws Exception {
+ MyService client1 = node.getService(MyService.class, "Client2");
+
+ client1.sayHello();
+
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/pom.xml
new file mode 100644
index 0000000000..83ef9aacd5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/pom.xml
@@ -0,0 +1,34 @@
+<?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-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-jms-oneway-nocf</artifactId>
+ <name>Apache Tuscany SCA iTest JMS for a oneway service</name>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java
new file mode 100644
index 0000000000..b572b1012a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements the OneWay service.
+ */
+@Service(OneWayService.class)
+public class OneWayClientImpl implements OneWayService {
+
+ private OneWayService serviceA;
+
+ @Reference
+ public void setServiceA(OneWayService service) {
+ this.serviceA = service;
+ }
+
+ public void sayHello(String name) {
+ serviceA.sayHello(name);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java
new file mode 100644
index 0000000000..9cec2d9b3e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+import org.oasisopen.sca.annotation.OneWay;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface OneWayService {
+
+ @OneWay
+ void sayHello(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java
new file mode 100644
index 0000000000..0036391696
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java
@@ -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.jms;
+
+public class OneWayServiceImpl implements OneWayService {
+
+ public static Object mutex = new Object();
+ public static String name;
+
+ public void sayHello(String name) {
+ OneWayServiceImpl.name = name;
+ synchronized (OneWayServiceImpl.mutex) {
+ OneWayServiceImpl.mutex.notify();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..edd6d508f7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:itest="http://itest">
+ <deployable composite="itest:OneWayServiceComposite"/>
+ <deployable composite="itest:OneWayClientComposite"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..8934614a8a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/main/resources/jndi.properties
@@ -0,0 +1,38 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = SomeConnectionFactory
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+queue.SomeQueue = RequestQueue
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/main/resources/oneway/OneWayClient.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/main/resources/oneway/OneWayClient.composite
new file mode 100644
index 0000000000..bf709776df
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/main/resources/oneway/OneWayClient.composite
@@ -0,0 +1,35 @@
+<?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"
+ targetNamespace="http://itest"
+ name="OneWayClientComposite">
+
+ <component name="OneWayClient">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.OneWayClientImpl"/>
+ <reference name="serviceA">
+ <interface.java interface="org.apache.tuscany.sca.binding.jms.OneWayService" />
+ <binding.jms>
+ <destination jndiName="SomeQueue"/>
+ <connectionFactory jndiName="SomeConnectionFactory"/>
+ </binding.jms>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/main/resources/oneway/OneWayService.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/main/resources/oneway/OneWayService.composite
new file mode 100644
index 0000000000..da2e6a2264
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/main/resources/oneway/OneWayService.composite
@@ -0,0 +1,34 @@
+<?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"
+ targetNamespace="http://itest"
+ name="OneWayServiceComposite">
+
+ <component name="OneWayService">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.OneWayServiceImpl"/>
+ <service name="OneWayService">
+ <binding.jms>
+ <destination jndiName="SomeQueue"/>
+ <connectionFactory jndiName="SomeConnectionFactory"/>
+ </binding.jms>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/test/java/org/apache/tuscany/sca/binding/jms/OneWayTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/test/java/org/apache/tuscany/sca/binding/jms/OneWayTestCase.java
new file mode 100644
index 0000000000..5d1f764382
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway-nocf/src/test/java/org/apache/tuscany/sca/binding/jms/OneWayTestCase.java
@@ -0,0 +1,59 @@
+/*
+ * 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.jms;
+
+import static org.junit.Assert.assertEquals;
+
+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;
+
+/**
+ * This shows how to test the JMS binding using a simple HelloWorld application.
+ */
+public class OneWayTestCase {
+
+ private Node node;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testOneWayInvoked() throws Exception {
+ OneWayService oneWayService = node.getService(OneWayService.class, "OneWayClient");
+ oneWayService.sayHello("Petra");
+ synchronized (OneWayServiceImpl.mutex) {
+ // wait up to 10 seconds but it will likely be a lot less
+ // as the service invocation will wake this up earlier
+ OneWayServiceImpl.mutex.wait(10000);
+ }
+ assertEquals("Petra", OneWayServiceImpl.name);
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/pom.xml
new file mode 100644
index 0000000000..fdd75941a1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/pom.xml
@@ -0,0 +1,35 @@
+<?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-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jms-oneway</artifactId>
+ <name>Apache Tuscany SCA iTest JMS with Oneway</name>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java
new file mode 100644
index 0000000000..b572b1012a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements the OneWay service.
+ */
+@Service(OneWayService.class)
+public class OneWayClientImpl implements OneWayService {
+
+ private OneWayService serviceA;
+
+ @Reference
+ public void setServiceA(OneWayService service) {
+ this.serviceA = service;
+ }
+
+ public void sayHello(String name) {
+ serviceA.sayHello(name);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectService.java
new file mode 100644
index 0000000000..9083ba1d9c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectService.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+import org.oasisopen.sca.annotation.OneWay;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface OneWayObjectService {
+
+ @OneWay
+ void sayHello(Object name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectServiceImpl.java
new file mode 100644
index 0000000000..3149f99a25
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayObjectServiceImpl.java
@@ -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.jms;
+
+public class OneWayObjectServiceImpl implements OneWayObjectService {
+
+ public static Object mutex = new Object();
+ public static Object name;
+
+ public void sayHello(Object name) {
+ OneWayObjectServiceImpl.name = name;
+ synchronized (OneWayObjectServiceImpl.mutex) {
+ OneWayObjectServiceImpl.mutex.notify();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java
new file mode 100644
index 0000000000..9cec2d9b3e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+import org.oasisopen.sca.annotation.OneWay;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface OneWayService {
+
+ @OneWay
+ void sayHello(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java
new file mode 100644
index 0000000000..0036391696
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java
@@ -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.jms;
+
+public class OneWayServiceImpl implements OneWayService {
+
+ public static Object mutex = new Object();
+ public static String name;
+
+ public void sayHello(String name) {
+ OneWayServiceImpl.name = name;
+ synchronized (OneWayServiceImpl.mutex) {
+ OneWayServiceImpl.mutex.notify();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..edd6d508f7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:itest="http://itest">
+ <deployable composite="itest:OneWayServiceComposite"/>
+ <deployable composite="itest:OneWayClientComposite"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..4d6acc037b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/resources/jndi.properties
@@ -0,0 +1,39 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+queue.RequestQueue = RequestQueue
+queue.ResponseQueue = ResponseQueue
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/resources/oneway/OneWayClient.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/resources/oneway/OneWayClient.composite
new file mode 100644
index 0000000000..8bccf22bea
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/resources/oneway/OneWayClient.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://itest"
+ name="OneWayClientComposite">
+
+ <component name="OneWayClient">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.OneWayClientImpl"/>
+ <reference name="serviceA">
+ <binding.jms>
+ <destination jndiName="DestQueueA"/>
+ </binding.jms>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/resources/oneway/OneWayService.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/resources/oneway/OneWayService.composite
new file mode 100644
index 0000000000..0014b88050
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/main/resources/oneway/OneWayService.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://itest"
+ name="OneWayServiceComposite">
+
+ <component name="OneWayService">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.OneWayServiceImpl"/>
+ <service name="OneWayService">
+ <binding.jms>
+ <destination jndiName="DestQueueA" create="always"/>
+ </binding.jms>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/test/java/org/apache/tuscany/sca/binding/jms/OneWayTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/test/java/org/apache/tuscany/sca/binding/jms/OneWayTestCase.java
new file mode 100644
index 0000000000..14bbf238e1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/oneway/src/test/java/org/apache/tuscany/sca/binding/jms/OneWayTestCase.java
@@ -0,0 +1,60 @@
+/*
+ * 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.jms;
+
+import static org.junit.Assert.assertEquals;
+
+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;
+
+/**
+ * This shows how to test the JMS binding using a simple HelloWorld application.
+ */
+public class OneWayTestCase {
+
+ private Node node;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testOneWayInvoked() throws Exception {
+ OneWayService oneWayService = node.getService(OneWayService.class, "OneWayClient");
+ oneWayService.sayHello("Petra");
+ synchronized (OneWayServiceImpl.mutex) {
+ // wait up to 10 seconds but it will likely be a lot less
+ // as the service invocation will wake this up earlier
+ OneWayServiceImpl.mutex.wait(10000);
+ }
+ assertEquals("Petra", OneWayServiceImpl.name);
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/pom.xml
new file mode 100644
index 0000000000..8f7d48f114
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/pom.xml
@@ -0,0 +1,35 @@
+<?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-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jms-policy-headers</artifactId>
+ <name>Apache Tuscany SCA iTest JMS with Policy Headers</name>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java
new file mode 100644
index 0000000000..d4cd5df431
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms;
+
+
+/**
+ * The client interface
+ */
+public interface JMSClient {
+
+ void aClientMethod();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClient.java
new file mode 100644
index 0000000000..464072b42d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClient.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+
+/**
+ * The client interface
+ */
+public interface MsgClient {
+
+ void aClientMethod();
+ void op2();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientImpl.java
new file mode 100644
index 0000000000..4140fa0b89
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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.jms;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(MsgClient.class)
+public class MsgClientImpl implements MsgClient {
+
+ @Reference protected MsgClientService myService;
+
+ public void aClientMethod() {
+ myService.aClientMethod();
+ }
+
+ public void op2() {
+ myService.op2();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientService.java
new file mode 100644
index 0000000000..2be4f2ad3e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientService.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+
+/**
+ * The client interface
+ */
+@Remotable
+public interface MsgClientService {
+
+ void aClientMethod();
+
+ void op2();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgService.java
new file mode 100644
index 0000000000..d5684ca56c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgService.java
@@ -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.jms;
+
+import org.oasisopen.sca.annotation.AllowsPassByReference;
+import org.oasisopen.sca.annotation.Remotable;
+
+
+@Remotable
+@AllowsPassByReference
+public interface MsgService {
+
+ void onMessage(javax.jms.Message msg);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgServiceImpl.java
new file mode 100644
index 0000000000..e18de0456c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/java/org/apache/tuscany/sca/binding/jms/MsgServiceImpl.java
@@ -0,0 +1,39 @@
+/*
+ * 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.jms;
+
+import javax.jms.Message;
+
+import org.oasisopen.sca.annotation.Service;
+
+@Service(MsgService.class)
+public class MsgServiceImpl implements MsgService {
+
+ public static Object lock = new Object();
+ public static Message msg;
+
+ public void onMessage(Message msg) {
+ MsgServiceImpl.msg = msg;
+ synchronized(lock) {
+ lock.notifyAll();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/resources/META-INF/definitions.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/resources/META-INF/definitions.xml
new file mode 100644
index 0000000000..7e417723f2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/resources/META-INF/definitions.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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 xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912">
+
+ <policySet name="JMSPolicySet1"
+ provides="priority"
+ appliesTo="sca:binding.jms">
+ <intentMap provides="priority">
+ <qualifier name="high">
+ <tuscany:jmsHeader JMSPriority="9"/>
+ </qualifier>
+ <qualifier name="medium">
+ <tuscany:jmsHeader JMSPriority="4"/>
+ </qualifier>
+ <qualifier name="low">
+ <tuscany:jmsHeader JMSPriority="0"/>
+ </qualifier>
+ </intentMap>
+ </policySet>
+
+ <policySet name="JMSPolicySet2"
+ provides="deliveryMode"
+ appliesTo="sca:binding.jms">
+ <intentMap provides="deliveryMode">
+ <qualifier name="persistent">
+ <tuscany:jmsHeader JMSDeliveryMode="PERSISTENT"/>
+ </qualifier>
+ <qualifier name="nonPersistent">
+ <tuscany:jmsHeader JMSDeliveryMode="NON_PERSISTENT"/>
+ </qualifier>
+ </intentMap>
+ </policySet>
+
+ <intent name="priority" constrains="sca:binding" intentType="interaction">
+ <qualifier name="high" default="true"/>
+ <qualifier name="medium"/>
+ <qualifier name="low"/>
+ </intent>
+
+ <intent name="deliveryMode" constrains="sca:binding" intentType="interaction">
+ <qualifier name="nonPersistent" default="true"/>
+ <qualifier name="persistent"/>
+ </intent>
+
+</definitions> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..12c7313bb4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/resources/META-INF/sca-contribution.xml
@@ -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://itest">
+ <deployable composite="itest:PropertiesClientComposite"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..f0b9fbd734
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/resources/jndi.properties
@@ -0,0 +1,38 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+queue.ServiceQueue = ServiceQueue
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/resources/policyHeaders/policyHeaders.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/resources/policyHeaders/policyHeaders.composite
new file mode 100644
index 0000000000..68f93669ec
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/main/resources/policyHeaders/policyHeaders.composite
@@ -0,0 +1,45 @@
+<?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"
+ targetNamespace="http://itest"
+ name="PropertiesClientComposite">
+
+ <component name="ClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.MsgClientImpl" />
+ <reference name="myService" requires="priority.medium">
+ <binding.jms uri="jms:jndi:ServiceQueue">
+ <headers type="myType"
+ deliveryMode="persistent"
+ timeToLive="4321"
+ priority="7">
+ <property name="headP1">myHeadP1</property>
+ </headers>
+ </binding.jms>
+ </reference>
+ </component>
+
+ <component name="ServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.MsgServiceImpl" />
+ <service name="MsgService">
+ <binding.jms uri="jms:jndi:ServiceQueue"/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/test/java/org/apache/tuscany/sca/binding/jms/PolicyHeadersTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/test/java/org/apache/tuscany/sca/binding/jms/PolicyHeadersTestCase.java
new file mode 100644
index 0000000000..ebffbc4bc4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/policy-headers/src/test/java/org/apache/tuscany/sca/binding/jms/PolicyHeadersTestCase.java
@@ -0,0 +1,94 @@
+/*
+ * 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.jms;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import javax.jms.DeliveryMode;
+
+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 PolicyHeadersTestCase {
+
+ private Node node;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testProps1() throws Exception {
+ JMSClient client = node.getService(JMSClient.class, "ClientComponent");
+
+ client.aClientMethod();
+
+ // wait for up to 5 seconds but should wake up as soon as done
+ synchronized(MsgServiceImpl.lock) {
+ if (MsgServiceImpl.msg == null) {
+ MsgServiceImpl.lock.wait(5000); // For debugging set higher.
+ }
+ }
+ assertNotNull(MsgServiceImpl.msg);
+
+ assertEquals("myType", MsgServiceImpl.msg.getJMSType());
+ assertEquals(DeliveryMode.PERSISTENT, MsgServiceImpl.msg.getJMSDeliveryMode());
+ assertEquals(7, MsgServiceImpl.msg.getJMSPriority());
+ assertEquals("myHeadP1", MsgServiceImpl.msg.getStringProperty("headP1"));
+ }
+
+ @Test
+ @Ignore
+ public void testOp2() throws Exception {
+ MsgClient client = node.getService(MsgClient.class, "ClientComponent");
+
+ client.op2();
+
+ // wait for up to 5 seconds but should wake up as soon as done
+ synchronized(MsgServiceImpl.lock) {
+ if (MsgServiceImpl.msg == null) {
+ MsgServiceImpl.lock.wait(5000);
+ }
+ }
+ assertNotNull(MsgServiceImpl.msg);
+
+ assertEquals("op2Type", MsgServiceImpl.msg.getJMSType());
+ assertEquals(DeliveryMode.NON_PERSISTENT, MsgServiceImpl.msg.getJMSDeliveryMode());
+ assertEquals(3, MsgServiceImpl.msg.getJMSPriority());
+ assertEquals("myHeadP1", MsgServiceImpl.msg.getStringProperty("headP1"));
+ assertEquals("foo", MsgServiceImpl.msg.getStringProperty("op2P2"));
+ assertEquals("nativeOp2", MsgServiceImpl.msg.getStringProperty("scaOperationName"));
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/pom.xml
new file mode 100644
index 0000000000..acd69711ee
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/pom.xml
@@ -0,0 +1,100 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <packaging>pom</packaging>
+ <artifactId>itest-jms</artifactId>
+ <name>Apache Tuscany SCA iTest JMS</name>
+
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-jms-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>activemq-core</artifactId>
+ <version>5.2.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>xmlunit</groupId>
+ <artifactId>xmlunit</artifactId>
+ <version>1.2</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <modules>
+ <module>args</module>
+ <module>callbacks</module>
+ <module>defaults</module>
+ <module>DynamicReplyQ</module>
+ <module>exceptions</module>
+ <module>exceptions1</module>
+ <module>externalBroker</module>
+ <module>format-jmsbytes</module>
+ <module>format-jmsbytesxml</module>
+ <module>format-jmsdefault</module>
+ <module>format-jmsmessage</module>
+ <module>format-jmsobject</module>
+ <module>format-jmstext</module>
+ <module>format-jmstextxml</module>
+ <module>format-jmstextxmlinjmsobjectout</module>
+ <module>format-wf-writing</module>
+ <module>non-sca-client</module>
+ <module>noreplyto</module>
+ <module>nulls</module>
+ <module>oneway</module>
+ <module>oneway-nocf</module>
+ <module>policy-headers</module>
+ <module>properties</module>
+ <module>responsecf</module>
+ <module>rpc</module>
+ <module>selectors</module>
+ <module>topics</module>
+ <module>ttl</module>
+ <module>uri-rpc</module>
+
+<!-- still to bring up in 2.x
+ <module>definitions</module>
+-->
+
+ </modules>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/pom.xml
new file mode 100644
index 0000000000..f8b7371c48
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/pom.xml
@@ -0,0 +1,35 @@
+<?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-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jms-properties</artifactId>
+ <name>Apache Tuscany SCA iTest JMS with Properties</name>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java
new file mode 100644
index 0000000000..d4cd5df431
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/JMSClient.java
@@ -0,0 +1,28 @@
+/*
+ * 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.jms;
+
+
+/**
+ * The client interface
+ */
+public interface JMSClient {
+
+ void aClientMethod();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClient.java
new file mode 100644
index 0000000000..464072b42d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClient.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+
+/**
+ * The client interface
+ */
+public interface MsgClient {
+
+ void aClientMethod();
+ void op2();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientImpl.java
new file mode 100644
index 0000000000..4140fa0b89
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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.jms;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(MsgClient.class)
+public class MsgClientImpl implements MsgClient {
+
+ @Reference protected MsgClientService myService;
+
+ public void aClientMethod() {
+ myService.aClientMethod();
+ }
+
+ public void op2() {
+ myService.op2();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientService.java
new file mode 100644
index 0000000000..2be4f2ad3e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgClientService.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+
+/**
+ * The client interface
+ */
+@Remotable
+public interface MsgClientService {
+
+ void aClientMethod();
+
+ void op2();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgService.java
new file mode 100644
index 0000000000..d5684ca56c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgService.java
@@ -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.jms;
+
+import org.oasisopen.sca.annotation.AllowsPassByReference;
+import org.oasisopen.sca.annotation.Remotable;
+
+
+@Remotable
+@AllowsPassByReference
+public interface MsgService {
+
+ void onMessage(javax.jms.Message msg);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgServiceImpl.java
new file mode 100644
index 0000000000..e18de0456c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/java/org/apache/tuscany/sca/binding/jms/MsgServiceImpl.java
@@ -0,0 +1,39 @@
+/*
+ * 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.jms;
+
+import javax.jms.Message;
+
+import org.oasisopen.sca.annotation.Service;
+
+@Service(MsgService.class)
+public class MsgServiceImpl implements MsgService {
+
+ public static Object lock = new Object();
+ public static Message msg;
+
+ public void onMessage(Message msg) {
+ MsgServiceImpl.msg = msg;
+ synchronized(lock) {
+ lock.notifyAll();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..12c7313bb4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/resources/META-INF/sca-contribution.xml
@@ -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://itest">
+ <deployable composite="itest:PropertiesClientComposite"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..c44da27df1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/resources/jndi.properties
@@ -0,0 +1,38 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+queue.ServiceQueue = RequestQueue
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/resources/properties/properties.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/resources/properties/properties.composite
new file mode 100644
index 0000000000..85babc8634
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/main/resources/properties/properties.composite
@@ -0,0 +1,53 @@
+<?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"
+ targetNamespace="http://itest"
+ name="PropertiesClientComposite">
+
+ <component name="ClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.MsgClientImpl" />
+ <reference name="myService">
+ <binding.jms uri="jms:jndi:ServiceQueue">
+ <headers type="myType"
+ deliveryMode="persistent"
+ timeToLive="4321"
+ priority="7">
+ <property name="headP1">myHeadP1</property>
+ </headers>
+ <operationProperties name="op2" selectedOperation="nativeOp2">
+ <headers type="op2Type"
+ deliveryMode="nonpersistent"
+ timeToLive="6000"
+ priority="8">
+ <property name="op2P2">foo</property>
+ </headers>
+ </operationProperties>
+ </binding.jms>
+ </reference>
+ </component>
+
+ <component name="ServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.MsgServiceImpl" />
+ <service name="MsgService">
+ <binding.jms uri="jms:jndi:ServiceQueue"/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/test/java/org/apache/tuscany/sca/binding/jms/PropertiesTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/test/java/org/apache/tuscany/sca/binding/jms/PropertiesTestCase.java
new file mode 100644
index 0000000000..e8d748bb19
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/properties/src/test/java/org/apache/tuscany/sca/binding/jms/PropertiesTestCase.java
@@ -0,0 +1,93 @@
+/*
+ * 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.jms;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+import javax.jms.DeliveryMode;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ */
+public class PropertiesTestCase {
+
+ private static Node node;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testProps1() throws Exception {
+ JMSClient client = node.getService(JMSClient.class, "ClientComponent");
+
+ client.aClientMethod();
+
+ // wait for up to 5 seconds but should wake up as soon as done
+ synchronized(MsgServiceImpl.lock) {
+ if (MsgServiceImpl.msg == null) {
+ MsgServiceImpl.lock.wait(5000);
+ }
+ }
+ assertNotNull(MsgServiceImpl.msg);
+
+ assertEquals("myType", MsgServiceImpl.msg.getJMSType());
+ assertEquals(DeliveryMode.PERSISTENT, MsgServiceImpl.msg.getJMSDeliveryMode());
+ // assertEquals(3, MsgServiceImpl.msg.getJMSPriority()); // Doesn't seem to work with ActiveMQ
+ assertEquals("myHeadP1", MsgServiceImpl.msg.getStringProperty("headP1"));
+ }
+
+ @Test
+ public void testOp2() throws Exception {
+ MsgClient client = node.getService(MsgClient.class, "ClientComponent");
+
+ client.op2();
+
+ // wait for up to 5 seconds but should wake up as soon as done
+ synchronized(MsgServiceImpl.lock) {
+ if (MsgServiceImpl.msg == null) {
+ MsgServiceImpl.lock.wait(15000);
+ }
+ }
+ assertNotNull(MsgServiceImpl.msg);
+
+ assertEquals("op2Type", MsgServiceImpl.msg.getJMSType());
+ // assertEquals(DeliveryMode.NON_PERSISTENT, MsgServiceImpl.msg.getJMSDeliveryMode()); // Doesn't seem to work with ActiveMQ
+ // assertEquals(3, MsgServiceImpl.msg.getJMSPriority()); // Doesn't seem to work with ActiveMQ
+ assertEquals("myHeadP1", MsgServiceImpl.msg.getStringProperty("headP1"));
+ assertEquals("foo", MsgServiceImpl.msg.getStringProperty("op2P2"));
+ //operation properties are a service side thing
+ //assertEquals("nativeOp2", MsgServiceImpl.msg.getStringProperty("scaOperationName"));
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/pom.xml
new file mode 100644
index 0000000000..8ac17858a3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/pom.xml
@@ -0,0 +1,35 @@
+<?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-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jms-responsecf</artifactId>
+ <name>Apache Tuscany SCA iTest JMS Response ConnectionFactory</name>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java
new file mode 100644
index 0000000000..9aef6ba1a3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements the HelloWorld service.
+ */
+@Service(HelloWorldService.class)
+public class HelloWorldClientImpl implements HelloWorldService {
+
+ private HelloWorldService serviceA;
+
+ @Reference
+ public void setServiceA(HelloWorldService service) {
+ this.serviceA = service;
+ }
+
+ public String sayHello(String name) {
+ return serviceA.sayHello(name);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java
new file mode 100644
index 0000000000..430c71aaef
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java
@@ -0,0 +1,26 @@
+/*
+ * 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.jms;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorldService {
+ String sayHello(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..2c6d9d0d17
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ public String sayHello(String name) {
+ if ("bang".equals(name)) {
+ throw new RuntimeException("blem wit");
+ }
+ return "jmsHello " + name;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..23c5979291
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:itest="http://itest">
+ <deployable composite="itest:SimpleServiceComposite"/>
+ <deployable composite="itest:SimpleClientComposite"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/main/resources/cf/client.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/main/resources/cf/client.composite
new file mode 100644
index 0000000000..a3e5403432
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/main/resources/cf/client.composite
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://itest"
+ name="SimpleClientComposite">
+
+ <component name="HelloWorldClient">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.HelloWorldClientImpl"/>
+ <reference name="serviceA">
+ <binding.jms>
+ <destination jndiName="DestQueueA"/>
+ <response>
+ <destination jndiName="RespQueueA"/>
+ </response>
+ </binding.jms>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/main/resources/cf/service.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/main/resources/cf/service.composite
new file mode 100644
index 0000000000..cd04ae7836
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/main/resources/cf/service.composite
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://itest"
+ name="SimpleServiceComposite">
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.HelloWorldServiceImpl"/>
+ <service name="HelloWorldService">
+ <binding.jms>
+ <destination jndiName="DestQueueA"/>
+ <response>
+ <connectionFactory jndiName="ResponseCF"/>
+ </response>
+ </binding.jms>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..a41e42950e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/main/resources/jndi.properties
@@ -0,0 +1,39 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory, ResponseCF
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+queue.DestQueueA = RequestQueue
+queue.RespQueueA = ResponseQueue
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/test/java/org/apache/tuscany/sca/binding/jms/ResponseCFTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/test/java/org/apache/tuscany/sca/binding/jms/ResponseCFTestCase.java
new file mode 100644
index 0000000000..03b834ce7d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/responsecf/src/test/java/org/apache/tuscany/sca/binding/jms/ResponseCFTestCase.java
@@ -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.jms;
+
+import static org.junit.Assert.assertEquals;
+
+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;
+
+/**
+ * This shows how to test the JMS binding using a response ConnectionFactory
+ */
+public class ResponseCFTestCase {
+
+ private Node node;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testHelloWorldCreate() throws Exception {
+ HelloWorldService helloWorldService = node.getService(HelloWorldService.class, "HelloWorldClient");
+ assertEquals("jmsHello Petra", helloWorldService.sayHello("Petra"));
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/pom.xml
new file mode 100644
index 0000000000..71212d4d3c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/pom.xml
@@ -0,0 +1,35 @@
+<?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-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jms-rpc</artifactId>
+ <name>Apache Tuscany SCA iTest JMS with RPC</name>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java
new file mode 100644
index 0000000000..9aef6ba1a3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements the HelloWorld service.
+ */
+@Service(HelloWorldService.class)
+public class HelloWorldClientImpl implements HelloWorldService {
+
+ private HelloWorldService serviceA;
+
+ @Reference
+ public void setServiceA(HelloWorldService service) {
+ this.serviceA = service;
+ }
+
+ public String sayHello(String name) {
+ return serviceA.sayHello(name);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java
new file mode 100644
index 0000000000..430c71aaef
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java
@@ -0,0 +1,26 @@
+/*
+ * 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.jms;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorldService {
+ String sayHello(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..2c6d9d0d17
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ public String sayHello(String name) {
+ if ("bang".equals(name)) {
+ throw new RuntimeException("blem wit");
+ }
+ return "jmsHello " + name;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..23c5979291
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:itest="http://itest">
+ <deployable composite="itest:SimpleServiceComposite"/>
+ <deployable composite="itest:SimpleClientComposite"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..4d6acc037b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/main/resources/jndi.properties
@@ -0,0 +1,39 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+queue.RequestQueue = RequestQueue
+queue.ResponseQueue = ResponseQueue
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/main/resources/simple/client.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/main/resources/simple/client.composite
new file mode 100644
index 0000000000..a758389e89
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/main/resources/simple/client.composite
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://itest"
+ name="SimpleClientComposite">
+
+ <component name="HelloWorldClient">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.HelloWorldClientImpl"/>
+ <reference name="serviceA">
+ <binding.jms>
+ <destination jndiName="DestQueueA">
+ </destination>
+ <response>
+ <destination jndiName="RespQueueA"/>
+ </response>
+ </binding.jms>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/main/resources/simple/service.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/main/resources/simple/service.composite
new file mode 100644
index 0000000000..33364f61c0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/main/resources/simple/service.composite
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://itest"
+ name="SimpleServiceComposite">
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.HelloWorldServiceImpl"/>
+ <service name="HelloWorldService">
+ <binding.jms>
+ <destination jndiName="DestQueueA" create="always">
+ </destination>
+ <response>
+ <destination jndiName="RespQueueA" create="always"/>
+ </response>
+ </binding.jms>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/test/java/org/apache/tuscany/sca/binding/jms/RPCTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/test/java/org/apache/tuscany/sca/binding/jms/RPCTestCase.java
new file mode 100644
index 0000000000..3c0eb0791b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/rpc/src/test/java/org/apache/tuscany/sca/binding/jms/RPCTestCase.java
@@ -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.jms;
+
+import static org.junit.Assert.assertEquals;
+
+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;
+
+/**
+ * This shows how to test the JMS binding using a simple HelloWorld application.
+ */
+public class RPCTestCase {
+
+ private Node node;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testHelloWorldCreate() throws Exception {
+ HelloWorldService helloWorldService = node.getService(HelloWorldService.class, "HelloWorldClient");
+ assertEquals("jmsHello Petra", helloWorldService.sayHello("Petra"));
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/pom.xml
new file mode 100644
index 0000000000..f628857985
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/pom.xml
@@ -0,0 +1,35 @@
+<?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-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jms-selectors</artifactId>
+ <name>Apache Tuscany SCA iTest JMS Tests For Selectors</name>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java
new file mode 100644
index 0000000000..b589d5e8bc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements the OneWay service.
+ */
+@Service(SelectorService.class)
+public class ClientImpl implements SelectorService {
+
+ private SelectorService serviceA;
+
+ @Reference
+ public void setServiceA(SelectorService service) {
+ this.serviceA = service;
+ }
+
+ public void sayHello(String name) {
+ serviceA.sayHello(name);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorService.java
new file mode 100644
index 0000000000..1aff0d454e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorService.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+import org.oasisopen.sca.annotation.OneWay;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface SelectorService {
+
+ @OneWay
+ void sayHello(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl1.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl1.java
new file mode 100644
index 0000000000..fb53c877e6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl1.java
@@ -0,0 +1,40 @@
+/*
+ * 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.jms;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class SelectorServiceImpl1 implements SelectorService {
+
+ public static Object lock = new Object();
+ public static List<String> names = new ArrayList<String>();
+
+ public void sayHello(String name) {
+ System.out.println("SelectorServiceImpl1 " + name);
+ SelectorServiceImpl1.names.add(name);
+ if (names.size() == 2) {
+ synchronized (SelectorServiceImpl1.lock) {
+ SelectorServiceImpl1.lock.notify();
+ }
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl2.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl2.java
new file mode 100644
index 0000000000..1bbaf5d6f4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl2.java
@@ -0,0 +1,38 @@
+/*
+ * 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.jms;
+
+public class SelectorServiceImpl2 implements SelectorService {
+
+ public static Object lock = new Object();
+ public static String name;
+
+ public void sayHello(String name) {
+ if (SelectorServiceImpl2.name != null) {
+ throw new IllegalStateException("name already set");
+ }
+ System.out.println("SelectorServiceImpl2 " + name);
+ SelectorServiceImpl2.name = name;
+ synchronized (SelectorServiceImpl2.lock) {
+ SelectorServiceImpl2.lock.notify();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl3.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl3.java
new file mode 100644
index 0000000000..4bdc4edcb5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/SelectorServiceImpl3.java
@@ -0,0 +1,38 @@
+/*
+ * 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.jms;
+
+public class SelectorServiceImpl3 implements SelectorService {
+
+ public static Object lock = new Object();
+ public static String name;
+
+ public void sayHello(String name) {
+ if (SelectorServiceImpl3.name != null) {
+ throw new IllegalStateException("name already set");
+ }
+ System.out.println("SelectorServiceImpl3 " + name);
+ SelectorServiceImpl3.name = name;
+ synchronized (SelectorServiceImpl3.lock) {
+ SelectorServiceImpl3.lock.notify();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldReference.java
new file mode 100644
index 0000000000..0592194b21
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldReference.java
@@ -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.jms.operationselector.jmsdefault;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldReference {
+
+ public String getGreetings(String name);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldReferenceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldReferenceImpl.java
new file mode 100644
index 0000000000..2d4ff0192b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldReferenceImpl.java
@@ -0,0 +1,39 @@
+/*
+ * 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.jms.operationselector.jmsdefault;
+
+import org.oasisopen.sca.annotation.Reference;
+
+
+public class HelloWorldReferenceImpl implements HelloWorldReference {
+
+ @Reference
+ protected HelloWorldService helloWorldService1;
+
+ @Reference
+ protected HelloWorldService helloWorldService2;
+
+ public String getGreetings(String name){
+ return helloWorldService1.getGreetingsOne(name) + " " +
+ helloWorldService1.getGreetingsTwo(name) + " " +
+ helloWorldService2.getGreetingsOne(name) + " " +
+ helloWorldService1.getGreetingsThree(name);
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldService.java
new file mode 100644
index 0000000000..b632b3f60f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldService.java
@@ -0,0 +1,38 @@
+/*
+ * 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.jms.operationselector.jmsdefault;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+ public String getGreetingsOne(String name);
+
+ public String getGreetingsTwo(String name);
+
+ public String getGreetingsThree(String name);
+
+ public String getGreetingsFour(String name);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..b2df9137c8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsdefault/HelloWorldServiceImpl.java
@@ -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.binding.jms.operationselector.jmsdefault;
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ public String getGreetingsOne(String name){
+ String response = "Hello One " + name;
+ System.out.println("getGreetingsOne: " + response);
+ return response;
+ }
+
+ public String getGreetingsTwo(String name){
+ String response = "Hello Two " + name;
+ System.out.println("getGreetingsTwo: " + response);
+ return response;
+ }
+
+ public String getGreetingsThree(String name){
+ String response = "Hello Three " + name;
+ System.out.println("getGreetingsThree: " + response);
+ return response;
+ }
+
+ public String getGreetingsFour(String name){
+ String response = "Hello Four " + name;
+ System.out.println("getGreetingsFour: " + response);
+ return response;
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldReference.java
new file mode 100644
index 0000000000..0b24678543
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldReference.java
@@ -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.jms.operationselector.jmsuserprop;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldReference {
+
+ public String getGreetings(String name);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldReferenceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldReferenceImpl.java
new file mode 100644
index 0000000000..0ce66005fc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldReferenceImpl.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms.operationselector.jmsuserprop;
+
+import org.oasisopen.sca.annotation.Reference;
+
+
+public class HelloWorldReferenceImpl implements HelloWorldReference {
+
+ @Reference
+ protected HelloWorldService helloWorldService1;
+
+
+ public String getGreetings(String name){
+ return helloWorldService1.getGreetingsOne(name) + " " +
+ helloWorldService1.getGreetingsTwo(name) + " " +
+ helloWorldService1.getGreetingsThree(name);
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldService.java
new file mode 100644
index 0000000000..7e42113da4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldService.java
@@ -0,0 +1,38 @@
+/*
+ * 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.jms.operationselector.jmsuserprop;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+ public String getGreetingsOne(String name);
+
+ public String getGreetingsTwo(String name);
+
+ public String getGreetingsThree(String name);
+
+ public String getGreetingsFour(String name);
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..724de6ff7c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/java/org/apache/tuscany/sca/binding/jms/operationselector/jmsuserprop/HelloWorldServiceImpl.java
@@ -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.binding.jms.operationselector.jmsuserprop;
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ public String getGreetingsOne(String name){
+ String response = "Hello One " + name;
+ System.out.println("getGreetingsOne: " + response);
+ return response;
+ }
+
+ public String getGreetingsTwo(String name){
+ String response = "Hello Two " + name;
+ System.out.println("getGreetingsTwo: " + response);
+ return response;
+ }
+
+ public String getGreetingsThree(String name){
+ String response = "Hello Three " + name;
+ System.out.println("getGreetingsThree: " + response);
+ return response;
+ }
+
+ public String getGreetingsFour(String name){
+ String response = "Hello Four " + name;
+ System.out.println("getGreetingsFour: " + response);
+ return response;
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..3527e98032
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,25 @@
+<?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://itest">
+ <deployable composite="itest:helloworld"/>
+ <deployable composite="itest:helloworldUP"/>
+ <deployable composite="itest:Selectors"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/resources/jmsdefault/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/resources/jmsdefault/helloworld.composite
new file mode 100644
index 0000000000..1fbe1fdfc7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/resources/jmsdefault/helloworld.composite
@@ -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.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://itest"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:hw="http://helloworld"
+ name="helloworld">
+
+ <component name="HelloWorldReferenceComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.operationselector.jmsdefault.HelloWorldReferenceImpl" />
+ <reference name="helloWorldService1" >
+ <binding.jms>
+ <destination jndiName="HelloWorldService1"/>
+ </binding.jms>
+ </reference>
+ <reference name="helloWorldService2" >
+ <binding.jms>
+ <destination jndiName="HelloWorldService2"/>
+ <operationProperties name="getGreetingsOne" >
+ <headers>
+ <property name="scaOperationName">getGreetingsThree</property>
+ </headers>
+ </operationProperties>
+ </binding.jms>
+ </reference>
+ </component>
+
+ <component name="HelloWorldServiceComponent1">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.operationselector.jmsdefault.HelloWorldServiceImpl" />
+ <service name="HelloWorldService">
+ <binding.jms>
+ <destination jndiName="HelloWorldService1"/>
+ <operationProperties name="getGreetingsFour" selectedOperation="getGreetingsThree">
+ <headers>
+ <property name="blaNotUsed">getGreetingsThree</property>
+ </headers>
+ </operationProperties>
+ </binding.jms>
+ </service>
+ </component>
+
+ <component name="HelloWorldServiceComponent2">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.operationselector.jmsdefault.HelloWorldServiceImpl" />
+ <service name="HelloWorldService">
+ <binding.jms>
+ <operationSelector.jmsDefault/>
+ <destination jndiName="HelloWorldService2"/>
+ </binding.jms>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/resources/jmsuserprop/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/resources/jmsuserprop/helloworld.composite
new file mode 100644
index 0000000000..2f39bd1e8e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/resources/jmsuserprop/helloworld.composite
@@ -0,0 +1,65 @@
+<?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"
+ targetNamespace="http://itest"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:hw="http://helloworld"
+ name="helloworldUP">
+
+ <component name="HelloWorldReferenceComponent1">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.operationselector.jmsuserprop.HelloWorldReferenceImpl" />
+ <reference name="helloWorldService1" >
+ <binding.jms>
+ <destination jndiName="HelloWorldService4"/>
+ <operationProperties name="getGreetingsOne" >
+ <headers>
+ <property name="myProperty">getGreetingsOne</property>
+ </headers>
+ </operationProperties>
+ <operationProperties name="getGreetingsTwo" >
+ <headers>
+ <property name="myProperty">getGreetingsThree</property>
+ </headers>
+ </operationProperties>
+ <operationProperties name="getGreetingsThree" >
+ <headers>
+ <property name="myProperty">getGreetingsTwo</property>
+ </headers>
+ </operationProperties>
+ </binding.jms>
+ </reference>
+ </component>
+
+ <component name="HelloWorldServiceComponent3">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.operationselector.jmsuserprop.HelloWorldServiceImpl" />
+ <service name="HelloWorldService">
+ <binding.jms>
+ <tuscany:operationSelector.jmsUserProp propertyName="myProperty"/>
+ <destination jndiName="HelloWorldService4"/>
+ <operationProperties name="getGreetingsFour" selectedOperation="getGreetingsThree">
+ <headers>
+ <property name="blaNotUsed2">getGreetingsThree</property>
+ </headers>
+ </operationProperties>
+ </binding.jms>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..7ce468aa0f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/resources/jndi.properties
@@ -0,0 +1,38 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false&broker.useJmx=false&broker.useShutdownHook=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory, ConnectionFactory2
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+topic.ServiceTopic = ServiceTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/resources/selectors/selectors.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/resources/selectors/selectors.composite
new file mode 100644
index 0000000000..1a408dfb9a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/main/resources/selectors/selectors.composite
@@ -0,0 +1,68 @@
+<?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"
+ targetNamespace="http://itest"
+ xmlns:itest="http://jms"
+ name="Selectors">
+
+ <component name="Client1">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.ClientImpl"/>
+ <reference name="serviceA">
+ <binding.jms uri="jms:jndi:ServiceTopic" >
+ <headers type="type1" />
+ </binding.jms>
+ </reference>
+ </component>
+
+ <component name="Client2">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.ClientImpl"/>
+ <reference name="serviceA">
+ <binding.jms uri="jms:jndi:ServiceTopic" >
+ <headers type="type2" />
+ </binding.jms>
+ </reference>
+ </component>
+
+ <component name="Service1">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.SelectorServiceImpl1"/>
+ <service name="SelectorService">
+ <binding.jms uri="jms:jndi:ServiceTopic" />
+ </service>
+ </component>
+
+ <component name="Service2">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.SelectorServiceImpl2"/>
+ <service name="SelectorService">
+ <binding.jms uri="jms:jndi:ServiceTopic" >
+ <messageSelection selector="JMSType = 'type1'"/>
+ </binding.jms>
+ </service>
+ </component>
+
+ <component name="Service3">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.SelectorServiceImpl3"/>
+ <service name="SelectorService">
+ <binding.jms uri="jms:jndi:ServiceTopic" >
+ <messageSelection selector="JMSType = 'type2'"/>
+ </binding.jms>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/OperationselectorJMSDefaultTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/OperationselectorJMSDefaultTestCase.java
new file mode 100644
index 0000000000..bee0c549bd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/OperationselectorJMSDefaultTestCase.java
@@ -0,0 +1,57 @@
+/*
+ * 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.jms;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.binding.jms.operationselector.jmsdefault.HelloWorldReference;
+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;
+
+
+/**
+ * This shows how to test the JMS binding using a simple HelloWorld application.
+ */
+public class OperationselectorJMSDefaultTestCase {
+
+ private Node node;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testHelloWorldCreate() throws Exception {
+ HelloWorldReference helloWorldReference = node.getService(HelloWorldReference.class, "HelloWorldReferenceComponent");
+
+ assertEquals("Hello One Fred Bloggs Hello Two Fred Bloggs Hello Three Fred Bloggs Hello Four Fred Bloggs", helloWorldReference.getGreetings("Fred Bloggs"));
+
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/OperationselectorJMSUserPropTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/OperationselectorJMSUserPropTestCase.java
new file mode 100644
index 0000000000..33e047ae18
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/OperationselectorJMSUserPropTestCase.java
@@ -0,0 +1,57 @@
+/*
+ * 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.jms;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.binding.jms.operationselector.jmsdefault.HelloWorldReference;
+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;
+
+
+/**
+ * This shows how to test the JMS binding using a simple HelloWorld application.
+ */
+public class OperationselectorJMSUserPropTestCase {
+
+ private Node node;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testHelloWorldCreate() throws Exception {
+ HelloWorldReference helloWorldReference = node.getService(HelloWorldReference.class, "HelloWorldReferenceComponent1");
+
+ assertEquals("Hello One Fred Bloggs Hello Four Fred Bloggs Hello Two Fred Bloggs", helloWorldReference.getGreetings("Fred Bloggs"));
+
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/SelectorsTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/SelectorsTestCase.java
new file mode 100644
index 0000000000..e7254005be
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/selectors/src/test/java/org/apache/tuscany/sca/binding/jms/SelectorsTestCase.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+import static org.junit.Assert.assertEquals;
+
+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;
+
+/**
+ */
+public class SelectorsTestCase {
+
+ private Node node;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testSayHello() throws Exception {
+ SelectorService client1 = node.getService(SelectorService.class, "Client1");
+ SelectorService client2 = node.getService(SelectorService.class, "Client2");
+
+ client1.sayHello("petra");
+ client2.sayHello("beate");
+
+ // wait for up to 5 seconds but should wake up as soon as done
+ synchronized(SelectorServiceImpl2.lock) {
+ if (SelectorServiceImpl2.name == null) {
+ SelectorServiceImpl2.lock.wait(5000);
+ }
+ }
+ synchronized(SelectorServiceImpl3.lock) {
+ if (SelectorServiceImpl3.name == null) {
+ SelectorServiceImpl3.lock.wait(5000);
+ }
+ }
+ synchronized(SelectorServiceImpl1.lock) {
+ if (SelectorServiceImpl1.names.size() != 2) {
+ SelectorServiceImpl1.lock.wait(5000);
+ }
+ }
+
+ assertEquals("petra", SelectorServiceImpl2.name);
+ assertEquals("beate", SelectorServiceImpl3.name);
+ assertEquals(2, SelectorServiceImpl1.names.size());
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/pom.xml
new file mode 100644
index 0000000000..99f5a2344c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/pom.xml
@@ -0,0 +1,35 @@
+<?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-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jms-topics</artifactId>
+ <name>Apache Tuscany SCA iTest JMS Tests for topics</name>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java
new file mode 100644
index 0000000000..b572b1012a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayClientImpl.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements the OneWay service.
+ */
+@Service(OneWayService.class)
+public class OneWayClientImpl implements OneWayService {
+
+ private OneWayService serviceA;
+
+ @Reference
+ public void setServiceA(OneWayService service) {
+ this.serviceA = service;
+ }
+
+ public void sayHello(String name) {
+ serviceA.sayHello(name);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java
new file mode 100644
index 0000000000..9cec2d9b3e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayService.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+import org.oasisopen.sca.annotation.OneWay;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface OneWayService {
+
+ @OneWay
+ void sayHello(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java
new file mode 100644
index 0000000000..0036391696
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/main/java/org/apache/tuscany/sca/binding/jms/OneWayServiceImpl.java
@@ -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.jms;
+
+public class OneWayServiceImpl implements OneWayService {
+
+ public static Object mutex = new Object();
+ public static String name;
+
+ public void sayHello(String name) {
+ OneWayServiceImpl.name = name;
+ synchronized (OneWayServiceImpl.mutex) {
+ OneWayServiceImpl.mutex.notify();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..c1156b35e6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:itest="http://itest">
+ <deployable composite="itest:TopicsClientComposite"/>
+ <deployable composite="itest:OneWayServiceComposite"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..d7988ee60d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/main/resources/jndi.properties
@@ -0,0 +1,38 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false&broker.useJmx=false&broker.useShutdownHook=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+topic.MyTopic = example.MyTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/main/resources/topics/TopicsClient.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/main/resources/topics/TopicsClient.composite
new file mode 100644
index 0000000000..d4027ff60d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/main/resources/topics/TopicsClient.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://itest"
+ name="TopicsClientComposite">
+
+ <component name="OneWayClient">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.OneWayClientImpl"/>
+ <reference name="serviceA">
+ <binding.jms>
+ <destination jndiName="MyTopic" type="topic" create="never"/>
+ </binding.jms>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/main/resources/topics/TopicsService.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/main/resources/topics/TopicsService.composite
new file mode 100644
index 0000000000..8726543253
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/main/resources/topics/TopicsService.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://itest"
+ name="OneWayServiceComposite">
+
+ <component name="OneWayService">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.OneWayServiceImpl"/>
+ <service name="OneWayService">
+ <binding.jms>
+ <destination jndiName="MyTopic" type="topic" create="never"/>
+ </binding.jms>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/test/java/org/apache/tuscany/sca/binding/jms/TopicsTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/test/java/org/apache/tuscany/sca/binding/jms/TopicsTestCase.java
new file mode 100644
index 0000000000..35fe96b81a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/topics/src/test/java/org/apache/tuscany/sca/binding/jms/TopicsTestCase.java
@@ -0,0 +1,59 @@
+/*
+ * 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.jms;
+
+import static org.junit.Assert.assertEquals;
+
+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;
+
+/**
+ * This shows how to test the JMS binding using a simple HelloWorld application.
+ */
+public class TopicsTestCase {
+
+ private Node node;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testOneWayInvoked() throws Exception {
+ OneWayService oneWayService = node.getService(OneWayService.class, "OneWayClient");
+ oneWayService.sayHello("Petra");
+ synchronized (OneWayServiceImpl.mutex) {
+ // wait up to 10 seconds but it will likely be a lot less
+ // as the service invocation will wake this up earlier
+ OneWayServiceImpl.mutex.wait(10000);
+ }
+ assertEquals("Petra", OneWayServiceImpl.name);
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/pom.xml
new file mode 100644
index 0000000000..857f5232e2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/pom.xml
@@ -0,0 +1,35 @@
+<?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-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jms-ttl</artifactId>
+ <name>Apache Tuscany SCA iTest JMS Time To Live</name>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/src/main/java/itest/MockInitialContextFactory.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/src/main/java/itest/MockInitialContextFactory.java
new file mode 100644
index 0000000000..336fecf67b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/src/main/java/itest/MockInitialContextFactory.java
@@ -0,0 +1,904 @@
+/*
+ * 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 itest;
+
+import java.io.Serializable;
+import java.util.Enumeration;
+import java.util.Hashtable;
+
+import javax.jms.BytesMessage;
+import javax.jms.Connection;
+import javax.jms.ConnectionConsumer;
+import javax.jms.ConnectionFactory;
+import javax.jms.ConnectionMetaData;
+import javax.jms.Destination;
+import javax.jms.ExceptionListener;
+import javax.jms.JMSException;
+import javax.jms.MapMessage;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageListener;
+import javax.jms.MessageProducer;
+import javax.jms.ObjectMessage;
+import javax.jms.Queue;
+import javax.jms.QueueBrowser;
+import javax.jms.ServerSessionPool;
+import javax.jms.Session;
+import javax.jms.StreamMessage;
+import javax.jms.TemporaryQueue;
+import javax.jms.TemporaryTopic;
+import javax.jms.TextMessage;
+import javax.jms.Topic;
+import javax.jms.TopicSubscriber;
+import javax.naming.Binding;
+import javax.naming.Context;
+import javax.naming.Name;
+import javax.naming.NameClassPair;
+import javax.naming.NameParser;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+
+/**
+ * Some classes that mock up various JMS interfaces with the end result
+ * of having the Time-To-Live value set on the static timeToLive
+ *
+ * This class is referenced from the AMQ jndi.properties file
+ */
+public class MockInitialContextFactory extends org.apache.activemq.jndi.ActiveMQInitialContextFactory{
+
+ public static Object lock = new Object();
+ public static Long timeToLive;
+
+ public Context getInitialContext(Hashtable environment) throws NamingException {
+ return new Context() {
+
+ public Object addToEnvironment(String propName, Object propVal) throws NamingException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void bind(Name name, Object obj) throws NamingException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void bind(String name, Object obj) throws NamingException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void close() throws NamingException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public Name composeName(Name name, Name prefix) throws NamingException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String composeName(String name, String prefix) throws NamingException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Context createSubcontext(Name name) throws NamingException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Context createSubcontext(String name) throws NamingException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void destroySubcontext(Name name) throws NamingException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void destroySubcontext(String name) throws NamingException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public Hashtable<?, ?> getEnvironment() throws NamingException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getNameInNamespace() throws NamingException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public NameParser getNameParser(Name name) throws NamingException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public NameParser getNameParser(String name) throws NamingException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public NamingEnumeration<NameClassPair> list(Name name) throws NamingException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public NamingEnumeration<NameClassPair> list(String name) throws NamingException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public NamingEnumeration<Binding> listBindings(Name name) throws NamingException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public NamingEnumeration<Binding> listBindings(String name) throws NamingException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object lookup(Name name) throws NamingException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object lookup(String name) throws NamingException {
+ if (name.endsWith("ConnectionFactory")) {
+ return new ConnectionFactory() {
+ public Connection createConnection() throws JMSException {
+ return new Connection(){
+
+ public void close() throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public ConnectionConsumer createConnectionConsumer(Destination arg0,
+ String arg1,
+ ServerSessionPool arg2,
+ int arg3) throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ConnectionConsumer createDurableConnectionConsumer(Topic arg0,
+ String arg1,
+ String arg2,
+ ServerSessionPool arg3,
+ int arg4) throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Session createSession(boolean arg0, int arg1) throws JMSException {
+ // TODO Auto-generated method stub
+ return new Session() {
+
+ public void close() throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void commit() throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public QueueBrowser createBrowser(Queue arg0) throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public QueueBrowser createBrowser(Queue arg0, String arg1) throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public BytesMessage createBytesMessage() throws JMSException {
+ // TODO Auto-generated method stub
+ return new BytesMessage() {
+
+ public long getBodyLength() throws JMSException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public boolean readBoolean() throws JMSException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public byte readByte() throws JMSException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public int readBytes(byte[] arg0) throws JMSException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public int readBytes(byte[] arg0, int arg1) throws JMSException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public char readChar() throws JMSException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public double readDouble() throws JMSException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public float readFloat() throws JMSException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public int readInt() throws JMSException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public long readLong() throws JMSException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public short readShort() throws JMSException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public String readUTF() throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public int readUnsignedByte() throws JMSException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public int readUnsignedShort() throws JMSException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public void reset() throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void writeBoolean(boolean arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void writeByte(byte arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void writeBytes(byte[] arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void writeBytes(byte[] arg0, int arg1, int arg2)
+ throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void writeChar(char arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void writeDouble(double arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void writeFloat(float arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void writeInt(int arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void writeLong(long arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void writeObject(Object arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void writeShort(short arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void writeUTF(String arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void acknowledge() throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void clearBody() throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void clearProperties() throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public boolean getBooleanProperty(String arg0) throws JMSException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public byte getByteProperty(String arg0) throws JMSException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public double getDoubleProperty(String arg0) throws JMSException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public float getFloatProperty(String arg0) throws JMSException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public int getIntProperty(String arg0) throws JMSException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public String getJMSCorrelationID() throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public byte[] getJMSCorrelationIDAsBytes() throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public int getJMSDeliveryMode() throws JMSException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public Destination getJMSDestination() throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public long getJMSExpiration() throws JMSException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public String getJMSMessageID() throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public int getJMSPriority() throws JMSException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public boolean getJMSRedelivered() throws JMSException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public Destination getJMSReplyTo() throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public long getJMSTimestamp() throws JMSException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public String getJMSType() throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public long getLongProperty(String arg0) throws JMSException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public Object getObjectProperty(String arg0) throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Enumeration getPropertyNames() throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public short getShortProperty(String arg0) throws JMSException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public String getStringProperty(String arg0) throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean propertyExists(String arg0) throws JMSException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void setBooleanProperty(String arg0, boolean arg1)
+ throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setByteProperty(String arg0, byte arg1) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setDoubleProperty(String arg0, double arg1)
+ throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setFloatProperty(String arg0, float arg1)
+ throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setIntProperty(String arg0, int arg1) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setJMSCorrelationID(String arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setJMSCorrelationIDAsBytes(byte[] arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setJMSDeliveryMode(int arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setJMSDestination(Destination arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setJMSExpiration(long arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setJMSMessageID(String arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setJMSPriority(int arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setJMSRedelivered(boolean arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setJMSReplyTo(Destination arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setJMSTimestamp(long arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setJMSType(String arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setLongProperty(String arg0, long arg1) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setObjectProperty(String arg0, Object arg1)
+ throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setShortProperty(String arg0, short arg1)
+ throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setStringProperty(String arg0, String arg1)
+ throws JMSException {
+ // TODO Auto-generated method stub
+
+ }};
+ }
+
+ public MessageConsumer createConsumer(Destination arg0) throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public MessageConsumer createConsumer(Destination arg0, String arg1)
+ throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public MessageConsumer createConsumer(Destination arg0,
+ String arg1,
+ boolean arg2) throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public TopicSubscriber createDurableSubscriber(Topic arg0, String arg1)
+ throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public TopicSubscriber createDurableSubscriber(Topic arg0,
+ String arg1,
+ String arg2,
+ boolean arg3)
+ throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public MapMessage createMapMessage() throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Message createMessage() throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ObjectMessage createObjectMessage() throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ObjectMessage createObjectMessage(Serializable arg0) throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public MessageProducer createProducer(Destination arg0) throws JMSException {
+ return new MessageProducer() {
+
+ public void close() throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public int getDeliveryMode() throws JMSException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public Destination getDestination() throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean getDisableMessageID() throws JMSException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean getDisableMessageTimestamp() throws JMSException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public int getPriority() throws JMSException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public long getTimeToLive() throws JMSException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public void send(Message arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void send(Destination arg0, Message arg1) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void send(Message arg0, int arg1, int arg2, long arg3)
+ throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void send(Destination arg0,
+ Message arg1,
+ int arg2,
+ int arg3,
+ long arg4) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setDeliveryMode(int arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setDisableMessageID(boolean arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setDisableMessageTimestamp(boolean arg0)
+ throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setPriority(int arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setTimeToLive(long arg0) throws JMSException {
+ MockInitialContextFactory.timeToLive = Long.valueOf(arg0);
+ synchronized(MockInitialContextFactory.lock) {
+ MockInitialContextFactory.lock.notifyAll();
+ }
+ }};
+ }
+
+ public Queue createQueue(String arg0) throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public StreamMessage createStreamMessage() throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public TemporaryQueue createTemporaryQueue() throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public TemporaryTopic createTemporaryTopic() throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public TextMessage createTextMessage() throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public TextMessage createTextMessage(String arg0) throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Topic createTopic(String arg0) throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public int getAcknowledgeMode() throws JMSException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public MessageListener getMessageListener() throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean getTransacted() throws JMSException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void recover() throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void rollback() throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void run() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setMessageListener(MessageListener arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void unsubscribe(String arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }};
+ }
+
+ public String getClientID() throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ExceptionListener getExceptionListener() throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ConnectionMetaData getMetaData() throws JMSException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void setClientID(String arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setExceptionListener(ExceptionListener arg0) throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void start() throws JMSException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void stop() throws JMSException {
+ // TODO Auto-generated method stub
+
+ }};
+ }
+ public Connection createConnection(String arg0, String arg1) throws JMSException {
+ return null;
+ }};
+ } else {
+ return new Queue(){
+ public String getQueueName() throws JMSException {
+ return null;
+ }};
+ }
+ }
+
+ public Object lookupLink(Name name) throws NamingException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object lookupLink(String name) throws NamingException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void rebind(Name name, Object obj) throws NamingException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void rebind(String name, Object obj) throws NamingException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public Object removeFromEnvironment(String propName) throws NamingException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void rename(Name oldName, Name newName) throws NamingException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void rename(String oldName, String newName) throws NamingException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void unbind(Name name) throws NamingException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void unbind(String name) throws NamingException {
+ // TODO Auto-generated method stub
+
+ }};
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/src/main/java/org/apache/tuscany/sca/binding/jms/ClientIface.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/src/main/java/org/apache/tuscany/sca/binding/jms/ClientIface.java
new file mode 100644
index 0000000000..dc6577b7e1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/src/main/java/org/apache/tuscany/sca/binding/jms/ClientIface.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.jms;
+
+import org.oasisopen.sca.annotation.OneWay;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface ClientIface {
+
+ @OneWay
+ void sayHello(String s);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java
new file mode 100644
index 0000000000..4f9908f062
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/src/main/java/org/apache/tuscany/sca/binding/jms/ClientImpl.java
@@ -0,0 +1,39 @@
+/*
+ * 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.jms;
+
+import org.oasisopen.sca.annotation.Reference;
+
+/**
+ * This class implements the OneWay service.
+ */
+public class ClientImpl implements ClientIface {
+
+ private ClientIface serviceA;
+
+ @Reference
+ public void setServiceA(ClientIface service) {
+ this.serviceA = service;
+ }
+
+ public void sayHello(String name) {
+ serviceA.sayHello(name);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ff50ad2daa
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/src/main/resources/META-INF/sca-contribution.xml
@@ -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://itest">
+ <deployable composite="itest:TTLTests"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..7ac9aa559c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/src/main/resources/jndi.properties
@@ -0,0 +1,38 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = itest.MockInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false&broker.useJmx=false&broker.useShutdownHook=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory, ConnectionFactory2
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+topic.ServiceTopic = ServiceTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/src/main/resources/ttl.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/src/main/resources/ttl.composite
new file mode 100644
index 0000000000..8b06a9fc7c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/src/main/resources/ttl.composite
@@ -0,0 +1,35 @@
+<?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"
+ targetNamespace="http://itest"
+ name="TTLTests">
+
+ <component name="Client1">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.ClientImpl"/>
+ <reference name="serviceA">
+ <interface.java interface="org.apache.tuscany.sca.binding.jms.ClientIface" />
+ <binding.jms >
+ <destination jndiName="dynamic/MyService"/>
+ <headers timeToLive="123" />
+ </binding.jms>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/src/test/java/org/apache/tuscany/sca/binding/jms/TTLTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/src/test/java/org/apache/tuscany/sca/binding/jms/TTLTestCase.java
new file mode 100644
index 0000000000..b5839f4c4f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/ttl/src/test/java/org/apache/tuscany/sca/binding/jms/TTLTestCase.java
@@ -0,0 +1,64 @@
+/*
+ * 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.jms;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import itest.MockInitialContextFactory;
+
+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;
+
+/**
+ */
+public class TTLTestCase {
+
+ private Node node;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @Test
+ public void testSayHello() throws Exception {
+ ClientIface client1 = node.getService(ClientIface.class, "Client1");
+
+ client1.sayHello("petra");
+
+ synchronized(MockInitialContextFactory.lock) {
+ if (MockInitialContextFactory.timeToLive == null) {
+ MockInitialContextFactory.lock.wait(10000);
+ }
+ }
+
+ assertNotNull(MockInitialContextFactory.timeToLive);
+ assertEquals(123, MockInitialContextFactory.timeToLive.longValue());
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/pom.xml
new file mode 100644
index 0000000000..bf80c85458
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/pom.xml
@@ -0,0 +1,35 @@
+<?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-jms</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-jms-uri-rpc</artifactId>
+ <name>Apache Tuscany SCA iTest JMS with URI RPC</name>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java
new file mode 100644
index 0000000000..9aef6ba1a3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldClientImpl.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements the HelloWorld service.
+ */
+@Service(HelloWorldService.class)
+public class HelloWorldClientImpl implements HelloWorldService {
+
+ private HelloWorldService serviceA;
+
+ @Reference
+ public void setServiceA(HelloWorldService service) {
+ this.serviceA = service;
+ }
+
+ public String sayHello(String name) {
+ return serviceA.sayHello(name);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java
new file mode 100644
index 0000000000..430c71aaef
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldService.java
@@ -0,0 +1,26 @@
+/*
+ * 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.jms;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorldService {
+ String sayHello(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java
new file mode 100644
index 0000000000..2c6d9d0d17
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/main/java/org/apache/tuscany/sca/binding/jms/HelloWorldServiceImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.jms;
+
+public class HelloWorldServiceImpl implements HelloWorldService {
+
+ public String sayHello(String name) {
+ if ("bang".equals(name)) {
+ throw new RuntimeException("blem wit");
+ }
+ return "jmsHello " + name;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..655372580c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:itest="http://itest">
+ <deployable composite="itest:SimpleServiceComposite"/>
+ <deployable composite="itest:URIClientComposite"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/main/resources/jndi.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/main/resources/jndi.properties
new file mode 100644
index 0000000000..f6dfc8e9d0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/main/resources/jndi.properties
@@ -0,0 +1,38 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+queue.DestQueueA = DestQueueA
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+
+# END SNIPPET: jndi
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/main/resources/simple/service.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/main/resources/simple/service.composite
new file mode 100644
index 0000000000..99ed243196
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/main/resources/simple/service.composite
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://itest"
+ name="SimpleServiceComposite">
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.HelloWorldServiceImpl"/>
+ <service name="HelloWorldService">
+ <binding.jms>
+ <destination jndiName="DestQueueA" >
+ </destination>
+ <response>
+ <destination jndiName="RespQueueA"/>
+ </response>
+ </binding.jms>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/main/resources/simple/uriclient.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/main/resources/simple/uriclient.composite
new file mode 100644
index 0000000000..8295fb10c9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/main/resources/simple/uriclient.composite
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://itest"
+ name="URIClientComposite">
+
+ <component name="HelloWorldClient">
+ <implementation.java class="org.apache.tuscany.sca.binding.jms.HelloWorldClientImpl"/>
+ <reference name="serviceA">
+ <binding.jms uri="jms:jndi:DestQueueA" />
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/test/java/org/apache/tuscany/sca/binding/jms/URIRPCTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/test/java/org/apache/tuscany/sca/binding/jms/URIRPCTestCase.java
new file mode 100644
index 0000000000..60b0f0a1a3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/jms/uri-rpc/src/test/java/org/apache/tuscany/sca/binding/jms/URIRPCTestCase.java
@@ -0,0 +1,54 @@
+/*
+ * 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.jms;
+
+import static org.junit.Assert.assertEquals;
+
+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;
+
+/**
+ * This shows how to test the JMS binding using a simple HelloWorld application.
+ */
+public class URIRPCTestCase {
+
+ private static Node node;
+
+ @Before
+ public void init() {
+ node = NodeFactory.newInstance().createNode().start();
+ }
+
+ @After
+ public void end() {
+ if (node != null) {
+ node.stop();
+ }
+ }
+
+ @Test
+ public void testHelloWorldCreate() throws Exception {
+ HelloWorldService helloWorldService = node.getService(HelloWorldService.class, "HelloWorldClient");
+ assertEquals("jmsHello Petra", helloWorldService.sayHello("Petra"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/pom.xml
new file mode 100644
index 0000000000..d9352969f3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/pom.xml
@@ -0,0 +1,43 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-lifecycle</artifactId>
+ <name>Apache Tuscany SCA iTest Lifecycle</name>
+ <version>2.0.1</version>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ </dependencies>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleBinding.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleBinding.java
new file mode 100644
index 0000000000..ecd4393e4d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleBinding.java
@@ -0,0 +1,49 @@
+/*
+ * 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 binding.lifecycle;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.provider.BaseBindingImpl;
+
+/**
+ * Represents a binding to a Sample service.
+ */
+public class LifecycleBinding extends BaseBindingImpl {
+
+ public static final QName TYPE = new QName(SCA11_TUSCANY_NS, "binding.lifecycle");
+
+ private String someAttr;
+
+ public LifecycleBinding() {
+ }
+
+ public QName getType() {
+ return TYPE;
+ }
+
+ public String getSomeAttr() {
+ return someAttr;
+ }
+
+ public void setSomeAttr(String someAttr) {
+ this.someAttr = someAttr;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleBindingFactory.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleBindingFactory.java
new file mode 100644
index 0000000000..4fdf09bdf0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleBindingFactory.java
@@ -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 binding.lifecycle;
+
+
+/**
+ * Factory implementation to create Sample Models
+ */
+public class LifecycleBindingFactory {
+
+ public LifecycleBinding createLifecycleBinding() {
+ return new LifecycleBinding();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleBindingProviderFactory.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleBindingProviderFactory.java
new file mode 100644
index 0000000000..f197578e84
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleBindingProviderFactory.java
@@ -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 binding.lifecycle;
+
+import binding.lifecycle.LifecycleBinding;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.provider.BindingProviderFactory;
+import org.apache.tuscany.sca.provider.ReferenceBindingProvider;
+import org.apache.tuscany.sca.provider.ServiceBindingProvider;
+import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
+import org.apache.tuscany.sca.runtime.RuntimeEndpointReference;
+
+public class LifecycleBindingProviderFactory implements BindingProviderFactory<LifecycleBinding> {
+
+ public LifecycleBindingProviderFactory(ExtensionPointRegistry extensionPoints) {
+ }
+
+ public Class<LifecycleBinding> getModelType() {
+ return LifecycleBinding.class;
+ }
+
+ public ReferenceBindingProvider createReferenceBindingProvider(RuntimeEndpointReference endpoint) {
+ return new LifecycleReferenceBindingProvider(endpoint);
+ }
+
+ public ServiceBindingProvider createServiceBindingProvider(RuntimeEndpoint endpoint) {
+ return new LifecycleServiceBindingProvider(endpoint);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleReferenceBindingProvider.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleReferenceBindingProvider.java
new file mode 100644
index 0000000000..5c2ca0bf77
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleReferenceBindingProvider.java
@@ -0,0 +1,63 @@
+/*
+ * 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 binding.lifecycle;
+
+import helloworld.StatusImpl;
+
+import org.apache.tuscany.sca.assembly.EndpointReference;
+import org.apache.tuscany.sca.assembly.impl.EndpointImpl;
+import org.apache.tuscany.sca.assembly.impl.EndpointReferenceImpl;
+import org.apache.tuscany.sca.interfacedef.InterfaceContract;
+import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.invocation.Invoker;
+import org.apache.tuscany.sca.provider.ReferenceBindingProvider;
+
+public class LifecycleReferenceBindingProvider implements ReferenceBindingProvider {
+
+ private EndpointReference endpoint;
+ private InterfaceContract contract;
+
+ public LifecycleReferenceBindingProvider(EndpointReference endpoint) {
+ this.endpoint = endpoint;
+ }
+
+ public Invoker createInvoker(Operation operation) {
+ return new LifecycleReferenceInvoker(operation, endpoint);
+ }
+
+ public void start() {
+ StatusImpl.appendStatus("Reference binding start",
+ ((EndpointReferenceImpl)endpoint).toStringWithoutHash());
+ }
+
+ public void stop() {
+ StatusImpl.appendStatus("Reference binding stop",
+ ((EndpointReferenceImpl)endpoint).toStringWithoutHash());
+ }
+
+ public InterfaceContract getBindingInterfaceContract() {
+ return contract;
+ }
+
+ public boolean supportsOneWayInvocation() {
+ return false;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleReferenceInvoker.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleReferenceInvoker.java
new file mode 100644
index 0000000000..023be8613b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleReferenceInvoker.java
@@ -0,0 +1,48 @@
+/*
+ * 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 binding.lifecycle;
+
+import org.apache.tuscany.sca.assembly.EndpointReference;
+import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.invocation.Invoker;
+import org.apache.tuscany.sca.invocation.Message;
+
+public class LifecycleReferenceInvoker implements Invoker {
+
+ protected Operation operation;
+ protected EndpointReference endpoint;
+
+ public LifecycleReferenceInvoker(Operation operation, EndpointReference endpoint) {
+ this.operation = operation;
+ this.endpoint = endpoint;
+ }
+
+ public Message invoke(Message msg) {
+ try {
+ Object[] body = msg.getBody();
+ msg.setBody(body[0]);
+ return msg;
+
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleServiceBindingProvider.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleServiceBindingProvider.java
new file mode 100644
index 0000000000..158aa27201
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleServiceBindingProvider.java
@@ -0,0 +1,56 @@
+/*
+ * 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 binding.lifecycle;
+
+import helloworld.StatusImpl;
+
+import org.apache.tuscany.sca.assembly.impl.EndpointImpl;
+import org.apache.tuscany.sca.interfacedef.InterfaceContract;
+import org.apache.tuscany.sca.provider.ServiceBindingProvider;
+import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
+
+public class LifecycleServiceBindingProvider implements ServiceBindingProvider {
+
+ private RuntimeEndpoint endpoint;
+ private InterfaceContract contract;
+
+ public LifecycleServiceBindingProvider(RuntimeEndpoint endpoint) {
+ this.endpoint = endpoint;
+ }
+
+ public void start() {
+ StatusImpl.appendStatus("Service binding start",
+ ((EndpointImpl)endpoint).toStringWithoutHash());
+ }
+
+ public void stop() {
+ StatusImpl.appendStatus("Service binding stop",
+ ((EndpointImpl)endpoint).toStringWithoutHash());
+ }
+
+ public InterfaceContract getBindingInterfaceContract() {
+ return contract;
+ }
+
+ public boolean supportsOneWayInvocation() {
+ return false;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleServiceInvoker.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleServiceInvoker.java
new file mode 100644
index 0000000000..09ca7a051e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/binding/lifecycle/LifecycleServiceInvoker.java
@@ -0,0 +1,40 @@
+/*
+ * 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 binding.lifecycle;
+
+import org.apache.tuscany.sca.invocation.Message;
+import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
+
+public class LifecycleServiceInvoker {
+
+ private RuntimeEndpoint wire;
+
+ public LifecycleServiceInvoker(RuntimeEndpoint wire) {
+ this.wire = wire;
+ }
+
+ /**
+ * Send the request down the wire to invoke the service
+ */
+ public Message invokeService(Message msg) {
+ return wire.invoke(msg);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/helloworld/Helloworld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/helloworld/Helloworld.java
new file mode 100644
index 0000000000..7b9c17cf59
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/helloworld/Helloworld.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface Helloworld {
+
+ String sayHello(String name) throws Exception;
+
+ String throwException(String name) throws Exception;
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/helloworld/HelloworldClientImplC.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/helloworld/HelloworldClientImplC.java
new file mode 100644
index 0000000000..931e61677d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/helloworld/HelloworldClientImplC.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld;
+
+import org.oasisopen.sca.annotation.Destroy;
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Scope;
+
+/*
+ * C = a composite scoped component that throws exceptions
+ */
+
+@Scope("COMPOSITE")
+public class HelloworldClientImplC implements Helloworld {
+
+ public static boolean throwTestExceptionOnConstruction = false;
+ public static boolean throwTestExceptionOnInit = false;
+ public static boolean throwTestExceptionOnDestroy = false;
+
+
+ @Reference
+ public Helloworld service;
+
+ public HelloworldClientImplC() throws Exception {
+ if(throwTestExceptionOnConstruction){
+ StatusImpl.appendStatus("Exception on construction", "HelloworldClientImplC");
+ throw new Exception("Exception on construction");
+ }
+ }
+
+ @Init
+ public void initialize() throws Exception{
+ if (throwTestExceptionOnInit) {
+ StatusImpl.appendStatus("Exception on init", "HelloworldClientImplC");
+ throw new Exception("Exception on init");
+ }
+
+ StatusImpl.appendStatus("Init", "HelloworldClientImplC");
+ System.out.println(">>>>>> " + sayHello("init"));
+ }
+
+ @Destroy
+ public void destroy() throws Exception{
+ if (throwTestExceptionOnDestroy) {
+ StatusImpl.appendStatus("Exception on destroy", "HelloworldClientImplC");
+ throw new Exception("Exception on destroy");
+ }
+
+ StatusImpl.appendStatus("Destroy", "HelloworldClientImplC");
+ }
+
+ public String sayHello(String name) throws Exception {
+ return "Hi " + service.sayHello(name);
+ }
+
+ public String throwException(String name) throws Exception {
+ throw new Exception("test exception");
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/helloworld/HelloworldClientImplCE.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/helloworld/HelloworldClientImplCE.java
new file mode 100644
index 0000000000..af97452ee9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/helloworld/HelloworldClientImplCE.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld;
+
+import org.oasisopen.sca.annotation.Destroy;
+import org.oasisopen.sca.annotation.EagerInit;
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Scope;
+
+/*
+ * CE = a composite scoped component with EagerInit that throws exceptions
+ */
+
+@EagerInit
+@Scope("COMPOSITE")
+public class HelloworldClientImplCE implements Helloworld {
+
+ public static boolean throwTestExceptionOnConstruction = false;
+ public static boolean throwTestExceptionOnInit = false;
+ public static boolean throwTestExceptionOnDestroy = false;
+
+
+ @Reference
+ public Helloworld service;
+
+ public HelloworldClientImplCE() throws Exception {
+ if(throwTestExceptionOnConstruction){
+ StatusImpl.appendStatus("Exception on construction", "HelloworldClientImplCE");
+ throw new Exception("Exception on construction");
+ }
+ }
+
+ @Init
+ public void initialize() throws Exception{
+ if (throwTestExceptionOnInit) {
+ StatusImpl.appendStatus("Exception on init", "HelloworldClientImplCE");
+ throw new Exception("Exception on init");
+ }
+
+ StatusImpl.appendStatus("Init", "HelloworldClientImplCE");
+ System.out.println(">>>>>> " + sayHello("init"));
+ }
+
+ @Destroy
+ public void destroy() throws Exception{
+ if (throwTestExceptionOnDestroy) {
+ StatusImpl.appendStatus("Exception on destroy", "HelloworldClientImplCE");
+ throw new Exception("Exception on destroy");
+ }
+
+ StatusImpl.appendStatus("Destroy", "HelloworldClientImplCE");
+ }
+
+ public String sayHello(String name) throws Exception {
+ return "Hi " + service.sayHello(name);
+ }
+
+ public String throwException(String name) throws Exception {
+ throw new Exception("test exception");
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/helloworld/HelloworldClientImplS.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/helloworld/HelloworldClientImplS.java
new file mode 100644
index 0000000000..493ccca972
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/helloworld/HelloworldClientImplS.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld;
+
+import org.oasisopen.sca.annotation.Destroy;
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Scope;
+
+/*
+ * S = a stateless scoped component that throws exceptions
+ */
+
+@Scope("STATELESS")
+public class HelloworldClientImplS implements Helloworld {
+
+ public static boolean throwTestExceptionOnConstruction = false;
+ public static boolean throwTestExceptionOnInit = false;
+ public static boolean throwTestExceptionOnDestroy = false;
+
+
+ @Reference
+ public Helloworld service;
+
+ public HelloworldClientImplS() throws Exception {
+ if(throwTestExceptionOnConstruction){
+ StatusImpl.appendStatus("Exception on construction", "HelloworldClientImplS");
+ throw new Exception("Exception on construction");
+ }
+ }
+
+ @Init
+ public void initialize() throws Exception{
+ if (throwTestExceptionOnInit) {
+ StatusImpl.appendStatus("Exception on init", "HelloworldClientImplS");
+ throw new Exception("Exception on init");
+ }
+
+ StatusImpl.appendStatus("Init", "HelloworldClientImplS");
+ System.out.println(">>>>>> " + sayHello("init"));
+ }
+
+ @Destroy
+ public void destroy() throws Exception{
+ if (throwTestExceptionOnDestroy) {
+ StatusImpl.appendStatus("Exception on destroy", "HelloworldClientImplS");
+ throw new Exception("Exception on destroy");
+ }
+
+ StatusImpl.appendStatus("Destroy", "HelloworldClientImplS");
+ }
+
+ public String sayHello(String name) throws Exception {
+ return "Hi " + service.sayHello(name);
+ }
+
+ public String throwException(String name) throws Exception {
+ throw new Exception("test exception");
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/helloworld/HelloworldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/helloworld/HelloworldServiceImpl.java
new file mode 100644
index 0000000000..2d27ec8f58
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/helloworld/HelloworldServiceImpl.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld;
+
+public class HelloworldServiceImpl implements Helloworld {
+
+ public String sayHello(String name) {
+ String response = "Hello " + name;
+ System.out.println("At service - " + response);
+ return response;
+ }
+
+ public String throwException(String name) throws Exception {
+ // not used
+ return null;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/helloworld/StatusImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/helloworld/StatusImpl.java
new file mode 100644
index 0000000000..644853d6c2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/helloworld/StatusImpl.java
@@ -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 helloworld;
+
+public class StatusImpl {
+
+ public static String statusString = "";
+
+ public static void appendStatus(String event, String location){
+ // remove any addresses from the strings
+ location = location.replaceAll("\\(@.*Endpoint", "Endpoint");
+ statusString += event + " - " + location + "\n";
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/implementation/lifecycle/LifecycleImplementation.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/implementation/lifecycle/LifecycleImplementation.java
new file mode 100644
index 0000000000..ebed204b87
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/implementation/lifecycle/LifecycleImplementation.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package implementation.lifecycle;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.assembly.impl.ImplementationImpl;
+
+/**
+ * Model representing a Sample implementation in an SCA assembly.
+ *
+ * @version $Rev$ $Date$
+ */
+public class LifecycleImplementation extends ImplementationImpl {
+ static final QName QN = new QName(SCA11_TUSCANY_NS, "implementation.lifecycle");
+
+ final String name;
+ Class<?> clazz;
+
+ LifecycleImplementation(final String name) {
+ super(QN);
+ this.name = name;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/implementation/lifecycle/LifecycleImplementationProcessor.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/implementation/lifecycle/LifecycleImplementationProcessor.java
new file mode 100644
index 0000000000..c7989b291c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/implementation/lifecycle/LifecycleImplementationProcessor.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package implementation.lifecycle;
+
+import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Field;
+
+import javax.wsdl.PortType;
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.tuscany.sca.assembly.AssemblyFactory;
+import org.apache.tuscany.sca.assembly.Service;
+import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor;
+import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
+import org.apache.tuscany.sca.contribution.processor.ContributionResolveException;
+import org.apache.tuscany.sca.contribution.processor.ContributionWriteException;
+import org.apache.tuscany.sca.contribution.processor.ProcessorContext;
+import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
+import org.apache.tuscany.sca.contribution.resolver.ClassReference;
+import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+import org.apache.tuscany.sca.databinding.xml.DOMDataBinding;
+import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException;
+import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceContract;
+import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory;
+import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition;
+import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory;
+import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface;
+import org.apache.tuscany.sca.interfacedef.wsdl.WSDLObject;
+
+/**
+ * StAX artifact processor for Sample implementations.
+ *
+ * @version $Rev$ $Date$
+ */
+public class LifecycleImplementationProcessor extends BaseStAXArtifactProcessor implements StAXArtifactProcessor<LifecycleImplementation> {
+ final AssemblyFactory af;
+ final JavaInterfaceFactory jif;
+ final WSDLFactory wf;
+
+ public LifecycleImplementationProcessor(final ExtensionPointRegistry ep) {
+ final FactoryExtensionPoint fep = ep.getExtensionPoint(FactoryExtensionPoint.class);
+ this.af = fep.getFactory(AssemblyFactory.class);
+ this.jif = fep.getFactory(JavaInterfaceFactory.class);
+ this.wf = fep.getFactory(WSDLFactory.class);
+ }
+
+ public QName getArtifactType() {
+ return LifecycleImplementation.QN;
+ }
+
+ public Class<LifecycleImplementation> getModelType() {
+ return LifecycleImplementation.class;
+ }
+
+ public LifecycleImplementation read(final XMLStreamReader r, final ProcessorContext ctx) throws ContributionReadException, XMLStreamException {
+ // not actually going to read any config for this test
+ // so just create a model
+ LifecycleImplementation impl = new LifecycleImplementation("helloworld.Helloworld");
+ impl.setUnresolved(true);
+ return impl;
+ }
+
+ public void resolve(final LifecycleImplementation impl, final ModelResolver res, final ProcessorContext ctx) throws ContributionResolveException {
+ try {
+ Class c = Class.forName("helloworld.Helloworld");
+ Service s = af.createService();
+ s.setName("Helloworld");
+ JavaInterfaceContract ic = jif.createJavaInterfaceContract();
+ ic.setInterface(jif.createJavaInterface(c));
+ s.setInterfaceContract(ic);
+ impl.getServices().add(s);
+ impl.setUnresolved(false);
+ } catch (Exception ex){
+ throw new ContributionResolveException(ex);
+ }
+ }
+
+ public void write(final LifecycleImplementation impl, final XMLStreamWriter w, final ProcessorContext ctx) throws ContributionWriteException, XMLStreamException {
+ // not required for this test
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/implementation/lifecycle/LifecycleJavaInvoker.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/implementation/lifecycle/LifecycleJavaInvoker.java
new file mode 100644
index 0000000000..ac750fe040
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/implementation/lifecycle/LifecycleJavaInvoker.java
@@ -0,0 +1,46 @@
+/*
+ * 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 implementation.lifecycle;
+
+import java.lang.reflect.Method;
+
+import org.apache.tuscany.sca.interfacedef.java.JavaOperation;
+import org.apache.tuscany.sca.invocation.Invoker;
+import org.apache.tuscany.sca.invocation.Message;
+
+/**
+ * Invoker for Sample components that implement a Java interface.
+ *
+ * @version $Rev$ $Date$
+ */
+class SampleJavaInvoker implements Invoker {
+ final Object instance;
+ final Method method;
+
+ SampleJavaInvoker(final JavaOperation op, final Class<?> clazz, final Object instance) throws SecurityException, NoSuchMethodException {
+ this.instance = instance;
+ this.method = clazz.getMethod(op.getJavaMethod().getName(), op.getJavaMethod().getParameterTypes());
+ }
+
+ public Message invoke(final Message msg) {
+ // we don't actually do anything here
+ return msg;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/implementation/lifecycle/LifecycleProvider.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/implementation/lifecycle/LifecycleProvider.java
new file mode 100644
index 0000000000..f1e303882f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/implementation/lifecycle/LifecycleProvider.java
@@ -0,0 +1,77 @@
+/*
+ * 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 implementation.lifecycle;
+
+import helloworld.StatusImpl;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.invocation.ProxyFactory;
+import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.interfacedef.java.JavaOperation;
+import org.apache.tuscany.sca.invocation.Invoker;
+import org.apache.tuscany.sca.provider.ImplementationProvider;
+import org.apache.tuscany.sca.runtime.RuntimeComponent;
+import org.apache.tuscany.sca.runtime.RuntimeComponentService;
+
+/**
+ * Implementation provider for Sample component implementations.
+ *
+ * @version $Rev$ $Date$
+ */
+class LifecycleProvider implements ImplementationProvider {
+ final RuntimeComponent comp;
+ final LifecycleImplementation impl;
+ final ProxyFactory pxf;
+ final ExtensionPointRegistry ep;
+ Object instance;
+
+ // make this static rather than worrying about persistence on the reference side
+ static Map<String, Object> asyncMessageMap = new HashMap<String, Object>();
+
+ LifecycleProvider(final RuntimeComponent comp, final LifecycleImplementation impl, ProxyFactory pf, ExtensionPointRegistry ep) {
+ this.comp = comp;
+ this.impl = impl;
+ this.pxf = pf;
+ this.ep = ep;
+ }
+
+ public void start() {
+ StatusImpl.appendStatus("Implementation start", comp.getName());
+ }
+
+ public void stop() {
+ StatusImpl.appendStatus("Implementation stop", comp.getName());
+ }
+
+ public boolean supportsOneWayInvocation() {
+ return false;
+ }
+
+ public Invoker createInvoker(final RuntimeComponentService s, final Operation op) {
+ try {
+ return new SampleJavaInvoker((JavaOperation)op, impl.clazz, instance);
+ } catch(Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/implementation/lifecycle/LifecycleProviderFactory.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/implementation/lifecycle/LifecycleProviderFactory.java
new file mode 100644
index 0000000000..dfd39716fd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/java/implementation/lifecycle/LifecycleProviderFactory.java
@@ -0,0 +1,50 @@
+/*
+ * 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 implementation.lifecycle;
+
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.invocation.ExtensibleProxyFactory;
+import org.apache.tuscany.sca.core.invocation.ProxyFactory;
+import org.apache.tuscany.sca.provider.ImplementationProvider;
+import org.apache.tuscany.sca.provider.ImplementationProviderFactory;
+import org.apache.tuscany.sca.runtime.RuntimeComponent;
+
+/**
+ * Factory for Sample implementation providers.
+ *
+ * @version $Rev$ $Date$
+ */
+public class LifecycleProviderFactory implements ImplementationProviderFactory<LifecycleImplementation> {
+ final ProxyFactory pxf;
+ final ExtensionPointRegistry ep;
+
+ public LifecycleProviderFactory(final ExtensionPointRegistry ep) {
+ this.ep = ep;
+ pxf = ExtensibleProxyFactory.getInstance(ep);
+ }
+
+ public ImplementationProvider createImplementationProvider(final RuntimeComponent comp, final LifecycleImplementation impl) {
+ return new LifecycleProvider(comp, impl, pxf, ep);
+ }
+
+ public Class<LifecycleImplementation> getModelType() {
+ return LifecycleImplementation.class;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/META-INF/services/binding.lifecycle.BindingFactory b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/META-INF/services/binding.lifecycle.BindingFactory
new file mode 100644
index 0000000000..357cf65727
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/META-INF/services/binding.lifecycle.BindingFactory
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Implementation class for model factory
+binding.lifecycle.LifecycleBindingFactory
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
new file mode 100644
index 0000000000..09a474a567
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Implementation class for the artifact processor extension
+org.apache.tuscany.sca.assembly.xml.DefaultBeanModelProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.1#binding.lifecycle,model=binding.lifecycle.LifecycleBinding,factory=binding.lifecycle.LifecycleBindingFactory
+implementation.lifecycle.LifecycleImplementationProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.1#implementation.lifecycle,model=implementation.lifecycle.LifecycleImplementation
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema
new file mode 100644
index 0000000000..e436702181
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+implementation-lifecycle.xsd
+binding-lifecycle.xsd
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory
new file mode 100644
index 0000000000..9a814793b2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Implementation class for the binding extension
+binding.lifecycle.LifecycleBindingProviderFactory;model=binding.lifecycle.LifecycleBinding
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory
new file mode 100644
index 0000000000..c9b5077888
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ImplementationProviderFactory
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Implementation provider for Sample components
+implementation.lifecycle.LifecycleProviderFactory;model=implementation.lifecycle.LifecycleImplementation
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/binding-lifecycle.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/binding-lifecycle.xsd
new file mode 100644
index 0000000000..b798446c26
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/binding-lifecycle.xsd
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1"
+ elementFormDefault="qualified">
+
+ <import namespace="http://docs.oasis-open.org/ns/opencsa/sca/200912" />
+
+ <element name="binding.lifecycle" type="t:BindingLifecycle" substitutionGroup="sca:binding"/>
+
+ <complexType name="BindingLifecycle">
+ <complexContent>
+ <extension base="sca:Binding">
+ <attribute name="someAttr" type="string" use="optional"/>
+ </extension>
+ </complexContent>
+ </complexType>
+</schema>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/implementation-lifecycle.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/implementation-lifecycle.xsd
new file mode 100644
index 0000000000..c029a43922
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/implementation-lifecycle.xsd
@@ -0,0 +1,38 @@
+<?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.
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1"
+ elementFormDefault="qualified">
+
+ <import namespace="http://docs.oasis-open.org/ns/opencsa/sca/200912"/>
+
+ <element name="implementation.lifecycle" type="t:LifecycleImplementation" substitutionGroup="sca:implementation"/>
+
+ <complexType name="LifecycleImplementation">
+ <complexContent>
+ <extension base="sca:Implementation">
+ <attribute name="class" type="string" use="required"/>
+ </extension>
+ </complexContent>
+ </complexType>
+
+</schema>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/lifecycle.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/lifecycle.composite
new file mode 100644
index 0000000000..f08f6fe57b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/main/resources/lifecycle.composite
@@ -0,0 +1,55 @@
+<?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:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://sample"
+ name="lifecycle">
+
+ <component name="HelloworldService">
+ <implementation.java class="helloworld.HelloworldServiceImpl"/>
+ <service name="Helloworld">
+ <tuscany:binding.lifecycle name="lifecycle"/>
+ </service>
+ </component>
+
+
+ <component name="HelloworldServiceTestImpl">
+ <tuscany:implementation.lifecycle class="helloworld.HelloworldServiceImpl"/>
+ <service name="Helloworld">
+ <tuscany:binding.lifecycle name="lifecycle"/>
+ </service>
+ </component>
+
+ <component name="HelloworldClientC">
+ <implementation.java class="helloworld.HelloworldClientImplC"/>
+ <reference name="service" target="HelloworldService"/>
+ </component>
+
+ <component name="HelloworldClientCE">
+ <implementation.java class="helloworld.HelloworldClientImplCE"/>
+ <reference name="service" target="HelloworldService"/>
+ </component>
+
+ <component name="HelloworldClientS">
+ <implementation.java class="helloworld.HelloworldClientImplS"/>
+ <reference name="service" target="HelloworldService"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/test/java/org/apache/tuscany/sca/itest/lifecycle/LifecycleTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/test/java/org/apache/tuscany/sca/itest/lifecycle/LifecycleTestCase.java
new file mode 100644
index 0000000000..b1b0c84376
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/lifecycle/src/test/java/org/apache/tuscany/sca/itest/lifecycle/LifecycleTestCase.java
@@ -0,0 +1,836 @@
+/*
+ * 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.itest.lifecycle;
+
+
+import helloworld.Helloworld;
+import helloworld.HelloworldClientImplC;
+import helloworld.HelloworldClientImplCE;
+import helloworld.HelloworldClientImplS;
+import helloworld.StatusImpl;
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+
+public class LifecycleTestCase {
+
+ public Node node = null;
+
+
+ @Before
+ public void setUp() throws Exception {
+ StatusImpl.statusString = "";
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ /*
+ * Start up the composite and don't send any messages. No exception
+ * should be thrown.
+ */
+ @Test
+ public void testNoExceptionNoMessageShutdown() throws Exception{
+
+ StatusImpl.statusString = "";
+
+ TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();
+
+ // create a Tuscany node
+ node = tuscanyRuntime.createNode();
+
+ // install a contribution
+ node.installContribution("HelloworldContrib", "target/classes", null, null);
+
+ // start a composite
+ node.startComposite("HelloworldContrib", "lifecycle.composite");
+
+ // we don't send any messages in this case and just shut down directly
+
+ // stop a composite
+ node.stopComposite("HelloworldContrib", "lifecycle.composite");
+
+ // uninstall a constribution
+ node.uninstallContribution("HelloworldContrib");
+
+ // stop a Tuscany node
+ node.stop();
+
+ // stop the runtime
+ tuscanyRuntime.stop();
+
+ // see what happened
+ System.out.println(StatusImpl.statusString);
+ Assert.assertEquals("Service binding start - Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Implementation start - HelloworldServiceTestImpl\n" +
+ "Service binding start - Endpoint: URI = HelloworldServiceTestImpl#service-binding(Helloworld/lifecycle)\n" +
+ "Init - HelloworldClientImplCE\n" +
+ "Reference binding start - EndpointReference: URI = HelloworldClientCE#reference-binding(service/lifecycle) WIRED_TARGET_FOUND_AND_MATCHED Target = Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Service binding stop - Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Service binding stop - Endpoint: URI = HelloworldServiceTestImpl#service-binding(Helloworld/lifecycle)\n" +
+ "Implementation stop - HelloworldServiceTestImpl\n" +
+ "Reference binding stop - EndpointReference: URI = HelloworldClientCE#reference-binding(service/lifecycle) WIRED_TARGET_FOUND_AND_MATCHED Target = Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Destroy - HelloworldClientImplCE\n",
+ StatusImpl.statusString);
+ }
+
+ /*
+ * Start up the composite and send a message. No exception
+ * should be thrown.
+ */
+ @Test
+ public void testNoExceptionMessageShutdown() throws Exception{
+
+ TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();
+
+ // create a Tuscany node
+ node = tuscanyRuntime.createNode();
+
+ // install a contribution
+ node.installContribution("HelloworldContrib", "target/classes", null, null);
+
+ // start a composite
+ node.startComposite("HelloworldContrib", "lifecycle.composite");
+
+ // send a message to each client
+ Helloworld hwCE = node.getService(Helloworld.class, "HelloworldClientCE");
+ System.out.println(hwCE.sayHello("name"));
+ Helloworld hwC = node.getService(Helloworld.class, "HelloworldClientC");
+ System.out.println(hwC.sayHello("name"));
+ Helloworld hwS = node.getService(Helloworld.class, "HelloworldClientC");
+ System.out.println(hwS.sayHello("name"));
+
+ // stop a composite
+ node.stopComposite("HelloworldContrib", "lifecycle.composite");
+
+ // uninstall a constribution
+ node.uninstallContribution("HelloworldContrib");
+
+ // stop a Tuscany node
+ node.stop();
+
+ // stop the runtime
+ tuscanyRuntime.stop();
+
+ // see what happened
+ System.out.println(StatusImpl.statusString);
+ Assert.assertEquals("Service binding start - Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Implementation start - HelloworldServiceTestImpl\n" +
+ "Service binding start - Endpoint: URI = HelloworldServiceTestImpl#service-binding(Helloworld/lifecycle)\n" +
+ "Init - HelloworldClientImplCE\n" +
+ "Reference binding start - EndpointReference: URI = HelloworldClientCE#reference-binding(service/lifecycle) WIRED_TARGET_FOUND_AND_MATCHED Target = Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Init - HelloworldClientImplC\n" +
+ "Reference binding start - EndpointReference: URI = HelloworldClientC#reference-binding(service/lifecycle) WIRED_TARGET_FOUND_AND_MATCHED Target = Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Service binding stop - Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Service binding stop - Endpoint: URI = HelloworldServiceTestImpl#service-binding(Helloworld/lifecycle)\n" +
+ "Implementation stop - HelloworldServiceTestImpl\n" +
+ "Reference binding stop - EndpointReference: URI = HelloworldClientC#reference-binding(service/lifecycle) WIRED_TARGET_FOUND_AND_MATCHED Target = Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Destroy - HelloworldClientImplC\n" +
+ "Reference binding stop - EndpointReference: URI = HelloworldClientCE#reference-binding(service/lifecycle) WIRED_TARGET_FOUND_AND_MATCHED Target = Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Destroy - HelloworldClientImplCE\n",
+ StatusImpl.statusString);
+
+ /*$self$ reference of client is not stopped here - should it be? */
+ }
+
+ /*
+ * Start up the composite. Exception thrown in constructor of composite
+ * scoped component with eager init set
+ */
+ @Test
+ public void testConstructorExceptionShutdownCE() throws Exception{
+
+ HelloworldClientImplCE.throwTestExceptionOnConstruction = true;
+
+ TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();
+
+ // create a Tuscany node
+ node = tuscanyRuntime.createNode();
+
+ // install a contribution
+ node.installContribution("HelloworldContrib", "target/classes", null, null);
+
+ // start a composite
+ try {
+ node.startComposite("HelloworldContrib", "lifecycle.composite");
+ } catch (Exception exception) {
+ // it's thrown from the HelloworldClientImpl @Init method
+ StatusImpl.appendStatus("Exception caught on node.startComposite", "LifecycleTestCase.testConstructorExceptionShutdownCE");
+ }
+
+ // don't need to send a message as eager init ensures that
+ // the component instance is created at start time
+
+ // stop a composite
+ try {
+ // not required in this test as the exception during EagerInit will cause the stop
+ //node.stopComposite("HelloworldContrib", "lifecycle.composite");
+ } catch (Exception exception) {
+ // it will complain about the composite not being started
+ StatusImpl.appendStatus("Exception caught on node.stopComposite", "LifecycleTestCase.testConstructorExceptionShutdownCE");
+ }
+
+ // uninstall a constribution
+ node.uninstallContribution("HelloworldContrib");
+
+ // stop a Tuscany node
+ node.stop();
+
+ // stop the runtime
+ tuscanyRuntime.stop();
+
+ HelloworldClientImplCE.throwTestExceptionOnConstruction = false;
+
+ // see what happened
+ System.out.println(StatusImpl.statusString);
+ Assert.assertEquals("Service binding start - Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Implementation start - HelloworldServiceTestImpl\n" +
+ "Service binding start - Endpoint: URI = HelloworldServiceTestImpl#service-binding(Helloworld/lifecycle)\n" +
+ "Exception on construction - HelloworldClientImplCE\n" +
+ "Service binding stop - Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Service binding stop - Endpoint: URI = HelloworldServiceTestImpl#service-binding(Helloworld/lifecycle)\n" +
+ "Implementation stop - HelloworldServiceTestImpl\n" +
+ "Exception caught on node.startComposite - LifecycleTestCase.testConstructorExceptionShutdownCE\n",
+ StatusImpl.statusString);
+ }
+
+ /*
+ * Start up the composite. Exception thrown in constructor of composite
+ * scoped component
+ */
+ @Test
+ public void testConstructorExceptionShutdownC() throws Exception{
+
+ HelloworldClientImplC.throwTestExceptionOnConstruction = true;
+
+ TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();
+
+ // create a Tuscany node
+ node = tuscanyRuntime.createNode();
+
+ // install a contribution
+ node.installContribution("HelloworldContrib", "target/classes", null, null);
+
+ // start a composite
+ try {
+ node.startComposite("HelloworldContrib", "lifecycle.composite");
+ } catch (Exception exception) {
+ // it's thrown from the HelloworldClientImpl @Init method
+ StatusImpl.appendStatus("Exception caught on node.startComposite", "LifecycleTestCase.testConstructorExceptionShutdownC");
+ }
+
+ // send a message to the appropriate client
+ try {
+ Helloworld hwCE = node.getService(Helloworld.class, "HelloworldClientC");
+ System.out.println(hwCE.sayHello("name"));
+ } catch (Exception exception) {
+ // the component throws an error on construction
+ StatusImpl.appendStatus("Exception caught on sayHello()", "LifecycleTestCase.testConstructorExceptionShutdownC");
+ }
+
+ // stop a composite
+ try {
+ node.stopComposite("HelloworldContrib", "lifecycle.composite");
+ } catch (Exception exception) {
+ // it will complain about the composite not being started
+ StatusImpl.appendStatus("Exception caught on node.stopComposite", "LifecycleTestCase.testConstructorExceptionShutdownC");
+ }
+
+ // uninstall a constribution
+ node.uninstallContribution("HelloworldContrib");
+
+ // stop a Tuscany node
+ node.stop();
+
+ // stop the runtime
+ tuscanyRuntime.stop();
+
+ HelloworldClientImplC.throwTestExceptionOnConstruction = false;
+
+ // see what happened
+ System.out.println(StatusImpl.statusString);
+ Assert.assertEquals("Service binding start - Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Implementation start - HelloworldServiceTestImpl\n" +
+ "Service binding start - Endpoint: URI = HelloworldServiceTestImpl#service-binding(Helloworld/lifecycle)\n" +
+ "Init - HelloworldClientImplCE\n" +
+ "Reference binding start - EndpointReference: URI = HelloworldClientCE#reference-binding(service/lifecycle) WIRED_TARGET_FOUND_AND_MATCHED Target = Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Exception on construction - HelloworldClientImplC\n" +
+ "Exception caught on sayHello() - LifecycleTestCase.testConstructorExceptionShutdownC\n" +
+ "Service binding stop - Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Service binding stop - Endpoint: URI = HelloworldServiceTestImpl#service-binding(Helloworld/lifecycle)\n" +
+ "Implementation stop - HelloworldServiceTestImpl\n" +
+ "Reference binding stop - EndpointReference: URI = HelloworldClientCE#reference-binding(service/lifecycle) WIRED_TARGET_FOUND_AND_MATCHED Target = Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Destroy - HelloworldClientImplCE\n",
+ StatusImpl.statusString);
+ }
+
+ /*
+ * Start up the composite. Exception thrown in constructor of stateless
+ * scoped component
+ */
+ @Test
+ public void testConstructorExceptionShutdownS() throws Exception{
+
+ HelloworldClientImplS.throwTestExceptionOnConstruction = true;
+
+ TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();
+
+ // create a Tuscany node
+ node = tuscanyRuntime.createNode();
+
+ // install a contribution
+ node.installContribution("HelloworldContrib", "target/classes", null, null);
+
+ // start a composite
+ try {
+ node.startComposite("HelloworldContrib", "lifecycle.composite");
+ } catch (Exception exception) {
+ // it's thrown from the HelloworldClientImpl @Init method
+ StatusImpl.appendStatus("Exception caught on node.startComposite", "LifecycleTestCase.testConstructorExceptionShutdownS");
+ }
+
+ // send a message to the appropriate client
+ try {
+ Helloworld hwCE = node.getService(Helloworld.class, "HelloworldClientS");
+ System.out.println(hwCE.sayHello("name"));
+ } catch (Exception exception) {
+ // the component throws an error on construction
+ StatusImpl.appendStatus("Exception caught on sayHello()", "LifecycleTestCase.testConstructorExceptionShutdownS");
+ }
+
+ // stop a composite
+ try {
+ node.stopComposite("HelloworldContrib", "lifecycle.composite");
+ } catch (Exception exception) {
+ // it will complain about the composite not being started
+ StatusImpl.appendStatus("Exception caught on node.stopComposite", "LifecycleTestCase.testConstructorExceptionShutdownS");
+ }
+
+ // uninstall a constribution
+ node.uninstallContribution("HelloworldContrib");
+
+ // stop a Tuscany node
+ node.stop();
+
+ // stop the runtime
+ tuscanyRuntime.stop();
+
+ HelloworldClientImplS.throwTestExceptionOnConstruction = false;
+
+ // see what happened
+ System.out.println(StatusImpl.statusString);
+ Assert.assertEquals("Service binding start - Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Implementation start - HelloworldServiceTestImpl\n" +
+ "Service binding start - Endpoint: URI = HelloworldServiceTestImpl#service-binding(Helloworld/lifecycle)\n" +
+ "Init - HelloworldClientImplCE\n" +
+ "Reference binding start - EndpointReference: URI = HelloworldClientCE#reference-binding(service/lifecycle) WIRED_TARGET_FOUND_AND_MATCHED Target = Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Exception on construction - HelloworldClientImplS\n" +
+ "Exception caught on sayHello() - LifecycleTestCase.testConstructorExceptionShutdownS\n" +
+ "Service binding stop - Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Service binding stop - Endpoint: URI = HelloworldServiceTestImpl#service-binding(Helloworld/lifecycle)\n" +
+ "Implementation stop - HelloworldServiceTestImpl\n" +
+ "Reference binding stop - EndpointReference: URI = HelloworldClientCE#reference-binding(service/lifecycle) WIRED_TARGET_FOUND_AND_MATCHED Target = Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Destroy - HelloworldClientImplCE\n",
+ StatusImpl.statusString);
+ }
+
+ /*
+ * Start up the composite. Exception thrown in init of composite
+ * scoped component with eager init
+ */
+ @Test
+ public void testInitExceptionShutdownCE() throws Exception{
+
+ HelloworldClientImplCE.throwTestExceptionOnInit = true;
+
+ TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();
+
+ // create a Tuscany node
+ node = tuscanyRuntime.createNode();
+
+ // install a contribution
+ node.installContribution("HelloworldContrib", "target/classes", null, null);
+
+ // start a composite
+ try {
+ node.startComposite("HelloworldContrib", "lifecycle.composite");
+ } catch (Exception exception) {
+ // it's thrown from the HelloworldClientImpl @Init method
+ StatusImpl.appendStatus("Exception caught on node.startComposite", "LifecycleTestCase.testInitExceptionShutdownCE");
+ }
+
+ // don't need to send a message as eager init ensures that
+ // the component instance is created and inited at start time
+
+ // stop a composite
+ try {
+ // not required in this test as the exception during EagerInit will cause the stop
+ //node.stopComposite("HelloworldContrib", "lifecycle.composite");
+ } catch (Exception exception) {
+ // it will complain about the composite not being started
+ StatusImpl.appendStatus("Exception caught on node.stopComposite", "LifecycleTestCase.testInitExceptionShutdownCE");
+ }
+
+ // uninstall a constribution
+ node.uninstallContribution("HelloworldContrib");
+
+ // stop a Tuscany node
+ node.stop();
+
+ // stop the runtime
+ tuscanyRuntime.stop();
+
+ HelloworldClientImplCE.throwTestExceptionOnInit = false;
+
+ // see what happened
+ System.out.println(StatusImpl.statusString);
+ Assert.assertEquals("Service binding start - Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n"+
+ "Implementation start - HelloworldServiceTestImpl\n"+
+ "Service binding start - Endpoint: URI = HelloworldServiceTestImpl#service-binding(Helloworld/lifecycle)\n"+
+ "Exception on init - HelloworldClientImplCE\n"+
+ "Destroy - HelloworldClientImplCE\n"+
+ "Service binding stop - Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n"+
+ "Service binding stop - Endpoint: URI = HelloworldServiceTestImpl#service-binding(Helloworld/lifecycle)\n"+
+ "Implementation stop - HelloworldServiceTestImpl\n" +
+ "Exception caught on node.startComposite - LifecycleTestCase.testInitExceptionShutdownCE\n",
+ StatusImpl.statusString);
+ }
+
+ /*
+ * Start up the composite. Exception thrown in init of composite
+ * scoped component
+ */
+ @Test
+ public void testInitExceptionShutdownC() throws Exception{
+
+ HelloworldClientImplC.throwTestExceptionOnInit = true;
+
+ TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();
+
+ // create a Tuscany node
+ node = tuscanyRuntime.createNode();
+
+ // install a contribution
+ node.installContribution("HelloworldContrib", "target/classes", null, null);
+
+ // start a composite
+ try {
+ node.startComposite("HelloworldContrib", "lifecycle.composite");
+ } catch (Exception exception) {
+ // it's thrown from the HelloworldClientImpl @Init method
+ StatusImpl.appendStatus("Exception caught on node.startComposite", "LifecycleTestCase.testInitExceptionShutdownC");
+ }
+
+ // send a message to the appropriate client
+ try {
+ Helloworld hwCE = node.getService(Helloworld.class, "HelloworldClientC");
+ System.out.println(hwCE.sayHello("name"));
+ } catch (Exception exception) {
+ // the component throws an error on init
+ StatusImpl.appendStatus("Exception caught on sayHello()", "LifecycleTestCase.testInitExceptionShutdownC");
+ }
+
+ // stop a composite
+ try {
+ node.stopComposite("HelloworldContrib", "lifecycle.composite");
+ } catch (Exception exception) {
+ // it will complain about the composite not being started
+ StatusImpl.appendStatus("Exception caught on node.stopComposite", "LifecycleTestCase.testInitExceptionShutdownC");
+ }
+
+ // uninstall a constribution
+ node.uninstallContribution("HelloworldContrib");
+
+ // stop a Tuscany node
+ node.stop();
+
+ // stop the runtime
+ tuscanyRuntime.stop();
+
+ HelloworldClientImplC.throwTestExceptionOnInit = false;
+
+ // see what happened
+ System.out.println(StatusImpl.statusString);
+ Assert.assertEquals("Service binding start - Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Implementation start - HelloworldServiceTestImpl\n" +
+ "Service binding start - Endpoint: URI = HelloworldServiceTestImpl#service-binding(Helloworld/lifecycle)\n" +
+ "Init - HelloworldClientImplCE\n" +
+ "Reference binding start - EndpointReference: URI = HelloworldClientCE#reference-binding(service/lifecycle) WIRED_TARGET_FOUND_AND_MATCHED Target = Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Exception on init - HelloworldClientImplC\n" +
+ "Destroy - HelloworldClientImplC\n" +
+ "Exception caught on sayHello() - LifecycleTestCase.testInitExceptionShutdownC\n" +
+ "Service binding stop - Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Service binding stop - Endpoint: URI = HelloworldServiceTestImpl#service-binding(Helloworld/lifecycle)\n" +
+ "Implementation stop - HelloworldServiceTestImpl\n" +
+ "Reference binding stop - EndpointReference: URI = HelloworldClientCE#reference-binding(service/lifecycle) WIRED_TARGET_FOUND_AND_MATCHED Target = Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Destroy - HelloworldClientImplCE\n",
+ StatusImpl.statusString);
+ }
+
+ /*
+ * Start up the composite. Exception thrown in init of stateless
+ * scoped component
+ */
+ @Test
+ public void testInitExceptionShutdownS() throws Exception{
+
+ HelloworldClientImplS.throwTestExceptionOnInit = true;
+
+ TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();
+
+ // create a Tuscany node
+ node = tuscanyRuntime.createNode();
+
+ // install a contribution
+ node.installContribution("HelloworldContrib", "target/classes", null, null);
+
+ // start a composite
+ try {
+ node.startComposite("HelloworldContrib", "lifecycle.composite");
+ } catch (Exception exception) {
+ // it's thrown from the HelloworldClientImpl @Init method
+ StatusImpl.appendStatus("Exception caught on node.startComposite", "LifecycleTestCase.testInitExceptionShutdownS");
+ }
+
+ // send a message to the appropriate client
+ try {
+ Helloworld hwCE = node.getService(Helloworld.class, "HelloworldClientS");
+ System.out.println(hwCE.sayHello("name"));
+ } catch (Exception exception) {
+ // the component throws an error on init
+ StatusImpl.appendStatus("Exception caught on sayHello()", "LifecycleTestCase.testInitExceptionShutdownS");
+ }
+
+ // stop a composite
+ try {
+ node.stopComposite("HelloworldContrib", "lifecycle.composite");
+ } catch (Exception exception) {
+ // it will complain about the composite not being started
+ StatusImpl.appendStatus("Exception caught on node.stopComposite", "LifecycleTestCase.testInitExceptionShutdownS");
+ }
+
+ // uninstall a constribution
+ node.uninstallContribution("HelloworldContrib");
+
+ // stop a Tuscany node
+ node.stop();
+
+ // stop the runtime
+ tuscanyRuntime.stop();
+
+ HelloworldClientImplS.throwTestExceptionOnInit = false;
+
+ // see what happened
+ System.out.println(StatusImpl.statusString);
+ Assert.assertEquals("Service binding start - Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Implementation start - HelloworldServiceTestImpl\n" +
+ "Service binding start - Endpoint: URI = HelloworldServiceTestImpl#service-binding(Helloworld/lifecycle)\n" +
+ "Init - HelloworldClientImplCE\n" +
+ "Reference binding start - EndpointReference: URI = HelloworldClientCE#reference-binding(service/lifecycle) WIRED_TARGET_FOUND_AND_MATCHED Target = Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Exception on init - HelloworldClientImplS\n" +
+ "Destroy - HelloworldClientImplS\n" +
+ "Exception caught on sayHello() - LifecycleTestCase.testInitExceptionShutdownS\n" +
+ "Service binding stop - Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Service binding stop - Endpoint: URI = HelloworldServiceTestImpl#service-binding(Helloworld/lifecycle)\n" +
+ "Implementation stop - HelloworldServiceTestImpl\n" +
+ "Reference binding stop - EndpointReference: URI = HelloworldClientCE#reference-binding(service/lifecycle) WIRED_TARGET_FOUND_AND_MATCHED Target = Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Destroy - HelloworldClientImplCE\n",
+ StatusImpl.statusString);
+ }
+
+ /*
+ * Start up the composite and then stop it. Exception thrown in destory of composite
+ * scoped component with eager init set
+ */
+ @Test
+ public void testDestroyExceptionShutdownCE() throws Exception{
+
+ HelloworldClientImplCE.throwTestExceptionOnDestroy = true;
+
+ TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();
+
+ // create a Tuscany node
+ node = tuscanyRuntime.createNode();
+
+ // install a contribution
+ node.installContribution("HelloworldContrib", "target/classes", null, null);
+
+ // start a composite
+ try {
+ node.startComposite("HelloworldContrib", "lifecycle.composite");
+ } catch (Exception exception) {
+ // it's thrown from the HelloworldClientImpl @Destroy method
+ StatusImpl.appendStatus("Exception caught on node.startComposite", "LifecycleTestCase.testDestroyExceptionShutdownCE");
+ }
+
+ // don't need to send a message as eager init ensures that
+ // the component instance is created start time and hence should
+ // be destroyed
+
+ // stop a composite
+ try {
+ // not required in this test as the exception during EagerInit will cause the stop
+ //node.stopComposite("HelloworldContrib", "lifecycle.composite");
+ } catch (Exception exception) {
+ // it will complain about the composite not being started
+ StatusImpl.appendStatus("Exception caught on node.stopComposite", "LifecycleTestCase.testDestroyExceptionShutdownCE");
+ }
+
+ // uninstall a constribution
+ node.uninstallContribution("HelloworldContrib");
+
+ // stop a Tuscany node
+ node.stop();
+
+ // stop the runtime
+ tuscanyRuntime.stop();
+
+ HelloworldClientImplCE.throwTestExceptionOnDestroy = false;
+
+ // see what happened
+ System.out.println(StatusImpl.statusString);
+ Assert.assertEquals("Service binding start - Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Implementation start - HelloworldServiceTestImpl\n" +
+ "Service binding start - Endpoint: URI = HelloworldServiceTestImpl#service-binding(Helloworld/lifecycle)\n" +
+ "Init - HelloworldClientImplCE\n" +
+ "Reference binding start - EndpointReference: URI = HelloworldClientCE#reference-binding(service/lifecycle) WIRED_TARGET_FOUND_AND_MATCHED Target = Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Service binding stop - Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Service binding stop - Endpoint: URI = HelloworldServiceTestImpl#service-binding(Helloworld/lifecycle)\n" +
+ "Implementation stop - HelloworldServiceTestImpl\n" +
+ "Reference binding stop - EndpointReference: URI = HelloworldClientCE#reference-binding(service/lifecycle) WIRED_TARGET_FOUND_AND_MATCHED Target = Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Exception on destroy - HelloworldClientImplCE\n",
+ StatusImpl.statusString);
+ }
+
+ /*
+ * Start up the composite and then stop it. Exception thrown in destory of composite
+ * scoped component
+ */
+ @Test
+ public void testDestroyExceptionShutdownC() throws Exception{
+
+ HelloworldClientImplC.throwTestExceptionOnDestroy = true;
+
+ TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();
+
+ // create a Tuscany node
+ node = tuscanyRuntime.createNode();
+
+ // install a contribution
+ node.installContribution("HelloworldContrib", "target/classes", null, null);
+
+ // start a composite
+ try {
+ node.startComposite("HelloworldContrib", "lifecycle.composite");
+ } catch (Exception exception) {
+ // it's thrown from the HelloworldClientImpl @Destroy method
+ StatusImpl.appendStatus("Exception caught on node.startComposite", "LifecycleTestCase.testDestroyExceptionShutdownC");
+ }
+
+ // send a message to the appropriate client
+ Helloworld hwCE = node.getService(Helloworld.class, "HelloworldClientC");
+ System.out.println(hwCE.sayHello("name"));
+ // don't need to catch exception here as the component instance won't
+ // be destroyed until shutdown
+
+ // stop a composite
+ try {
+ node.stopComposite("HelloworldContrib", "lifecycle.composite");
+ } catch (Exception exception) {
+ // it will complain about the composite not being started
+ StatusImpl.appendStatus("Exception caught on node.stopComposite", "LifecycleTestCase.testDestroyExceptionShutdownC");
+ }
+
+ // uninstall a constribution
+ node.uninstallContribution("HelloworldContrib");
+
+ // stop a Tuscany node
+ node.stop();
+
+ // stop the runtime
+ tuscanyRuntime.stop();
+
+ HelloworldClientImplC.throwTestExceptionOnDestroy = false;
+
+ // see what happened
+ System.out.println(StatusImpl.statusString);
+ Assert.assertEquals("Service binding start - Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Implementation start - HelloworldServiceTestImpl\n" +
+ "Service binding start - Endpoint: URI = HelloworldServiceTestImpl#service-binding(Helloworld/lifecycle)\n" +
+ "Init - HelloworldClientImplCE\n" +
+ "Reference binding start - EndpointReference: URI = HelloworldClientCE#reference-binding(service/lifecycle) WIRED_TARGET_FOUND_AND_MATCHED Target = Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Init - HelloworldClientImplC\n" +
+ "Reference binding start - EndpointReference: URI = HelloworldClientC#reference-binding(service/lifecycle) WIRED_TARGET_FOUND_AND_MATCHED Target = Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Service binding stop - Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Service binding stop - Endpoint: URI = HelloworldServiceTestImpl#service-binding(Helloworld/lifecycle)\n" +
+ "Implementation stop - HelloworldServiceTestImpl\n" +
+ "Reference binding stop - EndpointReference: URI = HelloworldClientC#reference-binding(service/lifecycle) WIRED_TARGET_FOUND_AND_MATCHED Target = Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Exception on destroy - HelloworldClientImplC\n" +
+ "Reference binding stop - EndpointReference: URI = HelloworldClientCE#reference-binding(service/lifecycle) WIRED_TARGET_FOUND_AND_MATCHED Target = Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Destroy - HelloworldClientImplCE\n",
+ StatusImpl.statusString);
+ }
+
+ /*
+ * Start up the composite and then stop it. Exception thrown in destory of stateless
+ * scoped component
+ */
+ @Test
+ public void testDestroyExceptionShutdownS() throws Exception{
+
+ HelloworldClientImplS.throwTestExceptionOnDestroy = true;
+
+ TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();
+
+ // create a Tuscany node
+ node = tuscanyRuntime.createNode();
+
+ // install a contribution
+ node.installContribution("HelloworldContrib", "target/classes", null, null);
+
+ // start a composite
+ try {
+ node.startComposite("HelloworldContrib", "lifecycle.composite");
+ } catch (Exception exception) {
+ // it's thrown from the HelloworldClientImpl @Destroy method
+ StatusImpl.appendStatus("Exception caught on node.startComposite", "LifecycleTestCase.testDestroyExceptionShutdownS");
+ }
+
+ // send a message to the appropriate client
+ try {
+ Helloworld hwCE = node.getService(Helloworld.class, "HelloworldClientS");
+ System.out.println(hwCE.sayHello("name"));
+ } catch (Exception exception) {
+ // exception will be thrown when component instance is discarded
+ // after the message has been processed
+ }
+
+ // stop a composite
+ try {
+ node.stopComposite("HelloworldContrib", "lifecycle.composite");
+ } catch (Exception exception) {
+ // it will complain about the composite not being started
+ StatusImpl.appendStatus("Exception caught on sayHello()", "LifecycleTestCase.testDestroyExceptionShutdownS");
+ }
+
+ // uninstall a constribution
+ node.uninstallContribution("HelloworldContrib");
+
+ // stop a Tuscany node
+ node.stop();
+
+ // stop the runtime
+ tuscanyRuntime.stop();
+
+ HelloworldClientImplS.throwTestExceptionOnDestroy = false;
+
+ // see what happened
+ System.out.println(StatusImpl.statusString);
+ Assert.assertEquals("Service binding start - Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Implementation start - HelloworldServiceTestImpl\n" +
+ "Service binding start - Endpoint: URI = HelloworldServiceTestImpl#service-binding(Helloworld/lifecycle)\n" +
+ "Init - HelloworldClientImplCE\n" +
+ "Reference binding start - EndpointReference: URI = HelloworldClientCE#reference-binding(service/lifecycle) WIRED_TARGET_FOUND_AND_MATCHED Target = Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Init - HelloworldClientImplS\n" +
+ "Reference binding start - EndpointReference: URI = HelloworldClientS#reference-binding(service/lifecycle) WIRED_TARGET_FOUND_AND_MATCHED Target = Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Exception on destroy - HelloworldClientImplS\n" +
+ "Service binding stop - Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Service binding stop - Endpoint: URI = HelloworldServiceTestImpl#service-binding(Helloworld/lifecycle)\n" +
+ "Implementation stop - HelloworldServiceTestImpl\n" +
+ "Reference binding stop - EndpointReference: URI = HelloworldClientCE#reference-binding(service/lifecycle) WIRED_TARGET_FOUND_AND_MATCHED Target = Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Destroy - HelloworldClientImplCE\n" +
+ "Reference binding stop - EndpointReference: URI = HelloworldClientS#reference-binding(service/lifecycle) WIRED_TARGET_FOUND_AND_MATCHED Target = Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n",
+ StatusImpl.statusString);
+ }
+
+ /*
+ * Start up the composite. Send a message where the processing sends an
+ * exception. App exception has no material affect and the scenario is the
+ * same as just sending normal messages and stopping the runtime
+ */
+ @Test
+ public void testAppExceptionShutdown() throws Exception{
+
+ TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();
+
+ // create a Tuscany node
+ node = tuscanyRuntime.createNode();
+
+ // install a contribution
+ node.installContribution("HelloworldContrib", "target/classes", null, null);
+
+ // start a composite
+ node.startComposite("HelloworldContrib", "lifecycle.composite");
+
+ // send a message to each client. The last one throws and exception
+ Helloworld hwCE = node.getService(Helloworld.class, "HelloworldClientCE");
+ System.out.println(hwCE.sayHello("name"));
+ Helloworld hwC = node.getService(Helloworld.class, "HelloworldClientC");
+ System.out.println(hwC.sayHello("name"));
+ Helloworld hwS = node.getService(Helloworld.class, "HelloworldClientC");
+ System.out.println(hwS.sayHello("name"));
+ try {
+ Helloworld hw = node.getService(Helloworld.class, "HelloworldC");
+ hw.throwException("name");
+ } catch (Exception ex) {
+ // do nothing
+ StatusImpl.appendStatus("Exception caught on throwException()", "LifecycleTestCase.testAppExceptionShutdown");
+ }
+
+ // stop a composite
+ node.stopComposite("HelloworldContrib", "lifecycle.composite");
+
+ // uninstall a constribution
+ node.uninstallContribution("HelloworldContrib");
+
+ // stop a Tuscany node
+ node.stop();
+
+ // stop the runtime
+ tuscanyRuntime.stop();
+
+ // see what happened
+ System.out.println(StatusImpl.statusString);
+ Assert.assertEquals("Service binding start - Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Implementation start - HelloworldServiceTestImpl\n" +
+ "Service binding start - Endpoint: URI = HelloworldServiceTestImpl#service-binding(Helloworld/lifecycle)\n" +
+ "Init - HelloworldClientImplCE\n" +
+ "Reference binding start - EndpointReference: URI = HelloworldClientCE#reference-binding(service/lifecycle) WIRED_TARGET_FOUND_AND_MATCHED Target = Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Init - HelloworldClientImplC\n" +
+ "Reference binding start - EndpointReference: URI = HelloworldClientC#reference-binding(service/lifecycle) WIRED_TARGET_FOUND_AND_MATCHED Target = Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Exception caught on throwException() - LifecycleTestCase.testAppExceptionShutdown\n" +
+ "Service binding stop - Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Service binding stop - Endpoint: URI = HelloworldServiceTestImpl#service-binding(Helloworld/lifecycle)\n" +
+ "Implementation stop - HelloworldServiceTestImpl\n" +
+ "Reference binding stop - EndpointReference: URI = HelloworldClientC#reference-binding(service/lifecycle) WIRED_TARGET_FOUND_AND_MATCHED Target = Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Destroy - HelloworldClientImplC\n" +
+ "Reference binding stop - EndpointReference: URI = HelloworldClientCE#reference-binding(service/lifecycle) WIRED_TARGET_FOUND_AND_MATCHED Target = Endpoint: URI = HelloworldService#service-binding(Helloworld/lifecycle)\n" +
+ "Destroy - HelloworldClientImplCE\n",
+ StatusImpl.statusString);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/node-launcher-equinox/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/node-launcher-equinox/pom.xml
new file mode 100644
index 0000000000..c6b8e22e6d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/node-launcher-equinox/pom.xml
@@ -0,0 +1,76 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-node-launcher-equinox</artifactId>
+ <name>Apache Tuscany SCA iTest Node Launcher Equinox</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-launcher-equinox</artifactId>
+ <version>2.0.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-api</artifactId>
+ <version>2.0.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>2.0.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-extensibility-equinox</artifactId>
+ <version>2.0.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-http-runtime</artifactId>
+ <version>2.0.1</version>
+ <scope>test</scope>
+ </dependency-->
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/node-launcher-equinox/src/test/java/hello/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/node-launcher-equinox/src/test/java/hello/HelloWorld.java
new file mode 100644
index 0000000000..e3fcdfd25f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/node-launcher-equinox/src/test/java/hello/HelloWorld.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package hello;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * HelloWorld interface
+ */
+@Remotable
+public interface HelloWorld {
+ String hello(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/node-launcher-equinox/src/test/java/hello/HelloWorldClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/node-launcher-equinox/src/test/java/hello/HelloWorldClient.java
new file mode 100644
index 0000000000..8232acb658
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/node-launcher-equinox/src/test/java/hello/HelloWorldClient.java
@@ -0,0 +1,50 @@
+/*
+ * 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 hello;
+
+import org.oasisopen.sca.annotation.EagerInit;
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Scope;
+
+/**
+ * This client program shows how to create an SCA runtime, start it,
+ * and locate and invoke a SCA component
+ */
+@Scope("COMPOSITE")
+@EagerInit
+public class HelloWorldClient {
+
+ private HelloWorld hw;
+
+ @Reference
+ public void setHelloWorld(HelloWorld hw) {
+ this.hw = hw;
+ }
+
+ @Init
+ public void hello() {
+ // Say hello
+ System.out.println("Contribution ClassLoader: " + getClass().getClassLoader());
+ System.out.println("SCA API ClassLoader: " + Reference.class.getClassLoader());
+ System.out.println(hw.hello("Equinox"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/node-launcher-equinox/src/test/java/hello/HelloWorldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/node-launcher-equinox/src/test/java/hello/HelloWorldImpl.java
new file mode 100644
index 0000000000..e51d3c79d9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/node-launcher-equinox/src/test/java/hello/HelloWorldImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package hello;
+
+/**
+ * HelloWorldImpl
+ */
+public class HelloWorldImpl implements HelloWorld {
+ public String hello(String name) {
+ System.out.println("Name: " + name);
+ return "Hello, " + name;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/node-launcher-equinox/src/test/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxOSGiHostTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/node-launcher-equinox/src/test/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxOSGiHostTestCase.java
new file mode 100644
index 0000000000..5728ad2e07
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/node-launcher-equinox/src/test/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxOSGiHostTestCase.java
@@ -0,0 +1,100 @@
+/*
+ * 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.node.equinox.launcher;
+
+import java.util.Dictionary;
+import java.util.Enumeration;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+
+
+/**
+ * Test case for equinox host
+ */
+public class EquinoxOSGiHostTestCase {
+
+ @Test
+ public void testStartThenStop() {
+ EquinoxHost host = new EquinoxHost();
+ BundleContext context = host.start();
+ Assert.assertNotNull(context);
+ for (Bundle b : context.getBundles()) {
+ System.out.println(toString(b, false));
+ }
+ host.stop();
+ }
+
+ @Test
+ public void testStartThenStopTwice() {
+ EquinoxHost host = new EquinoxHost();
+ BundleContext context = host.start();
+ Assert.assertNotNull(context);
+ for (Bundle b : context.getBundles()) {
+ System.out.println(toString(b, false));
+ }
+ host.stop();
+
+ host = new EquinoxHost();
+ context = host.start();
+ Assert.assertNotNull(context);
+ for (Bundle b : context.getBundles()) {
+ System.out.println(toString(b, false));
+ }
+ host.stop();
+ }
+
+ public static String toString(Bundle b, boolean verbose) {
+ StringBuffer sb = new StringBuffer();
+ sb.append(b.getBundleId()).append(" ").append(b.getSymbolicName());
+ int s = b.getState();
+ if ((s & Bundle.UNINSTALLED) != 0) {
+ sb.append(" UNINSTALLED");
+ }
+ if ((s & Bundle.INSTALLED) != 0) {
+ sb.append(" INSTALLED");
+ }
+ if ((s & Bundle.RESOLVED) != 0) {
+ sb.append(" RESOLVED");
+ }
+ if ((s & Bundle.STARTING) != 0) {
+ sb.append(" STARTING");
+ }
+ if ((s & Bundle.STOPPING) != 0) {
+ sb.append(" STOPPING");
+ }
+ if ((s & Bundle.ACTIVE) != 0) {
+ sb.append(" ACTIVE");
+ }
+
+ sb.append(" ").append(b.getLocation());
+ if (verbose) {
+ Dictionary<Object, Object> dict = b.getHeaders();
+ Enumeration<Object> keys = dict.keys();
+ while (keys.hasMoreElements()) {
+ Object key = keys.nextElement();
+ sb.append(" ").append(key).append("=").append(dict.get(key));
+ }
+ }
+ return sb.toString();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/node-launcher-equinox/src/test/java/org/apache/tuscany/sca/node/equinox/launcher/NodeLauncherTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/node-launcher-equinox/src/test/java/org/apache/tuscany/sca/node/equinox/launcher/NodeLauncherTestCase.java
new file mode 100644
index 0000000000..5cc40ca77f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/node-launcher-equinox/src/test/java/org/apache/tuscany/sca/node/equinox/launcher/NodeLauncherTestCase.java
@@ -0,0 +1,67 @@
+/*
+ * 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.node.equinox.launcher;
+
+import org.apache.tuscany.sca.node.Node;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ *
+ */
+public class NodeLauncherTestCase {
+ private static NodeLauncher launcher;
+
+ @BeforeClass
+ public static void setUp() {
+ System.setProperty("osgi.configuration.area", "target/equinox/configuration");
+ try {
+ launcher = NodeLauncher.newInstance();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ @AfterClass
+ public static void tearDown() {
+ System.clearProperty("osgi.configuration.area");
+ if (launcher != null) {
+ launcher.destroy();
+ }
+
+ }
+
+ @Test
+ public void testLaunch() throws Exception {
+ String location = ContributionLocationHelper.getContributionLocation(getClass());
+ Node node = launcher.createNode("HelloWorld.composite", new Contribution("test", location));
+ node.start();
+ node.stop();
+ }
+
+ @Test
+ @Ignore("contribution-osgi issue")
+ public void testLaunchDomain() throws Exception {
+ DomainManagerLauncher.main(new String[] {});
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/node-launcher-equinox/src/test/resources/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/node-launcher-equinox/src/test/resources/HelloWorld.composite
new file mode 100644
index 0000000000..32ec5f0e2f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/node-launcher-equinox/src/test/resources/HelloWorld.composite
@@ -0,0 +1,34 @@
+<?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:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://sample/composite"
+ xmlns:sc="http://sample/composite"
+ name="HelloWorld">
+
+ <component name="HelloWorld">
+ <implementation.java class="hello.HelloWorldImpl" />
+ </component>
+ <component name="HelloWorldClient">
+ <implementation.java class="hello.HelloWorldClient" />
+ <reference name="helloWorld" target="HelloWorld"></reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/pom.xml
new file mode 100644
index 0000000000..626f0d1352
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/pom.xml
@@ -0,0 +1,74 @@
+<?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-nodes</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-binding-sca-hazelcast</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes binding.sca Using Hazelcast Registry</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-domain-hazelcast</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-jetty</artifactId>
+ <version>2.0.1</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.5</version>
+ <configuration>
+ <includes>
+ <include>**/*TestCase.java</include>
+ </includes>
+ <reportFormat>brief</reportFormat>
+ <useFile>true</useFile>
+ <forkMode>once</forkMode>
+ <argLine>-ea -Xmx256m</argLine>
+ <parallel>off</parallel>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Client.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Client.java
new file mode 100644
index 0000000000..ef2565b750
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Client.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.bindingsca;
+
+/**
+ *
+ */
+public interface Client {
+ String getName(String id);
+
+ String create(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/ClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/ClientImpl.java
new file mode 100644
index 0000000000..96a0f2dadd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/ClientImpl.java
@@ -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.itest.bindingsca;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ *
+ */
+@Service(Client.class)
+public class ClientImpl implements Client {
+ @Reference
+ protected Local local;
+
+ @Reference
+ protected Remote remote;
+
+ public String getName(String id) {
+ Customer customer = null;
+ try {
+ customer = remote.getCustomer(id);
+ } catch (CustomerNotFoundException e) {
+ return null;
+ }
+ customer.dump("Client.getName()");
+ return local.getName(customer);
+ }
+
+ public String create(String name) {
+ String id = remote.generateId();
+ Customer customer = remote.createCustomer(id, name);
+ customer.dump("Client.create()");
+ return remote.getId(customer);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Customer.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Customer.java
new file mode 100644
index 0000000000..f2b7b1e41d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Customer.java
@@ -0,0 +1,70 @@
+/*
+ * 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.itest.bindingsca;
+
+/**
+ *
+ */
+public class Customer {
+ private String id;
+ private String name;
+
+ public Customer() {
+ }
+
+ /**
+ * @param id
+ * @param name
+ */
+ public Customer(String id, String name) {
+ super();
+ this.id = id;
+ this.name = name;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Override
+ public String toString() {
+ return "Customer [id=" + id + ", name=" + name + "]";
+ }
+
+ public void dump(String prefix) {
+ System.out.print(prefix);
+ System.out.print(": ");
+ System.out.print(toString());
+ System.out.println(" @" + System.identityHashCode(this));
+ System.out.println(getClass().getClassLoader());
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/CustomerNotFoundException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/CustomerNotFoundException.java
new file mode 100644
index 0000000000..a6e80c9eca
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/CustomerNotFoundException.java
@@ -0,0 +1,64 @@
+/*
+ * 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.itest.bindingsca;
+
+/**
+ *
+ */
+public class CustomerNotFoundException extends Exception {
+ private String customerId;
+
+ /**
+ *
+ */
+ public CustomerNotFoundException() {
+ }
+
+ /**
+ * @param message
+ */
+ public CustomerNotFoundException(String message) {
+ super(message);
+ }
+
+ /**
+ * @param cause
+ */
+ public CustomerNotFoundException(Throwable cause) {
+ super(cause);
+ }
+
+ /**
+ * @param message
+ * @param cause
+ */
+ public CustomerNotFoundException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public String getCustomerId() {
+ return customerId;
+ }
+
+ public void setCustomerId(String customerId) {
+ this.customerId = customerId;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Local.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Local.java
new file mode 100644
index 0000000000..0fe30c9d53
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Local.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.bindingsca;
+
+/**
+ *
+ */
+public interface Local {
+ String getName(Customer customer);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/LocalServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/LocalServiceImpl.java
new file mode 100644
index 0000000000..8783808334
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/LocalServiceImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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.itest.bindingsca;
+
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ *
+ */
+@Service(Local.class)
+public class LocalServiceImpl implements Local {
+
+ public String getName(Customer customer) {
+ if (customer == null) {
+ return null;
+ }
+ customer.dump("Local.getName()");
+ return customer.getName();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Remote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Remote.java
new file mode 100644
index 0000000000..050d35007b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Remote.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.bindingsca;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ *
+ */
+@Remotable
+public interface Remote {
+ String generateId();
+
+ String getId(Customer customer);
+
+ Customer getCustomer(String id) throws CustomerNotFoundException;
+
+ Customer createCustomer(String id, String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/RemoteServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/RemoteServiceImpl.java
new file mode 100644
index 0000000000..6c432a500a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/RemoteServiceImpl.java
@@ -0,0 +1,66 @@
+/*
+ * 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.itest.bindingsca;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.oasisopen.sca.annotation.AllowsPassByReference;
+import org.oasisopen.sca.annotation.Scope;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ *
+ */
+@Service(Remote.class)
+@Scope("COMPOSITE")
+public class RemoteServiceImpl implements Remote {
+ private Map<String, Customer> customers = new HashMap<String, Customer>();
+
+ public String generateId() {
+ return UUID.randomUUID().toString();
+ }
+
+ @AllowsPassByReference
+ public String getId(Customer customer) {
+ customer.dump("Remote.getId()");
+ return customer.getId();
+ }
+
+ public Customer getCustomer(String id) throws CustomerNotFoundException {
+ Customer customer = customers.get(id);
+ if (customer == null) {
+ CustomerNotFoundException ex = new CustomerNotFoundException("Customer not found");
+ ex.setCustomerId(id);
+ throw ex;
+ }
+ customer.dump("Remote.getCustomer()");
+ return customer;
+ }
+
+ public Customer createCustomer(String id, String name) {
+ Customer customer = new Customer(id, name);
+ customer.dump("Remote.createCustomer()");
+ customers.put(id, customer);
+ return customer;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/SCAClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/SCAClientImpl.java
new file mode 100644
index 0000000000..3573eea978
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/java/org/apache/tuscany/sca/itest/bindingsca/SCAClientImpl.java
@@ -0,0 +1,57 @@
+/*
+ * 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.itest.bindingsca;
+
+import java.net.URI;
+
+import org.oasisopen.sca.client.SCAClientFactory;
+
+/**
+ *
+ */
+public class SCAClientImpl implements Client {
+ private Local local;
+ private Remote remote;
+
+ public SCAClientImpl(String domainURI) throws Exception {
+ SCAClientFactory factory = SCAClientFactory.newInstance(URI.create(domainURI));
+ local = factory.getService(Local.class, "LocalComponent/Local");
+ remote = factory.getService(Remote.class, "RemoteComponent/Remote");
+ }
+
+ public String getName(String id) {
+ Customer customer = null;
+ try {
+ customer = remote.getCustomer(id);
+ } catch (CustomerNotFoundException e) {
+ return null;
+ }
+ customer.dump("Client.getName()");
+ return local.getName(customer);
+ }
+
+ public String create(String name) {
+ String id = remote.generateId();
+ Customer customer = remote.createCustomer(id, name);
+ customer.dump("Client.create()");
+ return remote.getId(customer);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Client.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Client.composite
new file mode 100644
index 0000000000..b04cc33023
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Client.composite
@@ -0,0 +1,30 @@
+<?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
+ * 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"
+ targetNamespace="http://client"
+ name="Client">
+
+ <component name="ClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.bindingsca.ClientImpl" />
+ <reference name="local" target="LocalComponent" />
+ <reference name="remote" target="RemoteComponent" />
+ </component>
+
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Service.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Service.composite
new file mode 100644
index 0000000000..fe282d291c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Service.composite
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * 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"
+ targetNamespace="http://service"
+ name="Service">
+
+ <component name="LocalComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.bindingsca.LocalServiceImpl" />
+ </component>
+
+ <component name="RemoteComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.bindingsca.RemoteServiceImpl" />
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/AsynchTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/AsynchTestCase.java
new file mode 100644
index 0000000000..9efa1a99ec
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/AsynchTestCase.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.sca.axis2;
+
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientCallbackOnewayRemoteImpl;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+// @Ignore("TUSCANY-3138")
+public class AsynchTestCase {
+
+ public static Node nodeA;
+ public static Node nodeB;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ System.out.println("Setting up nodes");
+
+ try {
+ // create and start nodes
+ Contribution contrib = new Contribution("asynch", "./target/test-classes/ws/asynchReference");
+ nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("asynch", "./target/test-classes/ws/asynchService");
+ nodeB = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeB.start();
+
+ } catch (Exception ex) {
+ System.err.println("Exception when creating domain " + ex.getMessage());
+ ex.printStackTrace(System.err);
+ throw ex;
+ }
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ nodeA.stop();
+ nodeB.stop();
+ }
+
+ @Test
+ public void testHelloWorldAsynch() throws Exception {
+ HelloWorldClient helloWorldClientB;
+ helloWorldClientB = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientCallbackRemote");
+ helloWorldClientB.getGreetings("fred");
+ System.out.println("Sleeping ...");
+ Thread.sleep(2000);
+ System.out.println("... Done");
+ Assert.assertEquals("callback fred", HelloWorldClientCallbackOnewayRemoteImpl.result );
+
+ }
+
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/CallbackTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/CallbackTestCase.java
new file mode 100644
index 0000000000..efa84e92a5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/CallbackTestCase.java
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.sca.axis2;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+// @Ignore("TUSCANY-3138")
+public class CallbackTestCase {
+
+ public static Node nodeA;
+ public static Node nodeB;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ System.out.println("Setting up nodes");
+
+ try {
+ // create and start nodes
+ Contribution contrib = new Contribution("reference", "./target/test-classes/ws/callbackReference");
+ nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("service", "./target/test-classes/ws/callbackService");
+ nodeB = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeB.start();
+
+ } catch (Exception ex) {
+ System.err.println("Exception when creating domain " + ex.getMessage());
+ ex.printStackTrace(System.err);
+ throw ex;
+ }
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ nodeA.stop();
+ nodeB.stop();
+ }
+
+ //@Test
+ public void testKeepServerRunning() throws Exception {
+ System.out.println("press enter to continue");
+ System.in.read();
+ }
+
+ @Test
+ public void testHelloWorldCallbackLocal() throws Exception {
+ HelloWorldClient helloWorldClientB;
+ helloWorldClientB = nodeB.getService(HelloWorldClient.class, "BHelloWorldClientCallbackLocal");
+ Assert.assertEquals("Hello callback fred", helloWorldClientB.getGreetings("fred"));
+ }
+
+ @Test
+ public void testHelloWorldCallbackRemote() throws Exception {
+ HelloWorldClient helloWorldClientA;
+ helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientCallbackRemote");
+ Assert.assertEquals("Hello callback fred", helloWorldClientA.getGreetings("fred"));
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/PromotionTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/PromotionTestCase.java
new file mode 100644
index 0000000000..45d28140b4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/PromotionTestCase.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.sca.axis2;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+
+public class PromotionTestCase {
+
+
+ public static Node nodeA;
+ public static Node nodeB;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ System.out.println("Setting up nodes");
+
+ try {
+ // create and start nodes
+ Contribution contrib = new Contribution("reference", "./target/test-classes/ws/promotionReference");
+ nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("service", "./target/test-classes/ws/promotionService");
+ nodeB = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeB.start();
+
+ } catch (Exception ex) {
+ System.err.println("Exception when creating domain " + ex.getMessage());
+ ex.printStackTrace(System.err);
+ throw ex;
+ }
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ nodeA.stop();
+ nodeB.stop();
+ }
+
+ @Test
+ @Ignore
+ public void testHelloWorldPromotion() throws Exception {
+ HelloWorldClient helloWorldClientA;
+ helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientRemotePromotion");
+ Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred");
+
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/SimpleTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/SimpleTestCase.java
new file mode 100644
index 0000000000..a5d6529895
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/SimpleTestCase.java
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.sca.axis2;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.oasisopen.sca.ServiceUnavailableException;
+
+public class SimpleTestCase {
+
+ public static Node nodeA;
+ public static Node nodeB;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ System.out.println("Setting up nodes");
+
+ try {
+ // create and start nodes
+ Contribution contrib = new Contribution("reference", "./target/test-classes/ws/simpleReference");
+ nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("service", "./target/test-classes/ws/simpleService");
+ nodeB = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeB.start();
+
+ } catch (Exception ex) {
+ System.err.println("Exception when creating domain " + ex.getMessage());
+ ex.printStackTrace(System.err);
+ throw ex;
+ }
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ nodeA.stop();
+ nodeB.stop();
+ }
+
+ @Test
+ public void testHelloWorldLocal() throws Exception {
+ HelloWorldClient helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientLocal");
+ Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred");
+
+ }
+
+ @Test
+ public void testHelloWorldRemote() throws Exception {
+
+ HelloWorldClient helloWorldClientA;
+ helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientRemote");
+
+ try {
+ helloWorldClientA.getGreetings("fred");
+ } catch (ServiceUnavailableException ex){
+ Assert.fail();
+ }
+ }
+
+ @Test
+ public void testHelloWorldLocalAndRemote() throws Exception {
+ HelloWorldClient helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientLocalAndRemote");
+ HelloWorldClient helloWorldClientB = nodeB.getService(HelloWorldClient.class, "BHelloWorldClientLocalAndRemote");
+ Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred");
+ Assert.assertEquals(helloWorldClientB.getGreetings("fred"), "Hello fred");
+ }
+
+ @Test
+ public void testHelloWorldMultipleServices() throws Exception {
+ HelloWorldClient helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientMultipleServices");
+ HelloWorldClient helloWorldClientA2 = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientMultipleServices2");
+ HelloWorldClient helloWorldClientB = nodeB.getService(HelloWorldClient.class, "BHelloWorldClientMultipleServices");
+ Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred");
+ Assert.assertEquals(helloWorldClientA2.getGreetings("fred"), "Hello fred");
+ Assert.assertEquals(helloWorldClientB.getGreetings("fred"), "Hello fred");
+ }
+
+ @Test
+ public void testHelloWorldMultipleBindings() throws Exception {
+ HelloWorldClient helloWorldClientA;
+ helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientMultipleBindings");
+ Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred");
+
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldCallbackRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldCallbackRemote.java
new file mode 100644
index 0000000000..f7ab3dfe98
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldCallbackRemote.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+
+@Remotable
+public interface HelloWorldCallbackRemote {
+
+ String getGreetingsCallbackRemote(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldClient.java
new file mode 100644
index 0000000000..3d25d37708
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldClient.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld;
+
+
+public interface HelloWorldClient {
+
+ String getGreetings(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackOnewayRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackOnewayRemote.java
new file mode 100644
index 0000000000..a469d197d6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackOnewayRemote.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.OneWay;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+@Callback(HelloWorldCallbackRemote.class)
+public interface HelloWorldServiceCallbackOnewayRemote {
+
+ @OneWay
+ void getGreetingsRemote(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackRemote.java
new file mode 100644
index 0000000000..3f5a21fddd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackRemote.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+@Callback(HelloWorldCallbackRemote.class)
+public interface HelloWorldServiceCallbackRemote {
+
+ String getGreetingsRemote(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceLocal.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceLocal.java
new file mode 100644
index 0000000000..49e5232b31
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceLocal.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld;
+
+
+public interface HelloWorldServiceLocal {
+
+ String getGreetingsLocal(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote.java
new file mode 100644
index 0000000000..ccc77c142b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorldServiceRemote {
+
+ String getGreetingsRemote(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote2.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote2.java
new file mode 100644
index 0000000000..c2be798d1a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote2.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorldServiceRemote2 {
+
+ String getGreetingsRemote2(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java
new file mode 100644
index 0000000000..9355aece1f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java
@@ -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.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceCallbackOnewayRemote;
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClientCallbackOnewayRemoteImpl implements HelloWorldClient {
+
+ public static String result;
+
+ @Reference
+ public HelloWorldServiceCallbackOnewayRemote helloWorldService;
+
+ public String getGreetings(String s) {
+ helloWorldService.getGreetingsRemote(s);
+ return null;
+ }
+
+ public String getGreetingsCallbackRemote(String s) {
+ result = "callback " + s;
+ return result;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java
new file mode 100644
index 0000000000..efc47aa94d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceCallbackRemote;
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClientCallbackRemoteImpl implements HelloWorldClient {
+
+ public static String result;
+
+ @Reference
+ public HelloWorldServiceCallbackRemote helloWorldService;
+
+ public String getGreetings(String s) {
+ return helloWorldService.getGreetingsRemote(s);
+ }
+
+ public String getGreetingsCallbackRemote(String s) {
+ result = "callback " + s;
+ return result;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientLocalImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientLocalImpl.java
new file mode 100644
index 0000000000..6ed813ff0a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientLocalImpl.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceLocal;
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClientLocalImpl implements HelloWorldClient {
+
+ @Reference
+ public HelloWorldServiceLocal helloWorldService;
+
+ public String getGreetings(String s) {
+ return helloWorldService.getGreetingsLocal(s);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemote2Impl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemote2Impl.java
new file mode 100644
index 0000000000..ba70573efb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemote2Impl.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote2;
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClientRemote2Impl implements HelloWorldClient {
+
+ @Reference
+ public HelloWorldServiceRemote2 helloWorldService;
+
+ public String getGreetings(String s) {
+ return helloWorldService.getGreetingsRemote2(s);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemoteImpl.java
new file mode 100644
index 0000000000..a87d6eb49a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemoteImpl.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote;
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClientRemoteImpl implements HelloWorldClient {
+
+ @Reference
+ public HelloWorldServiceRemote helloWorldService;
+
+ public String getGreetings(String s) {
+ return helloWorldService.getGreetingsRemote(s);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java
new file mode 100644
index 0000000000..3dc0b12b82
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldCallbackRemote;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceCallbackOnewayRemote;
+import org.oasisopen.sca.annotation.Callback;
+
+public class HelloWorldServiceCallbackOnewayRemoteImpl implements HelloWorldServiceCallbackOnewayRemote {
+
+ @Callback
+ protected HelloWorldCallbackRemote theCallback;
+
+ public void getGreetingsRemote(String s) {
+ theCallback.getGreetingsCallbackRemote(s);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java
new file mode 100644
index 0000000000..b15d6dea80
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldCallbackRemote;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceCallbackRemote;
+import org.oasisopen.sca.annotation.Callback;
+
+public class HelloWorldServiceCallbackRemoteImpl implements HelloWorldServiceCallbackRemote {
+
+ @Callback
+ protected HelloWorldCallbackRemote theCallback;
+
+ public HelloWorldServiceCallbackRemoteImpl() {
+ System.out.println("Constructor");
+ }
+
+ public String getGreetingsRemote(String s) {
+ return "Hello " + theCallback.getGreetingsCallbackRemote(s);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceLocalImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceLocalImpl.java
new file mode 100644
index 0000000000..c4347b084a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceLocalImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceLocal;
+
+public class HelloWorldServiceLocalImpl implements HelloWorldServiceLocal {
+
+ public String getGreetingsLocal(String s) {
+ return "Hello " + s;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java
new file mode 100644
index 0000000000..846bff02e1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceLocal;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote2;
+import org.oasisopen.sca.annotation.Service;
+
+@Service({HelloWorldServiceRemote.class, HelloWorldServiceRemote2.class, HelloWorldServiceLocal.class} )
+public class HelloWorldServiceMultipleServicesImpl implements HelloWorldServiceLocal, HelloWorldServiceRemote, HelloWorldServiceRemote2 {
+
+ public String getGreetingsLocal(String s) {
+ return "Hello " + s;
+ }
+
+ public String getGreetingsRemote(String s) {
+ return "Hello " + s;
+ }
+
+ public String getGreetingsRemote2(String s) {
+ return "Hello " + s;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceRemoteImpl.java
new file mode 100644
index 0000000000..d69f442879
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceRemoteImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote;
+
+public class HelloWorldServiceRemoteImpl implements HelloWorldServiceRemote {
+
+ public String getGreetingsRemote(String s) {
+ return "Hello " + s;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/AsynchTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/AsynchTestCase.java
new file mode 100644
index 0000000000..cbcc06056a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/AsynchTestCase.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.sca.rmi;
+
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientCallbackOnewayRemoteImpl;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class AsynchTestCase {
+
+ public static Node nodeA;
+ public static Node nodeB;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ System.out.println("Setting up nodes");
+ // System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding", RMIBinding.TYPE.toString());
+ try {
+ // create and start nodes
+ Contribution contrib = new Contribution("asynch", "./target/test-classes/rmi/asynchReference");
+ nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("asynch", "./target/test-classes/rmi/asynchService");
+ nodeB = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeB.start();
+
+ } catch (Exception ex) {
+ System.err.println("Exception when creating domain " + ex.getMessage());
+ ex.printStackTrace(System.err);
+ throw ex;
+ }
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ nodeA.stop();
+ nodeB.stop();
+ // System.clearProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding");
+ }
+
+ @Test
+ public void testHelloWorldAsynch() throws Exception {
+ HelloWorldClient helloWorldClientB;
+ helloWorldClientB = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientCallbackRemote");
+ helloWorldClientB.getGreetings("fred");
+ System.out.println("Sleeping ...");
+ Thread.sleep(2000);
+ System.out.println("... Done");
+ Assert.assertEquals("callback fred", HelloWorldClientCallbackOnewayRemoteImpl.result );
+
+ }
+
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/CallbackTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/CallbackTestCase.java
new file mode 100644
index 0000000000..dccd2dace8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/CallbackTestCase.java
@@ -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.sca.rmi;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class CallbackTestCase {
+
+ public static Node nodeA;
+ public static Node nodeB;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ System.out.println("Setting up nodes");
+ // System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding", RMIBinding.TYPE.toString());
+
+ try {
+ // create and start nodes
+ Contribution contrib = new Contribution("reference", "./target/test-classes/rmi/callbackReference");
+ nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("service", "./target/test-classes/rmi/callbackService");
+ nodeB = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeB.start();
+
+ } catch (Exception ex) {
+ System.err.println("Exception when creating domain " + ex.getMessage());
+ ex.printStackTrace(System.err);
+ throw ex;
+ }
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ nodeA.stop();
+ nodeB.stop();
+ // System.clearProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding");
+ }
+
+ //@Test
+ public void testKeepServerRunning() throws Exception {
+ System.out.println("press enter to continue");
+ System.in.read();
+ }
+
+ @Test
+ public void testHelloWorldCallbackLocal() throws Exception {
+ HelloWorldClient helloWorldClientB;
+ helloWorldClientB = nodeB.getService(HelloWorldClient.class, "BHelloWorldClientCallbackLocal");
+ Assert.assertEquals("Hello callback fred", helloWorldClientB.getGreetings("fred"));
+ }
+
+ @Test
+ public void testHelloWorldCallbackRemote() throws Exception {
+ HelloWorldClient helloWorldClientA;
+ helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientCallbackRemote");
+ Assert.assertEquals("Hello callback fred", helloWorldClientA.getGreetings("fred"));
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/PromotionTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/PromotionTestCase.java
new file mode 100644
index 0000000000..7aac95a8ff
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/PromotionTestCase.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.sca.rmi;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class PromotionTestCase {
+
+
+ public static Node nodeA;
+ public static Node nodeB;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ System.out.println("Setting up nodes");
+ System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding",
+ "{http://tuscany.apache.org/xmlns/sca/1.1}binding.rmi");
+
+ try {
+ // create and start nodes
+ Contribution contrib = new Contribution("reference", "./target/test-classes/rmi/promotionReference");
+ nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("service", "./target/test-classes/rmi/promotionService");
+ nodeB = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeB.start();
+
+ } catch (Exception ex) {
+ System.err.println("Exception when creating domain " + ex.getMessage());
+ ex.printStackTrace(System.err);
+ throw ex;
+ }
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ nodeA.stop();
+ nodeB.stop();
+ System.clearProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding");
+
+ }
+
+ @Test
+ public void testHelloWorldPromotion() throws Exception {
+ HelloWorldClient helloWorldClientA;
+ helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientRemotePromotion");
+ Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred");
+
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/SimpleTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/SimpleTestCase.java
new file mode 100644
index 0000000000..f748beb6cb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/SimpleTestCase.java
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.sca.rmi;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.oasisopen.sca.ServiceUnavailableException;
+
+public class SimpleTestCase {
+
+ private static NodeFactory factory;
+ public static Node nodeA;
+ public static Node nodeB;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ System.out.println("Setting up nodes");
+ System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding",
+ "{http://tuscany.apache.org/xmlns/sca/1.1}binding.rmi");
+
+ try {
+ factory = NodeFactory.getInstance();
+ // create and start nodes
+ Contribution contrib = new Contribution("reference", "./target/test-classes/rmi/simpleReference");
+ nodeA = factory.createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("service", "./target/test-classes/rmi/simpleService");
+ nodeB = factory.createNode("HelloWorld.composite", contrib);
+ nodeB.start();
+
+ } catch (Exception ex) {
+ System.err.println("Exception when creating domain " + ex.getMessage());
+ ex.printStackTrace(System.err);
+ throw ex;
+ }
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ nodeA.stop();
+ nodeB.stop();
+ factory.destroy();
+ System.clearProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding");
+ }
+
+ @Test
+ public void testHelloWorldLocal() throws Exception {
+ HelloWorldClient helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientLocal");
+ Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred");
+
+ }
+
+ @Test
+ public void testHelloWorldRemote() throws Exception {
+
+ HelloWorldClient helloWorldClientA;
+ helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientRemote");
+
+ try {
+ helloWorldClientA.getGreetings("fred");
+ } catch (ServiceUnavailableException ex){
+ Assert.fail();
+ }
+ }
+
+ @Test
+ public void testHelloWorldLocalAndRemote() throws Exception {
+ HelloWorldClient helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientLocalAndRemote");
+ HelloWorldClient helloWorldClientB = nodeB.getService(HelloWorldClient.class, "BHelloWorldClientLocalAndRemote");
+ Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred");
+ Assert.assertEquals(helloWorldClientB.getGreetings("fred"), "Hello fred");
+ }
+
+ @Test
+ public void testHelloWorldMultipleServices() throws Exception {
+ HelloWorldClient helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientMultipleServices");
+ HelloWorldClient helloWorldClientA2 = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientMultipleServices2");
+ HelloWorldClient helloWorldClientB = nodeB.getService(HelloWorldClient.class, "BHelloWorldClientMultipleServices");
+ Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred");
+ Assert.assertEquals(helloWorldClientA2.getGreetings("fred"), "Hello fred");
+ Assert.assertEquals(helloWorldClientB.getGreetings("fred"), "Hello fred");
+ }
+
+ @Test
+ public void testHelloWorldMultipleBindings() throws Exception {
+ HelloWorldClient helloWorldClientA;
+ helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientMultipleBindings");
+ Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred");
+
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldCallbackRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldCallbackRemote.java
new file mode 100644
index 0000000000..7c4cf4b0b7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldCallbackRemote.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+
+@Remotable
+public interface HelloWorldCallbackRemote {
+
+ String getGreetingsCallbackRemote(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldClient.java
new file mode 100644
index 0000000000..017acee582
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldClient.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld;
+
+
+public interface HelloWorldClient {
+
+ String getGreetings(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackOnewayRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackOnewayRemote.java
new file mode 100644
index 0000000000..86f984e61a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackOnewayRemote.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.OneWay;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+@Callback(HelloWorldCallbackRemote.class)
+public interface HelloWorldServiceCallbackOnewayRemote {
+
+ @OneWay
+ void getGreetingsRemote(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackRemote.java
new file mode 100644
index 0000000000..8e19fd7382
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackRemote.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+@Callback(HelloWorldCallbackRemote.class)
+public interface HelloWorldServiceCallbackRemote {
+
+ String getGreetingsRemote(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceLocal.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceLocal.java
new file mode 100644
index 0000000000..b0d623e2e4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceLocal.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld;
+
+
+public interface HelloWorldServiceLocal {
+
+ String getGreetingsLocal(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote.java
new file mode 100644
index 0000000000..ccb44694d9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorldServiceRemote {
+
+ String getGreetingsRemote(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote2.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote2.java
new file mode 100644
index 0000000000..5c8bb13f43
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote2.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorldServiceRemote2 {
+
+ String getGreetingsRemote2(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java
new file mode 100644
index 0000000000..1ff1792bb7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java
@@ -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.binding.sca.rmi.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceCallbackOnewayRemote;
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClientCallbackOnewayRemoteImpl implements HelloWorldClient {
+
+ public static String result;
+
+ @Reference
+ public HelloWorldServiceCallbackOnewayRemote helloWorldService;
+
+ public String getGreetings(String s) {
+ helloWorldService.getGreetingsRemote(s);
+ return null;
+ }
+
+ public String getGreetingsCallbackRemote(String s) {
+ result = "callback " + s;
+ return result;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java
new file mode 100644
index 0000000000..b17d8e2016
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceCallbackRemote;
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClientCallbackRemoteImpl implements HelloWorldClient {
+
+ public static String result;
+
+ @Reference
+ public HelloWorldServiceCallbackRemote helloWorldService;
+
+ public String getGreetings(String s) {
+ return helloWorldService.getGreetingsRemote(s);
+ }
+
+ public String getGreetingsCallbackRemote(String s) {
+ result = "callback " + s;
+ return result;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientLocalImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientLocalImpl.java
new file mode 100644
index 0000000000..e230326f5f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientLocalImpl.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceLocal;
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClientLocalImpl implements HelloWorldClient {
+
+ @Reference
+ public HelloWorldServiceLocal helloWorldService;
+
+ public String getGreetings(String s) {
+ return helloWorldService.getGreetingsLocal(s);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemote2Impl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemote2Impl.java
new file mode 100644
index 0000000000..77df8c2c39
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemote2Impl.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceRemote2;
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClientRemote2Impl implements HelloWorldClient {
+
+ @Reference
+ public HelloWorldServiceRemote2 helloWorldService;
+
+ public String getGreetings(String s) {
+ return helloWorldService.getGreetingsRemote2(s);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemoteImpl.java
new file mode 100644
index 0000000000..8effa3ac36
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemoteImpl.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceRemote;
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClientRemoteImpl implements HelloWorldClient {
+
+ @Reference
+ public HelloWorldServiceRemote helloWorldService;
+
+ public String getGreetings(String s) {
+ return helloWorldService.getGreetingsRemote(s);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java
new file mode 100644
index 0000000000..2467ddab88
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldCallbackRemote;
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceCallbackOnewayRemote;
+import org.oasisopen.sca.annotation.Callback;
+
+public class HelloWorldServiceCallbackOnewayRemoteImpl implements HelloWorldServiceCallbackOnewayRemote {
+
+ @Callback
+ protected HelloWorldCallbackRemote theCallback;
+
+ public void getGreetingsRemote(String s) {
+ theCallback.getGreetingsCallbackRemote(s);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java
new file mode 100644
index 0000000000..d1b75d0a2c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldCallbackRemote;
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceCallbackRemote;
+import org.oasisopen.sca.annotation.Callback;
+
+public class HelloWorldServiceCallbackRemoteImpl implements HelloWorldServiceCallbackRemote {
+
+ @Callback
+ protected HelloWorldCallbackRemote theCallback;
+
+ public HelloWorldServiceCallbackRemoteImpl() {
+ System.out.println("Constructor");
+ }
+
+ public String getGreetingsRemote(String s) {
+ return "Hello " + theCallback.getGreetingsCallbackRemote(s);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceLocalImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceLocalImpl.java
new file mode 100644
index 0000000000..44e7efc668
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceLocalImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceLocal;
+
+public class HelloWorldServiceLocalImpl implements HelloWorldServiceLocal {
+
+ public String getGreetingsLocal(String s) {
+ return "Hello " + s;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java
new file mode 100644
index 0000000000..88440de023
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceLocal;
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceRemote;
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceRemote2;
+import org.oasisopen.sca.annotation.Service;
+
+@Service({HelloWorldServiceRemote.class, HelloWorldServiceRemote2.class, HelloWorldServiceLocal.class} )
+public class HelloWorldServiceMultipleServicesImpl implements HelloWorldServiceLocal, HelloWorldServiceRemote, HelloWorldServiceRemote2 {
+
+ public String getGreetingsLocal(String s) {
+ return "Hello " + s;
+ }
+
+ public String getGreetingsRemote(String s) {
+ return "Hello " + s;
+ }
+
+ public String getGreetingsRemote2(String s) {
+ return "Hello " + s;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceRemoteImpl.java
new file mode 100644
index 0000000000..06dc2c3f79
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceRemoteImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceRemote;
+
+public class HelloWorldServiceRemoteImpl implements HelloWorldServiceRemote {
+
+ public String getGreetingsRemote(String s) {
+ return "Hello " + s;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/BindingSCATestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/BindingSCATestCase.java
new file mode 100644
index 0000000000..fcd0d39162
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/BindingSCATestCase.java
@@ -0,0 +1,170 @@
+/*
+ * 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.itest.bindingsca;
+
+import java.io.File;
+
+import org.apache.tuscany.sca.assembly.SCABinding;
+import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.configuration.NodeConfiguration;
+import org.junit.Assert;
+import org.junit.Test;
+import org.oasisopen.sca.ServiceRuntimeException;
+
+/**
+ * Test binding.sca in the same classloader
+ */
+public class BindingSCATestCase {
+ static final String DOMAIN_URI = "my-domain";
+ private static final String REGISTRY_URI = "tuscany:bindingScaTestDomain";
+ private static final String PKG = "org/apache/tuscany/sca/itest/bindingsca/";
+ private static final String CLIENT = "Client.composite";
+ private static final String SERVICE = "Service.composite";
+ private static final String ROOT = new File("target/classes/" + PKG).toURI().toString();
+
+ /**
+ * One NodeFactory and two nodes
+ */
+ @Test
+ public void testOneFactoryTwoNodes() {
+ NodeFactory factory1 = NodeFactory.getInstance();
+ Node node1 = createClientNode(factory1);
+ Node node2 = createServiceNode(factory1);
+ node1.start();
+ node2.start();
+ try {
+ runClient(node1);
+ } finally {
+ node2.stop();
+ node1.stop();
+ factory1.destroy();
+ }
+ }
+
+ /**
+ * Create the service node
+ * @param factory
+ * @return
+ */
+ static Node createServiceNode(NodeFactory factory) {
+ NodeConfiguration config2 =
+ factory.createNodeConfiguration().setDomainURI(DOMAIN_URI).setURI("node2").addContribution("c2", ROOT)
+ .addDeploymentComposite("c2", SERVICE).setDomainRegistryURI(REGISTRY_URI)
+ .addBinding(WebServiceBinding.TYPE, "http://localhost:8085/").addBinding(SCABinding.TYPE,
+ "http://localhost:8085/");
+
+ Node node2 = factory.createNode(config2);
+ return node2;
+ }
+
+ /**
+ * Create the client node
+ * @param factory
+ * @return
+ */
+ static Node createClientNode(NodeFactory factory) {
+ NodeConfiguration config1 =
+ factory.createNodeConfiguration().setDomainURI(DOMAIN_URI).setURI("node1").addContribution("c1", ROOT)
+ .addDeploymentComposite("c1", CLIENT).setDomainRegistryURI(REGISTRY_URI)
+ .addBinding(WebServiceBinding.TYPE, "http://localhost:8085/").addBinding(SCABinding.TYPE,
+ "http://localhost:8085/");
+ Node node1 = factory.createNode(config1);
+ return node1;
+ }
+
+ /**
+ * Two node factories and two nodes
+ */
+ @Test
+ public void testTwoFactoriesTwoNodes() throws Exception {
+ NodeFactory factory1 = NodeFactory.newInstance();
+ Node node1 = createClientNode(factory1);
+ NodeFactory factory2 = NodeFactory.newInstance();
+ Node node2 = createServiceNode(factory2);
+ node1.start();
+ node2.start();
+ Thread.sleep(1000);
+ try {
+ // This call doesn't require the Local service, it should be successful
+ createCustomer(node1);
+ try {
+ runClient(node1);
+ // We cannot make local call to remote endpoints
+ Assert.fail("ServiceRuntimeException should have been thrown.");
+ } catch (ServiceRuntimeException e) {
+ // ignore
+ }
+ } finally {
+ node2.stop();
+ node1.stop();
+ factory2.destroy();
+ factory1.destroy();
+ }
+ }
+
+ /**
+ * Run the client
+ * @param node
+ */
+ static void runClient(Node node) {
+ Client client = node.getService(Client.class, "ClientComponent/Client");
+ runClient(client);
+ }
+
+ static void runClient(Client client) {
+ String id = client.create("Ray");
+ Assert.assertEquals("Ray", client.getName(id));
+ }
+
+ static void runClientNotFound(Client client) {
+ String id = "not-there";
+ Assert.assertNull(client.getName(id));
+ }
+
+ static String createCustomer(Node node) {
+ Client client = node.getService(Client.class, "ClientComponent/Client");
+ String id = client.create("John");
+ Assert.assertNotNull(id);
+ return id;
+ }
+
+ /**
+ * One node factory and one node for both composites
+ */
+ @Test
+ public void testOneFactoryOneNode() {
+ NodeFactory factory = NodeFactory.getInstance();
+ NodeConfiguration config1 =
+ factory.createNodeConfiguration().setDomainURI(DOMAIN_URI).setURI("node1").addContribution("c1", ROOT)
+ .addDeploymentComposite("c1", CLIENT).addDeploymentComposite("c1", SERVICE);
+
+ Node node1 = factory.createNode(config1);
+ node1.start();
+ try {
+ runClient(node1);
+ } finally {
+ node1.stop();
+ factory.destroy();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedCustomerTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedCustomerTestCase.java
new file mode 100644
index 0000000000..7255697d4b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedCustomerTestCase.java
@@ -0,0 +1,62 @@
+/*
+ * 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.itest.bindingsca;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Running the client node and service node with two different classloaders that share the Customer class
+ */
+public class ClientNodeSharedCustomerTestCase {
+ private static Node clientNode;
+ private static TestCaseRunner runner;
+ private static NodeFactory factory;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ runner = new TestCaseRunner(ServiceNode.class, Remote.class.getName(), RemoteServiceImpl.class.getName());
+ runner.beforeClass();
+ factory = NodeFactory.getInstance();
+ clientNode = BindingSCATestCase.createClientNode(factory).start();
+ Thread.sleep(1000);
+ }
+
+ @Test
+ public void testClient() throws Exception {
+ BindingSCATestCase.runClient(clientNode);
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (clientNode != null) {
+ clientNode.stop();
+ }
+ if (runner != null) {
+ runner.afterClass();
+ }
+ if (factory != null) {
+ factory.destroy();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedLocalTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedLocalTestCase.java
new file mode 100644
index 0000000000..51fafae32c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedLocalTestCase.java
@@ -0,0 +1,62 @@
+/*
+ * 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.itest.bindingsca;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Running the client node and service node with two different classloaders that share the Local class
+ * (but not Customer)
+ */
+public class ClientNodeSharedLocalTestCase {
+ private static Node clientNode;
+ private static TestCaseRunner runner;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ runner =
+ new TestCaseRunner(ServiceNode.class, Remote.class.getName(), RemoteServiceImpl.class.getName(),
+ Customer.class.getName());
+ runner.beforeClass();
+ NodeFactory factory = NodeFactory.getInstance();
+ clientNode = BindingSCATestCase.createClientNode(factory).start();
+ Thread.sleep(1000);
+ }
+
+ @Test
+ public void testClient() throws Exception {
+ BindingSCATestCase.runClient(clientNode);
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (clientNode != null) {
+ clientNode.stop();
+ }
+ if (runner != null) {
+ runner.afterClass();
+ }
+ NodeFactory.getInstance().destroy();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedCustomerTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedCustomerTestCase.java
new file mode 100644
index 0000000000..b8ff0c58ba
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedCustomerTestCase.java
@@ -0,0 +1,54 @@
+/*
+ * 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.itest.bindingsca;
+
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Running the client api and service node with two different classloaders that share the Customer class
+ */
+public class ClientSharedCustomerTestCase {
+ private static Client client;
+ private static TestCaseRunner runner;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ runner = new TestCaseRunner(ServiceNode.class, Remote.class.getName(), RemoteServiceImpl.class.getName());
+ runner.beforeClass();
+ client = new SCAClientImpl(BindingSCATestCase.DOMAIN_URI);
+ Thread.sleep(1000);
+ }
+
+ @Test
+ public void testClient() throws Exception {
+ BindingSCATestCase.runClient(client);
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (runner != null) {
+ runner.afterClass();
+ }
+ NodeFactory.getInstance().destroy();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedLocalTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedLocalTestCase.java
new file mode 100644
index 0000000000..633e1a767c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedLocalTestCase.java
@@ -0,0 +1,63 @@
+/*
+ * 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.itest.bindingsca;
+
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Running the client api and service node with two different classloaders that share the Local class
+ * (but not Customer)
+ */
+public class ClientSharedLocalTestCase {
+ private static Client client;
+ private static TestCaseRunner runner;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ runner =
+ new TestCaseRunner(ServiceNode.class, Remote.class.getName(), RemoteServiceImpl.class.getName(),
+ Customer.class.getName(), CustomerNotFoundException.class.getName());
+ runner.beforeClass();
+ client = new SCAClientImpl(BindingSCATestCase.DOMAIN_URI);
+ Thread.sleep(1000);
+ }
+
+ @Test
+ public void testClient() throws Exception {
+ BindingSCATestCase.runClient(client);
+ }
+
+ @Test
+ public void testClientNotFound() throws Exception {
+ BindingSCATestCase.runClientNotFound(client);
+ }
+
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (runner != null) {
+ runner.afterClass();
+ }
+ NodeFactory.getInstance().destroy();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ServiceNode.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ServiceNode.java
new file mode 100644
index 0000000000..1cba2b57c2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ServiceNode.java
@@ -0,0 +1,48 @@
+/*
+ * 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.itest.bindingsca;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class ServiceNode {
+ private static Node serviceNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ /* System.setProperty("org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint.enabled",
+ "false");
+ */
+ NodeFactory factory = NodeFactory.getInstance();
+ serviceNode = BindingSCATestCase.createServiceNode(factory).start();
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (serviceNode != null) {
+ serviceNode.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/TestCaseRunner.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/TestCaseRunner.java
new file mode 100644
index 0000000000..c0960ffe95
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/java/org/apache/tuscany/sca/itest/bindingsca/TestCaseRunner.java
@@ -0,0 +1,329 @@
+/*
+ * 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.itest.bindingsca;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * A helper class that can be used to run an SCA JUnit test case. The test case will run in an isolated class loader.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TestCaseRunner {
+
+ private ClassLoader classLoader;
+ private Class<?> testSuiteClass;
+ private Object testSuite;
+ private Class<?> testResultClass;
+ private Class<?> testCaseClass;
+ private Object testCase;
+
+ private Class<?> beforeAnnotation;
+ private Class<?> beforeClassAnnotation;
+ private Class<?> afterAnnotation;
+ private Class<?> afterClassAnnotation;
+ private Class<?> junit4AdapterClass;
+ private Class<?> junit3TestCaseClass;
+
+ /**
+ * Constructs a new TestCase runner.
+ *
+ * @param testClass
+ */
+ public TestCaseRunner(Class<?> testClass, String... isolatedClasses) {
+ try {
+ ClassLoader tccl = setupClassLoader(testClass, isolatedClasses);
+
+ try {
+ // Thread.currentThread().setContextClassLoader(classLoader);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finalClassLoader = classLoader;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finalClassLoader);
+ return null;
+ }
+ });
+
+ testCaseClass = Class.forName(testClass.getName(), true, classLoader);
+ testCase = testCaseClass.newInstance();
+ ClassLoader testClassLoader = testCaseClass.getClassLoader();
+
+ junit3TestCaseClass = Class.forName("junit.framework.TestCase", true, testClassLoader);
+
+ testSuiteClass = Class.forName("junit.framework.TestSuite", true, testClassLoader);
+ Constructor<?> testSuiteConstructor = testSuiteClass.getConstructor(Class.class);
+ testSuite = testSuiteConstructor.newInstance(testCaseClass);
+
+ testResultClass = Class.forName("junit.framework.TestResult", true, testClassLoader);
+
+ try {
+ beforeAnnotation = Class.forName("org.junit.Before", true, testClassLoader);
+ afterAnnotation = Class.forName("org.junit.After", true, testClassLoader);
+ beforeClassAnnotation = Class.forName("org.junit.BeforeClass", true, testClassLoader);
+ afterClassAnnotation = Class.forName("org.junit.AfterClass", true, testClassLoader);
+ junit4AdapterClass = Class.forName("junit.framework.JUnit4TestAdapter", true, testClassLoader);
+ } catch (Exception e) {
+ // Unexpected
+ throw new AssertionError(e);
+ }
+ } catch (Throwable e) {
+ e.printStackTrace();
+ } finally {
+ // Thread.currentThread().setContextClassLoader(tccl);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finaltccl = tccl;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finaltccl);
+ return null;
+ }
+ });
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ private ClassLoader setupClassLoader(Class<?> testClass, String... isolatedClasses) {
+ ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+ classLoader = testClass.getClassLoader();
+ if (classLoader instanceof URLClassLoader) {
+ URL[] urls = ((URLClassLoader)classLoader).getURLs();
+ classLoader = new ClassLoaderImpl(urls, classLoader, isolatedClasses);
+ } else if (classLoader == tccl || classLoader.getParent() == tccl) {
+ classLoader = new URLClassLoader(new URL[0], classLoader);
+ } else {
+ classLoader = tccl;
+ }
+ return tccl;
+ }
+
+ /**
+ * Run the test case
+ */
+ public void run() {
+ ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+ try {
+ // Thread.currentThread().setContextClassLoader(classLoader);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finalClassLoader = classLoader;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finalClassLoader);
+ return null;
+ }
+ });
+
+ if (junit3TestCaseClass.isAssignableFrom(testCaseClass)) {
+ Object testResult = testResultClass.newInstance();
+ Method runMethod = testSuiteClass.getMethod("run", testResultClass);
+ runMethod.invoke(testSuite, testResult);
+ } else {
+ Object junit4Adapter = junit4AdapterClass.getConstructor(Class.class).newInstance(testCaseClass);
+ Object testResult = testResultClass.newInstance();
+ Method runMethod = junit4AdapterClass.getMethod("run", testResultClass);
+ runMethod.invoke(junit4Adapter, testResult);
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ } finally {
+ // Thread.currentThread().setContextClassLoader(tccl);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finaltccl = tccl;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finaltccl);
+ return null;
+ }
+ });
+ }
+ }
+
+ /**
+ * Invoke the setUp method
+ */
+ public void setUp() {
+ execute("setUp");
+ }
+
+ /**
+ * Invoke the before methods
+ */
+ public void before() {
+ execute(beforeAnnotation);
+ }
+
+ /**
+ * Invoke the beforeClass methods
+ */
+ public void beforeClass() {
+ execute(beforeClassAnnotation);
+ }
+
+ /**
+ * Invoke the tearDown method
+ */
+ public void tearDown() {
+ execute("tearDown");
+ }
+
+ /**
+ * Invoke the after methods
+ */
+ public void after() {
+ execute(afterAnnotation);
+ }
+
+ /**
+ * Invoke the afterClass methods
+ */
+ public void afterClass() {
+ execute(afterClassAnnotation);
+ }
+
+ /**
+ * Invoke the specified test method.
+ */
+ public void run(String methodName) {
+ execute(methodName);
+ }
+
+ /**
+ * Invoke the methods annotated with the specified annotation.
+ */
+ private void execute(Class<?> annotationClass) {
+ if (annotationClass == null) {
+ throw new RuntimeException(new NoSuchMethodException());
+ }
+ ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+ try {
+ // Thread.currentThread().setContextClassLoader(classLoader);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finalClassLoader = classLoader;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finalClassLoader);
+ return null;
+ }
+ });
+
+ for (Method method : testCaseClass.getDeclaredMethods()) {
+ for (Annotation annotation : method.getAnnotations()) {
+ if (annotation.annotationType() == annotationClass) {
+ method.invoke(testCase);
+ }
+ }
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ } finally {
+ // Thread.currentThread().setContextClassLoader(tccl);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finaltccl = tccl;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finaltccl);
+ return null;
+ }
+ });
+ }
+ }
+
+ /**
+ * Invoke the specified method
+ */
+ private void execute(String methodName) {
+ ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+ try {
+ // Thread.currentThread().setContextClassLoader(classLoader);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finalClassLoader = classLoader;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finalClassLoader);
+ return null;
+ }
+ });
+ Method setUpMethod = testCaseClass.getDeclaredMethod(methodName);
+ setUpMethod.setAccessible(true);
+ setUpMethod.invoke(testCase);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ } finally {
+ // Thread.currentThread().setContextClassLoader(tccl);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finaltccl = tccl;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finaltccl);
+ return null;
+ }
+ });
+ }
+ }
+
+ public static class ClassLoaderImpl extends URLClassLoader {
+ private Set<String> isolatedClasses = new HashSet<String>();
+
+ /**
+ * @param urls
+ * @param parent
+ */
+ public ClassLoaderImpl(URL[] urls, ClassLoader parent, String... sharedClasses) {
+ super(urls, parent);
+ this.isolatedClasses.addAll(Arrays.asList(sharedClasses));
+ }
+
+ @Override
+ protected synchronized Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
+ if (!isolatedClasses.contains(name)) {
+ return super.loadClass(name, resolve);
+ } else {
+ Class<?> cls = findLoadedClass(name);
+ if (cls == null) {
+ cls = findClass(name);
+ }
+ if (resolve) {
+ resolveClass(cls);
+ }
+ return cls;
+ }
+ }
+
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchReference/HelloWorld.composite
new file mode 100644
index 0000000000..8c825ca805
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchReference/HelloWorld.composite
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+ <!-- callback remote wire -->
+ <component name="AHelloWorldClientCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientCallbackOnewayRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceCallbackRemote">
+ <binding.sca/>
+ <callback>
+ <binding.sca uri="http://localhost:8084/AHelloWorldClientCallbackRemote"/>
+ </callback>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchReference/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchService/HelloWorld.composite
new file mode 100644
index 0000000000..79b1a5d794
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchService/HelloWorld.composite
@@ -0,0 +1,38 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- callback remote wire -->
+ <component name="BHelloWorldServiceCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceCallbackOnewayRemoteImpl" />
+ <service name="HelloWorldServiceCallbackOnewayRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceCallbackRemote"/>
+ <callback>
+ <binding.sca/>
+ </callback>
+ </service>
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/asynchService/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackReference/HelloWorld.composite
new file mode 100644
index 0000000000..e8924d2728
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackReference/HelloWorld.composite
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+ <!-- callback remote wire -->
+ <component name="AHelloWorldClientCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientCallbackRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceCallbackRemote">
+ <binding.sca/>
+ <callback>
+ <binding.sca uri="http://localhost:8084/AHelloWorldClientCallbackRemote"/>
+ </callback>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackReference/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackService/HelloWorld.composite
new file mode 100644
index 0000000000..4edc8df5cd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackService/HelloWorld.composite
@@ -0,0 +1,43 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- callback remote wire -->
+ <component name="BHelloWorldServiceCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceCallbackRemoteImpl" />
+ <service name="HelloWorldServiceCallbackRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceCallbackRemote"/>
+ <callback>
+ <binding.sca/>
+ </callback>
+ </service>
+ </component>
+
+ <!-- callback local wire -->
+ <component name="BHelloWorldClientCallbackLocal">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientCallbackRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceCallbackRemote" />
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/callbackService/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionReference/HelloWorld.composite
new file mode 100644
index 0000000000..823cab4f56
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionReference/HelloWorld.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- composite hierarchy -->
+ <component name="AHelloWorldClientRemotePromotion">
+ <implementation.composite name="sample:HelloWorldComponent" />
+ <reference name="AHelloWorldClientRemoteReference" target="BHelloWorldServiceRemotePromotion"/>
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionReference/HelloWorldComponent.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionReference/HelloWorldComponent.composite
new file mode 100644
index 0000000000..088fd616f4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionReference/HelloWorldComponent.composite
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorldComponent">
+
+ <service name="AHelloWorldClientRemoteService" promote="AHelloWorldClientRemoteComponent">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient"/>
+ </service>
+
+ <reference name="AHelloWorldClientRemoteReference" promote="AHelloWorldClientRemoteComponent/helloWorldService" multiplicity="1..1">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceRemote"/>
+ </reference>
+
+ <component name="AHelloWorldClientRemoteComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientRemoteImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionReference/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionService/HelloWorld.composite
new file mode 100644
index 0000000000..454e9c55cf
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionService/HelloWorld.composite
@@ -0,0 +1,35 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- composite hierarchy -->
+ <component name="BHelloWorldServiceRemotePromotion">
+ <implementation.composite name="sample:HelloWorldComponent" />
+ <service name="BHelloWorldServiceRemoteService">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceRemotePromotion"/>
+ </service>
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionService/HelloWorldComponent.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionService/HelloWorldComponent.composite
new file mode 100644
index 0000000000..a313fb8f68
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionService/HelloWorldComponent.composite
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorldComponent">
+
+ <service name="BHelloWorldServiceRemoteService"
+ promote="BHelloWorldServiceRemoteComponent/HelloWorldServiceRemote"/>
+
+ <component name="BHelloWorldServiceRemoteComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceRemoteImpl"/>
+ </component>
+
+ <component name="BHelloWorldServiceLocalAndRemoteNested">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/promotionService/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleReference/HelloWorld.composite
new file mode 100644
index 0000000000..4151749523
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleReference/HelloWorld.composite
@@ -0,0 +1,67 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- local only wire -->
+ <component name="AHelloWorldClientLocal">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientLocalImpl"/>
+ <reference name="helloWorldService" target="AHelloWorldServiceLocal" />
+ </component>
+
+ <component name="AHelloWorldServiceLocal">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceLocalImpl" />
+ </component>
+
+ <!-- unresolved remote wire -->
+ <component name="AHelloWorldClientRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceRemote" />
+ </component>
+
+ <!-- local and remote wires -->
+ <component name="AHelloWorldClientLocalAndRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceLocalAndRemote"/>
+ </component>
+
+ <!-- multiple services -->
+ <component name="AHelloWorldClientMultipleServices">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceMultipleServices/HelloWorldServiceRemote"/>
+ </component>
+
+ <component name="AHelloWorldClientMultipleServices2">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientRemote2Impl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceMultipleServices/HelloWorldServiceRemote2"/>
+ </component>
+
+ <!-- multiple bindings -->
+ <component name="AHelloWorldClientMultipleBindings">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldMultipleBindings/HelloWorldServiceRemote/scaBinding">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceRemote" />
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleReference/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleService/HelloWorld.composite
new file mode 100644
index 0000000000..37af7625ff
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleService/HelloWorld.composite
@@ -0,0 +1,85 @@
+<?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:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- local only wire -->
+
+
+ <!-- unresolved remote wire -->
+ <component name="BHelloWorldServiceRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ <service name="HelloWorldServiceRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceRemote"/>
+ </service>
+ </component>
+
+ <!-- local and remote wires -->
+ <component name="BHelloWorldServiceLocalAndRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ <service name="HelloWorldServiceRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceLocalAndRemote"/>
+ </service>
+ </component>
+
+ <component name="BHelloWorldClientLocalAndRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceLocalAndRemote" />
+ </component>
+
+ <!-- multiple services -->
+ <component name="BHelloWorldServiceMultipleServices">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceMultipleServicesImpl" />
+ <service name="HelloWorldServiceLocal">
+ </service>
+ <service name="HelloWorldServiceRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceMultipleServices/HelloWorldServiceRemote"/>
+ </service>
+ <service name="HelloWorldServiceRemote2">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceMultipleServices/HelloWorldServiceRemote2"/>
+ </service>
+ </component>
+
+ <component name="BHelloWorldClientMultipleServices">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientLocalImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceMultipleServices/HelloWorldServiceLocal" />
+ </component>
+
+ <!-- multiple bindings -->
+ <component name="BHelloWorldMultipleBindings">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ <service name="HelloWorldServiceRemote">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceRemote" />
+ <!-- tuscany:binding.rmi name="rmiBinding" uri="http://localhost:8085/BHelloWorldMultipleBindings/HelloWorldServiceRemote-wsbinding"/ -->
+ <binding.sca name="scaBinding" uri="http://localhost:8085/BHelloWorldMultipleBindings/HelloWorldServiceRemote-scabinding"/>
+ </service>
+ </component>
+
+
+ <!-- Dynamic interfaces -->
+ <!--component name="BHelloWorldServiceScript">
+ <implementation.script script="calculator/AddServiceImpl.js"/>
+ </component-->
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/rmi/simpleService/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchReference/HelloWorld.composite
new file mode 100644
index 0000000000..e797a0aa9c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchReference/HelloWorld.composite
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+ <!-- callback remote wire -->
+ <component name="AHelloWorldClientCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientCallbackOnewayRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceCallbackRemote">
+ <binding.sca/>
+ <callback>
+ <binding.sca uri="http://localhost:8084/AHelloWorldClientCallbackRemote"/>
+ </callback>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchReference/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchService/HelloWorld.composite
new file mode 100644
index 0000000000..079ee49380
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchService/HelloWorld.composite
@@ -0,0 +1,38 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- callback remote wire -->
+ <component name="BHelloWorldServiceCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceCallbackOnewayRemoteImpl" />
+ <service name="HelloWorldServiceCallbackOnewayRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceCallbackRemote"/>
+ <callback>
+ <binding.sca/>
+ </callback>
+ </service>
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/asynchService/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackReference/HelloWorld.composite
new file mode 100644
index 0000000000..1d5630f3d0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackReference/HelloWorld.composite
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+ <!-- callback remote wire -->
+ <component name="AHelloWorldClientCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientCallbackRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceCallbackRemote">
+ <binding.sca/>
+ <callback>
+ <binding.sca uri="http://localhost:8084/AHelloWorldClientCallbackRemote"/>
+ </callback>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackReference/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackService/HelloWorld.composite
new file mode 100644
index 0000000000..ded3766d49
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackService/HelloWorld.composite
@@ -0,0 +1,43 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- callback remote wire -->
+ <component name="BHelloWorldServiceCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceCallbackRemoteImpl" />
+ <service name="HelloWorldServiceCallbackRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceCallbackRemote"/>
+ <callback>
+ <binding.sca/>
+ </callback>
+ </service>
+ </component>
+
+ <!-- callback local wire -->
+ <component name="BHelloWorldClientCallbackLocal">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientCallbackRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceCallbackRemote" />
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/callbackService/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionReference/HelloWorld.composite
new file mode 100644
index 0000000000..4513f21acf
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionReference/HelloWorld.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- composite hierarchy -->
+ <component name="AHelloWorldClientRemotePromotion">
+ <implementation.composite name="sample:HelloWorldComponent" />
+ <reference name="AHelloWorldClientRemoteReference" target="BHelloWorldServiceRemotePromotion"/>
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionReference/HelloWorldComponent.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionReference/HelloWorldComponent.composite
new file mode 100644
index 0000000000..22c20ff94a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionReference/HelloWorldComponent.composite
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorldComponent">
+
+ <service name="AHelloWorldClientRemoteService" promote="AHelloWorldClientRemoteComponent">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient"/>
+ </service>
+
+ <reference name="AHelloWorldClientRemoteReference" promote="AHelloWorldClientRemoteComponent/helloWorldService" multiplicity="1..1">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote"/>
+ </reference>
+
+ <component name="AHelloWorldClientRemoteComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionReference/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionService/HelloWorld.composite
new file mode 100644
index 0000000000..e6a7d776c9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionService/HelloWorld.composite
@@ -0,0 +1,35 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- composite hierarchy -->
+ <component name="BHelloWorldServiceRemotePromotion">
+ <implementation.composite name="sample:HelloWorldComponent" />
+ <service name="BHelloWorldServiceRemoteService">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceRemotePromotion"/>
+ </service>
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionService/HelloWorldComponent.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionService/HelloWorldComponent.composite
new file mode 100644
index 0000000000..0393280625
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionService/HelloWorldComponent.composite
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorldComponent">
+
+ <service name="BHelloWorldServiceRemoteService"
+ promote="BHelloWorldServiceRemoteComponent/HelloWorldServiceRemote"/>
+
+ <component name="BHelloWorldServiceRemoteComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceRemoteImpl"/>
+ </component>
+
+ <component name="BHelloWorldServiceLocalAndRemoteNested">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/promotionService/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleReference/HelloWorld.composite
new file mode 100644
index 0000000000..f4d2789ff7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleReference/HelloWorld.composite
@@ -0,0 +1,67 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- local only wire -->
+ <component name="AHelloWorldClientLocal">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientLocalImpl"/>
+ <reference name="helloWorldService" target="AHelloWorldServiceLocal" />
+ </component>
+
+ <component name="AHelloWorldServiceLocal">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceLocalImpl" />
+ </component>
+
+ <!-- unresolved remote wire -->
+ <component name="AHelloWorldClientRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceRemote" />
+ </component>
+
+ <!-- local and remote wires -->
+ <component name="AHelloWorldClientLocalAndRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceLocalAndRemote"/>
+ </component>
+
+ <!-- multiple services -->
+ <component name="AHelloWorldClientMultipleServices">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceMultipleServices/HelloWorldServiceRemote"/>
+ </component>
+
+ <component name="AHelloWorldClientMultipleServices2">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemote2Impl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceMultipleServices/HelloWorldServiceRemote2"/>
+ </component>
+
+ <!-- multiple bindings -->
+ <component name="AHelloWorldClientMultipleBindings">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldMultipleBindings/HelloWorldServiceRemote/scaBinding">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote" />
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleReference/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleService/HelloWorld.composite
new file mode 100644
index 0000000000..7e6311a22d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleService/HelloWorld.composite
@@ -0,0 +1,84 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- local only wire -->
+
+
+ <!-- unresolved remote wire -->
+ <component name="BHelloWorldServiceRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ <service name="HelloWorldServiceRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceRemote"/>
+ </service>
+ </component>
+
+ <!-- local and remote wires -->
+ <component name="BHelloWorldServiceLocalAndRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ <service name="HelloWorldServiceRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceLocalAndRemote"/>
+ </service>
+ </component>
+
+ <component name="BHelloWorldClientLocalAndRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceLocalAndRemote" />
+ </component>
+
+ <!-- multiple services -->
+ <component name="BHelloWorldServiceMultipleServices">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceMultipleServicesImpl" />
+ <service name="HelloWorldServiceLocal">
+ </service>
+ <service name="HelloWorldServiceRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceMultipleServices/HelloWorldServiceRemote"/>
+ </service>
+ <service name="HelloWorldServiceRemote2">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceMultipleServices/HelloWorldServiceRemote2"/>
+ </service>
+ </component>
+
+ <component name="BHelloWorldClientMultipleServices">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientLocalImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceMultipleServices/HelloWorldServiceLocal" />
+ </component>
+
+ <!-- multiple bindings -->
+ <component name="BHelloWorldMultipleBindings">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ <service name="HelloWorldServiceRemote">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote" />
+ <binding.ws name="wsBinding" uri="http://localhost:8085/BHelloWorldMultipleBindings/HelloWorldServiceRemote-wsbinding"/>
+ <binding.sca name="scaBinding" uri="http://localhost:8085/BHelloWorldMultipleBindings/HelloWorldServiceRemote-scabinding"/>
+ </service>
+ </component>
+
+
+ <!-- Dynamic interfaces -->
+ <!--component name="BHelloWorldServiceScript">
+ <implementation.script script="calculator/AddServiceImpl.js"/>
+ </component-->
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-hazelcast/src/test/resources/ws/simpleService/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/pom.xml
new file mode 100644
index 0000000000..a7ae8ed797
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/pom.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-binding-sca-tribes</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes binding.sca Using Tribes Registry</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-client-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-endpoint-tribes</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-rmi-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-jetty</artifactId>
+ <version>2.0.1</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Client.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Client.java
new file mode 100644
index 0000000000..ef2565b750
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Client.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.bindingsca;
+
+/**
+ *
+ */
+public interface Client {
+ String getName(String id);
+
+ String create(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/ClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/ClientImpl.java
new file mode 100644
index 0000000000..96a0f2dadd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/ClientImpl.java
@@ -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.itest.bindingsca;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ *
+ */
+@Service(Client.class)
+public class ClientImpl implements Client {
+ @Reference
+ protected Local local;
+
+ @Reference
+ protected Remote remote;
+
+ public String getName(String id) {
+ Customer customer = null;
+ try {
+ customer = remote.getCustomer(id);
+ } catch (CustomerNotFoundException e) {
+ return null;
+ }
+ customer.dump("Client.getName()");
+ return local.getName(customer);
+ }
+
+ public String create(String name) {
+ String id = remote.generateId();
+ Customer customer = remote.createCustomer(id, name);
+ customer.dump("Client.create()");
+ return remote.getId(customer);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Customer.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Customer.java
new file mode 100644
index 0000000000..f2b7b1e41d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Customer.java
@@ -0,0 +1,70 @@
+/*
+ * 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.itest.bindingsca;
+
+/**
+ *
+ */
+public class Customer {
+ private String id;
+ private String name;
+
+ public Customer() {
+ }
+
+ /**
+ * @param id
+ * @param name
+ */
+ public Customer(String id, String name) {
+ super();
+ this.id = id;
+ this.name = name;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Override
+ public String toString() {
+ return "Customer [id=" + id + ", name=" + name + "]";
+ }
+
+ public void dump(String prefix) {
+ System.out.print(prefix);
+ System.out.print(": ");
+ System.out.print(toString());
+ System.out.println(" @" + System.identityHashCode(this));
+ System.out.println(getClass().getClassLoader());
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/CustomerNotFoundException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/CustomerNotFoundException.java
new file mode 100644
index 0000000000..a6e80c9eca
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/CustomerNotFoundException.java
@@ -0,0 +1,64 @@
+/*
+ * 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.itest.bindingsca;
+
+/**
+ *
+ */
+public class CustomerNotFoundException extends Exception {
+ private String customerId;
+
+ /**
+ *
+ */
+ public CustomerNotFoundException() {
+ }
+
+ /**
+ * @param message
+ */
+ public CustomerNotFoundException(String message) {
+ super(message);
+ }
+
+ /**
+ * @param cause
+ */
+ public CustomerNotFoundException(Throwable cause) {
+ super(cause);
+ }
+
+ /**
+ * @param message
+ * @param cause
+ */
+ public CustomerNotFoundException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public String getCustomerId() {
+ return customerId;
+ }
+
+ public void setCustomerId(String customerId) {
+ this.customerId = customerId;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Local.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Local.java
new file mode 100644
index 0000000000..0fe30c9d53
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Local.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.bindingsca;
+
+/**
+ *
+ */
+public interface Local {
+ String getName(Customer customer);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/LocalServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/LocalServiceImpl.java
new file mode 100644
index 0000000000..8783808334
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/LocalServiceImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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.itest.bindingsca;
+
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ *
+ */
+@Service(Local.class)
+public class LocalServiceImpl implements Local {
+
+ public String getName(Customer customer) {
+ if (customer == null) {
+ return null;
+ }
+ customer.dump("Local.getName()");
+ return customer.getName();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Remote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Remote.java
new file mode 100644
index 0000000000..050d35007b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/Remote.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.bindingsca;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ *
+ */
+@Remotable
+public interface Remote {
+ String generateId();
+
+ String getId(Customer customer);
+
+ Customer getCustomer(String id) throws CustomerNotFoundException;
+
+ Customer createCustomer(String id, String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/RemoteServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/RemoteServiceImpl.java
new file mode 100644
index 0000000000..6c432a500a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/RemoteServiceImpl.java
@@ -0,0 +1,66 @@
+/*
+ * 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.itest.bindingsca;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.oasisopen.sca.annotation.AllowsPassByReference;
+import org.oasisopen.sca.annotation.Scope;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ *
+ */
+@Service(Remote.class)
+@Scope("COMPOSITE")
+public class RemoteServiceImpl implements Remote {
+ private Map<String, Customer> customers = new HashMap<String, Customer>();
+
+ public String generateId() {
+ return UUID.randomUUID().toString();
+ }
+
+ @AllowsPassByReference
+ public String getId(Customer customer) {
+ customer.dump("Remote.getId()");
+ return customer.getId();
+ }
+
+ public Customer getCustomer(String id) throws CustomerNotFoundException {
+ Customer customer = customers.get(id);
+ if (customer == null) {
+ CustomerNotFoundException ex = new CustomerNotFoundException("Customer not found");
+ ex.setCustomerId(id);
+ throw ex;
+ }
+ customer.dump("Remote.getCustomer()");
+ return customer;
+ }
+
+ public Customer createCustomer(String id, String name) {
+ Customer customer = new Customer(id, name);
+ customer.dump("Remote.createCustomer()");
+ customers.put(id, customer);
+ return customer;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/SCAClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/SCAClientImpl.java
new file mode 100644
index 0000000000..3573eea978
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/java/org/apache/tuscany/sca/itest/bindingsca/SCAClientImpl.java
@@ -0,0 +1,57 @@
+/*
+ * 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.itest.bindingsca;
+
+import java.net.URI;
+
+import org.oasisopen.sca.client.SCAClientFactory;
+
+/**
+ *
+ */
+public class SCAClientImpl implements Client {
+ private Local local;
+ private Remote remote;
+
+ public SCAClientImpl(String domainURI) throws Exception {
+ SCAClientFactory factory = SCAClientFactory.newInstance(URI.create(domainURI));
+ local = factory.getService(Local.class, "LocalComponent/Local");
+ remote = factory.getService(Remote.class, "RemoteComponent/Remote");
+ }
+
+ public String getName(String id) {
+ Customer customer = null;
+ try {
+ customer = remote.getCustomer(id);
+ } catch (CustomerNotFoundException e) {
+ return null;
+ }
+ customer.dump("Client.getName()");
+ return local.getName(customer);
+ }
+
+ public String create(String name) {
+ String id = remote.generateId();
+ Customer customer = remote.createCustomer(id, name);
+ customer.dump("Client.create()");
+ return remote.getId(customer);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Client.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Client.composite
new file mode 100644
index 0000000000..b04cc33023
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Client.composite
@@ -0,0 +1,30 @@
+<?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
+ * 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"
+ targetNamespace="http://client"
+ name="Client">
+
+ <component name="ClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.bindingsca.ClientImpl" />
+ <reference name="local" target="LocalComponent" />
+ <reference name="remote" target="RemoteComponent" />
+ </component>
+
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Service.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Service.composite
new file mode 100644
index 0000000000..fe282d291c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/main/resources/org/apache/tuscany/sca/itest/bindingsca/Service.composite
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * 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"
+ targetNamespace="http://service"
+ name="Service">
+
+ <component name="LocalComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.bindingsca.LocalServiceImpl" />
+ </component>
+
+ <component name="RemoteComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.bindingsca.RemoteServiceImpl" />
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/AsynchTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/AsynchTestCase.java
new file mode 100644
index 0000000000..9efa1a99ec
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/AsynchTestCase.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.sca.axis2;
+
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientCallbackOnewayRemoteImpl;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+// @Ignore("TUSCANY-3138")
+public class AsynchTestCase {
+
+ public static Node nodeA;
+ public static Node nodeB;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ System.out.println("Setting up nodes");
+
+ try {
+ // create and start nodes
+ Contribution contrib = new Contribution("asynch", "./target/test-classes/ws/asynchReference");
+ nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("asynch", "./target/test-classes/ws/asynchService");
+ nodeB = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeB.start();
+
+ } catch (Exception ex) {
+ System.err.println("Exception when creating domain " + ex.getMessage());
+ ex.printStackTrace(System.err);
+ throw ex;
+ }
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ nodeA.stop();
+ nodeB.stop();
+ }
+
+ @Test
+ public void testHelloWorldAsynch() throws Exception {
+ HelloWorldClient helloWorldClientB;
+ helloWorldClientB = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientCallbackRemote");
+ helloWorldClientB.getGreetings("fred");
+ System.out.println("Sleeping ...");
+ Thread.sleep(2000);
+ System.out.println("... Done");
+ Assert.assertEquals("callback fred", HelloWorldClientCallbackOnewayRemoteImpl.result );
+
+ }
+
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/CallbackTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/CallbackTestCase.java
new file mode 100644
index 0000000000..efa84e92a5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/CallbackTestCase.java
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.sca.axis2;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+// @Ignore("TUSCANY-3138")
+public class CallbackTestCase {
+
+ public static Node nodeA;
+ public static Node nodeB;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ System.out.println("Setting up nodes");
+
+ try {
+ // create and start nodes
+ Contribution contrib = new Contribution("reference", "./target/test-classes/ws/callbackReference");
+ nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("service", "./target/test-classes/ws/callbackService");
+ nodeB = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeB.start();
+
+ } catch (Exception ex) {
+ System.err.println("Exception when creating domain " + ex.getMessage());
+ ex.printStackTrace(System.err);
+ throw ex;
+ }
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ nodeA.stop();
+ nodeB.stop();
+ }
+
+ //@Test
+ public void testKeepServerRunning() throws Exception {
+ System.out.println("press enter to continue");
+ System.in.read();
+ }
+
+ @Test
+ public void testHelloWorldCallbackLocal() throws Exception {
+ HelloWorldClient helloWorldClientB;
+ helloWorldClientB = nodeB.getService(HelloWorldClient.class, "BHelloWorldClientCallbackLocal");
+ Assert.assertEquals("Hello callback fred", helloWorldClientB.getGreetings("fred"));
+ }
+
+ @Test
+ public void testHelloWorldCallbackRemote() throws Exception {
+ HelloWorldClient helloWorldClientA;
+ helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientCallbackRemote");
+ Assert.assertEquals("Hello callback fred", helloWorldClientA.getGreetings("fred"));
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/PromotionTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/PromotionTestCase.java
new file mode 100644
index 0000000000..45d28140b4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/PromotionTestCase.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.sca.axis2;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+
+public class PromotionTestCase {
+
+
+ public static Node nodeA;
+ public static Node nodeB;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ System.out.println("Setting up nodes");
+
+ try {
+ // create and start nodes
+ Contribution contrib = new Contribution("reference", "./target/test-classes/ws/promotionReference");
+ nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("service", "./target/test-classes/ws/promotionService");
+ nodeB = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeB.start();
+
+ } catch (Exception ex) {
+ System.err.println("Exception when creating domain " + ex.getMessage());
+ ex.printStackTrace(System.err);
+ throw ex;
+ }
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ nodeA.stop();
+ nodeB.stop();
+ }
+
+ @Test
+ @Ignore
+ public void testHelloWorldPromotion() throws Exception {
+ HelloWorldClient helloWorldClientA;
+ helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientRemotePromotion");
+ Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred");
+
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/SimpleTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/SimpleTestCase.java
new file mode 100644
index 0000000000..a5d6529895
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/SimpleTestCase.java
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.sca.axis2;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.oasisopen.sca.ServiceUnavailableException;
+
+public class SimpleTestCase {
+
+ public static Node nodeA;
+ public static Node nodeB;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ System.out.println("Setting up nodes");
+
+ try {
+ // create and start nodes
+ Contribution contrib = new Contribution("reference", "./target/test-classes/ws/simpleReference");
+ nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("service", "./target/test-classes/ws/simpleService");
+ nodeB = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeB.start();
+
+ } catch (Exception ex) {
+ System.err.println("Exception when creating domain " + ex.getMessage());
+ ex.printStackTrace(System.err);
+ throw ex;
+ }
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ nodeA.stop();
+ nodeB.stop();
+ }
+
+ @Test
+ public void testHelloWorldLocal() throws Exception {
+ HelloWorldClient helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientLocal");
+ Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred");
+
+ }
+
+ @Test
+ public void testHelloWorldRemote() throws Exception {
+
+ HelloWorldClient helloWorldClientA;
+ helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientRemote");
+
+ try {
+ helloWorldClientA.getGreetings("fred");
+ } catch (ServiceUnavailableException ex){
+ Assert.fail();
+ }
+ }
+
+ @Test
+ public void testHelloWorldLocalAndRemote() throws Exception {
+ HelloWorldClient helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientLocalAndRemote");
+ HelloWorldClient helloWorldClientB = nodeB.getService(HelloWorldClient.class, "BHelloWorldClientLocalAndRemote");
+ Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred");
+ Assert.assertEquals(helloWorldClientB.getGreetings("fred"), "Hello fred");
+ }
+
+ @Test
+ public void testHelloWorldMultipleServices() throws Exception {
+ HelloWorldClient helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientMultipleServices");
+ HelloWorldClient helloWorldClientA2 = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientMultipleServices2");
+ HelloWorldClient helloWorldClientB = nodeB.getService(HelloWorldClient.class, "BHelloWorldClientMultipleServices");
+ Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred");
+ Assert.assertEquals(helloWorldClientA2.getGreetings("fred"), "Hello fred");
+ Assert.assertEquals(helloWorldClientB.getGreetings("fred"), "Hello fred");
+ }
+
+ @Test
+ public void testHelloWorldMultipleBindings() throws Exception {
+ HelloWorldClient helloWorldClientA;
+ helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientMultipleBindings");
+ Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred");
+
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldCallbackRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldCallbackRemote.java
new file mode 100644
index 0000000000..f7ab3dfe98
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldCallbackRemote.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+
+@Remotable
+public interface HelloWorldCallbackRemote {
+
+ String getGreetingsCallbackRemote(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldClient.java
new file mode 100644
index 0000000000..3d25d37708
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldClient.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld;
+
+
+public interface HelloWorldClient {
+
+ String getGreetings(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackOnewayRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackOnewayRemote.java
new file mode 100644
index 0000000000..a469d197d6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackOnewayRemote.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.OneWay;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+@Callback(HelloWorldCallbackRemote.class)
+public interface HelloWorldServiceCallbackOnewayRemote {
+
+ @OneWay
+ void getGreetingsRemote(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackRemote.java
new file mode 100644
index 0000000000..3f5a21fddd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceCallbackRemote.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+@Callback(HelloWorldCallbackRemote.class)
+public interface HelloWorldServiceCallbackRemote {
+
+ String getGreetingsRemote(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceLocal.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceLocal.java
new file mode 100644
index 0000000000..49e5232b31
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceLocal.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld;
+
+
+public interface HelloWorldServiceLocal {
+
+ String getGreetingsLocal(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote.java
new file mode 100644
index 0000000000..ccc77c142b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorldServiceRemote {
+
+ String getGreetingsRemote(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote2.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote2.java
new file mode 100644
index 0000000000..c2be798d1a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/HelloWorldServiceRemote2.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorldServiceRemote2 {
+
+ String getGreetingsRemote2(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java
new file mode 100644
index 0000000000..9355aece1f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java
@@ -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.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceCallbackOnewayRemote;
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClientCallbackOnewayRemoteImpl implements HelloWorldClient {
+
+ public static String result;
+
+ @Reference
+ public HelloWorldServiceCallbackOnewayRemote helloWorldService;
+
+ public String getGreetings(String s) {
+ helloWorldService.getGreetingsRemote(s);
+ return null;
+ }
+
+ public String getGreetingsCallbackRemote(String s) {
+ result = "callback " + s;
+ return result;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java
new file mode 100644
index 0000000000..efc47aa94d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceCallbackRemote;
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClientCallbackRemoteImpl implements HelloWorldClient {
+
+ public static String result;
+
+ @Reference
+ public HelloWorldServiceCallbackRemote helloWorldService;
+
+ public String getGreetings(String s) {
+ return helloWorldService.getGreetingsRemote(s);
+ }
+
+ public String getGreetingsCallbackRemote(String s) {
+ result = "callback " + s;
+ return result;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientLocalImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientLocalImpl.java
new file mode 100644
index 0000000000..6ed813ff0a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientLocalImpl.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceLocal;
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClientLocalImpl implements HelloWorldClient {
+
+ @Reference
+ public HelloWorldServiceLocal helloWorldService;
+
+ public String getGreetings(String s) {
+ return helloWorldService.getGreetingsLocal(s);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemote2Impl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemote2Impl.java
new file mode 100644
index 0000000000..ba70573efb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemote2Impl.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote2;
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClientRemote2Impl implements HelloWorldClient {
+
+ @Reference
+ public HelloWorldServiceRemote2 helloWorldService;
+
+ public String getGreetings(String s) {
+ return helloWorldService.getGreetingsRemote2(s);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemoteImpl.java
new file mode 100644
index 0000000000..a87d6eb49a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldClientRemoteImpl.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote;
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClientRemoteImpl implements HelloWorldClient {
+
+ @Reference
+ public HelloWorldServiceRemote helloWorldService;
+
+ public String getGreetings(String s) {
+ return helloWorldService.getGreetingsRemote(s);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java
new file mode 100644
index 0000000000..3dc0b12b82
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldCallbackRemote;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceCallbackOnewayRemote;
+import org.oasisopen.sca.annotation.Callback;
+
+public class HelloWorldServiceCallbackOnewayRemoteImpl implements HelloWorldServiceCallbackOnewayRemote {
+
+ @Callback
+ protected HelloWorldCallbackRemote theCallback;
+
+ public void getGreetingsRemote(String s) {
+ theCallback.getGreetingsCallbackRemote(s);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java
new file mode 100644
index 0000000000..b15d6dea80
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldCallbackRemote;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceCallbackRemote;
+import org.oasisopen.sca.annotation.Callback;
+
+public class HelloWorldServiceCallbackRemoteImpl implements HelloWorldServiceCallbackRemote {
+
+ @Callback
+ protected HelloWorldCallbackRemote theCallback;
+
+ public HelloWorldServiceCallbackRemoteImpl() {
+ System.out.println("Constructor");
+ }
+
+ public String getGreetingsRemote(String s) {
+ return "Hello " + theCallback.getGreetingsCallbackRemote(s);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceLocalImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceLocalImpl.java
new file mode 100644
index 0000000000..c4347b084a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceLocalImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceLocal;
+
+public class HelloWorldServiceLocalImpl implements HelloWorldServiceLocal {
+
+ public String getGreetingsLocal(String s) {
+ return "Hello " + s;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java
new file mode 100644
index 0000000000..846bff02e1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceLocal;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote;
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote2;
+import org.oasisopen.sca.annotation.Service;
+
+@Service({HelloWorldServiceRemote.class, HelloWorldServiceRemote2.class, HelloWorldServiceLocal.class} )
+public class HelloWorldServiceMultipleServicesImpl implements HelloWorldServiceLocal, HelloWorldServiceRemote, HelloWorldServiceRemote2 {
+
+ public String getGreetingsLocal(String s) {
+ return "Hello " + s;
+ }
+
+ public String getGreetingsRemote(String s) {
+ return "Hello " + s;
+ }
+
+ public String getGreetingsRemote2(String s) {
+ return "Hello " + s;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceRemoteImpl.java
new file mode 100644
index 0000000000..d69f442879
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/helloworld/impl/HelloWorldServiceRemoteImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote;
+
+public class HelloWorldServiceRemoteImpl implements HelloWorldServiceRemote {
+
+ public String getGreetingsRemote(String s) {
+ return "Hello " + s;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/AsynchTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/AsynchTestCase.java
new file mode 100644
index 0000000000..cbcc06056a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/AsynchTestCase.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.sca.rmi;
+
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientCallbackOnewayRemoteImpl;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class AsynchTestCase {
+
+ public static Node nodeA;
+ public static Node nodeB;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ System.out.println("Setting up nodes");
+ // System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding", RMIBinding.TYPE.toString());
+ try {
+ // create and start nodes
+ Contribution contrib = new Contribution("asynch", "./target/test-classes/rmi/asynchReference");
+ nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("asynch", "./target/test-classes/rmi/asynchService");
+ nodeB = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeB.start();
+
+ } catch (Exception ex) {
+ System.err.println("Exception when creating domain " + ex.getMessage());
+ ex.printStackTrace(System.err);
+ throw ex;
+ }
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ nodeA.stop();
+ nodeB.stop();
+ // System.clearProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding");
+ }
+
+ @Test
+ public void testHelloWorldAsynch() throws Exception {
+ HelloWorldClient helloWorldClientB;
+ helloWorldClientB = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientCallbackRemote");
+ helloWorldClientB.getGreetings("fred");
+ System.out.println("Sleeping ...");
+ Thread.sleep(2000);
+ System.out.println("... Done");
+ Assert.assertEquals("callback fred", HelloWorldClientCallbackOnewayRemoteImpl.result );
+
+ }
+
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/CallbackTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/CallbackTestCase.java
new file mode 100644
index 0000000000..dccd2dace8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/CallbackTestCase.java
@@ -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.sca.rmi;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class CallbackTestCase {
+
+ public static Node nodeA;
+ public static Node nodeB;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ System.out.println("Setting up nodes");
+ // System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding", RMIBinding.TYPE.toString());
+
+ try {
+ // create and start nodes
+ Contribution contrib = new Contribution("reference", "./target/test-classes/rmi/callbackReference");
+ nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("service", "./target/test-classes/rmi/callbackService");
+ nodeB = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeB.start();
+
+ } catch (Exception ex) {
+ System.err.println("Exception when creating domain " + ex.getMessage());
+ ex.printStackTrace(System.err);
+ throw ex;
+ }
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ nodeA.stop();
+ nodeB.stop();
+ // System.clearProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding");
+ }
+
+ //@Test
+ public void testKeepServerRunning() throws Exception {
+ System.out.println("press enter to continue");
+ System.in.read();
+ }
+
+ @Test
+ public void testHelloWorldCallbackLocal() throws Exception {
+ HelloWorldClient helloWorldClientB;
+ helloWorldClientB = nodeB.getService(HelloWorldClient.class, "BHelloWorldClientCallbackLocal");
+ Assert.assertEquals("Hello callback fred", helloWorldClientB.getGreetings("fred"));
+ }
+
+ @Test
+ public void testHelloWorldCallbackRemote() throws Exception {
+ HelloWorldClient helloWorldClientA;
+ helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientCallbackRemote");
+ Assert.assertEquals("Hello callback fred", helloWorldClientA.getGreetings("fred"));
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/PromotionTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/PromotionTestCase.java
new file mode 100644
index 0000000000..7aac95a8ff
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/PromotionTestCase.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.sca.rmi;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class PromotionTestCase {
+
+
+ public static Node nodeA;
+ public static Node nodeB;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ System.out.println("Setting up nodes");
+ System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding",
+ "{http://tuscany.apache.org/xmlns/sca/1.1}binding.rmi");
+
+ try {
+ // create and start nodes
+ Contribution contrib = new Contribution("reference", "./target/test-classes/rmi/promotionReference");
+ nodeA = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("service", "./target/test-classes/rmi/promotionService");
+ nodeB = NodeFactory.getInstance().createNode("HelloWorld.composite", contrib);
+ nodeB.start();
+
+ } catch (Exception ex) {
+ System.err.println("Exception when creating domain " + ex.getMessage());
+ ex.printStackTrace(System.err);
+ throw ex;
+ }
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ nodeA.stop();
+ nodeB.stop();
+ System.clearProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding");
+
+ }
+
+ @Test
+ public void testHelloWorldPromotion() throws Exception {
+ HelloWorldClient helloWorldClientA;
+ helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientRemotePromotion");
+ Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred");
+
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/SimpleTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/SimpleTestCase.java
new file mode 100644
index 0000000000..f748beb6cb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/SimpleTestCase.java
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.sca.rmi;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.oasisopen.sca.ServiceUnavailableException;
+
+public class SimpleTestCase {
+
+ private static NodeFactory factory;
+ public static Node nodeA;
+ public static Node nodeB;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ System.out.println("Setting up nodes");
+ System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding",
+ "{http://tuscany.apache.org/xmlns/sca/1.1}binding.rmi");
+
+ try {
+ factory = NodeFactory.getInstance();
+ // create and start nodes
+ Contribution contrib = new Contribution("reference", "./target/test-classes/rmi/simpleReference");
+ nodeA = factory.createNode("HelloWorld.composite", contrib);
+ nodeA.start();
+
+ contrib = new Contribution("service", "./target/test-classes/rmi/simpleService");
+ nodeB = factory.createNode("HelloWorld.composite", contrib);
+ nodeB.start();
+
+ } catch (Exception ex) {
+ System.err.println("Exception when creating domain " + ex.getMessage());
+ ex.printStackTrace(System.err);
+ throw ex;
+ }
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ nodeA.stop();
+ nodeB.stop();
+ factory.destroy();
+ System.clearProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding");
+ }
+
+ @Test
+ public void testHelloWorldLocal() throws Exception {
+ HelloWorldClient helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientLocal");
+ Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred");
+
+ }
+
+ @Test
+ public void testHelloWorldRemote() throws Exception {
+
+ HelloWorldClient helloWorldClientA;
+ helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientRemote");
+
+ try {
+ helloWorldClientA.getGreetings("fred");
+ } catch (ServiceUnavailableException ex){
+ Assert.fail();
+ }
+ }
+
+ @Test
+ public void testHelloWorldLocalAndRemote() throws Exception {
+ HelloWorldClient helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientLocalAndRemote");
+ HelloWorldClient helloWorldClientB = nodeB.getService(HelloWorldClient.class, "BHelloWorldClientLocalAndRemote");
+ Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred");
+ Assert.assertEquals(helloWorldClientB.getGreetings("fred"), "Hello fred");
+ }
+
+ @Test
+ public void testHelloWorldMultipleServices() throws Exception {
+ HelloWorldClient helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientMultipleServices");
+ HelloWorldClient helloWorldClientA2 = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientMultipleServices2");
+ HelloWorldClient helloWorldClientB = nodeB.getService(HelloWorldClient.class, "BHelloWorldClientMultipleServices");
+ Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred");
+ Assert.assertEquals(helloWorldClientA2.getGreetings("fred"), "Hello fred");
+ Assert.assertEquals(helloWorldClientB.getGreetings("fred"), "Hello fred");
+ }
+
+ @Test
+ public void testHelloWorldMultipleBindings() throws Exception {
+ HelloWorldClient helloWorldClientA;
+ helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientMultipleBindings");
+ Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred");
+
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldCallbackRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldCallbackRemote.java
new file mode 100644
index 0000000000..7c4cf4b0b7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldCallbackRemote.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+
+@Remotable
+public interface HelloWorldCallbackRemote {
+
+ String getGreetingsCallbackRemote(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldClient.java
new file mode 100644
index 0000000000..017acee582
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldClient.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld;
+
+
+public interface HelloWorldClient {
+
+ String getGreetings(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackOnewayRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackOnewayRemote.java
new file mode 100644
index 0000000000..86f984e61a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackOnewayRemote.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.OneWay;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+@Callback(HelloWorldCallbackRemote.class)
+public interface HelloWorldServiceCallbackOnewayRemote {
+
+ @OneWay
+ void getGreetingsRemote(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackRemote.java
new file mode 100644
index 0000000000..8e19fd7382
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceCallbackRemote.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+@Callback(HelloWorldCallbackRemote.class)
+public interface HelloWorldServiceCallbackRemote {
+
+ String getGreetingsRemote(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceLocal.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceLocal.java
new file mode 100644
index 0000000000..b0d623e2e4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceLocal.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld;
+
+
+public interface HelloWorldServiceLocal {
+
+ String getGreetingsLocal(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote.java
new file mode 100644
index 0000000000..ccb44694d9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorldServiceRemote {
+
+ String getGreetingsRemote(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote2.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote2.java
new file mode 100644
index 0000000000..5c8bb13f43
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/HelloWorldServiceRemote2.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorldServiceRemote2 {
+
+ String getGreetingsRemote2(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java
new file mode 100644
index 0000000000..1ff1792bb7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackOnewayRemoteImpl.java
@@ -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.binding.sca.rmi.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceCallbackOnewayRemote;
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClientCallbackOnewayRemoteImpl implements HelloWorldClient {
+
+ public static String result;
+
+ @Reference
+ public HelloWorldServiceCallbackOnewayRemote helloWorldService;
+
+ public String getGreetings(String s) {
+ helloWorldService.getGreetingsRemote(s);
+ return null;
+ }
+
+ public String getGreetingsCallbackRemote(String s) {
+ result = "callback " + s;
+ return result;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java
new file mode 100644
index 0000000000..b17d8e2016
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientCallbackRemoteImpl.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceCallbackRemote;
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClientCallbackRemoteImpl implements HelloWorldClient {
+
+ public static String result;
+
+ @Reference
+ public HelloWorldServiceCallbackRemote helloWorldService;
+
+ public String getGreetings(String s) {
+ return helloWorldService.getGreetingsRemote(s);
+ }
+
+ public String getGreetingsCallbackRemote(String s) {
+ result = "callback " + s;
+ return result;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientLocalImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientLocalImpl.java
new file mode 100644
index 0000000000..e230326f5f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientLocalImpl.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceLocal;
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClientLocalImpl implements HelloWorldClient {
+
+ @Reference
+ public HelloWorldServiceLocal helloWorldService;
+
+ public String getGreetings(String s) {
+ return helloWorldService.getGreetingsLocal(s);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemote2Impl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemote2Impl.java
new file mode 100644
index 0000000000..77df8c2c39
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemote2Impl.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceRemote2;
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClientRemote2Impl implements HelloWorldClient {
+
+ @Reference
+ public HelloWorldServiceRemote2 helloWorldService;
+
+ public String getGreetings(String s) {
+ return helloWorldService.getGreetingsRemote2(s);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemoteImpl.java
new file mode 100644
index 0000000000..8effa3ac36
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldClientRemoteImpl.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceRemote;
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClientRemoteImpl implements HelloWorldClient {
+
+ @Reference
+ public HelloWorldServiceRemote helloWorldService;
+
+ public String getGreetings(String s) {
+ return helloWorldService.getGreetingsRemote(s);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java
new file mode 100644
index 0000000000..2467ddab88
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackOnewayRemoteImpl.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldCallbackRemote;
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceCallbackOnewayRemote;
+import org.oasisopen.sca.annotation.Callback;
+
+public class HelloWorldServiceCallbackOnewayRemoteImpl implements HelloWorldServiceCallbackOnewayRemote {
+
+ @Callback
+ protected HelloWorldCallbackRemote theCallback;
+
+ public void getGreetingsRemote(String s) {
+ theCallback.getGreetingsCallbackRemote(s);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java
new file mode 100644
index 0000000000..d1b75d0a2c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceCallbackRemoteImpl.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldCallbackRemote;
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceCallbackRemote;
+import org.oasisopen.sca.annotation.Callback;
+
+public class HelloWorldServiceCallbackRemoteImpl implements HelloWorldServiceCallbackRemote {
+
+ @Callback
+ protected HelloWorldCallbackRemote theCallback;
+
+ public HelloWorldServiceCallbackRemoteImpl() {
+ System.out.println("Constructor");
+ }
+
+ public String getGreetingsRemote(String s) {
+ return "Hello " + theCallback.getGreetingsCallbackRemote(s);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceLocalImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceLocalImpl.java
new file mode 100644
index 0000000000..44e7efc668
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceLocalImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceLocal;
+
+public class HelloWorldServiceLocalImpl implements HelloWorldServiceLocal {
+
+ public String getGreetingsLocal(String s) {
+ return "Hello " + s;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java
new file mode 100644
index 0000000000..88440de023
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceMultipleServicesImpl.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceLocal;
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceRemote;
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceRemote2;
+import org.oasisopen.sca.annotation.Service;
+
+@Service({HelloWorldServiceRemote.class, HelloWorldServiceRemote2.class, HelloWorldServiceLocal.class} )
+public class HelloWorldServiceMultipleServicesImpl implements HelloWorldServiceLocal, HelloWorldServiceRemote, HelloWorldServiceRemote2 {
+
+ public String getGreetingsLocal(String s) {
+ return "Hello " + s;
+ }
+
+ public String getGreetingsRemote(String s) {
+ return "Hello " + s;
+ }
+
+ public String getGreetingsRemote2(String s) {
+ return "Hello " + s;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceRemoteImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceRemoteImpl.java
new file mode 100644
index 0000000000..06dc2c3f79
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/binding/sca/rmi/helloworld/impl/HelloWorldServiceRemoteImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl;
+
+import org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceRemote;
+
+public class HelloWorldServiceRemoteImpl implements HelloWorldServiceRemote {
+
+ public String getGreetingsRemote(String s) {
+ return "Hello " + s;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/BindingSCATestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/BindingSCATestCase.java
new file mode 100644
index 0000000000..05a8c3455c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/BindingSCATestCase.java
@@ -0,0 +1,170 @@
+/*
+ * 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.itest.bindingsca;
+
+import java.io.File;
+
+import org.apache.tuscany.sca.assembly.SCABinding;
+import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.configuration.NodeConfiguration;
+import org.junit.Assert;
+import org.junit.Test;
+import org.oasisopen.sca.ServiceRuntimeException;
+
+/**
+ * Test binding.sca in the same classloader
+ */
+public class BindingSCATestCase {
+ static final String DOMAIN_URI = "my-domain";
+ private static final String REGISTRY_URI = "tribes://228.0.0.100:50000";
+ private static final String PKG = "org/apache/tuscany/sca/itest/bindingsca/";
+ private static final String CLIENT = "Client.composite";
+ private static final String SERVICE = "Service.composite";
+ private static final String ROOT = new File("target/classes/" + PKG).toURI().toString();
+
+ /**
+ * One NodeFactory and two nodes
+ */
+ @Test
+ public void testOneFactoryTwoNodes() {
+ NodeFactory factory1 = NodeFactory.getInstance();
+ Node node1 = createClientNode(factory1);
+ Node node2 = createServiceNode(factory1);
+ node1.start();
+ node2.start();
+ try {
+ runClient(node1);
+ } finally {
+ node2.stop();
+ node1.stop();
+ factory1.destroy();
+ }
+ }
+
+ /**
+ * Create the service node
+ * @param factory
+ * @return
+ */
+ static Node createServiceNode(NodeFactory factory) {
+ NodeConfiguration config2 =
+ factory.createNodeConfiguration().setDomainURI(DOMAIN_URI).setURI("node2").addContribution("c2", ROOT)
+ .addDeploymentComposite("c2", SERVICE).setDomainRegistryURI(REGISTRY_URI)
+ .addBinding(WebServiceBinding.TYPE, "http://localhost:8085/").addBinding(SCABinding.TYPE,
+ "http://localhost:8085/");
+
+ Node node2 = factory.createNode(config2);
+ return node2;
+ }
+
+ /**
+ * Create the client node
+ * @param factory
+ * @return
+ */
+ static Node createClientNode(NodeFactory factory) {
+ NodeConfiguration config1 =
+ factory.createNodeConfiguration().setDomainURI(DOMAIN_URI).setURI("node1").addContribution("c1", ROOT)
+ .addDeploymentComposite("c1", CLIENT).setDomainRegistryURI(REGISTRY_URI)
+ .addBinding(WebServiceBinding.TYPE, "http://localhost:8085/").addBinding(SCABinding.TYPE,
+ "http://localhost:8085/");
+ Node node1 = factory.createNode(config1);
+ return node1;
+ }
+
+ /**
+ * Two node factories and two nodes
+ */
+ @Test
+ public void testTwoFactoriesTwoNodes() throws Exception {
+ NodeFactory factory1 = NodeFactory.newInstance();
+ Node node1 = createClientNode(factory1);
+ NodeFactory factory2 = NodeFactory.newInstance();
+ Node node2 = createServiceNode(factory2);
+ node1.start();
+ node2.start();
+ Thread.sleep(1000);
+ try {
+ // This call doesn't require the Local service, it should be successful
+ createCustomer(node1);
+ try {
+ runClient(node1);
+ // We cannot make local call to remote endpoints
+ Assert.fail("ServiceRuntimeException should have been thrown.");
+ } catch (ServiceRuntimeException e) {
+ // ignore
+ }
+ } finally {
+ node2.stop();
+ node1.stop();
+ factory2.destroy();
+ factory1.destroy();
+ }
+ }
+
+ /**
+ * Run the client
+ * @param node
+ */
+ static void runClient(Node node) {
+ Client client = node.getService(Client.class, "ClientComponent/Client");
+ runClient(client);
+ }
+
+ static void runClient(Client client) {
+ String id = client.create("Ray");
+ Assert.assertEquals("Ray", client.getName(id));
+ }
+
+ static void runClientNotFound(Client client) {
+ String id = "not-there";
+ Assert.assertNull(client.getName(id));
+ }
+
+ static String createCustomer(Node node) {
+ Client client = node.getService(Client.class, "ClientComponent/Client");
+ String id = client.create("John");
+ Assert.assertNotNull(id);
+ return id;
+ }
+
+ /**
+ * One node factory and one node for both composites
+ */
+ @Test
+ public void testOneFactoryOneNode() {
+ NodeFactory factory = NodeFactory.getInstance();
+ NodeConfiguration config1 =
+ factory.createNodeConfiguration().setDomainURI(DOMAIN_URI).setURI("node1").addContribution("c1", ROOT)
+ .addDeploymentComposite("c1", CLIENT).addDeploymentComposite("c1", SERVICE);
+
+ Node node1 = factory.createNode(config1);
+ node1.start();
+ try {
+ runClient(node1);
+ } finally {
+ node1.stop();
+ factory.destroy();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedCustomerTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedCustomerTestCase.java
new file mode 100644
index 0000000000..7255697d4b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedCustomerTestCase.java
@@ -0,0 +1,62 @@
+/*
+ * 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.itest.bindingsca;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Running the client node and service node with two different classloaders that share the Customer class
+ */
+public class ClientNodeSharedCustomerTestCase {
+ private static Node clientNode;
+ private static TestCaseRunner runner;
+ private static NodeFactory factory;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ runner = new TestCaseRunner(ServiceNode.class, Remote.class.getName(), RemoteServiceImpl.class.getName());
+ runner.beforeClass();
+ factory = NodeFactory.getInstance();
+ clientNode = BindingSCATestCase.createClientNode(factory).start();
+ Thread.sleep(1000);
+ }
+
+ @Test
+ public void testClient() throws Exception {
+ BindingSCATestCase.runClient(clientNode);
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (clientNode != null) {
+ clientNode.stop();
+ }
+ if (runner != null) {
+ runner.afterClass();
+ }
+ if (factory != null) {
+ factory.destroy();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedLocalTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedLocalTestCase.java
new file mode 100644
index 0000000000..51fafae32c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientNodeSharedLocalTestCase.java
@@ -0,0 +1,62 @@
+/*
+ * 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.itest.bindingsca;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Running the client node and service node with two different classloaders that share the Local class
+ * (but not Customer)
+ */
+public class ClientNodeSharedLocalTestCase {
+ private static Node clientNode;
+ private static TestCaseRunner runner;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ runner =
+ new TestCaseRunner(ServiceNode.class, Remote.class.getName(), RemoteServiceImpl.class.getName(),
+ Customer.class.getName());
+ runner.beforeClass();
+ NodeFactory factory = NodeFactory.getInstance();
+ clientNode = BindingSCATestCase.createClientNode(factory).start();
+ Thread.sleep(1000);
+ }
+
+ @Test
+ public void testClient() throws Exception {
+ BindingSCATestCase.runClient(clientNode);
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (clientNode != null) {
+ clientNode.stop();
+ }
+ if (runner != null) {
+ runner.afterClass();
+ }
+ NodeFactory.getInstance().destroy();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedCustomerTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedCustomerTestCase.java
new file mode 100644
index 0000000000..b8ff0c58ba
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedCustomerTestCase.java
@@ -0,0 +1,54 @@
+/*
+ * 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.itest.bindingsca;
+
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Running the client api and service node with two different classloaders that share the Customer class
+ */
+public class ClientSharedCustomerTestCase {
+ private static Client client;
+ private static TestCaseRunner runner;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ runner = new TestCaseRunner(ServiceNode.class, Remote.class.getName(), RemoteServiceImpl.class.getName());
+ runner.beforeClass();
+ client = new SCAClientImpl(BindingSCATestCase.DOMAIN_URI);
+ Thread.sleep(1000);
+ }
+
+ @Test
+ public void testClient() throws Exception {
+ BindingSCATestCase.runClient(client);
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (runner != null) {
+ runner.afterClass();
+ }
+ NodeFactory.getInstance().destroy();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedLocalTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedLocalTestCase.java
new file mode 100644
index 0000000000..633e1a767c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ClientSharedLocalTestCase.java
@@ -0,0 +1,63 @@
+/*
+ * 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.itest.bindingsca;
+
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Running the client api and service node with two different classloaders that share the Local class
+ * (but not Customer)
+ */
+public class ClientSharedLocalTestCase {
+ private static Client client;
+ private static TestCaseRunner runner;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ runner =
+ new TestCaseRunner(ServiceNode.class, Remote.class.getName(), RemoteServiceImpl.class.getName(),
+ Customer.class.getName(), CustomerNotFoundException.class.getName());
+ runner.beforeClass();
+ client = new SCAClientImpl(BindingSCATestCase.DOMAIN_URI);
+ Thread.sleep(1000);
+ }
+
+ @Test
+ public void testClient() throws Exception {
+ BindingSCATestCase.runClient(client);
+ }
+
+ @Test
+ public void testClientNotFound() throws Exception {
+ BindingSCATestCase.runClientNotFound(client);
+ }
+
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (runner != null) {
+ runner.afterClass();
+ }
+ NodeFactory.getInstance().destroy();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ServiceNode.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ServiceNode.java
new file mode 100644
index 0000000000..1cba2b57c2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/ServiceNode.java
@@ -0,0 +1,48 @@
+/*
+ * 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.itest.bindingsca;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class ServiceNode {
+ private static Node serviceNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ /* System.setProperty("org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint.enabled",
+ "false");
+ */
+ NodeFactory factory = NodeFactory.getInstance();
+ serviceNode = BindingSCATestCase.createServiceNode(factory).start();
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (serviceNode != null) {
+ serviceNode.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/TestCaseRunner.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/TestCaseRunner.java
new file mode 100644
index 0000000000..c0960ffe95
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/java/org/apache/tuscany/sca/itest/bindingsca/TestCaseRunner.java
@@ -0,0 +1,329 @@
+/*
+ * 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.itest.bindingsca;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * A helper class that can be used to run an SCA JUnit test case. The test case will run in an isolated class loader.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TestCaseRunner {
+
+ private ClassLoader classLoader;
+ private Class<?> testSuiteClass;
+ private Object testSuite;
+ private Class<?> testResultClass;
+ private Class<?> testCaseClass;
+ private Object testCase;
+
+ private Class<?> beforeAnnotation;
+ private Class<?> beforeClassAnnotation;
+ private Class<?> afterAnnotation;
+ private Class<?> afterClassAnnotation;
+ private Class<?> junit4AdapterClass;
+ private Class<?> junit3TestCaseClass;
+
+ /**
+ * Constructs a new TestCase runner.
+ *
+ * @param testClass
+ */
+ public TestCaseRunner(Class<?> testClass, String... isolatedClasses) {
+ try {
+ ClassLoader tccl = setupClassLoader(testClass, isolatedClasses);
+
+ try {
+ // Thread.currentThread().setContextClassLoader(classLoader);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finalClassLoader = classLoader;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finalClassLoader);
+ return null;
+ }
+ });
+
+ testCaseClass = Class.forName(testClass.getName(), true, classLoader);
+ testCase = testCaseClass.newInstance();
+ ClassLoader testClassLoader = testCaseClass.getClassLoader();
+
+ junit3TestCaseClass = Class.forName("junit.framework.TestCase", true, testClassLoader);
+
+ testSuiteClass = Class.forName("junit.framework.TestSuite", true, testClassLoader);
+ Constructor<?> testSuiteConstructor = testSuiteClass.getConstructor(Class.class);
+ testSuite = testSuiteConstructor.newInstance(testCaseClass);
+
+ testResultClass = Class.forName("junit.framework.TestResult", true, testClassLoader);
+
+ try {
+ beforeAnnotation = Class.forName("org.junit.Before", true, testClassLoader);
+ afterAnnotation = Class.forName("org.junit.After", true, testClassLoader);
+ beforeClassAnnotation = Class.forName("org.junit.BeforeClass", true, testClassLoader);
+ afterClassAnnotation = Class.forName("org.junit.AfterClass", true, testClassLoader);
+ junit4AdapterClass = Class.forName("junit.framework.JUnit4TestAdapter", true, testClassLoader);
+ } catch (Exception e) {
+ // Unexpected
+ throw new AssertionError(e);
+ }
+ } catch (Throwable e) {
+ e.printStackTrace();
+ } finally {
+ // Thread.currentThread().setContextClassLoader(tccl);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finaltccl = tccl;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finaltccl);
+ return null;
+ }
+ });
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ private ClassLoader setupClassLoader(Class<?> testClass, String... isolatedClasses) {
+ ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+ classLoader = testClass.getClassLoader();
+ if (classLoader instanceof URLClassLoader) {
+ URL[] urls = ((URLClassLoader)classLoader).getURLs();
+ classLoader = new ClassLoaderImpl(urls, classLoader, isolatedClasses);
+ } else if (classLoader == tccl || classLoader.getParent() == tccl) {
+ classLoader = new URLClassLoader(new URL[0], classLoader);
+ } else {
+ classLoader = tccl;
+ }
+ return tccl;
+ }
+
+ /**
+ * Run the test case
+ */
+ public void run() {
+ ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+ try {
+ // Thread.currentThread().setContextClassLoader(classLoader);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finalClassLoader = classLoader;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finalClassLoader);
+ return null;
+ }
+ });
+
+ if (junit3TestCaseClass.isAssignableFrom(testCaseClass)) {
+ Object testResult = testResultClass.newInstance();
+ Method runMethod = testSuiteClass.getMethod("run", testResultClass);
+ runMethod.invoke(testSuite, testResult);
+ } else {
+ Object junit4Adapter = junit4AdapterClass.getConstructor(Class.class).newInstance(testCaseClass);
+ Object testResult = testResultClass.newInstance();
+ Method runMethod = junit4AdapterClass.getMethod("run", testResultClass);
+ runMethod.invoke(junit4Adapter, testResult);
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ } finally {
+ // Thread.currentThread().setContextClassLoader(tccl);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finaltccl = tccl;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finaltccl);
+ return null;
+ }
+ });
+ }
+ }
+
+ /**
+ * Invoke the setUp method
+ */
+ public void setUp() {
+ execute("setUp");
+ }
+
+ /**
+ * Invoke the before methods
+ */
+ public void before() {
+ execute(beforeAnnotation);
+ }
+
+ /**
+ * Invoke the beforeClass methods
+ */
+ public void beforeClass() {
+ execute(beforeClassAnnotation);
+ }
+
+ /**
+ * Invoke the tearDown method
+ */
+ public void tearDown() {
+ execute("tearDown");
+ }
+
+ /**
+ * Invoke the after methods
+ */
+ public void after() {
+ execute(afterAnnotation);
+ }
+
+ /**
+ * Invoke the afterClass methods
+ */
+ public void afterClass() {
+ execute(afterClassAnnotation);
+ }
+
+ /**
+ * Invoke the specified test method.
+ */
+ public void run(String methodName) {
+ execute(methodName);
+ }
+
+ /**
+ * Invoke the methods annotated with the specified annotation.
+ */
+ private void execute(Class<?> annotationClass) {
+ if (annotationClass == null) {
+ throw new RuntimeException(new NoSuchMethodException());
+ }
+ ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+ try {
+ // Thread.currentThread().setContextClassLoader(classLoader);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finalClassLoader = classLoader;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finalClassLoader);
+ return null;
+ }
+ });
+
+ for (Method method : testCaseClass.getDeclaredMethods()) {
+ for (Annotation annotation : method.getAnnotations()) {
+ if (annotation.annotationType() == annotationClass) {
+ method.invoke(testCase);
+ }
+ }
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ } finally {
+ // Thread.currentThread().setContextClassLoader(tccl);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finaltccl = tccl;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finaltccl);
+ return null;
+ }
+ });
+ }
+ }
+
+ /**
+ * Invoke the specified method
+ */
+ private void execute(String methodName) {
+ ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+ try {
+ // Thread.currentThread().setContextClassLoader(classLoader);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finalClassLoader = classLoader;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finalClassLoader);
+ return null;
+ }
+ });
+ Method setUpMethod = testCaseClass.getDeclaredMethod(methodName);
+ setUpMethod.setAccessible(true);
+ setUpMethod.invoke(testCase);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ } finally {
+ // Thread.currentThread().setContextClassLoader(tccl);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finaltccl = tccl;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finaltccl);
+ return null;
+ }
+ });
+ }
+ }
+
+ public static class ClassLoaderImpl extends URLClassLoader {
+ private Set<String> isolatedClasses = new HashSet<String>();
+
+ /**
+ * @param urls
+ * @param parent
+ */
+ public ClassLoaderImpl(URL[] urls, ClassLoader parent, String... sharedClasses) {
+ super(urls, parent);
+ this.isolatedClasses.addAll(Arrays.asList(sharedClasses));
+ }
+
+ @Override
+ protected synchronized Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
+ if (!isolatedClasses.contains(name)) {
+ return super.loadClass(name, resolve);
+ } else {
+ Class<?> cls = findLoadedClass(name);
+ if (cls == null) {
+ cls = findClass(name);
+ }
+ if (resolve) {
+ resolveClass(cls);
+ }
+ return cls;
+ }
+ }
+
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchReference/HelloWorld.composite
new file mode 100644
index 0000000000..8c825ca805
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchReference/HelloWorld.composite
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+ <!-- callback remote wire -->
+ <component name="AHelloWorldClientCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientCallbackOnewayRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceCallbackRemote">
+ <binding.sca/>
+ <callback>
+ <binding.sca uri="http://localhost:8084/AHelloWorldClientCallbackRemote"/>
+ </callback>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchReference/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchService/HelloWorld.composite
new file mode 100644
index 0000000000..79b1a5d794
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchService/HelloWorld.composite
@@ -0,0 +1,38 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- callback remote wire -->
+ <component name="BHelloWorldServiceCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceCallbackOnewayRemoteImpl" />
+ <service name="HelloWorldServiceCallbackOnewayRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceCallbackRemote"/>
+ <callback>
+ <binding.sca/>
+ </callback>
+ </service>
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/asynchService/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackReference/HelloWorld.composite
new file mode 100644
index 0000000000..e8924d2728
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackReference/HelloWorld.composite
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+ <!-- callback remote wire -->
+ <component name="AHelloWorldClientCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientCallbackRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceCallbackRemote">
+ <binding.sca/>
+ <callback>
+ <binding.sca uri="http://localhost:8084/AHelloWorldClientCallbackRemote"/>
+ </callback>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackReference/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackService/HelloWorld.composite
new file mode 100644
index 0000000000..4edc8df5cd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackService/HelloWorld.composite
@@ -0,0 +1,43 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- callback remote wire -->
+ <component name="BHelloWorldServiceCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceCallbackRemoteImpl" />
+ <service name="HelloWorldServiceCallbackRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceCallbackRemote"/>
+ <callback>
+ <binding.sca/>
+ </callback>
+ </service>
+ </component>
+
+ <!-- callback local wire -->
+ <component name="BHelloWorldClientCallbackLocal">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientCallbackRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceCallbackRemote" />
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/callbackService/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionReference/HelloWorld.composite
new file mode 100644
index 0000000000..823cab4f56
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionReference/HelloWorld.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- composite hierarchy -->
+ <component name="AHelloWorldClientRemotePromotion">
+ <implementation.composite name="sample:HelloWorldComponent" />
+ <reference name="AHelloWorldClientRemoteReference" target="BHelloWorldServiceRemotePromotion"/>
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionReference/HelloWorldComponent.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionReference/HelloWorldComponent.composite
new file mode 100644
index 0000000000..54fb359ba0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionReference/HelloWorldComponent.composite
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorldComponent">
+
+ <service name="AHelloWorldClientRemoteService" promote="AHelloWorldClientRemoteComponent">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldClient"/>
+ </service>
+
+ <reference name="AHelloWorldClientRemoteReference" promote="AHelloWorldClientRemoteComponent/helloWorldService" multiplicity="1..1">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceRemote"/>
+ </reference>
+
+ <component name="AHelloWorldClientRemoteComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientRemoteImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionReference/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionService/HelloWorld.composite
new file mode 100644
index 0000000000..454e9c55cf
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionService/HelloWorld.composite
@@ -0,0 +1,35 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- composite hierarchy -->
+ <component name="BHelloWorldServiceRemotePromotion">
+ <implementation.composite name="sample:HelloWorldComponent" />
+ <service name="BHelloWorldServiceRemoteService">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceRemotePromotion"/>
+ </service>
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionService/HelloWorldComponent.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionService/HelloWorldComponent.composite
new file mode 100644
index 0000000000..a313fb8f68
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionService/HelloWorldComponent.composite
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorldComponent">
+
+ <service name="BHelloWorldServiceRemoteService"
+ promote="BHelloWorldServiceRemoteComponent/HelloWorldServiceRemote"/>
+
+ <component name="BHelloWorldServiceRemoteComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceRemoteImpl"/>
+ </component>
+
+ <component name="BHelloWorldServiceLocalAndRemoteNested">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/promotionService/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleReference/HelloWorld.composite
new file mode 100644
index 0000000000..4151749523
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleReference/HelloWorld.composite
@@ -0,0 +1,67 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- local only wire -->
+ <component name="AHelloWorldClientLocal">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientLocalImpl"/>
+ <reference name="helloWorldService" target="AHelloWorldServiceLocal" />
+ </component>
+
+ <component name="AHelloWorldServiceLocal">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceLocalImpl" />
+ </component>
+
+ <!-- unresolved remote wire -->
+ <component name="AHelloWorldClientRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceRemote" />
+ </component>
+
+ <!-- local and remote wires -->
+ <component name="AHelloWorldClientLocalAndRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceLocalAndRemote"/>
+ </component>
+
+ <!-- multiple services -->
+ <component name="AHelloWorldClientMultipleServices">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceMultipleServices/HelloWorldServiceRemote"/>
+ </component>
+
+ <component name="AHelloWorldClientMultipleServices2">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientRemote2Impl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceMultipleServices/HelloWorldServiceRemote2"/>
+ </component>
+
+ <!-- multiple bindings -->
+ <component name="AHelloWorldClientMultipleBindings">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldMultipleBindings/HelloWorldServiceRemote/scaBinding">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceRemote" />
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleReference/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleService/HelloWorld.composite
new file mode 100644
index 0000000000..37af7625ff
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleService/HelloWorld.composite
@@ -0,0 +1,85 @@
+<?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:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- local only wire -->
+
+
+ <!-- unresolved remote wire -->
+ <component name="BHelloWorldServiceRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ <service name="HelloWorldServiceRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceRemote"/>
+ </service>
+ </component>
+
+ <!-- local and remote wires -->
+ <component name="BHelloWorldServiceLocalAndRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ <service name="HelloWorldServiceRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceLocalAndRemote"/>
+ </service>
+ </component>
+
+ <component name="BHelloWorldClientLocalAndRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceLocalAndRemote" />
+ </component>
+
+ <!-- multiple services -->
+ <component name="BHelloWorldServiceMultipleServices">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceMultipleServicesImpl" />
+ <service name="HelloWorldServiceLocal">
+ </service>
+ <service name="HelloWorldServiceRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceMultipleServices/HelloWorldServiceRemote"/>
+ </service>
+ <service name="HelloWorldServiceRemote2">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceMultipleServices/HelloWorldServiceRemote2"/>
+ </service>
+ </component>
+
+ <component name="BHelloWorldClientMultipleServices">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldClientLocalImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceMultipleServices/HelloWorldServiceLocal" />
+ </component>
+
+ <!-- multiple bindings -->
+ <component name="BHelloWorldMultipleBindings">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.rmi.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ <service name="HelloWorldServiceRemote">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.rmi.helloworld.HelloWorldServiceRemote" />
+ <!-- tuscany:binding.rmi name="rmiBinding" uri="http://localhost:8085/BHelloWorldMultipleBindings/HelloWorldServiceRemote-wsbinding"/ -->
+ <binding.sca name="scaBinding" uri="http://localhost:8085/BHelloWorldMultipleBindings/HelloWorldServiceRemote-scabinding"/>
+ </service>
+ </component>
+
+
+ <!-- Dynamic interfaces -->
+ <!--component name="BHelloWorldServiceScript">
+ <implementation.script script="calculator/AddServiceImpl.js"/>
+ </component-->
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..ab75f7d225
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/rmi/simpleService/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchReference/HelloWorld.composite
new file mode 100644
index 0000000000..e797a0aa9c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchReference/HelloWorld.composite
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+ <!-- callback remote wire -->
+ <component name="AHelloWorldClientCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientCallbackOnewayRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceCallbackRemote">
+ <binding.sca/>
+ <callback>
+ <binding.sca uri="http://localhost:8084/AHelloWorldClientCallbackRemote"/>
+ </callback>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchReference/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchService/HelloWorld.composite
new file mode 100644
index 0000000000..079ee49380
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchService/HelloWorld.composite
@@ -0,0 +1,38 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- callback remote wire -->
+ <component name="BHelloWorldServiceCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceCallbackOnewayRemoteImpl" />
+ <service name="HelloWorldServiceCallbackOnewayRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceCallbackRemote"/>
+ <callback>
+ <binding.sca/>
+ </callback>
+ </service>
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/asynchService/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackReference/HelloWorld.composite
new file mode 100644
index 0000000000..1d5630f3d0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackReference/HelloWorld.composite
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+ <!-- callback remote wire -->
+ <component name="AHelloWorldClientCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientCallbackRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceCallbackRemote">
+ <binding.sca/>
+ <callback>
+ <binding.sca uri="http://localhost:8084/AHelloWorldClientCallbackRemote"/>
+ </callback>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackReference/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackService/HelloWorld.composite
new file mode 100644
index 0000000000..ded3766d49
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackService/HelloWorld.composite
@@ -0,0 +1,43 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- callback remote wire -->
+ <component name="BHelloWorldServiceCallbackRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceCallbackRemoteImpl" />
+ <service name="HelloWorldServiceCallbackRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceCallbackRemote"/>
+ <callback>
+ <binding.sca/>
+ </callback>
+ </service>
+ </component>
+
+ <!-- callback local wire -->
+ <component name="BHelloWorldClientCallbackLocal">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientCallbackRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceCallbackRemote" />
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/callbackService/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionReference/HelloWorld.composite
new file mode 100644
index 0000000000..4513f21acf
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionReference/HelloWorld.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- composite hierarchy -->
+ <component name="AHelloWorldClientRemotePromotion">
+ <implementation.composite name="sample:HelloWorldComponent" />
+ <reference name="AHelloWorldClientRemoteReference" target="BHelloWorldServiceRemotePromotion"/>
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionReference/HelloWorldComponent.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionReference/HelloWorldComponent.composite
new file mode 100644
index 0000000000..22c20ff94a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionReference/HelloWorldComponent.composite
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorldComponent">
+
+ <service name="AHelloWorldClientRemoteService" promote="AHelloWorldClientRemoteComponent">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient"/>
+ </service>
+
+ <reference name="AHelloWorldClientRemoteReference" promote="AHelloWorldClientRemoteComponent/helloWorldService" multiplicity="1..1">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote"/>
+ </reference>
+
+ <component name="AHelloWorldClientRemoteComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionReference/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionService/HelloWorld.composite
new file mode 100644
index 0000000000..e6a7d776c9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionService/HelloWorld.composite
@@ -0,0 +1,35 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- composite hierarchy -->
+ <component name="BHelloWorldServiceRemotePromotion">
+ <implementation.composite name="sample:HelloWorldComponent" />
+ <service name="BHelloWorldServiceRemoteService">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceRemotePromotion"/>
+ </service>
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionService/HelloWorldComponent.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionService/HelloWorldComponent.composite
new file mode 100644
index 0000000000..0393280625
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionService/HelloWorldComponent.composite
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorldComponent">
+
+ <service name="BHelloWorldServiceRemoteService"
+ promote="BHelloWorldServiceRemoteComponent/HelloWorldServiceRemote"/>
+
+ <component name="BHelloWorldServiceRemoteComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceRemoteImpl"/>
+ </component>
+
+ <component name="BHelloWorldServiceLocalAndRemoteNested">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/promotionService/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleReference/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleReference/HelloWorld.composite
new file mode 100644
index 0000000000..f4d2789ff7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleReference/HelloWorld.composite
@@ -0,0 +1,67 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- local only wire -->
+ <component name="AHelloWorldClientLocal">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientLocalImpl"/>
+ <reference name="helloWorldService" target="AHelloWorldServiceLocal" />
+ </component>
+
+ <component name="AHelloWorldServiceLocal">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceLocalImpl" />
+ </component>
+
+ <!-- unresolved remote wire -->
+ <component name="AHelloWorldClientRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceRemote" />
+ </component>
+
+ <!-- local and remote wires -->
+ <component name="AHelloWorldClientLocalAndRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceLocalAndRemote"/>
+ </component>
+
+ <!-- multiple services -->
+ <component name="AHelloWorldClientMultipleServices">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceMultipleServices/HelloWorldServiceRemote"/>
+ </component>
+
+ <component name="AHelloWorldClientMultipleServices2">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemote2Impl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceMultipleServices/HelloWorldServiceRemote2"/>
+ </component>
+
+ <!-- multiple bindings -->
+ <component name="AHelloWorldClientMultipleBindings">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldMultipleBindings/HelloWorldServiceRemote/scaBinding">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote" />
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleReference/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleReference/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleReference/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleService/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleService/HelloWorld.composite
new file mode 100644
index 0000000000..7e6311a22d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleService/HelloWorld.composite
@@ -0,0 +1,84 @@
+<?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"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="HelloWorld">
+
+
+ <!-- local only wire -->
+
+
+ <!-- unresolved remote wire -->
+ <component name="BHelloWorldServiceRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ <service name="HelloWorldServiceRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceRemote"/>
+ </service>
+ </component>
+
+ <!-- local and remote wires -->
+ <component name="BHelloWorldServiceLocalAndRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ <service name="HelloWorldServiceRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceLocalAndRemote"/>
+ </service>
+ </component>
+
+ <component name="BHelloWorldClientLocalAndRemote">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientRemoteImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceLocalAndRemote" />
+ </component>
+
+ <!-- multiple services -->
+ <component name="BHelloWorldServiceMultipleServices">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceMultipleServicesImpl" />
+ <service name="HelloWorldServiceLocal">
+ </service>
+ <service name="HelloWorldServiceRemote">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceMultipleServices/HelloWorldServiceRemote"/>
+ </service>
+ <service name="HelloWorldServiceRemote2">
+ <binding.sca uri="http://localhost:8085/BHelloWorldServiceMultipleServices/HelloWorldServiceRemote2"/>
+ </service>
+ </component>
+
+ <component name="BHelloWorldClientMultipleServices">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientLocalImpl" />
+ <reference name="helloWorldService" target="BHelloWorldServiceMultipleServices/HelloWorldServiceLocal" />
+ </component>
+
+ <!-- multiple bindings -->
+ <component name="BHelloWorldMultipleBindings">
+ <implementation.java class="org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldServiceRemoteImpl" />
+ <service name="HelloWorldServiceRemote">
+ <interface.java interface="org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldServiceRemote" />
+ <binding.ws name="wsBinding" uri="http://localhost:8085/BHelloWorldMultipleBindings/HelloWorldServiceRemote-wsbinding"/>
+ <binding.sca name="scaBinding" uri="http://localhost:8085/BHelloWorldMultipleBindings/HelloWorldServiceRemote-scabinding"/>
+ </service>
+ </component>
+
+
+ <!-- Dynamic interfaces -->
+ <!--component name="BHelloWorldServiceScript">
+ <implementation.script script="calculator/AddServiceImpl.js"/>
+ </component-->
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleService/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleService/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e6ccae5c73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/binding-sca-tribes/src/test/resources/ws/simpleService/META-INF/sca-contribution.xml
@@ -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:sample="http://sample">
+ <deployable composite="sample:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/pom.xml
new file mode 100644
index 0000000000..f2733b7b7d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/pom.xml
@@ -0,0 +1,59 @@
+<?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-nodes</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-node-domain-node</artifactId>
+ <name>Apache Tuscany SCA iTest Node DomainNode</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-rmi-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+<!--
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.19</version>
+ </dependency>
+-->
+
+ </dependencies>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/java/helloworld/HelloWorldClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/java/helloworld/HelloWorldClientImpl.java
new file mode 100644
index 0000000000..021a653c36
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/java/helloworld/HelloWorldClientImpl.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package helloworld;
+
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements the HelloWorld service.
+ */
+@Service(HelloWorldService.class)
+public class HelloWorldClientImpl implements HelloWorldService {
+
+ @Reference
+ protected HelloWorldService hwService;
+
+ public String getGreetings(String name) {
+ return "Hello " + hwService.getGreetings(name);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/java/helloworld/HelloWorldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/java/helloworld/HelloWorldImpl.java
new file mode 100644
index 0000000000..636f7699ed
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/java/helloworld/HelloWorldImpl.java
@@ -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 helloworld;
+
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements the HelloWorld service.
+ */
+@Service(HelloWorldService.class)
+public class HelloWorldImpl implements HelloWorldService {
+
+ public String getGreetings(String name) {
+ return "Hello " + name;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/java/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/java/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..32c2d0b907
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/java/helloworld/HelloWorldService.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package helloworld;
+
+import javax.jws.WebService;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface HelloWorldService {
+
+ public String getGreetings(String name);
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..34da25216d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/resources/META-INF/sca-contribution.xml
@@ -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:hw="http://helloworld">
+ <deployable composite="hw:helloworldws" />
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/resources/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/resources/helloworld.composite
new file mode 100644
index 0000000000..fae44b642d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/main/resources/helloworld.composite
@@ -0,0 +1,47 @@
+<?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://helloworld"
+ xmlns:hw="http://helloworld"
+ xmlns:wsdli="http://www.w3.org/ns/wsdl-instance"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ name="helloworldws">
+
+ <component name="HelloWorldClientComponent">
+ <implementation.java class="helloworld.HelloWorldClientImpl" />
+ <service name="HelloWorldService">
+ <binding.sca/>
+ </service>
+ <reference name="hwService" target="HelloWorldServiceComponent">
+<!--
+ <binding.ws uri="http://localhost:8085/HelloWorldServiceComponent"/>
+-->
+ </reference>
+ </component>
+
+ <component name="HelloWorldServiceComponent">
+ <implementation.java class="helloworld.HelloWorldImpl" />
+ <service name="HelloWorldService">
+ <tuscany:binding.rmi uri="rmi://duffuri"/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/test/java/helloworld/DomainNodeTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/test/java/helloworld/DomainNodeTestCase.java
new file mode 100644
index 0000000000..028db4cf33
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/domain-node/src/test/java/helloworld/DomainNodeTestCase.java
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package helloworld;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertNotNull;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+
+/**
+ * Tests that the helloworld server is available
+ */
+public class DomainNodeTestCase{
+
+ private Node node;
+
+ @Before
+ public void startServer() throws Exception {
+ node = TuscanyRuntime.newInstance().createNode("default");
+ node.installContribution("helloworld", "target/classes", null, null);
+ try {
+ node.startComposite("helloworld", "helloworld.composite");
+ } catch (Exception ex) {
+ System.out.println("Caught exception on composite start : " + ex);
+ }
+ }
+
+ @Ignore
+ @Test
+ public void testWaitForInput() {
+ System.out.println("Press a key to end");
+ try {
+ System.in.read();
+ } catch (Exception ex) {
+ }
+ System.out.println("Shutting down");
+ }
+
+ @Test
+ public void testContributionUninstall() throws IOException, NoSuchServiceException {
+ List<String> installedContributions = node.getInstalledContributionURIs();
+ System.out.println(installedContributions);
+
+ assertEquals(1, installedContributions.size());
+
+ try {
+ node.stopCompositeAndUninstallUnused("helloworld", "helloworld.composite");
+ } catch (Exception ex) {
+ System.out.println("Caught exception on composite stop : " + ex);
+ }
+
+ installedContributions = node.getInstalledContributionURIs();
+ assertEquals(0, installedContributions.size());
+ }
+
+
+ @After
+ public void stopServer() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/pom.xml
new file mode 100644
index 0000000000..f2144e3ded
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/pom.xml
@@ -0,0 +1,44 @@
+<?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-nodes</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-helloworld-client</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes Helloworld Client</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0.1</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java
new file mode 100644
index 0000000000..2619dc269b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java
@@ -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 itest.nodes;
+
+import org.oasisopen.sca.annotation.EagerInit;
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Scope;
+
+@EagerInit
+@Scope("COMPOSITE")
+public class HelloworldImpl implements Helloworld {
+
+ @Reference
+ public Helloworld service;
+
+ @Init
+ public void initialize() throws Exception{
+ System.out.println(">>>>>> " + sayHello("init"));
+ }
+
+ public String sayHello(String name) throws Exception {
+ return "Hi " + service.sayHello(name);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e295015a40
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:itest="http://itest">
+ <deployable composite="itest:HelloworldClient"/>
+ <import.java package="itest.nodes"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/src/main/resources/helloworld-client.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/src/main/resources/helloworld-client.composite
new file mode 100644
index 0000000000..3c4ed03448
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-client/src/main/resources/helloworld-client.composite
@@ -0,0 +1,29 @@
+<?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"
+ targetNamespace="http://itest"
+ name="HelloworldClient">
+
+ <component name="HelloworldClient">
+ <implementation.java class="itest.nodes.HelloworldImpl"/>
+ <reference name="service" target="HelloworldService"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-iface/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-iface/pom.xml
new file mode 100644
index 0000000000..904b84e2a9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-iface/pom.xml
@@ -0,0 +1,39 @@
+<?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-nodes</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes Helloworld IFaces</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0.1</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-iface/src/main/java/itest/nodes/Helloworld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-iface/src/main/java/itest/nodes/Helloworld.java
new file mode 100644
index 0000000000..a0710281c9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-iface/src/main/java/itest/nodes/Helloworld.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package itest.nodes;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface Helloworld {
+
+ String sayHello(String name) throws Exception;
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-iface/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-iface/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..2205b4e8fe
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-iface/src/main/resources/META-INF/sca-contribution.xml
@@ -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://itest">
+ <export.java package="itest.nodes"/>
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/pom.xml
new file mode 100644
index 0000000000..0b767c15b0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/pom.xml
@@ -0,0 +1,44 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-helloworld-service-a</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes Helloworld Service A</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0.1</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/src/main/java/itest/nodes/HelloworldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/src/main/java/itest/nodes/HelloworldImpl.java
new file mode 100644
index 0000000000..2619dc269b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/src/main/java/itest/nodes/HelloworldImpl.java
@@ -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 itest.nodes;
+
+import org.oasisopen.sca.annotation.EagerInit;
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Scope;
+
+@EagerInit
+@Scope("COMPOSITE")
+public class HelloworldImpl implements Helloworld {
+
+ @Reference
+ public Helloworld service;
+
+ @Init
+ public void initialize() throws Exception{
+ System.out.println(">>>>>> " + sayHello("init"));
+ }
+
+ public String sayHello(String name) throws Exception {
+ return "Hi " + service.sayHello(name);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..bba92e6ca3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/src/main/resources/META-INF/sca-contribution.xml
@@ -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/200903"
+ xmlns:itest="http://itest">
+ <deployable composite="itest:ServiceA"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/src/main/resources/service-a.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/src/main/resources/service-a.composite
new file mode 100644
index 0000000000..55122d2d6c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-a/src/main/resources/service-a.composite
@@ -0,0 +1,29 @@
+<?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/200903"
+ targetNamespace="http://itest"
+ name="ServiceA">
+
+ <component name="ServiceA">
+ <implementation.java class="itest.nodes.HelloworldImpl"/>
+ <reference name="service" target="ServiceA"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/pom.xml
new file mode 100644
index 0000000000..34a0be500a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/pom.xml
@@ -0,0 +1,39 @@
+<?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-nodes</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-helloworld-service-and-client</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes Helloworld Service and Client</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0.1</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/Helloworld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/Helloworld.java
new file mode 100644
index 0000000000..f08412d4bf
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/Helloworld.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package itest.nodes.sac;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface Helloworld {
+
+ String sayHello(String name) throws Exception;
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/HelloworldClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/HelloworldClientImpl.java
new file mode 100644
index 0000000000..d64536a998
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/HelloworldClientImpl.java
@@ -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 itest.nodes.sac;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloworldClientImpl implements Helloworld {
+
+ @Reference
+ public Helloworld service;
+
+
+ public String sayHello(String name) throws Exception {
+ return "Hi " + service.sayHello(name);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/HelloworldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/HelloworldServiceImpl.java
new file mode 100644
index 0000000000..728804b08c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/java/itest/nodes/sac/HelloworldServiceImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package itest.nodes.sac;
+
+public class HelloworldServiceImpl implements Helloworld {
+
+ public String sayHello(String name) {
+ String response = "Hello " + name;
+ System.out.println("At service - " + response);
+ return response;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..555824a94e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/resources/META-INF/sca-contribution.xml
@@ -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://itest">
+ <deployable composite="itest:HelloworldServiceAndClient"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/resources/helloworld-service.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/resources/helloworld-service.composite
new file mode 100644
index 0000000000..38ac479275
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-and-client/src/main/resources/helloworld-service.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://itest"
+ name="HelloworldServiceAndClient">
+
+ <component name="HelloworldClient">
+ <implementation.java class="itest.nodes.sac.HelloworldClientImpl"/>
+ <reference name="service" target="HelloworldService"/>
+ </component>
+
+ <component name="HelloworldService">
+ <implementation.java class="itest.nodes.sac.HelloworldServiceImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/pom.xml
new file mode 100644
index 0000000000..7a021816cc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/pom.xml
@@ -0,0 +1,49 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-helloworld-service-b</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes Helloworld Service B</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0.1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/src/main/java/itest/nodes/HelloworldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/src/main/java/itest/nodes/HelloworldImpl.java
new file mode 100644
index 0000000000..b1d5a8235a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/src/main/java/itest/nodes/HelloworldImpl.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package itest.nodes;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloworldImpl implements Helloworld {
+
+ @Reference
+ protected Helloworld service;
+
+ public String sayHello(String name) throws Exception {
+ return service.sayHello(name);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..4405cca18e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/src/main/resources/META-INF/sca-contribution.xml
@@ -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/200903"
+ xmlns:itest="http://itest">
+ <deployable composite="itest:ServiceB"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/src/main/resources/service-b.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/src/main/resources/service-b.composite
new file mode 100644
index 0000000000..02cff882a7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-b/src/main/resources/service-b.composite
@@ -0,0 +1,29 @@
+<?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/200903"
+ targetNamespace="http://itest"
+ name="ServiceB">
+
+ <component name="ServiceB">
+ <implementation.java class="itest.nodes.HelloworldImpl"/>
+ <reference name="service" target="ServiceC"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/pom.xml
new file mode 100644
index 0000000000..55bf576501
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/pom.xml
@@ -0,0 +1,49 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-helloworld-Serivce-c</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes Helloworld Service C</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0.1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/src/main/java/itest/nodes/HelloworldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/src/main/java/itest/nodes/HelloworldImpl.java
new file mode 100644
index 0000000000..81f7e1747d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/src/main/java/itest/nodes/HelloworldImpl.java
@@ -0,0 +1,28 @@
+/*
+ * 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 itest.nodes;
+
+public class HelloworldImpl implements Helloworld {
+
+ public String sayHello(String name) {
+ return "Hello " + name;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..3ff86f946b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/src/main/resources/META-INF/sca-contribution.xml
@@ -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/200903"
+ xmlns:itest="http://itest">
+ <deployable composite="itest:ServiceC"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/src/main/resources/service-c.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/src/main/resources/service-c.composite
new file mode 100644
index 0000000000..d88db09b43
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service-c/src/main/resources/service-c.composite
@@ -0,0 +1,28 @@
+<?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/200903"
+ targetNamespace="http://itest"
+ name="ServiceC">
+
+ <component name="ServiceC">
+ <implementation.java class="itest.nodes.HelloworldImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/pom.xml
new file mode 100644
index 0000000000..cd4f429976
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/pom.xml
@@ -0,0 +1,43 @@
+<?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-nodes</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-helloworld-service</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes Helloworld Service</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/src/main/java/itest/nodes/HelloworldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/src/main/java/itest/nodes/HelloworldImpl.java
new file mode 100644
index 0000000000..a27e752fd7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/src/main/java/itest/nodes/HelloworldImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package itest.nodes;
+
+public class HelloworldImpl implements Helloworld {
+
+ public String sayHello(String name) {
+ String response = "Hello " + name;
+ System.out.println("At service - " + response);
+ return response;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..b02141ef26
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/src/main/resources/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:itest="http://itest">
+ <deployable composite="itest:HelloworldService"/>
+ <import.java package="itest.nodes"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/src/main/resources/helloworld-service.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/src/main/resources/helloworld-service.composite
new file mode 100644
index 0000000000..5334caeb55
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/helloworld-service/src/main/resources/helloworld-service.composite
@@ -0,0 +1,28 @@
+<?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"
+ targetNamespace="http://itest"
+ name="HelloworldService">
+
+ <component name="HelloworldService">
+ <implementation.java class="itest.nodes.HelloworldImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast-client/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast-client/pom.xml
new file mode 100644
index 0000000000..b5f8ca81f8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast-client/pom.xml
@@ -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.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-one-jvm-hazelcast-client</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes One JVM Using Hazelcast and client</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-domain-hazelcast</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+ <build>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast-client/src/test/java/itest/ClientTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast-client/src/test/java/itest/ClientTestCase.java
new file mode 100644
index 0000000000..1e59e3e34e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast-client/src/test/java/itest/ClientTestCase.java
@@ -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 itest;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointImpl;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.hazelcast.client.HazelcastClient;
+import com.hazelcast.core.IMap;
+
+/**
+ */
+public class ClientTestCase{
+
+ private static String domainURI = "uri:OneNodeTestCase?bind=127.0.0.1:14829";
+ private static Node node;
+ private static HazelcastClient client;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ node = TuscanyRuntime.newInstance().createNode(domainURI);
+ node.installContribution("../helloworld-iface/target/classes");
+ String c1 = node.installContribution("../helloworld-service/target/classes");
+ String c2 = node.installContribution("../helloworld-client/target/classes");
+ node.startDeployables(c1);
+ node.startDeployables(c2);
+ }
+
+ @Test
+ public void testNode() throws Exception {
+
+ client = HazelcastClient.newHazelcastClient("OneNodeTestCase", "tuscany", "127.0.0.1:14829");
+ IMap<Object, Object> map = client.getMap("OneNodeTestCase/Endpoints");
+
+ assertNotNull(map);
+ assertEquals(2, map.size());
+ Object ep1 = map.get("HelloworldService#service-binding(Helloworld/Helloworld)");
+// System.out.println((RuntimeEndpointImpl)ep1);
+ assertNotNull(ep1);
+ assertTrue(ep1 instanceof RuntimeEndpointImpl);
+ Object ep2 = map.get("HelloworldClient#service-binding(Helloworld/Helloworld)");
+ assertNotNull(ep2);
+ }
+
+ //@Test
+ public void testTime() throws Exception {
+ long start = System.currentTimeMillis();
+ long count = 100;
+ for (int i=0; i<count; i++) {
+ testNode();
+ client.shutdown();
+ }
+ long avg = (System.currentTimeMillis() - start) / count;
+ System.out.println("Average for " + count + " client connects " + avg);
+ }
+
+ @Test
+ public void testBadPassword() throws Exception {
+ try {
+ client = HazelcastClient.newHazelcastClient("OneNodeTestCase", "IncorrectPassword", "127.0.0.1:14829");
+ fail();
+ } catch (Exception e) {
+ //expected
+ }
+ }
+
+ @Test
+ public void testBadIP() throws Exception {
+ try {
+ client = HazelcastClient.newHazelcastClient("OneNodeTestCase", "IncorrectPassword", "127.0.0.99:9999");
+ fail();
+ } catch (Exception e) {
+ //expected
+ }
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (client != null) {
+ client.shutdown();
+ }
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/pom.xml
new file mode 100644
index 0000000000..befaa40d92
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/pom.xml
@@ -0,0 +1,54 @@
+<?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-nodes</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-one-jvm-hazelcast</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes One JVM Using Hazelcast Registry</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-service-and-client</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-domain-hazelcast</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/OneNodeOneContributionTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/OneNodeOneContributionTestCase.java
new file mode 100644
index 0000000000..3755d0b365
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/OneNodeOneContributionTestCase.java
@@ -0,0 +1,64 @@
+/*
+ * 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 itest;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import itest.nodes.sac.Helloworld;
+
+import java.net.URI;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.oasisopen.sca.client.SCAClientFactory;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class OneNodeOneContributionTestCase{
+
+ private static URI domainURI = URI.create("tuscany:OneNodeTestCase");
+ private static Node node;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ node = NodeFactory.getInstance().createNode(domainURI, "../helloworld-service-and-client/target/classes");
+ node.start();
+ }
+
+ @Test
+ public void testNode() throws Exception {
+
+ Helloworld client = node.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/OneNodeTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/OneNodeTestCase.java
new file mode 100644
index 0000000000..c8ae6f3762
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/OneNodeTestCase.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package itest;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import itest.nodes.Helloworld;
+
+import java.net.URI;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.oasisopen.sca.client.SCAClientFactory;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class OneNodeTestCase{
+
+ private static URI domainURI = URI.create("OneNodeTestCase");
+ private static Node node;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ node = NodeFactory.getInstance().createNode(domainURI, "../helloworld-service/target/classes", "../helloworld-client/target/classes", "../helloworld-iface/target/classes");
+ node.start();
+ }
+
+ @Test
+ public void testNode() throws Exception {
+
+ Helloworld service = node.getService(Helloworld.class, "HelloworldService");
+ assertNotNull(service);
+ assertEquals("Hello Petra", service.sayHello("Petra"));
+
+ Helloworld client = node.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+
+ Helloworld scaClientService = SCAClientFactory.newInstance(domainURI).getService(Helloworld.class, "HelloworldService");
+ assertNotNull(scaClientService);
+ assertEquals("Hello Petra", scaClientService.sayHello("Petra"));
+
+ Helloworld scaClientClient = SCAClientFactory.newInstance(domainURI).getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(scaClientClient);
+ assertEquals("Hi Hello Petra", scaClientClient.sayHello("Petra"));
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/TwoNodeTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/TwoNodeTestCase.java
new file mode 100644
index 0000000000..23c4a62916
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/TwoNodeTestCase.java
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package itest;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import itest.nodes.Helloworld;
+
+import java.net.URI;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.oasisopen.sca.client.SCAClientFactory;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class TwoNodeTestCase{
+
+ private static URI domainURI = URI.create("TwoNodeTestCase");
+ private static Node serviceNode;
+ private static Node clientNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ serviceNode = NodeFactory.getInstance().createNode(domainURI, "../helloworld-service/target/classes", "../helloworld-iface/target/classes");
+ serviceNode.start();
+ clientNode = NodeFactory.getInstance().createNode(domainURI, "../helloworld-client/target/classes", "../helloworld-iface/target/classes");
+ clientNode.start();
+ }
+
+ @Test
+ public void testNode() throws Exception {
+
+ Helloworld service = serviceNode.getService(Helloworld.class, "HelloworldService");
+ assertNotNull(service);
+ assertEquals("Hello Petra", service.sayHello("Petra"));
+
+ Helloworld client = clientNode.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+
+ Helloworld scaClientService = SCAClientFactory.newInstance(domainURI).getService(Helloworld.class, "HelloworldService");
+ assertNotNull(scaClientService);
+ assertEquals("Hello Petra", scaClientService.sayHello("Petra"));
+
+ Helloworld scaClientClient = SCAClientFactory.newInstance(domainURI).getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(scaClientClient);
+ assertEquals("Hi Hello Petra", scaClientClient.sayHello("Petra"));
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (serviceNode != null) {
+ serviceNode.stop();
+ }
+ if (clientNode != null) {
+ clientNode.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/TwoRemoteNodesTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/TwoRemoteNodesTestCase.java
new file mode 100644
index 0000000000..a7e2bcf1c1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-hazelcast/src/test/java/itest/TwoRemoteNodesTestCase.java
@@ -0,0 +1,89 @@
+/*
+ * 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 itest;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import itest.nodes.Helloworld;
+
+import java.net.URI;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.oasisopen.sca.client.SCAClientFactory;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class TwoRemoteNodesTestCase{
+
+ private static Node serviceNode;
+ private static Node clientNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ serviceNode = NodeFactory.newInstance().createNode(URI.create("tuscany:TwoRemoteNodesTestCase"), "../helloworld-service/target/classes", "../helloworld-iface/target/classes");
+ serviceNode.start();
+
+ clientNode = NodeFactory.getInstance().createNode(URI.create("tuscany:TwoRemoteNodesTestCase"), "../helloworld-client/target/classes", "../helloworld-iface/target/classes");
+ clientNode.start();
+ }
+
+ @Test
+ public void testNode() throws Exception {
+
+ Helloworld service = serviceNode.getService(Helloworld.class, "HelloworldService");
+ assertNotNull(service);
+ assertEquals("Hello Petra", service.sayHello("Petra"));
+
+ Helloworld client = clientNode.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+
+ Helloworld scaClientService = SCAClientFactory.newInstance(URI.create("TwoRemoteNodesTestCase")).getService(Helloworld.class, "HelloworldService");
+ assertNotNull(scaClientService);
+ assertEquals("Hello Petra", scaClientService.sayHello("Petra"));
+
+ }
+
+ @Ignore // Fails with Hazelcast 1.9.2.2, investigating...
+ @Test
+ public void testRemoteClient() throws Exception {
+
+ Helloworld scaClientClient = SCAClientFactory.newInstance(URI.create("TwoRemoteNodesTestCase")).getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(scaClientClient);
+ assertEquals("Hi Hello Petra", scaClientClient.sayHello("Petra"));
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (serviceNode != null) {
+ serviceNode.stop();
+ }
+ if (clientNode != null) {
+ clientNode.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/pom.xml
new file mode 100644
index 0000000000..4b23d1336c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/pom.xml
@@ -0,0 +1,82 @@
+<?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-nodes</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-one-jvm-tribes</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes One JVM Using Tribes Registry</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-client-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-endpoint-tribes</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-rmi-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.5</version>
+ <configuration>
+ <includes>
+ <include>**/*TestCase.java</include>
+ </includes>
+ <reportFormat>brief</reportFormat>
+ <useFile>false</useFile>
+ <forkMode>once</forkMode>
+ <argLine>-ea -Xmx256m</argLine>
+ <parallel>off</parallel>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/src/test/java/itest/OneNodeTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/src/test/java/itest/OneNodeTestCase.java
new file mode 100644
index 0000000000..e55e8f63e4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/src/test/java/itest/OneNodeTestCase.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package itest;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import itest.nodes.Helloworld;
+
+import java.net.URI;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.oasisopen.sca.client.SCAClientFactory;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class OneNodeTestCase{
+
+ private static URI domainURI = URI.create("OneNodeTestCase");
+ private static Node node;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ node = NodeFactory.getInstance().createNode(domainURI, "../helloworld-service/target/classes", "../helloworld-client/target/classes");
+ node.start();
+ }
+
+ @Test
+ public void testNode() throws Exception {
+
+ Helloworld service = node.getService(Helloworld.class, "HelloworldService");
+ assertNotNull(service);
+ assertEquals("Hello Petra", service.sayHello("Petra"));
+
+ Helloworld client = node.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+
+ Helloworld scaClientService = SCAClientFactory.newInstance(domainURI).getService(Helloworld.class, "HelloworldService");
+ assertNotNull(scaClientService);
+ assertEquals("Hello Petra", scaClientService.sayHello("Petra"));
+
+ Helloworld scaClientClient = SCAClientFactory.newInstance(domainURI).getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(scaClientClient);
+ assertEquals("Hi Hello Petra", scaClientClient.sayHello("Petra"));
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/src/test/java/itest/TwoNodeTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/src/test/java/itest/TwoNodeTestCase.java
new file mode 100644
index 0000000000..2d920c340a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/src/test/java/itest/TwoNodeTestCase.java
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package itest;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import itest.nodes.Helloworld;
+
+import java.net.URI;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.oasisopen.sca.client.SCAClientFactory;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class TwoNodeTestCase{
+
+ private static URI domainURI = URI.create("TwoNodeTestCase");
+ private static Node serviceNode;
+ private static Node clientNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ serviceNode = NodeFactory.getInstance().createNode(domainURI, "../helloworld-service/target/classes");
+ serviceNode.start();
+ clientNode = NodeFactory.getInstance().createNode(domainURI, "../helloworld-client/target/classes");
+ clientNode.start();
+ }
+
+ @Test
+ public void testNode() throws Exception {
+
+ Helloworld service = serviceNode.getService(Helloworld.class, "HelloworldService");
+ assertNotNull(service);
+ assertEquals("Hello Petra", service.sayHello("Petra"));
+
+ Helloworld client = clientNode.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+
+ Helloworld scaClientService = SCAClientFactory.newInstance(domainURI).getService(Helloworld.class, "HelloworldService");
+ assertNotNull(scaClientService);
+ assertEquals("Hello Petra", scaClientService.sayHello("Petra"));
+
+ Helloworld scaClientClient = SCAClientFactory.newInstance(domainURI).getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(scaClientClient);
+ assertEquals("Hi Hello Petra", scaClientClient.sayHello("Petra"));
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (serviceNode != null) {
+ serviceNode.stop();
+ }
+ if (clientNode != null) {
+ clientNode.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/src/test/java/itest/TwoRemoteNodesTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/src/test/java/itest/TwoRemoteNodesTestCase.java
new file mode 100644
index 0000000000..888b4df156
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm-tribes/src/test/java/itest/TwoRemoteNodesTestCase.java
@@ -0,0 +1,83 @@
+/*
+ * 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 itest;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import itest.nodes.Helloworld;
+
+import java.net.URI;
+
+import org.apache.tuscany.sca.binding.rmi.RMIBinding;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.oasisopen.sca.client.SCAClientFactory;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class TwoRemoteNodesTestCase{
+
+ private static Node serviceNode;
+ private static Node clientNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ serviceNode = NodeFactory.newInstance().createNode(URI.create("tuscany:TwoRemoteNodesTestCase"), "../helloworld-service/target/classes");
+ serviceNode.start();
+
+ clientNode = NodeFactory.getInstance().createNode(URI.create("tuscany:TwoRemoteNodesTestCase"), "../helloworld-client/target/classes");
+ clientNode.start();
+ }
+
+ @Test
+ public void testNode() throws Exception {
+
+ Helloworld service = serviceNode.getService(Helloworld.class, "HelloworldService");
+ assertNotNull(service);
+ assertEquals("Hello Petra", service.sayHello("Petra"));
+
+ Helloworld client = clientNode.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+
+// Helloworld scaClientService = SCAClientFactory.newInstance(URI.create("TwoRemoteNodesTestCase")).getService(Helloworld.class, "HelloworldService");
+// assertNotNull(scaClientService);
+// assertEquals("Hello Petra", scaClientService.sayHello("Petra"));
+
+ Helloworld scaClientClient = SCAClientFactory.newInstance(URI.create("TwoRemoteNodesTestCase")).getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(scaClientClient);
+ assertEquals("Hi Hello Petra", scaClientClient.sayHello("Petra"));
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (serviceNode != null) {
+ serviceNode.stop();
+ }
+ if (clientNode != null) {
+ clientNode.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm/pom.xml
new file mode 100644
index 0000000000..ab660730d0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm/pom.xml
@@ -0,0 +1,53 @@
+<?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-nodes</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-one-jvm</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes One JVM</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-client-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm/src/test/java/itest/OneNodeTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm/src/test/java/itest/OneNodeTestCase.java
new file mode 100644
index 0000000000..c8ae6f3762
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm/src/test/java/itest/OneNodeTestCase.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package itest;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import itest.nodes.Helloworld;
+
+import java.net.URI;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.oasisopen.sca.client.SCAClientFactory;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class OneNodeTestCase{
+
+ private static URI domainURI = URI.create("OneNodeTestCase");
+ private static Node node;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ node = NodeFactory.getInstance().createNode(domainURI, "../helloworld-service/target/classes", "../helloworld-client/target/classes", "../helloworld-iface/target/classes");
+ node.start();
+ }
+
+ @Test
+ public void testNode() throws Exception {
+
+ Helloworld service = node.getService(Helloworld.class, "HelloworldService");
+ assertNotNull(service);
+ assertEquals("Hello Petra", service.sayHello("Petra"));
+
+ Helloworld client = node.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+
+ Helloworld scaClientService = SCAClientFactory.newInstance(domainURI).getService(Helloworld.class, "HelloworldService");
+ assertNotNull(scaClientService);
+ assertEquals("Hello Petra", scaClientService.sayHello("Petra"));
+
+ Helloworld scaClientClient = SCAClientFactory.newInstance(domainURI).getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(scaClientClient);
+ assertEquals("Hi Hello Petra", scaClientClient.sayHello("Petra"));
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm/src/test/java/itest/TwoNodeTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm/src/test/java/itest/TwoNodeTestCase.java
new file mode 100644
index 0000000000..23c4a62916
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-jvm/src/test/java/itest/TwoNodeTestCase.java
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package itest;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import itest.nodes.Helloworld;
+
+import java.net.URI;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.oasisopen.sca.client.SCAClientFactory;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class TwoNodeTestCase{
+
+ private static URI domainURI = URI.create("TwoNodeTestCase");
+ private static Node serviceNode;
+ private static Node clientNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ serviceNode = NodeFactory.getInstance().createNode(domainURI, "../helloworld-service/target/classes", "../helloworld-iface/target/classes");
+ serviceNode.start();
+ clientNode = NodeFactory.getInstance().createNode(domainURI, "../helloworld-client/target/classes", "../helloworld-iface/target/classes");
+ clientNode.start();
+ }
+
+ @Test
+ public void testNode() throws Exception {
+
+ Helloworld service = serviceNode.getService(Helloworld.class, "HelloworldService");
+ assertNotNull(service);
+ assertEquals("Hello Petra", service.sayHello("Petra"));
+
+ Helloworld client = clientNode.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+
+ Helloworld scaClientService = SCAClientFactory.newInstance(domainURI).getService(Helloworld.class, "HelloworldService");
+ assertNotNull(scaClientService);
+ assertEquals("Hello Petra", scaClientService.sayHello("Petra"));
+
+ Helloworld scaClientClient = SCAClientFactory.newInstance(domainURI).getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(scaClientClient);
+ assertEquals("Hi Hello Petra", scaClientClient.sayHello("Petra"));
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (serviceNode != null) {
+ serviceNode.stop();
+ }
+ if (clientNode != null) {
+ clientNode.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-node-test/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-node-test/pom.xml
new file mode 100644
index 0000000000..5132f9065a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-node-test/pom.xml
@@ -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.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-one-node-test</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes One Node Test</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-node-test/src/test/java/itest/OneNodeTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-node-test/src/test/java/itest/OneNodeTestCase.java
new file mode 100644
index 0000000000..93f5863010
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/one-node-test/src/test/java/itest/OneNodeTestCase.java
@@ -0,0 +1,88 @@
+/*
+ * 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 itest;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.io.File;
+
+import itest.nodes.Helloworld;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class OneNodeTestCase{
+
+ private static Node node;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ System.setProperty("org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint.enabled", "false");
+ NodeFactory factory = NodeFactory.newInstance();
+ node = factory.createNode(
+ new Contribution("iface", getJar("../helloworld-iface/target")),
+ new Contribution("service", getJar("../helloworld-service/target")),
+ new Contribution("client", getJar("../helloworld-client/target")));
+ node.start();
+ }
+
+ /**
+ * Get the jar in the target folder without being dependent on the version name to
+ * make tuscany releases easier
+ */
+ private static String getJar(String targetDirectory) {
+ File f = new File(targetDirectory);
+ for (File file : f.listFiles()) {
+ if (file.getName().endsWith(".jar")) {
+ return file.toURI().toString();
+ }
+ }
+ throw new IllegalStateException("Can't find jar in: " + targetDirectory);
+ }
+
+ @Test
+ public void testCalculator() throws Exception {
+
+ // Ideally this would use the SCAClient API but leaving that tillwe have the basics working
+
+ Helloworld service = node.getService(Helloworld.class, "HelloworldService");
+ assertNotNull(service);
+ assertEquals("Hello Petra", service.sayHello("Petra"));
+
+ Helloworld client = node.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/pom.xml
new file mode 100644
index 0000000000..06dd6b86eb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/pom.xml
@@ -0,0 +1,64 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <packaging>pom</packaging>
+ <artifactId>itest-nodes</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes</name>
+
+ <build>
+ <defaultGoal>install</defaultGoal>
+ </build>
+
+ <modules>
+ <module>helloworld-iface</module>
+ <module>helloworld-service</module>
+ <module>helloworld-client</module>
+ <module>helloworld-service-and-client</module>
+<!--
+ <module>helloworld-service-a</module>
+ <module>helloworld-service-b</module>
+ <module>helloworld-service-c</module>
+-->
+ <module>one-jvm</module>
+ <module>one-jvm-hazelcast</module>
+ <module>one-jvm-hazelcast-client</module>
+ <module>one-jvm-tribes</module>
+ <module>binding-sca-hazelcast</module>
+ <!-- module>binding-sca-tribes</module -->
+ <module>one-node-test</module>
+<!-- failing now and then with RMI already bound problem
+ <module>two-nodes-two-vms-hazelcast</module>
+ <module>two-nodes-test</module>
+-->
+
+<!--
+ <module>three-nodes-three-vms-test</module>
+-->
+ <module>domain-node</module>
+ </modules>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/pom.xml
new file mode 100644
index 0000000000..ec5477e235
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/pom.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-remote-stop-start</artifactId>
+ <name>Apache Tuscany SCA iTest Remote Stop Start</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-domain-hazelcast</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-maven-plugin</artifactId>
+ <version>2.0.1</version>
+ <configuration>
+ <domainURI>uri:StartStopTestCase?bind=127.0.0.1:9876</domainURI>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>process-test-classes</phase>
+ <goals>
+ <goal>start</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>stop</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>stop</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/java/itest/HelloworldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/java/itest/HelloworldService.java
new file mode 100644
index 0000000000..f97d2c3a83
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/java/itest/HelloworldService.java
@@ -0,0 +1,28 @@
+/*
+ * 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 itest;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloworldService {
+
+ String sayHello(String name);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/java/itest/HelloworldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/java/itest/HelloworldServiceImpl.java
new file mode 100644
index 0000000000..4fd909af82
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/java/itest/HelloworldServiceImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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 itest;
+
+import org.oasisopen.sca.annotation.EagerInit;
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Scope;
+
+@EagerInit
+@Scope("COMPOSITE")
+public class HelloworldServiceImpl implements HelloworldService {
+
+ public String sayHello(String name) {
+ return "Hello " + name;
+ }
+
+ @Init
+ public void init() {
+ System.out.println("init: " + sayHello("world"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/java/itest/RemoteHelloworldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/java/itest/RemoteHelloworldService.java
new file mode 100644
index 0000000000..d5b9dcf311
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/java/itest/RemoteHelloworldService.java
@@ -0,0 +1,28 @@
+/*
+ * 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 itest;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface RemoteHelloworldService {
+
+ String sayHelloRemote(String name);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/resources/Helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/resources/Helloworld.composite
new file mode 100644
index 0000000000..d37c93857d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/resources/Helloworld.composite
@@ -0,0 +1,29 @@
+<?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:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://itest"
+ name="Helloworld">
+
+ <component name="HelloworldComponent">
+ <implementation.java class="itest.HelloworldServiceImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e178823296
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/main/resources/META-INF/sca-contribution.xml
@@ -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://itest">
+ <deployable composite="itest:Helloworld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/test/java/test/scaclient/StopStartTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/test/java/test/scaclient/StopStartTestCase.java
new file mode 100644
index 0000000000..933b9f1bea
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/remote-stop-start/src/test/java/test/scaclient/StopStartTestCase.java
@@ -0,0 +1,62 @@
+/*
+ * 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 test.scaclient;
+
+import itest.HelloworldService;
+
+import java.util.List;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
+import org.apache.tuscany.sca.monitor.ValidationException;
+import org.apache.tuscany.sca.runtime.ActivationException;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchDomainException;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class StopStartTestCase {
+
+ @Test
+ public void startStopInstall() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
+ TuscanyRuntime runtime = TuscanyRuntime.newInstance();
+ Node node1 = runtime.createNode("uri:StartStopTestCase?wka=127.0.0.1:9876");
+ Assert.assertEquals("Hello Amelia", node1.getService(HelloworldService.class, "HelloworldComponent").sayHello("Amelia"));
+
+ String curi = node1.getInstalledContributionURIs().get(0);
+
+ node1.stopComposite(curi, "Helloworld.composite");
+ try {
+ node1.getService(HelloworldService.class, "HelloworldComponent").sayHello("Amelia");
+ Assert.fail();
+ } catch (NoSuchServiceException e) {
+ // expected
+ }
+
+ List<String> nodes = node1.getNodeNames();
+ nodes.remove(node1.getLocalNodeName());
+ String remoteNode = nodes.get(0);
+ node1.startComposite(curi, "Helloworld.composite", remoteNode);
+
+// TUSCANY-3870: this next invoke doesn't work:
+// Assert.assertEquals("Hello Amelia", node1.getService(HelloworldService.class, "HelloworldComponent").sayHello("Amelia"));
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/build.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/build.xml
new file mode 100644
index 0000000000..3d77230541
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/build.xml
@@ -0,0 +1,38 @@
+<!--
+ * 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 name="itest-samples" default="run">
+
+ <target name="run">
+
+ <parallel failonany="true">
+
+ <daemons>
+ <ant antfile="server.xml"/>
+ </daemons>
+
+ <sequential>
+ <sleep seconds="4"/>
+ <ant antfile="client.xml"/>
+ </sequential>
+
+ </parallel>
+
+ </target>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/client.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/client.xml
new file mode 100644
index 0000000000..8e7c744940
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/client.xml
@@ -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.
+-->
+<project name="server" default="run">
+
+ <!--echo>${runtime_classpath}</echo-->
+
+ <target name="run">
+ <java classpath="${runtime_classpath};./target/test-classes"
+ classname="itest.Client"
+ fork="true"
+ failonerror="true">
+ </java>
+ </target>
+
+</project> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/pom.xml
new file mode 100644
index 0000000000..df9593dc53
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/pom.xml
@@ -0,0 +1,104 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-three-nodes-three-vms-test</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes Three Nodes Three VMs Test</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-domain-node</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-endpoint-tribes</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-launcher</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-client-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-sca-runtime-rmi</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-jetty</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>run-samples</id>
+ <phase>test</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks unless="maven.test.skip">
+ <property name="tuscany.version" value="${project.version}" />
+ <property name="runtime_classpath" refid="maven.runtime.classpath"/>
+ <ant antfile="./build.xml" target="run"/>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/server.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/server.xml
new file mode 100644
index 0000000000..dc18cc8ce0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/server.xml
@@ -0,0 +1,30 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<project name="server" default="run">
+
+ <!--echo>${runtime_classpath}</echo-->
+
+ <target name="run">
+ <java classpath="${runtime_classpath}" classname="org.apache.tuscany.sca.node.launcher.NodeMain" fork="true">
+ <arg value="-node"/>
+ <arg value="./server-config.xml"/>
+ </java>
+ </target>
+
+</project> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/service-a-config.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/service-a-config.xml
new file mode 100644
index 0000000000..d4c8909126
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/service-a-config.xml
@@ -0,0 +1,39 @@
+<?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.
+-->
+<node xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ uri="http://sample/nodes/TestNode1"
+ domain="http://domain1"
+ domainRegistry="tribes:default">
+
+ <!-- Configure the base URIs for a given binding -->
+ <!-- Each base URI is for a protocol supported by the binding -->
+ <binding name="sca:binding.sca" baseURIs="http://localhost:8081/sca https://localhost:8081/sca"/>
+ <binding name="sca:binding.ws" baseURIs="http://localhost:8082/ws https://localhost:8082/ws"/>
+
+ <!-- Configure a list of contributions -->
+ <contribution uri="iface" location="../helloworld-iface/target/itest-nodes-helloworld-iface-2.0.jar"/>
+ <contribution uri="client" location="../helloworld-service-a/target/itest-nodes-helloworld-service-a-2.0.jar">
+ <!-- doesn't pick up the deployable composite properly without this?-->
+ <deploymentComposite location="service-a.composite"/>
+ </contribution>
+
+</node>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/service-b-config.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/service-b-config.xml
new file mode 100644
index 0000000000..d557a31b64
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/service-b-config.xml
@@ -0,0 +1,39 @@
+<?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.
+-->
+<node xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ uri="http://sample/nodes/TestNode1"
+ domain="http://domain1"
+ domainRegistry="tribes:default">
+
+ <!-- Configure the base URIs for a given binding -->
+ <!-- Each base URI is for a protocol supported by the binding -->
+ <binding name="sca:binding.sca" baseURIs="http://localhost:8081/sca https://localhost:8081/sca"/>
+ <binding name="sca:binding.ws" baseURIs="http://localhost:8082/ws https://localhost:8082/ws"/>
+
+ <!-- Configure a list of contributions -->
+ <contribution uri="iface" location="../helloworld-iface/target/classes"/>
+ <contribution uri="service" location="../helloworld-service-b/target/classes">
+ <!-- doesn't pick up the deployable composite properly without this?-->
+ <deploymentComposite location="service-b.composite"/>
+ </contribution>
+
+</node> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/service-c-config.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/service-c-config.xml
new file mode 100644
index 0000000000..ba642c5ed0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/service-c-config.xml
@@ -0,0 +1,39 @@
+<?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.
+-->
+<node xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ uri="http://sample/nodes/TestNode1"
+ domain="http://domain1"
+ domainRegistry="tribes:default">
+
+ <!-- Configure the base URIs for a given binding -->
+ <!-- Each base URI is for a protocol supported by the binding -->
+ <binding name="sca:binding.sca" baseURIs="http://localhost:8081/sca https://localhost:8081/sca"/>
+ <binding name="sca:binding.ws" baseURIs="http://localhost:8082/ws https://localhost:8082/ws"/>
+
+ <!-- Configure a list of contributions -->
+ <contribution uri="iface" location="../helloworld-iface/target/classes"/>
+ <contribution uri="service" location="../helloworld-service-c/target/classes">
+ <!-- doesn't pick up the deployable composite properly without this?-->
+ <deploymentComposite location="service-c.composite"/>
+ </contribution>
+
+</node> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/src/test/java/itest/ServiceA.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/src/test/java/itest/ServiceA.java
new file mode 100644
index 0000000000..6ef30fe43f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/src/test/java/itest/ServiceA.java
@@ -0,0 +1,65 @@
+/*
+ * 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 itest;
+
+import java.io.File;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+
+public class ServiceA {
+
+ private static Node sericeNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ NodeFactory factory = NodeFactory.newInstance();
+
+ sericeNode = factory.createNode(new File("service-a-config.xml").toURI().toURL());
+
+ try {
+ sericeNode.start();
+ } catch (Exception ex){
+ ex.printStackTrace();
+ throw ex;
+ }
+ }
+
+ @Test
+ public void testNothing() throws Exception {
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (sericeNode != null) {
+ sericeNode.stop();
+ }
+ }
+
+ public static void main(String[] args) throws Exception {
+ ServiceA.setUpBeforeClass();
+ ServiceA.tearDownAfterClass();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/src/test/java/itest/ServiceB.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/src/test/java/itest/ServiceB.java
new file mode 100644
index 0000000000..67a8e5d92e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/src/test/java/itest/ServiceB.java
@@ -0,0 +1,55 @@
+/*
+ * 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 itest;
+
+import java.io.File;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class ServiceB {
+
+ private static Node serviceNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ NodeFactory factory = NodeFactory.newInstance();
+
+ serviceNode = factory.createNode(new File("service-b-config.xml").toURI().toURL());
+ serviceNode.start();
+ }
+
+ @Test
+ public void testNothing() throws Exception {
+ synchronized (this) {
+ this.wait();
+ }
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (serviceNode != null) {
+ serviceNode.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/src/test/java/itest/ServiceC.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/src/test/java/itest/ServiceC.java
new file mode 100644
index 0000000000..d716b5cd98
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/three-nodes-three-vms-test/src/test/java/itest/ServiceC.java
@@ -0,0 +1,55 @@
+/*
+ * 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 itest;
+
+import java.io.File;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class ServiceC {
+
+ private static Node serviceNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ NodeFactory factory = NodeFactory.newInstance();
+
+ serviceNode = factory.createNode(new File("service-c-config.xml").toURI().toURL());
+ serviceNode.start();
+ }
+
+ @Test
+ public void testNothing() throws Exception {
+ synchronized (this) {
+ this.wait();
+ }
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (serviceNode != null) {
+ serviceNode.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/build.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/build.xml
new file mode 100644
index 0000000000..7e83ff658e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/build.xml
@@ -0,0 +1,54 @@
+<!--
+ * 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 name="itest-nodes-two-jvms-hazelcast" default="run">
+
+ <target name="run">
+ <parallel failonany="true">
+
+ <!-- start a node that will be part of the domain -->
+ <java classpath="../../../../distribution/all/target/apache-tuscany-sca-all-2.0.dir/tuscany-sca-2.0/features/tuscany-sca-manifest.jar:./target/classes"
+ classname="org.apache.tuscany.sca.impl.Tuscany"
+ fork="true"
+ failonerror="true">
+ <arg value="domain1"/>
+ <arg value="nodeService"/>
+ <arg value="8088"/>
+ </java>
+
+ <sequential>
+ <!-- give the first node a chance to start -->
+ <sleep seconds="5"/>
+ <!-- start a second node that automatically tries to call a service in the first node -->
+ <java classpath="../../../../distribution/all/target/apache-tuscany-sca-all-2.0.dir/tuscany-sca-2.0/features/tuscany-sca-manifest.jar:./target/classes"
+ classname="org.apache.tuscany.sca.impl.Tuscany"
+ fork="true"
+ failonerror="true">
+ <arg value="domain1"/>
+ <arg value="nodeClient"/>
+ </java>
+ <!-- use a HTTP GET to ping the first node to tell it to stop -->
+ <get src="http://localhost:8088"
+ dest="target/deamon.txt"
+ ignoreerrors="true"/>
+ </sequential>
+
+ </parallel>
+ </target>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/pom.xml
new file mode 100644
index 0000000000..f40977406d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/pom.xml
@@ -0,0 +1,98 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-two-jvm-hazelcast</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes Two JVM using Hazelcast registry</name>
+
+ <dependencies>
+ <!-- runtime -->
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-sca-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-jetty</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-domain-hazelcast</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <!-- test artifacts -->
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>run-samples</id>
+ <phase>test</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks unless="maven.test.skip">
+ <property name="tuscany.version" value="${project.version}" />
+ <property name="runtime_classpath" refid="maven.runtime.classpath"/>
+ <ant antfile="./build.xml" target="run"/>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/main/java/org/apache/tuscany/sca/impl/Tuscany.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/main/java/org/apache/tuscany/sca/impl/Tuscany.java
new file mode 100644
index 0000000000..5c6ca7476e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/main/java/org/apache/tuscany/sca/impl/Tuscany.java
@@ -0,0 +1,138 @@
+/*
+ * 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.impl;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.net.URL;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+/**
+ * Main class for Tuscany. Just looking at what it means to read config from a directory structure.
+ *
+ */
+public class Tuscany {
+
+ public static void main(String[] args) throws Exception {
+ String domainName = args[0];
+ String nodeName = args[1];
+ int deamonPort = -1;
+
+ if (args.length > 2){
+ deamonPort = Integer.parseInt(args[2]);
+ }
+
+ // find the domain directory
+ File currentDirectory = new File(".");
+ File domainDirectory = findDirectory(currentDirectory, domainName);
+ System.out.println("Domain: " + domainDirectory.getPath());
+
+ // find a sub directory that ends in nodeName
+ File nodeDirectory = findDirectory(currentDirectory, nodeName);
+ System.out.println("Node: " + nodeDirectory.getPath());
+
+ // start a node with the node configuration
+/* don't know how to start the node using the following
+ TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();
+ Node node = tuscanyRuntime.createNodeFromXML(nodeDirectory.getPath() +
+ File.separator +
+ "node.xml");
+*/
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+
+ URL nodeConfigURL = nodeDirectory.toURI().resolve("node.xml").toURL();
+ Node node = nodeFactory.createNode(nodeConfigURL);
+
+ try {
+ node.start();
+
+ // for testing we're going to set up a deamon that listens for
+ // a shutdown message on a specified port (well it actually just
+ // waits for a client to connect to the port as that's all we need
+ // for now). If no port is specified then just stop straight away
+
+ if (deamonPort >= 0){
+ // Its a runtime that has to act as a deamon
+ ServerSocket serverSocket = null;
+
+ try {
+ serverSocket = new ServerSocket(deamonPort);
+ } catch (IOException e) {
+ System.out.println("Can't create a ServerSocket on port: " + deamonPort);
+ return;
+ }
+
+ // all we're doing here is waiting for a connection. If we wanted to implement
+ // a real deamon we should perhaps listen to what's coming in over the resulting socket
+ // and see if a shutdown has been requested
+ Socket clientSocket = null;
+ try {
+ clientSocket = serverSocket.accept();
+ } catch (IOException e) {
+ System.out.println("Accept failed on port: " + deamonPort);
+ return;
+ }
+ }
+
+ } finally {
+ node.stop();
+ }
+ }
+
+ /**
+ * Just walks down the tree (depth first) looking for a directory ending in the
+ * name.
+ */
+ private static File findDirectory(File currentDirectory, String name){
+ File directory = null;
+
+ if (currentDirectory.getPath().endsWith(name)){
+ directory = currentDirectory;
+ } else {
+ File[] subDirectories = currentDirectory.listFiles(new DirectoryFilter());
+ for (File aDirectory : subDirectories) {
+ directory = findDirectory(aDirectory, name);
+
+ if (directory != null){
+ break;
+ }
+ }
+ }
+
+ return directory;
+ }
+
+ private static class DirectoryFilter implements FilenameFilter {
+
+ public boolean accept(File dir, String name) {
+ if(new File(dir, name).isDirectory()) {
+ return true;
+ }
+
+ return false;
+ }
+ }
+
+} \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/helloworld-client-contribution.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/helloworld-client-contribution.jar
new file mode 100644
index 0000000000..c98214fc83
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/helloworld-client-contribution.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/helloworld-iface-contribution.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/helloworld-iface-contribution.jar
new file mode 100644
index 0000000000..455de9c58a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/helloworld-iface-contribution.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/helloworld-service-contribution.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/helloworld-service-contribution.jar
new file mode 100644
index 0000000000..28e3e680e9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/helloworld-service-contribution.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/node-nodeClient/node.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/node-nodeClient/node.xml
new file mode 100644
index 0000000000..81f82a9590
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/node-nodeClient/node.xml
@@ -0,0 +1,39 @@
+<?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.
+-->
+<node xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ uri="http://sample/nodes/node1"
+ domain="default"
+ domainRegistry="tuscany:default">
+
+ <!-- Configure the base URIs for a given binding -->
+ <!-- Each base URI is for a protocol supported by the binding -->
+ <binding name="sca:binding.sca" baseURIs="http://localhost:8081/sca https://localhost:8081/sca"/>
+ <binding name="sca:binding.ws" baseURIs="http://localhost:8082/ws https://localhost:8082/ws"/>
+
+ <!-- Configure a list of contributions -->
+ <contribution uri="iface" location="../helloworld-iface-contribution.jar"/>
+ <contribution uri="client" location="../helloworld-client-contribution.jar">
+ <!-- doesn't pick up the deployable composite properly without this?-->
+ <deploymentComposite location="helloworld-client.composite"/>
+ </contribution>
+
+</node> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/node-nodeService/node.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/node-nodeService/node.xml
new file mode 100644
index 0000000000..5d8620498a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-jvm-hazelcast/src/test/resources/domain-domain1/node-nodeService/node.xml
@@ -0,0 +1,39 @@
+<?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.
+-->
+<node xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ uri="http://sample/nodes/TestNode2"
+ domain="default"
+ domainRegistry="tuscany:default?listen=127.0.0.1:14820">
+
+ <!-- Configure the base URIs for a given binding -->
+ <!-- Each base URI is for a protocol supported by the binding -->
+ <binding name="sca:binding.sca" baseURIs="http://localhost:8081/sca https://localhost:8081/sca"/>
+ <binding name="sca:binding.ws" baseURIs="http://localhost:8082/ws https://localhost:8082/ws"/>
+
+ <!-- Configure a list of contributions -->
+ <contribution uri="iface" location="../helloworld-iface-contribution.jar"/>
+ <contribution uri="service" location="../helloworld-service-contribution.jar">
+ <!-- doesn't pick up the deployable composite properly without this?-->
+ <deploymentComposite location="helloworld-service.composite"/>
+ </contribution>
+
+</node> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/pom.xml
new file mode 100644
index 0000000000..02a0b19533
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/pom.xml
@@ -0,0 +1,59 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-two-nodes-test</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes Two Nodes Test</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-client-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java
new file mode 100644
index 0000000000..6da4c1f7e1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java
@@ -0,0 +1,93 @@
+/*
+ * 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 itest;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import itest.nodes.Helloworld;
+
+import java.io.File;
+import java.net.URI;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.configuration.NodeConfiguration;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.oasisopen.sca.client.SCAClientFactory;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class ClientNode {
+ private final static String SCA11_NS = "http://docs.oasis-open.org/ns/opencsa/sca/200912";
+ private static Node clientNode;
+ private static TestCaseRunner runner;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ runner = new TestCaseRunner(ServiceNode.class);
+ runner.beforeClass();
+ System.setProperty("org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint.enabled",
+ "false");
+ NodeFactory factory = NodeFactory.newInstance();
+ NodeConfiguration conf =
+ factory.createNodeConfiguration().setURI("clientNode").
+ addBinding(new QName(SCA11_NS, "binding.sca"), "http://localhost:8085/sca https://localhost:9085/sca")
+ .addBinding(new QName(SCA11_NS, "binding.ws"), "http://localhost:8086/ws")
+ .addContribution("client", new File("../helloworld-client/target/classes").toURI().toString());
+ clientNode = factory.createNode(conf).start();
+ Thread.sleep(1000);
+ }
+
+ @Test
+ public void testCalculator() throws Exception {
+
+ Helloworld client = clientNode.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+ }
+
+ @Test
+ @Ignore("SCAClient needs to leverage the EndpointRegistry to invoke services that are not hosted on the local node")
+ public void testCalculatorClientAPI() throws Exception {
+ Helloworld service = SCAClientFactory.newInstance(URI.create("default")).getService(Helloworld.class, "HelloworldService");
+ assertNotNull(service);
+ assertEquals("Hello Petra", service.sayHello("Petra"));
+
+ Helloworld client = SCAClientFactory.newInstance(URI.create("default")).getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (clientNode != null) {
+ clientNode.stop();
+ }
+ if (runner != null) {
+ runner.afterClass();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/ServiceNode.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/ServiceNode.java
new file mode 100644
index 0000000000..4b034d89e0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/ServiceNode.java
@@ -0,0 +1,58 @@
+/*
+ * 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 itest;
+
+import java.io.File;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.configuration.NodeConfiguration;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class ServiceNode {
+ private final static String SCA11_NS = "http://docs.oasis-open.org/ns/opencsa/sca/200912";
+ private static Node serviceNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ System.setProperty("org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint.enabled",
+ "false");
+ NodeFactory factory = NodeFactory.newInstance();
+ NodeConfiguration conf =
+ factory.createNodeConfiguration().setURI("serviceNode")
+ .addBinding(new QName(SCA11_NS, "binding.sca"), "http://localhost:8087/sca")
+ .addBinding(new QName(SCA11_NS, "binding.ws"), "http://localhost:8088/ws")
+ .addContribution("service", new File("../helloworld-service/target/classes").toURI().toString());
+ serviceNode = factory.createNode(conf).start();
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (serviceNode != null) {
+ serviceNode.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/StopStartNodesTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/StopStartNodesTestCase.java
new file mode 100644
index 0000000000..998492734b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/StopStartNodesTestCase.java
@@ -0,0 +1,103 @@
+/*
+ * 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 itest;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+import itest.nodes.Helloworld;
+
+import java.io.File;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.Test;
+
+/**
+ * Tests using two nodes and stopping and restarting a service node.
+ */
+public class StopStartNodesTestCase {
+
+ private static Node serviceNode;
+ private static Node clientNode;
+
+ @Test
+ public void testCalculator() throws Exception {
+ NodeFactory factory = NodeFactory.newInstance();
+ serviceNode = factory.createNode(new Contribution("service", getJar("../helloworld-service/target")));
+ serviceNode.start();
+ clientNode = factory.createNode(new Contribution("client", getJar("../helloworld-client/target")));
+ clientNode.start();
+
+ Helloworld service = serviceNode.getService(Helloworld.class, "HelloworldService");
+ assertNotNull(service);
+ assertEquals("Hello Petra", service.sayHello("Petra"));
+
+ Helloworld client = clientNode.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+
+ serviceNode.stop();
+
+ client = clientNode.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+
+ try {
+ client.sayHello("Petra");
+ fail();
+ } catch (Exception e) {
+ // expected
+ // TODO: better exception than NPE
+ }
+
+ serviceNode = factory.createNode(new Contribution("service", getJar("../helloworld-service/target")));
+ serviceNode.start();
+
+ client = clientNode.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+ }
+
+ /**
+ * Get the jar in the target folder without being dependent on the version name to
+ * make tuscany releases easier
+ */
+ private static String getJar(String targetDirectory) {
+ File f = new File(targetDirectory);
+ for (File file : f.listFiles()) {
+ if (file.getName().endsWith(".jar")) {
+ return file.toURI().toString();
+ }
+ }
+ throw new IllegalStateException("Can't find jar in: " + targetDirectory);
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (serviceNode != null) {
+ serviceNode.stop();
+ }
+ if (clientNode != null) {
+ clientNode.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/TestCaseRunner.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/TestCaseRunner.java
new file mode 100644
index 0000000000..7dfa6e66cc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/TestCaseRunner.java
@@ -0,0 +1,292 @@
+/*
+ * 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 itest;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ * A helper class that can be used to run an SCA JUnit test case. The test case will run in an isolated class loader.
+ *
+ * @version $Rev$ $Date$
+ */
+public class TestCaseRunner {
+
+ private ClassLoader classLoader;
+ private Class<?> testSuiteClass;
+ private Object testSuite;
+ private Class<?> testResultClass;
+ private Class<?> testCaseClass;
+ private Object testCase;
+
+ private Class<?> beforeAnnotation;
+ private Class<?> beforeClassAnnotation;
+ private Class<?> afterAnnotation;
+ private Class<?> afterClassAnnotation;
+ private Class<?> junit4AdapterClass;
+ private Class<?> junit3TestCaseClass;
+
+ /**
+ * Constructs a new TestCase runner.
+ *
+ * @param testClass
+ */
+ public TestCaseRunner(Class<?> testClass) {
+ try {
+ ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+ classLoader = testClass.getClassLoader();
+ if (classLoader instanceof URLClassLoader) {
+ URL[] urls = ((URLClassLoader)classLoader).getURLs();
+ classLoader = new URLClassLoader(urls, classLoader.getParent());
+ } else if (classLoader == tccl || classLoader.getParent() == tccl) {
+ classLoader = new URLClassLoader(new URL[0], classLoader);
+ } else {
+ classLoader = tccl;
+ }
+
+ try {
+ // Thread.currentThread().setContextClassLoader(classLoader);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finalClassLoader = classLoader;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finalClassLoader);
+ return null;
+ }
+ });
+
+ testCaseClass = Class.forName(testClass.getName(), true, classLoader);
+ testCase = testCaseClass.newInstance();
+ ClassLoader testClassLoader = testCaseClass.getClassLoader();
+
+ junit3TestCaseClass = Class.forName("junit.framework.TestCase", true, testClassLoader);
+
+ testSuiteClass = Class.forName("junit.framework.TestSuite", true, testClassLoader);
+ Constructor<?> testSuiteConstructor = testSuiteClass.getConstructor(Class.class);
+ testSuite = testSuiteConstructor.newInstance(testCaseClass);
+
+ testResultClass = Class.forName("junit.framework.TestResult", true, testClassLoader);
+
+ try {
+ beforeAnnotation = Class.forName("org.junit.Before", true, testClassLoader);
+ afterAnnotation = Class.forName("org.junit.After", true, testClassLoader);
+ beforeClassAnnotation = Class.forName("org.junit.BeforeClass", true, testClassLoader);
+ afterClassAnnotation = Class.forName("org.junit.AfterClass", true, testClassLoader);
+ junit4AdapterClass = Class.forName("junit.framework.JUnit4TestAdapter", true, testClassLoader);
+ } catch (Exception e) {
+ // Unexpected
+ throw new AssertionError(e);
+ }
+ } catch (Throwable e) {
+ e.printStackTrace();
+ } finally {
+ // Thread.currentThread().setContextClassLoader(tccl);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finaltccl = tccl;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finaltccl);
+ return null;
+ }
+ });
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Run the test case
+ */
+ public void run() {
+ ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+ try {
+ // Thread.currentThread().setContextClassLoader(classLoader);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finalClassLoader = classLoader;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finalClassLoader);
+ return null;
+ }
+ });
+
+ if (junit3TestCaseClass.isAssignableFrom(testCaseClass)) {
+ Object testResult = testResultClass.newInstance();
+ Method runMethod = testSuiteClass.getMethod("run", testResultClass);
+ runMethod.invoke(testSuite, testResult);
+ } else {
+ Object junit4Adapter = junit4AdapterClass.getConstructor(Class.class).newInstance(testCaseClass);
+ Object testResult = testResultClass.newInstance();
+ Method runMethod = junit4AdapterClass.getMethod("run", testResultClass);
+ runMethod.invoke(junit4Adapter, testResult);
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ } finally {
+ // Thread.currentThread().setContextClassLoader(tccl);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finaltccl = tccl;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finaltccl);
+ return null;
+ }
+ });
+ }
+ }
+
+ /**
+ * Invoke the setUp method
+ */
+ public void setUp() {
+ execute("setUp");
+ }
+
+ /**
+ * Invoke the before methods
+ */
+ public void before() {
+ execute(beforeAnnotation);
+ }
+
+ /**
+ * Invoke the beforeClass methods
+ */
+ public void beforeClass() {
+ execute(beforeClassAnnotation);
+ }
+
+ /**
+ * Invoke the tearDown method
+ */
+ public void tearDown() {
+ execute("tearDown");
+ }
+
+ /**
+ * Invoke the after methods
+ */
+ public void after() {
+ execute(afterAnnotation);
+ }
+
+ /**
+ * Invoke the afterClass methods
+ */
+ public void afterClass() {
+ execute(afterClassAnnotation);
+ }
+
+ /**
+ * Invoke the specified test method.
+ */
+ public void run(String methodName) {
+ execute(methodName);
+ }
+
+ /**
+ * Invoke the methods annotated with the specified annotation.
+ */
+ private void execute(Class<?> annotationClass) {
+ if (annotationClass == null) {
+ throw new RuntimeException(new NoSuchMethodException());
+ }
+ ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+ try {
+ // Thread.currentThread().setContextClassLoader(classLoader);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finalClassLoader = classLoader;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finalClassLoader);
+ return null;
+ }
+ });
+
+ for (Method method : testCaseClass.getDeclaredMethods()) {
+ for (Annotation annotation : method.getAnnotations()) {
+ if (annotation.annotationType() == annotationClass) {
+ method.invoke(testCase);
+ }
+ }
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ } finally {
+ // Thread.currentThread().setContextClassLoader(tccl);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finaltccl = tccl;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finaltccl);
+ return null;
+ }
+ });
+ }
+ }
+
+ /**
+ * Invoke the specified method
+ */
+ private void execute(String methodName) {
+ ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+ try {
+ // Thread.currentThread().setContextClassLoader(classLoader);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finalClassLoader = classLoader;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finalClassLoader);
+ return null;
+ }
+ });
+ Method setUpMethod = testCaseClass.getDeclaredMethod(methodName);
+ setUpMethod.setAccessible(true);
+ setUpMethod.invoke(testCase);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ } finally {
+ // Thread.currentThread().setContextClassLoader(tccl);
+ // Allow privileged access to set class loader. Requires RuntimePermission
+ // setContextClassLoader in security policy.
+ final ClassLoader finaltccl = tccl;
+ AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ public Object run() {
+ Thread.currentThread().setContextClassLoader(finaltccl);
+ return null;
+ }
+ });
+ }
+ }
+
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java
new file mode 100644
index 0000000000..80c36e5ee9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java
@@ -0,0 +1,106 @@
+/*
+ * 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 itest;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import itest.nodes.Helloworld;
+
+import java.io.File;
+import java.net.URI;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.configuration.NodeConfiguration;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.oasisopen.sca.client.SCAClientFactory;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class TwoNodesTestCase {
+
+ private static Node serviceNode;
+ private static Node clientNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ System.setProperty("org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint.enabled",
+ "false");
+ NodeFactory factory = NodeFactory.getInstance();
+ NodeConfiguration configuration1 =
+ factory.createNodeConfiguration().setURI("serviceNode")
+ .addContribution("service", getJar("../helloworld-service/target"));
+ serviceNode = factory.createNode(configuration1).start();
+
+ NodeConfiguration configuration2 =
+ factory.createNodeConfiguration().setURI("clientNode")
+ .addContribution("client", getJar("../helloworld-client/target"));
+ clientNode = factory.createNode(configuration2).start();
+ }
+
+ /**
+ * Get the jar in the target folder without being dependent on the version name to
+ * make tuscany releases easier
+ */
+ private static String getJar(String targetDirectory) {
+ File f = new File(targetDirectory);
+ for (File file : f.listFiles()) {
+ if (file.getName().endsWith(".jar")) {
+ return file.toURI().toString();
+ }
+ }
+ throw new IllegalStateException("Can't find jar in: " + targetDirectory);
+ }
+
+ @Test
+ public void testCalculator() throws Exception {
+ Helloworld service = serviceNode.getService(Helloworld.class, "HelloworldService");
+ assertNotNull(service);
+ assertEquals("Hello Petra", service.sayHello("Petra"));
+
+ Helloworld client = clientNode.getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+ }
+
+ @Test
+ public void testCalculatorClientAPI() throws Exception {
+ Helloworld service = SCAClientFactory.newInstance(URI.create("default")).getService(Helloworld.class, "HelloworldService");
+ assertNotNull(service);
+ assertEquals("Hello Petra", service.sayHello("Petra"));
+
+ Helloworld client = SCAClientFactory.newInstance(URI.create("default")).getService(Helloworld.class, "HelloworldClient");
+ assertNotNull(client);
+ assertEquals("Hi Hello Petra", client.sayHello("Petra"));
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (serviceNode != null) {
+ serviceNode.stop();
+ }
+ if (clientNode != null) {
+ clientNode.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/build.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/build.xml
new file mode 100644
index 0000000000..fa7e963e87
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/build.xml
@@ -0,0 +1,38 @@
+<!--
+ * 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 name="itest-samples" default="run">
+
+ <target name="run">
+
+ <parallel failonany="true">
+
+ <daemons>
+ <ant antfile="server.xml"/>
+ </daemons>
+
+ <sequential>
+ <sleep seconds="10"/>
+ <ant antfile="client.xml"/>
+ </sequential>
+
+ </parallel>
+
+ </target>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/client-config.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/client-config.xml
new file mode 100644
index 0000000000..3800a5e338
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/client-config.xml
@@ -0,0 +1,39 @@
+<?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.
+-->
+<node xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ uri="http://sample/nodes/TestNode1"
+ domainRegistry = "tribes://228.0.0.100:50000"
+ domain="http://domain1">
+
+ <!-- Configure the base URIs for a given binding -->
+ <!-- Each base URI is for a protocol supported by the binding -->
+ <binding name="sca:binding.sca" baseURIs="http://localhost:8081/sca https://localhost:8081/sca"/>
+ <binding name="sca:binding.ws" baseURIs="http://localhost:8082/ws https://localhost:8082/ws"/>
+
+ <!-- Configure a list of contributions -->
+ <contribution uri="iface" location="../helloworld-iface/target/itest-nodes-helloworld-iface-2.0.jar"/>
+ <contribution uri="client" location="../helloworld-client/target/itest-nodes-helloworld-client-2.0.jar">
+ <!-- doesn't pick up the deployable composite properly without this?-->
+ <deploymentComposite location="helloworld-client.composite"/>
+ </contribution>
+
+</node>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/client.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/client.xml
new file mode 100644
index 0000000000..8e7c744940
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/client.xml
@@ -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.
+-->
+<project name="server" default="run">
+
+ <!--echo>${runtime_classpath}</echo-->
+
+ <target name="run">
+ <java classpath="${runtime_classpath};./target/test-classes"
+ classname="itest.Client"
+ fork="true"
+ failonerror="true">
+ </java>
+ </target>
+
+</project> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/pom.xml
new file mode 100644
index 0000000000..bad670d99e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/pom.xml
@@ -0,0 +1,104 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-nodes-two-nodes-two-vms-test</artifactId>
+ <name>Apache Tuscany SCA iTest Nodes Two Nodes Two VMs Test</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-domain-node</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-endpoint-tribes</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-nodes-helloworld-iface</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-launcher</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-client-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-rmi-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-jetty</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>run-samples</id>
+ <phase>test</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks unless="maven.test.skip">
+ <property name="tuscany.version" value="${project.version}" />
+ <property name="runtime_classpath" refid="maven.runtime.classpath"/>
+ <ant antfile="./build.xml" target="run"/>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/server-config.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/server-config.xml
new file mode 100644
index 0000000000..590cf3bddb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/server-config.xml
@@ -0,0 +1,39 @@
+<?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.
+-->
+<node xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ uri="http://sample/nodes/TestNode2"
+ domainRegistry = "tribes://228.0.0.100:50000"
+ domain="http://domain1">
+
+ <!-- Configure the base URIs for a given binding -->
+ <!-- Each base URI is for a protocol supported by the binding -->
+ <binding name="sca:binding.sca" baseURIs="http://localhost:8081/sca https://localhost:8081/sca"/>
+ <binding name="sca:binding.ws" baseURIs="http://localhost:8082/ws https://localhost:8082/ws"/>
+
+ <!-- Configure a list of contributions -->
+ <contribution uri="iface" location="../helloworld-iface/target/classes"/>
+ <contribution uri="service" location="../helloworld-service/target/classes">
+ <!-- doesn't pick up the deployable composite properly without this?-->
+ <deploymentComposite location="helloworld-service.composite"/>
+ </contribution>
+
+</node> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/server.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/server.xml
new file mode 100644
index 0000000000..05a5aa16e9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/server.xml
@@ -0,0 +1,33 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<project name="server" default="run">
+
+ <!--echo>${runtime_classpath}</echo-->
+
+ <target name="run">
+ <java classpath="${runtime_classpath}" classname="org.apache.tuscany.sca.node.launcher.NodeMain" fork="true">
+ <sysproperty key="org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding" value="{http://tuscany.apache.org/xmlns/sca/1.1}binding.rmi"/>
+ <arg value="-node"/>
+ <arg value="./server-config.xml"/>
+ <arg value="-ttl"/>
+ <arg value="15000"/>
+ </java>
+ </target>
+
+</project> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Client.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Client.java
new file mode 100644
index 0000000000..eef3362c10
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Client.java
@@ -0,0 +1,69 @@
+/*
+ * 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 itest;
+
+import java.io.File;
+
+import org.apache.tuscany.sca.binding.rmi.RMIBinding;
+import org.apache.tuscany.sca.domain.node.DomainNode;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class Client {
+
+ private static Node clientNode;
+// private static DomainNode clientNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ NodeFactory factory = NodeFactory.newInstance();
+
+ clientNode = factory.createNode(new File("client-config.xml").toURI().toURL());
+
+ try {
+ clientNode.start();
+ } catch (Exception ex){
+ ex.printStackTrace();
+ throw ex;
+ }
+
+// clientNode = new DomainNode("tribes:default", new String []{"../helloworld-client/target/itest-nodes-helloworld-client-2.0-SNAPSHOT.jar"});
+ }
+
+ @Test
+ public void testNothing() throws Exception {
+
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (clientNode != null) {
+ clientNode.stop();
+ }
+ }
+
+ public static void main(String[] args) throws Exception {
+ Client.setUpBeforeClass();
+ Client.tearDownAfterClass();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Service.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Service.java
new file mode 100644
index 0000000000..7323c2c122
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/nodes/two-nodes-two-vms-test/src/test/java/itest/Service.java
@@ -0,0 +1,61 @@
+/*
+ * 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 itest;
+
+import java.io.File;
+
+import org.apache.tuscany.sca.binding.rmi.RMIBinding;
+import org.apache.tuscany.sca.domain.node.DomainNode;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class Service {
+
+ private static Node serviceNode;
+// private static DomainNode serviceNode;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ NodeFactory factory = NodeFactory.newInstance();
+
+ serviceNode = factory.createNode(new File("server-config.xml").toURI().toURL());
+ serviceNode.start();
+
+// serviceNode = new DomainNode("tribes:default", new String[]{"../helloworld-service/target/classes"});
+
+ }
+
+ @Test
+ public void testNothing() throws Exception {
+ synchronized (this) {
+ this.wait();
+ }
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ if (serviceNode != null) {
+ serviceNode.stop();
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/build.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/build.xml
new file mode 100644
index 0000000000..d3834c0696
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/build.xml
@@ -0,0 +1,127 @@
+<!--
+ * 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 name="oneway" default="runServer">
+
+ <property name="m2.repo" value="${user.home}\.m2\repository" />
+
+ <path id="repo.classpath">
+ <pathelement location="target/classes"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-core-spi\2.0\tuscany-core-spi-2.0.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-host-http\2.0\tuscany-host-http-2.0.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-ws-axis2\2.0\tuscany-binding-ws-axis2-2.0.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-policy\2.0\tuscany-policy-2.0.jar"/>
+ <pathelement location="${m2.repo}\xerces\xercesImpl\2.8.1\xercesImpl-2.8.1.jar"/>
+ <pathelement location="${m2.repo}\org\mortbay\jetty\jetty-util\6.1.3\jetty-util-6.1.3.jar"/>
+ <pathelement location="${m2.repo}\org\apache\geronimo\specs\geronimo-jms_1.1_spec\1.1\geronimo-jms_1.1_spec-1.1.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-implementation-java-runtime\2.0\tuscany-implementation-java-runtime-2.0.jar"/>
+ <pathelement location="${m2.repo}\wsdl4j\wsdl4j\1.6.2\wsdl4j-1.6.2.jar"/>
+ <pathelement location="${m2.repo}\commons-codec\commons-codec\1.3\commons-codec-1.3.jar"/>
+ <pathelement location="${m2.repo}\xml-apis\xml-apis\1.3.03\xml-apis-1.3.03.jar"/>
+ <pathelement location="${m2.repo}\org\apache\ws\security\wss4j\1.5.3\wss4j-1.5.3.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-contribution-namespace\2.0\tuscany-contribution-namespace-2.0.jar"/>
+ <pathelement location="${m2.repo}\jdom\jdom\1.0\jdom-1.0.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-assembly-xsd\2.0\tuscany-assembly-xsd-2.0.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-assembly\2.0\tuscany-assembly-2.0.jar"/>
+ <pathelement location="${m2.repo}\org\apache\rampart\rampart-trust\1.3\rampart-trust-1.3.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-core-databinding\2.0\tuscany-core-databinding-2.0.jar"/>
+ <pathelement location="${m2.repo}\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar"/>
+ <pathelement location="${m2.repo}\org\apache\ws\commons\axiom\axiom-api\1.2.5\axiom-api-1.2.5.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-policy-xml\2.0\tuscany-policy-xml-2.0.jar"/>
+ <pathelement location="${m2.repo}\org\apache\axis2\axis2-kernel\1.3\axis2-kernel-1.3.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-sca-api\2.0\tuscany-sca-api-2.0.jar"/>
+ <pathelement location="${m2.repo}\cglib\cglib-nodep\2.1_3\cglib-nodep-2.1_3.jar"/>
+ <pathelement location="${m2.repo}\org\apache\httpcomponents\httpcore\4.0-alpha5\httpcore-4.0-alpha5.jar"/>
+ <pathelement location="${m2.repo}\backport-util-concurrent\backport-util-concurrent\2.2\backport-util-concurrent-2.2.jar"/>
+ <pathelement location="${m2.repo}\commons-logging\commons-logging\1.1\commons-logging-1.1.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-contribution-java\2.0\tuscany-contribution-java-2.0.jar"/>
+ <pathelement location="${m2.repo}\org\apache\geronimo\specs\geronimo-activation_1.1_spec\1.0-M1\geronimo-activation_1.1_spec-1.0-M1.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-databinding\2.0\tuscany-databinding-2.0.jar"/>
+ <pathelement location="${m2.repo}\logkit\logkit\1.0.1\logkit-1.0.1.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-ws-xml\2.0\tuscany-binding-ws-xml-2.0.jar"/>
+ <pathelement location="${m2.repo}\commons-fileupload\commons-fileupload\1.1.1\commons-fileupload-1.1.1.jar"/>
+ <pathelement location="${m2.repo}\annogen\annogen\0.1.0\annogen-0.1.0.jar"/>
+ <pathelement location="${m2.repo}\javax\servlet\servlet-api\2.5\servlet-api-2.5.jar"/>
+ <pathelement location="${m2.repo}\org\apache\axis2\axis2-adb\1.3\axis2-adb-1.3.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-policy-security\2.0\tuscany-policy-security-2.0.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-assembly-xml\2.0\tuscany-assembly-xml-2.0.jar"/>
+ <pathelement location="${m2.repo}\org\apache\axis2\axis2-mtompolicy\1.3\axis2-mtompolicy-1.3.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-domain\2.0\tuscany-domain-2.0.jar"/>
+ <pathelement location="${m2.repo}\commons-httpclient\commons-httpclient\3.0.1\commons-httpclient-3.0.1.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-interface-java\2.0\tuscany-interface-java-2.0.jar"/>
+ <pathelement location="${m2.repo}\org\apache\axis2\axis2-java2wsdl\1.3\axis2-java2wsdl-1.3.jar"/>
+ <pathelement location="${m2.repo}\org\apache\httpcomponents\httpcore-nio\4.0-alpha5\httpcore-nio-4.0-alpha5.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-contribution\2.0\tuscany-contribution-2.0.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-implementation-java\2.0\tuscany-implementation-java-2.0.jar"/>
+ <pathelement location="${m2.repo}\xalan\xalan\2.7.0\xalan-2.7.0.jar"/>
+ <pathelement location="${m2.repo}\com\ibm\icu\icu4j\2.6.1\icu4j-2.6.1.jar"/>
+ <pathelement location="${m2.repo}\org\apache\rampart\rampart-core\1.3\rampart-core-1.3.jar"/>
+ <pathelement location="${m2.repo}\org\apache\geronimo\specs\geronimo-commonj_1.1_spec\1.0\geronimo-commonj_1.1_spec-1.0.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-domain-api\2.0\tuscany-domain-api-2.0.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-sca\2.0\tuscany-binding-sca-2.0.jar"/>
+ <pathelement location="${m2.repo}\xom\xom\1.0\xom-1.0.jar"/>
+ <pathelement location="${m2.repo}\org\apache\ant\ant-launcher\1.7.0\ant-launcher-1.7.0.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-host-jetty\2.0\tuscany-host-jetty-2.0.jar"/>
+ <pathelement location="${m2.repo}\org\apache\rampart\rampart-policy\1.3\rampart-policy-1.3.jar"/>
+ <pathelement location="${m2.repo}\org\apache\httpcomponents\httpcore-niossl\4.0-alpha5\httpcore-niossl-4.0-alpha5.jar"/>
+ <pathelement location="${m2.repo}\junit\junit\4.2\junit-4.2.jar"/>
+ <pathelement location="${m2.repo}\org\apache\ws\commons\axiom\axiom-impl\1.2.5\axiom-impl-1.2.5.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-implementation-java-xml\2.0\tuscany-implementation-java-xml-2.0.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-sca-xml\2.0\tuscany-binding-sca-xml-2.0.jar"/>
+ <pathelement location="${m2.repo}\org\apache\neethi\neethi\2.0.2\neethi-2.0.2.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-interface-wsdl\2.0\tuscany-interface-wsdl-2.0.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-binding-ws\2.0\tuscany-binding-ws-2.0.jar"/>
+ <pathelement location="${m2.repo}\javax\activation\activation\1.1\activation-1.1.jar"/>
+ <pathelement location="${m2.repo}\org\apache\ant\ant\1.7.0\ant-1.7.0.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-databinding-axiom\2.0\tuscany-databinding-axiom-2.0.jar"/>
+ <pathelement location="${m2.repo}\org\mortbay\jetty\jetty\6.1.3\jetty-6.1.3.jar"/>
+ <pathelement location="${m2.repo}\org\apache\geronimo\specs\geronimo-javamail_1.4_spec\1.0-M1\geronimo-javamail_1.4_spec-1.0-M1.jar"/>
+ <pathelement location="${m2.repo}\avalon-framework\avalon-framework\4.1.3\avalon-framework-4.1.3.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-core\2.0\tuscany-core-2.0.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-interface-wsdl-xml\2.0\tuscany-interface-wsdl-xml-2.0.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-contribution-impl\2.0\tuscany-contribution-impl-2.0.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-node\2.0\tuscany-node-2.0.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-definitions\2.0\tuscany-definitions-2.0.jar"/>
+ <pathelement location="${m2.repo}\org\apache\santuario\xmlsec\1.4.0\xmlsec-1.4.0.jar"/>
+ <pathelement location="${m2.repo}\jaxen\jaxen\1.1.1\jaxen-1.1.1.jar"/>
+ <pathelement location="${m2.repo}\commons-io\commons-io\1.2\commons-io-1.2.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-host-embedded\2.0\tuscany-host-embedded-2.0.jar"/>
+ <pathelement location="${m2.repo}\org\apache\ws\commons\axiom\axiom-dom\1.2.5\axiom-dom-1.2.5.jar"/>
+ <pathelement location="${m2.repo}\log4j\log4j\1.2.12\log4j-1.2.12.jar"/>
+ <pathelement location="${m2.repo}\javax\mail\mail\1.4\mail-1.4.jar"/>
+ <pathelement location="${m2.repo}\org\apache\axis2\axis2-codegen\1.3\axis2-codegen-1.3.jar"/>
+ <pathelement location="${m2.repo}\org\codehaus\woodstox\wstx-asl\3.2.1\wstx-asl-3.2.1.jar"/>
+ <pathelement location="${m2.repo}\stax\stax-api\1.0.1\stax-api-1.0.1.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-interface-java-xml\2.0\tuscany-interface-java-xml-2.0.jar"/>
+ <pathelement location="${m2.repo}\org\apache\ws\commons\schema\XmlSchema\1.3.2\XmlSchema-1.3.2.jar"/>
+ <pathelement location="${m2.repo}\xerces\xmlParserAPIs\2.6.2\xmlParserAPIs-2.6.2.jar"/>
+ <pathelement location="${m2.repo}\org\apache\woden\woden\1.0-incubating-M7b\woden-1.0-incubating-M7b.jar"/>
+ <pathelement location="${m2.repo}\org\apache\tuscany\sca\tuscany-interface\2.0\tuscany-interface-2.0.jar"/>
+ <pathelement location="${m2.repo}\org\easymock\easymock\2.2\easymock-2.2.jar"/>
+ </path>
+
+ <target name="runServer">
+ <java classname="org.apache.tuscany.sca.itest.oneway.impl.OneWayServer"
+ fork="true">
+ <classpath>
+ <path refid="repo.classpath"/>
+ </classpath>
+ </java>
+ </target>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/pom.xml
new file mode 100644
index 0000000000..092a0c9502
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/pom.xml
@@ -0,0 +1,52 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-oneway</artifactId>
+ <name>Apache Tuscany SCA iTest OneWay</name>
+ <version>2.0.1</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</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/tags/2.0.1-RC1/testing/itest/oneway/src/main/java/org/apache/tuscany/sca/itest/oneway/OneWayClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/src/main/java/org/apache/tuscany/sca/itest/oneway/OneWayClient.java
new file mode 100644
index 0000000000..ecd239d5fb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/src/main/java/org/apache/tuscany/sca/itest/oneway/OneWayClient.java
@@ -0,0 +1,40 @@
+/*
+ * 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.itest.oneway;
+
+/**
+ * The client for the oneway itest.
+ *
+ * @version $Rev$ $Date$
+ */
+public interface OneWayClient {
+
+ /**
+ * This method will invoke the doSomething() @OneWay method on the OneWayService
+ * the specified number of times.
+ *
+ * @param count The number of times to invoke doSomething() on the OneWayService
+ */
+ void doSomething(int count);
+
+ /**
+ * This method will invoke a @OneWay method that throws an exception.
+ */
+ void doSomethingWhichThrowsException();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/src/main/java/org/apache/tuscany/sca/itest/oneway/OneWayService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/src/main/java/org/apache/tuscany/sca/itest/oneway/OneWayService.java
new file mode 100644
index 0000000000..ba74b67d31
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/src/main/java/org/apache/tuscany/sca/itest/oneway/OneWayService.java
@@ -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.itest.oneway;
+
+
+import org.oasisopen.sca.annotation.OneWay;
+import org.oasisopen.sca.annotation.Remotable;
+
+
+/**
+ * The service interface used when testing @OneWay interactions.
+ *
+ * @version $Rev$ $Date$
+ */
+@Remotable
+public interface OneWayService {
+
+ /**
+ * This OneWay method will increment the callCount by 1.
+ *
+ * @param count Not used
+ */
+ @OneWay
+ void doSomething(int count);
+
+ /**
+ * This one way method will throw a NullPointerException.
+ */
+ @OneWay
+ void doSomethingWhichThrowsException();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/src/main/java/org/apache/tuscany/sca/itest/oneway/impl/OneWayClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/src/main/java/org/apache/tuscany/sca/itest/oneway/impl/OneWayClientImpl.java
new file mode 100644
index 0000000000..8ed3c3d638
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/src/main/java/org/apache/tuscany/sca/itest/oneway/impl/OneWayClientImpl.java
@@ -0,0 +1,64 @@
+/*
+ * 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.itest.oneway.impl;
+
+import org.apache.tuscany.sca.itest.oneway.OneWayClient;
+import org.apache.tuscany.sca.itest.oneway.OneWayService;
+import org.junit.Assert;
+import org.oasisopen.sca.annotation.Reference;
+
+
+/**
+ * The client for the oneway itest.
+ *
+ * @version $Rev$ $Date$
+ */
+public class OneWayClientImpl implements OneWayClient {
+ /**
+ * Injected reference to the OneWayService.
+ */
+ @Reference
+ protected OneWayService oneWayService;
+
+ /**
+ * Tracks the number of calls of the doSomething() method on the OneWayService.
+ */
+ public static int callCount = 0;
+
+ /**
+ * {@inheritDoc}
+ */
+ public void doSomething(int count) {
+ callCount = callCount + count;
+
+ for (int loopCount = 0; loopCount < count; loopCount++) {
+ //System.out.println("Client: doSomething " + loopCount);
+ //System.out.flush();
+ oneWayService.doSomething(loopCount);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void doSomethingWhichThrowsException() {
+ Assert.assertNotNull(oneWayService);
+ oneWayService.doSomethingWhichThrowsException();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/src/main/java/org/apache/tuscany/sca/itest/oneway/impl/OneWayServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/src/main/java/org/apache/tuscany/sca/itest/oneway/impl/OneWayServiceImpl.java
new file mode 100644
index 0000000000..1c36073cf1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/src/main/java/org/apache/tuscany/sca/itest/oneway/impl/OneWayServiceImpl.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.oneway.impl;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.apache.tuscany.sca.itest.oneway.OneWayService;
+
+/**
+ * The service for the oneway itest.
+ *
+ * @version $Rev$ $Date$
+ */
+
+
+public class OneWayServiceImpl implements OneWayService {
+
+ /**
+ * This is the error message that will be in the Exception thrown by
+ * the doSomethingWhichThrowsException() method.
+ */
+ public static final String EXCEPTION_MESSAGE = "Sample RuntimeException from a @OneWay method";
+
+ /**
+ * Counts the number of invocations to doSomething().
+ */
+ public static final AtomicInteger CALL_COUNT = new AtomicInteger();
+
+ /**
+ * Counts the number of invocations of the doSomethingWhichThrowsException() method.
+ */
+ public static final AtomicInteger CALL_COUNT_FOR_THROWS_EXCEPTION_METHOD = new AtomicInteger();
+
+ /**
+ * {@inheritDoc}
+ */
+ public void doSomething(int count) {
+ CALL_COUNT.incrementAndGet();
+
+ // System.out.println("Service: doSomething " + count + " callCount = " + callCount);
+ // System.out.flush();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void doSomethingWhichThrowsException() {
+ System.out.println("OneWay invoked. About to throw an Exception");
+ CALL_COUNT_FOR_THROWS_EXCEPTION_METHOD.incrementAndGet();
+ throw new NullPointerException(EXCEPTION_MESSAGE);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/src/main/resources/OneWayContribution/META-INF/sca-deployables/oneWay.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/src/main/resources/OneWayContribution/META-INF/sca-deployables/oneWay.composite
new file mode 100644
index 0000000000..b375944bbd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/src/main/resources/OneWayContribution/META-INF/sca-deployables/oneWay.composite
@@ -0,0 +1,57 @@
+<?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"
+ targetNamespace="http://oneway"
+ name="OneWayITest">
+
+ <component name="OneWayClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.oneway.impl.OneWayClientImpl"/>
+ <reference name="oneWayService" target="OneWayServiceComponent">
+ <interface.java interface="org.apache.tuscany.sca.itest.oneway.OneWayService" />
+ </reference>
+ </component>
+
+ <component name="OneWayServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.oneway.impl.OneWayServiceImpl"/>
+ <service name="OneWayService">
+ <interface.java interface="org.apache.tuscany.sca.itest.oneway.OneWayService" />
+ <binding.ws uri="http://localhost:8085/OneWayServiceComponent"/>
+ </service>
+ </component>
+
+
+ <!-- OneWay Client and Server Components that use the standard SCA Binding so we can validate -->
+ <!-- that the NonBlockingInterceptor logs an message when an Exception is thrown by the code -->
+ <!-- that is called. See TUSCANY-2225 -->
+ <component name="OneWayClientComponentSCABinding">
+ <implementation.java class="org.apache.tuscany.sca.itest.oneway.impl.OneWayClientImpl"/>
+ <reference name="oneWayService" target="OneWayServiceComponentSCABinding">
+ <interface.java interface="org.apache.tuscany.sca.itest.oneway.OneWayService" />
+ </reference>
+ </component>
+
+ <component name="OneWayServiceComponentSCABinding">
+ <implementation.java class="org.apache.tuscany.sca.itest.oneway.impl.OneWayServiceImpl"/>
+ <service name="OneWayService">
+ <interface.java interface="org.apache.tuscany.sca.itest.oneway.OneWayService" />
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/src/test/java/org/apache/tuscany/sca/itest/oneway/OneWayTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/src/test/java/org/apache/tuscany/sca/itest/oneway/OneWayTestCase.java
new file mode 100644
index 0000000000..1f771ea4ce
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/oneway/src/test/java/org/apache/tuscany/sca/itest/oneway/OneWayTestCase.java
@@ -0,0 +1,235 @@
+/*
+ * 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.itest.oneway;
+
+import java.io.File;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.logging.Handler;
+import java.util.logging.Level;
+import java.util.logging.LogRecord;
+import java.util.logging.Logger;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.core.invocation.NonBlockingInterceptor;
+import org.apache.tuscany.sca.itest.oneway.impl.OneWayClientImpl;
+import org.apache.tuscany.sca.itest.oneway.impl.OneWayServiceImpl;
+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;
+
+/**
+ * This test case will test invoking @OneWay operations.
+ *
+ * @version $Date$ $Revision$
+ */
+public class OneWayTestCase {
+ /**
+ * Maximum period of time that we are prepared to wait for all the @OneWay
+ * method calls to complete in milliseconds.
+ */
+ private static final int MAX_SLEEP_TIME = 10000;
+
+ private Node node;
+
+ /**
+ * Initialise the SCADomain.
+ *
+ * @throws Exception Failed to initialise the SCADomain
+ */
+ @Before
+ public void setUp() throws Exception {
+
+ NodeFactory factory = NodeFactory.newInstance();
+ node = factory.createNode(new File("src/main/resources/OneWayContribution/META-INF/sca-deployables/oneWay.composite").toURI().toURL().toString(),
+ new Contribution("TestContribution", new File("src/main/resources/OneWayContribution/META-INF/sca-deployables/").toURI().toURL().toString()));
+ node.start();
+
+ }
+
+ /**
+ * This method will ensure that the SCADomain is shutdown.
+ *
+ * @throws Exception Failed to shutdown the SCADomain
+ */
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+ /**
+ * This test will test repeatedly calling a @OneWay operation and ensure that the correct
+ * number of @OneWay operations are run.
+ *
+ * @throws Exception Test failed
+ */
+ @Test
+ public void testOneWay() throws Exception {
+ OneWayClient client =
+ node.getService(OneWayClient.class, "OneWayClientComponent");
+
+ int count = 100;
+
+ for (int i = 0; i < 10; i++) {
+ // System.out.println("Test: doSomething " + count);
+ // System.out.flush();
+ client.doSomething(count);
+
+ // TUSCANY-2192 - We need to sleep to allow the @OneWay method calls to complete.
+ // Note: This can take different periods depending on the speed and load
+ // on the computer where the test is being run.
+ // This loop will wait for the required number of @OneWay method calls to
+ // have taken place or MAX_SLEEP_TIME to have passed.
+ long startSleep = System.currentTimeMillis();
+ while (OneWayClientImpl.callCount != OneWayServiceImpl.CALL_COUNT.get()
+ && System.currentTimeMillis() - startSleep < MAX_SLEEP_TIME) {
+ Thread.sleep(100);
+ // System.out.println("" + OneWayClientImpl.callCount + "," + OneWayServiceImpl.callCount);
+ }
+
+ System.out.println("Finished callCount = " + OneWayServiceImpl.CALL_COUNT);
+
+ Assert.assertEquals(OneWayClientImpl.callCount, OneWayServiceImpl.CALL_COUNT.get());
+ }
+ }
+
+ /**
+ * This method will invoke a @OneWay method that throws an exception
+ * when invoked over a SCA Binding which uses the NonBlockingInterceptor and
+ * ensure that the Exception is logged.
+ * See TUSCANY-2225
+ */
+ @Test
+ public void testOneWayUsingNonBlockingInterceptorThrowsAnException() {
+ OneWayClient client =
+ node.getService(OneWayClient.class, "OneWayClientComponentSCABinding");
+
+ // We need to modify the JDK Logger for the NonBlockingInterceptor so we
+ // can check that it logs a message for the @OneWay invocation that throws
+ // an Exception
+ Logger nbiLogger = Logger.getLogger(NonBlockingInterceptor.class.getName());
+ DummyJDKHandler handler = new DummyJDKHandler();
+ nbiLogger.addHandler(handler);
+
+ // Add a message on the console to explain the stack dump that is going to be
+ // displayed and state that this is not a problem but expected behaviour
+ System.out.println();
+ System.out.println("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
+ System.out.println("IMPORTANT: The error message that appears on the console");
+ System.out.println("below is an expected error if it is a NullPointerException");
+ System.out.println(" with the message of:");
+ System.out.println(" \"" + OneWayServiceImpl.EXCEPTION_MESSAGE + "\"");
+ System.out.println("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
+ System.out.println();
+ System.out.flush();
+
+ // Invoke the @OneWay method that throws an exception
+ client.doSomethingWhichThrowsException();
+
+ // The logging is done asynchronously so we will need to wait a bit before
+ // the log message appears.
+ long start = System.currentTimeMillis();
+ boolean logged = false;
+ while (System.currentTimeMillis() - start < MAX_SLEEP_TIME && !logged) {
+ // Has the log message been logged?
+ if (handler.exceptionLogged.get()) {
+ logged = true;
+ } else {
+ try {
+ Thread.sleep(25);
+ } catch (InterruptedException ex) {
+ Assert.fail("Unexpected exception " + ex);
+ }
+ }
+ }
+
+ // Add a message explaining that errors beyond this point should be reported
+ System.out.println();
+ System.out.println("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
+ System.out.println("End of expected exceptions. Any errors beyond this point are errors!");
+ System.out.println("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
+ System.out.println();
+ System.out.flush();
+
+ // Remove the handler
+ nbiLogger.removeHandler(handler);
+
+ // Make sure that the exception was logged
+ Assert.assertTrue(handler.exceptionLogged.get());
+ }
+
+ /**
+ * A handler that is added to the JDK Logging system to examine the log messages
+ * generated to ensure that a @OneWay method that throws an Exception will
+ * generate a log message.
+ */
+ private class DummyJDKHandler extends Handler {
+
+ /**
+ * Used to track whether the exception has been logged.
+ */
+ private AtomicBoolean exceptionLogged = new AtomicBoolean(false);
+
+ /**
+ * Constructor.
+ */
+ private DummyJDKHandler() {
+ super.setLevel(Level.ALL);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void close() throws SecurityException {
+ // Nothing to do
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void flush() {
+ // Nothing to do
+ }
+
+ /**
+ * Examines the LogRecord and checks whether it matches the one we are looking for.
+ * If it matches, it will set exceptionLogged to True.
+ *
+ * @param record The Log Record that is being published
+ */
+ @Override
+ public void publish(LogRecord record) {
+ // The log message we are looking for is Severe
+ if (record.getLevel() == Level.SEVERE) {
+ if (record.getThrown() != null
+ && record.getThrown().toString().indexOf(
+ OneWayServiceImpl.EXCEPTION_MESSAGE) != -1) {
+ // We have found our Exception.
+ exceptionLogged.set(true);
+ }
+ }
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/operation-overloading/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/operation-overloading/pom.xml
new file mode 100644
index 0000000000..333f098f45
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/operation-overloading/pom.xml
@@ -0,0 +1,53 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-operation-overloading</artifactId>
+ <name>Apache Tuscany SCA iTest Operation Overloading</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-api</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>2.0.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/OverloadASourceTarget.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/OverloadASourceTarget.java
new file mode 100644
index 0000000000..1f589b44f4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/OverloadASourceTarget.java
@@ -0,0 +1,61 @@
+/*
+ * 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.test.opoverload;
+
+/**
+ * This is an Interface which has methods declared but not implemented, These methods will be implemented in
+ * OverloadATarget Class and OverloadASource This class has methods with overloaded parameters.
+ */
+
+//@AllowsPassByReference
+public interface OverloadASourceTarget {
+ String opName = "operationA:";
+
+ /**
+ * Method with no parameters
+ */
+ String operationA();
+
+ /**
+ * Method with one integer parameter
+ */
+ String operationA(int parm1);
+
+ /**
+ * Method with one integer parameter and one string parameter
+ */
+ String operationA(int parm1, String parm2);
+
+ /**
+ * Method with one one string parameter and one integer parameter
+ */
+ String operationA(String parm1, int parm2);
+
+ /**
+ * Method with one string parameter
+ */
+ String operationA(String string);
+
+ /**
+ * Method which throws an illegal argument exception in case of any exceptions.
+ */
+ String[] operationAall();
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadASource.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadASource.java
new file mode 100644
index 0000000000..a30d3611fb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadASource.java
@@ -0,0 +1,113 @@
+/*
+ * 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.test.opoverload.impl;
+
+import java.util.ArrayList;
+
+import org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class Implements the interface OverloadASourceTarget, and gives implementation for all methods which are
+ * declared in the OverloadASourceTarget interface.
+ */
+@Service(OverloadASourceTarget.class)
+public class OverloadASource implements OverloadASourceTarget {
+ public OverloadASourceTarget overloadASourceTarget;
+
+ /**
+ * This is a default constructor
+ */
+ public OverloadASource() {
+
+ }
+
+ /**
+ * @return
+ * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA()
+ */
+ public String[] operationAall() {
+ assert overloadASourceTarget != null : "reference overloadASourceTarget is null";
+ ArrayList<String> ret = new ArrayList<String>();
+ ret.add(overloadASourceTarget.operationA());
+ ret.add(overloadASourceTarget.operationA(11));
+ ret.add(overloadASourceTarget.operationA("eleven"));
+ ret.add(overloadASourceTarget.operationA(3, "three"));
+ ret.add(overloadASourceTarget.operationA("four", 4));
+ return (String[])ret.toArray(new String[ret.size()]);
+ }
+
+ /**
+ * @return
+ * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA()
+ */
+ public String operationA() {
+ assert overloadASourceTarget != null : "reference overloadASourceTarget is null";
+ return overloadASourceTarget.operationA();
+ }
+
+ /**
+ * @param parm1
+ * @return
+ * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA(int)
+ */
+ public String operationA(int parm1) {
+ assert overloadASourceTarget != null : "reference overloadASourceTarget is null";
+ return overloadASourceTarget.operationA(parm1);
+ }
+
+ /**
+ * @param parm1
+ * @param parm2
+ * @return
+ * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA(int, java.lang.String)
+ */
+ public String operationA(int parm1, String parm2) {
+ assert overloadASourceTarget != null : "reference overloadASourceTarget is null";
+ return overloadASourceTarget.operationA(parm1, parm2);
+ }
+
+ public String operationA(String string) {
+ assert overloadASourceTarget != null : "reference overloadASourceTarget is null";
+ return overloadASourceTarget.operationA(string);
+ }
+
+ /**
+ * @param parm1
+ * @param parm2
+ * @return
+ * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA(java.lang.String, int)
+ */
+ public String operationA(String parm1, int parm2) {
+ assert overloadASourceTarget != null : "reference overloadASourceTarget is null";
+ return overloadASourceTarget.operationA(parm1, parm2);
+ }
+
+ /**
+ * This method which is used by all the overloaded functions to set the source target
+ */
+ @Reference
+ public void setOverloadASourceTarget(OverloadASourceTarget overloadASourceTarget) {
+ assert overloadASourceTarget != null : "reference overloadASourceTarget is set tonull";
+ this.overloadASourceTarget = overloadASourceTarget;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATarget.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATarget.java
new file mode 100644
index 0000000000..9ec60eb78f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATarget.java
@@ -0,0 +1,99 @@
+/*
+ * 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.test.opoverload.impl;
+
+import org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class Implements the interface OverloadASourceTarget, and gives implementation for all methods which are
+ * declared in the OverloadASourceTarget interface.
+ */
+@Service(OverloadASourceTarget.class)
+public class OverloadATarget implements OverloadASourceTarget {
+
+ /**
+ * This is a default Constructor
+ */
+ public OverloadATarget() {
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA(int)
+ */
+ public String operationA(int parm1) {
+ final String ret = opName + parm1;
+ out(ret);
+ return ret;
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA(int, java.lang.String)
+ */
+ public String operationA(int parm1, String parm2) {
+ final String ret = opName + parm1 + parm2;
+ out(ret);
+ return ret;
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA()
+ */
+ public String operationA() {
+ out(opName);
+ return opName;
+
+ }
+
+ public String operationA(String parm1, int parm2) {
+ final String ret = opName + parm1 + parm2;
+ out(ret);
+ return ret;
+ }
+
+ public String operationA(String parm1) {
+ final String ret = opName + parm1;
+ out(ret);
+ return ret;
+ }
+
+ /**
+ * This method is used to print the message returned by all the overloaded functions
+ */
+ private void out(String msg) {
+
+ java.lang.System.out.println(msg);
+ }
+
+ public String[] operationAall() {
+ throw new IllegalArgumentException("not supported");
+
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/operation-overloading/src/main/resources/OperationOverload.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/operation-overloading/src/main/resources/OperationOverload.composite
new file mode 100644
index 0000000000..cbf5aa2078
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/operation-overloading/src/main/resources/OperationOverload.composite
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://foo"
+ xmlns:foo="http://foo"
+ name="OperationOverload">
+
+ <component name="OverloadASourceComponent">
+ <implementation.java class="org.apache.tuscany.sca.test.opoverload.impl.OverloadASource" />
+ <reference name="overloadASourceTarget" target="OverloadATargetComponent"/>
+ </component>
+
+ <component name="OverloadATargetComponent">
+ <implementation.java class="org.apache.tuscany.sca.test.opoverload.impl.OverloadATarget" />
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/operation-overloading/src/test/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/operation-overloading/src/test/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATestCase.java
new file mode 100644
index 0000000000..62e5c14ce2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/operation-overloading/src/test/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATestCase.java
@@ -0,0 +1,98 @@
+/*
+ * 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.test.opoverload.impl;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+public class OverloadATestCase {
+
+ private static Node node;
+ private static OverloadASourceTarget overloadA;
+
+ /**
+ * Method prefixed with 'test' is a test method where testing logic is written using various assert methods. This
+ * test verifies the values compared are same as the values retrieved from the SCA runtime.
+ */
+ @Test
+ public void testOperationAall() {
+ String[] result = overloadA.operationAall();
+ assertEquals(5, result.length);
+ assertEquals(OverloadASourceTarget.opName, result[0]);
+ assertEquals(OverloadASourceTarget.opName + 11, result[1]);
+ assertEquals(OverloadASourceTarget.opName + "eleven", result[2]);
+ assertEquals(OverloadASourceTarget.opName + 3 + "three", result[3]);
+ assertEquals(OverloadASourceTarget.opName + "four" + 4, result[4]);
+ }
+
+ @Test
+ public void testOperationAInt() {
+ String result = overloadA.operationA(29);
+ assertEquals(OverloadASourceTarget.opName + 29, result);
+ }
+
+ @Test
+ public void testOperationAString() {
+ String result = overloadA.operationA("rick:-)");
+ assertEquals(OverloadASourceTarget.opName + "rick:-)", result);
+ }
+
+ @Test
+ public void testOperationAIntString() {
+ String result = overloadA.operationA(123, "Tuscany");
+ assertEquals(OverloadASourceTarget.opName + 123 + "Tuscany", result);
+ }
+
+ @Test
+ public void testOperationStringInt() {
+ String result = overloadA.operationA("StringInt", 77);
+ assertEquals(OverloadASourceTarget.opName + "StringInt" + 77, result);
+ }
+
+ /**
+ * setUp() is a method in JUnit Frame Work which is executed before all others methods in the class extending
+ * unit.framework.TestCase. So this method is used to create a test Embedded SCA node, to start the SCA node and
+ * to get a reference to the contribution service
+ */
+
+ @BeforeClass
+ public static void setUp() throws Exception {
+ String location = ContributionLocationHelper.getContributionLocation("OperationOverload.composite");
+ node = NodeFactory.newInstance().createNode("OperationOverload.composite", new Contribution("c1", location));
+ node.start();
+ overloadA = node.getService(OverloadASourceTarget.class, "OverloadASourceComponent");
+ }
+
+ /**
+ * tearDown() is a method in JUnit Frame Work which is executed after all other methods in the class extending
+ * unit.framework.TestCase. So this method is used to close the SCA node.
+ */
+
+ @AfterClass
+ public static void tearDown() throws Exception {
+ node.stop();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/pom.xml
new file mode 100644
index 0000000000..9609c8486d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/pom.xml
@@ -0,0 +1,50 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ </parent>
+ <artifactId>itest-performance-contribution1</artifactId>
+ <name>Apache Tuscany SCA iTest Performance Contribution1</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-jetty</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/src/main/java/org/apache/tuscany/sca/test/performance/BeanA.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/src/main/java/org/apache/tuscany/sca/test/performance/BeanA.java
new file mode 100644
index 0000000000..a1c739900a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/src/main/java/org/apache/tuscany/sca/test/performance/BeanA.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.test.performance;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+public class BeanA {
+
+ private String field1;
+ private int field2;
+
+ public String getField1() {
+ return field1;
+ }
+
+ public void setField1(String field1) {
+ this.field1 = field1;
+ }
+
+ public int getField2() {
+ return field2;
+ }
+
+ public void setField2(int field2) {
+ this.field2 = field2;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/src/main/java/org/apache/tuscany/sca/test/performance/Helloworld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/src/main/java/org/apache/tuscany/sca/test/performance/Helloworld.java
new file mode 100644
index 0000000000..1186bdbe12
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/src/main/java/org/apache/tuscany/sca/test/performance/Helloworld.java
@@ -0,0 +1,28 @@
+/*
+ * 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.test.performance;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface Helloworld {
+
+ String sayHello(String name, BeanA beanA);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/src/main/java/org/apache/tuscany/sca/test/performance/impl/HelloworldClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/src/main/java/org/apache/tuscany/sca/test/performance/impl/HelloworldClientImpl.java
new file mode 100644
index 0000000000..878811b6fc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/src/main/java/org/apache/tuscany/sca/test/performance/impl/HelloworldClientImpl.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.test.performance.impl;
+
+import org.apache.tuscany.sca.test.performance.BeanA;
+import org.apache.tuscany.sca.test.performance.Helloworld;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(Helloworld.class)
+public class HelloworldClientImpl implements Helloworld {
+
+ @Reference
+ public Helloworld helloWorld;
+
+ public String sayHello(String name, BeanA beanA) {
+ return "Hello " + helloWorld.sayHello(name, beanA);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/src/main/java/org/apache/tuscany/sca/test/performance/impl/HelloworldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/src/main/java/org/apache/tuscany/sca/test/performance/impl/HelloworldServiceImpl.java
new file mode 100644
index 0000000000..ea748d0d46
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/src/main/java/org/apache/tuscany/sca/test/performance/impl/HelloworldServiceImpl.java
@@ -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.test.performance.impl;
+
+import org.apache.tuscany.sca.test.performance.BeanA;
+import org.apache.tuscany.sca.test.performance.Helloworld;
+import org.oasisopen.sca.annotation.Requires;
+
+@Requires("{http://tuscany.apache.org/xmlns/sca/1.1}logging")
+public class HelloworldServiceImpl implements Helloworld {
+
+ public String sayHello(String name, BeanA beanA) {
+ String returnStrng = "Hello " + name + " " + beanA.getField1();
+ System.out.println("At HelloworldServiceImpl - " + returnStrng);
+ return returnStrng;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/src/main/resources/LoggingMessages.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/src/main/resources/LoggingMessages.properties
new file mode 100644
index 0000000000..09c0e7565d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/src/main/resources/LoggingMessages.properties
@@ -0,0 +1,16 @@
+# 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.
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/src/main/resources/META-INF/definitions.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/src/main/resources/META-INF/definitions.xml
new file mode 100644
index 0000000000..e5ad11087b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/src/main/resources/META-INF/definitions.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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 xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
+
+ <intent name="mediation" constrains="sca:binding"/>
+
+ <policySet name="Mediation1"
+ provides="tuscany:mediation"
+ appliesTo="//sca:service"
+ attachTo="//sca:component[@name='BusinessLogicComponent']">
+ <tuscany:mediation name="mediation1.med"/>
+ </policySet>
+
+ <policySet name="Mediation2"
+ provides="tuscany:mediation"
+ appliesTo="//sca:reference"
+ attachTo="//sca:component[@name='BusinessLogicComponent']">
+ <tuscany:mediation name="mediation2.med"/>
+ </policySet>
+
+</definitions> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/src/main/resources/PerformanceTest.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/src/main/resources/PerformanceTest.composite
new file mode 100644
index 0000000000..a631baf8c5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-contribution1/src/main/resources/PerformanceTest.composite
@@ -0,0 +1,38 @@
+<?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:foo="http://foo"
+ targetNamespace="http://foo"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ name="PerformanceTest">
+
+ <component name="HelloWorldClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.test.performance.impl.HelloworldClientImpl" />
+ <reference name="helloWorld" target="HelloWorldServiceComponent" />
+ </component>
+
+ <component name="HelloWorldServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.test.performance.impl.HelloworldServiceImpl"/>
+ <service name="Helloworld">
+ <binding.ws/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-test/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-test/pom.xml
new file mode 100644
index 0000000000..3db1850c14
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-test/pom.xml
@@ -0,0 +1,57 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ </parent>
+ <artifactId>itest-performance-test</artifactId>
+ <name>Apache Tuscany SCA iTest Performance Test</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-jetty</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-policy-logging</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-test/src/main/java/org/apache/tuscany/sca/test/performance/client/BeanA.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-test/src/main/java/org/apache/tuscany/sca/test/performance/client/BeanA.java
new file mode 100644
index 0000000000..ec2a80e5ce
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-test/src/main/java/org/apache/tuscany/sca/test/performance/client/BeanA.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.test.performance.client;
+
+public class BeanA {
+
+ private String field1;
+ private int field2;
+
+ public String getField1() {
+ return field1;
+ }
+
+ public void setField1(String field1) {
+ this.field1 = field1;
+ }
+
+ public int getField2() {
+ return field2;
+ }
+
+ public void setField2(int field2) {
+ this.field2 = field2;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-test/src/main/java/org/apache/tuscany/sca/test/performance/client/Helloworld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-test/src/main/java/org/apache/tuscany/sca/test/performance/client/Helloworld.java
new file mode 100644
index 0000000000..6b5e9f2a5d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-test/src/main/java/org/apache/tuscany/sca/test/performance/client/Helloworld.java
@@ -0,0 +1,28 @@
+/*
+ * 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.test.performance.client;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface Helloworld {
+
+ String sayHello(String name, BeanA beanA);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-test/src/test/java/org/apache/tuscany/sca/test/performance/PerformanceTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-test/src/test/java/org/apache/tuscany/sca/test/performance/PerformanceTestCase.java
new file mode 100644
index 0000000000..d05ed1fd74
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/performance-test/src/test/java/org/apache/tuscany/sca/test/performance/PerformanceTestCase.java
@@ -0,0 +1,471 @@
+/*
+ * 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.test.performance;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.lang.management.ManagementFactory;
+import java.lang.management.MemoryMXBean;
+import java.lang.management.OperatingSystemMXBean;
+import java.lang.ref.WeakReference;
+
+import javax.management.MBeanServer;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+import org.apache.tuscany.sca.core.UtilityExtensionPoint;
+import org.apache.tuscany.sca.databinding.jaxb.JAXBContextHelper;
+import org.apache.tuscany.sca.impl.NodeImpl;
+import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory;
+import org.apache.tuscany.sca.interfacedef.java.impl.JavaInterfaceFactoryImpl;
+import org.apache.tuscany.sca.test.performance.client.BeanA;
+import org.apache.tuscany.sca.test.performance.client.Helloworld;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.sun.management.HotSpotDiagnosticMXBean;
+
+/*
+ * A test looking at memory and runtime performance.
+ * TODO - only a couple of memory tests to start with
+ */
+public class PerformanceTestCase {
+
+ public boolean writeHeapDump = true;
+
+ private static BufferedWriter resultsFile = null;
+
+ private TuscanyRuntime runtime;
+ private Node node;
+ private ExtensionPointRegistry extensionPointRegistry;
+ private long lastTotal = 0;
+ private long lastFree = 0;
+ private long lastUsed = 0;
+
+ @BeforeClass
+ public static void setUp() throws Exception {
+ FileWriter fileWriter = new FileWriter("out.txt");
+ resultsFile = new BufferedWriter(fileWriter);
+ }
+
+ @AfterClass
+ public static void tearDown() throws Exception {
+ resultsFile.flush();
+ resultsFile.close();
+ }
+
+ @Test
+ public void testNodeStartStop() {
+ dumpHeapStart("testInstallUninstall");
+
+ printRuntimeStats("createRuntime");
+
+ createRuntime();
+
+ callNodeStartStopRepeatedly(100);
+
+ waitForInput();
+
+ dumpHeapEnd("testInstallUninstall_postNodeStop");
+
+ printRuntimeStats("stopRuntime");
+
+ stopRuntime();
+
+ printRuntimeStats("destroyRuntime");
+
+ destroyRuntime();
+
+ printRuntimeStats("End");
+
+ dumpHeapEnd("testInstallUninstall_postStop");
+ }
+
+ @Test
+ public void testInstallUninstall() {
+ dumpHeapStart("testInstallUninstall");
+
+ printRuntimeStats("createRuntime");
+
+ createRuntime();
+
+ printRuntimeStats("createNode");
+
+ createNode();
+
+ callInstallUninstallRepeatedly(100);
+
+ dumpHeapEnd("testInstallUninstall_postUninstall");
+
+ checkCacheStatus();
+
+ printRuntimeStats("stopNode");
+
+ stopNode();
+
+ printRuntimeStats("destroyNode");
+
+ destroyNode();
+
+ printRuntimeStats("stopRuntime");
+
+ stopRuntime();
+
+ printRuntimeStats("destroyRuntime");
+
+ destroyRuntime();
+
+ printRuntimeStats("End");
+
+ dumpHeapEnd("testInstallUninstall_postStop");
+ }
+
+
+ @Test
+ public void testCall() {
+ dumpHeapStart("TestCall");
+
+ printRuntimeStats("createRuntime");
+
+ createRuntime();
+
+ printRuntimeStats("createNode");
+
+ createNode();
+
+ printRuntimeStats("installContribution");
+
+ installContribution();
+
+ printRuntimeStats("startNode");
+
+ startComposite();
+
+ printRuntimeStats("callServiceRepeatedly 10000 times");
+
+ callServiceRepeatedly(10000);
+
+ printRuntimeStats("stopCompositeAndUninstallUnused");
+
+ stopCompositeAndUninstallUnused();
+
+ //printRuntimeStats("uninstallContribution");
+
+ //uninstallContribution();
+ dumpHeapEnd("TestCall_postUninstall");
+
+ printRuntimeStats("stopNode");
+
+ stopNode();
+
+ printRuntimeStats("destroyNode");
+
+ destroyNode();
+
+ printRuntimeStats("stopRuntime");
+
+ stopRuntime();
+
+ printRuntimeStats("destroyRuntime");
+
+ destroyRuntime();
+
+ printRuntimeStats("End");
+
+ dumpHeapEnd("TestCall_postStop");
+ }
+
+ public void checkCacheStatus(){
+ UtilityExtensionPoint utilityExtensionPoint = extensionPointRegistry.getExtensionPoint(UtilityExtensionPoint.class);
+ JAXBContextHelper jaxbContextHelper = utilityExtensionPoint.getUtility(JAXBContextHelper.class);
+
+ Assert.assertEquals("JAXBContextCache > 1", 1, jaxbContextHelper.getJAXBContextCache().getCache().keySet().size());
+
+ FactoryExtensionPoint factoryExtensionPoint = extensionPointRegistry.getExtensionPoint(FactoryExtensionPoint.class);
+ JavaInterfaceFactory javaInterfaceFactory = factoryExtensionPoint.getFactory(JavaInterfaceFactory.class);
+ Assert.assertEquals("JavaInterfaceFactoryImpl.normalCache > 1", 1, ((JavaInterfaceFactoryImpl)javaInterfaceFactory).getNormalCache().keySet().size());
+
+ }
+
+ // ============================================================
+
+ public void callNodeStartStopRepeatedly(int repeatCount) {
+ for (int i =0; i < repeatCount; i++){
+ printRuntimeStats("createNode");
+
+ createNode();
+
+ callInstallUninstallRepeatedly(1);
+
+ printRuntimeStats("stopNode");
+
+ stopNode();
+
+ printRuntimeStats("destroyNode");
+
+ destroyNode();
+ }
+ }
+
+ public void callInstallUninstallRepeatedly(int repeatCount) {
+ for (int i =0; i < repeatCount; i++){
+ printRuntimeStats("install/unistall contribution");
+
+ installContribution();
+
+ startComposite();
+
+ callService();
+
+ stopCompositeAndUninstallUnused();
+
+ //uninstallContribution();
+ }
+ }
+
+ public void callServiceRepeatedly(int repeatCount) {
+ for (int i =0; i < repeatCount; i++){
+ callService();
+ }
+ }
+
+ // ============================================================
+
+ public void dumpHeapStart(String name){
+ if (writeHeapDump){
+ dumpHeap("heap_start_" + name + ".bin");
+ }
+ }
+
+ public void dumpHeapEnd(String name){
+ if (writeHeapDump){
+ dumpHeap("heap_stop_" + name + ".bin");
+
+ System.out.println("You can watch a JVM run using \n" +
+ " jconsole \n" +
+ "You can manually dump the heap using \n" +
+ " jmap -dump:file=heap_stop_" + name + ".bin 345" +
+ "Where 345 is the process id from jconsole \n" +
+ "The program dumps the heap at the start and end. You can look at them using \n" +
+ " jhat -J-Xmx512m heap_start.bin\n" +
+ " jhat -J-Xmx512m heap_stop_" + name + ".bin\n" +
+ "Then point your browser at\n" +
+ " http://localhost:7000/");
+ } else {
+ System.out.println("NO HEAP DUMPS WRITTEN");
+ }
+ }
+
+ public void createRuntime() {
+ runtime = TuscanyRuntime.newInstance();
+ }
+
+ public void createNode() {
+ node = runtime.createNode("default");
+ extensionPointRegistry = ((NodeImpl)node).getExtensionPointRegistry();
+ }
+
+ public void installContribution() {
+ try {
+ node.installContribution("performance", "../performance-contribution1/target/itest-performance-contribution1-2.0-SNAPSHOT.jar", null, null);
+ } catch (Exception ex){
+ ex.printStackTrace();
+ }
+ }
+
+ public void startComposite() {
+ try {
+ node.startComposite("performance", "PerformanceTest.composite");
+ } catch (Exception ex){
+ ex.printStackTrace();
+ }
+ }
+
+ public void stopCompositeAndUninstallUnused(){
+ try {
+ node.stopCompositeAndUninstallUnused("performance", "PerformanceTest.composite");
+ } catch (Exception ex){
+ ex.printStackTrace();
+ }
+ }
+
+ public void uninstallContribution(){
+ try {
+ node.installContribution("performance");
+ } catch (Exception ex){
+ ex.printStackTrace();
+ }
+ }
+
+ public void stopNode(){
+ node.stop();
+ }
+
+ public void destroyNode() {
+ node = null;
+ }
+
+ public void stopRuntime() {
+ runtime.stop();
+ }
+
+ public void destroyRuntime() {
+ runtime = null;
+ }
+
+ public void callService() {
+ try {
+ Helloworld helloWorldClient = node.getService(Helloworld.class, "HelloWorldClientComponent");
+
+ assertNotNull(helloWorldClient);
+
+ BeanA beanA = new BeanA();
+ beanA.setField1("Smith");
+ beanA.setField2(13);
+
+ assertEquals("Hello Hello Jane Smith", helloWorldClient.sayHello("Jane", beanA));
+ } catch (Exception ex) {
+ fail(ex.toString());
+ }
+ }
+
+ public void printRuntimeStats(String step){
+ tryToGC();
+
+ Runtime runtime = Runtime.getRuntime();
+
+ long used = runtime.totalMemory() - runtime.freeMemory();
+ long free = runtime.freeMemory();
+ long total = runtime.totalMemory();
+
+ String stats = "U " + used + "[" + (used - lastUsed ) + "] \t" +
+ "F " + free + "[" + (free - lastFree ) + "] \t" +
+ "T " + total + "[" + (total - lastTotal) + "] \t" +
+ step + "\n";
+
+ try {
+ resultsFile.write(stats);
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+
+ System.out.print(stats);
+
+ lastTotal = total;
+ lastFree = free;
+ lastUsed = used;
+ }
+
+ /**
+ * We can't rely on GC doing anything sensible
+ * but I'm just playing here to see if I can
+ * force it to GC
+ */
+ public void tryToGC(){
+
+ Runtime runtime = Runtime.getRuntime();
+
+/*
+ // force OOME
+ StringBuffer sb = new StringBuffer();
+ try {
+ while(true)
+ {
+ sb.append("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
+ }
+ } catch (OutOfMemoryError ex){
+ // we are going to GC now
+ System.out.println("OOME");
+ }
+ sb = null;
+
+
+ for (int i = 0; i < 10; i++){
+ Object obj = new Object();
+ WeakReference ref = new WeakReference<Object>(obj);
+ obj = null;
+ while(ref.get() != null) {
+ runtime.runFinalization();
+ runtime.gc();
+ try {
+ Thread.sleep(100);
+ } catch (InterruptedException e) {
+ // Do nothing
+ }
+ }
+ }
+*/
+ }
+
+ public void dumpHeap(String heapName){
+ String vendor = System.getProperty("java.vendor");
+ if (vendor.contains("Sun")){
+ dumpHeapSun(heapName);
+ }
+ }
+
+
+ public void dumpHeapSun(String heapName){
+ final MemoryMXBean memoryBean = ManagementFactory.getMemoryMXBean();
+ final OperatingSystemMXBean osBean = ManagementFactory.getOperatingSystemMXBean();
+ final MBeanServer platformBean = ManagementFactory.getPlatformMBeanServer();
+
+ HotSpotDiagnosticMXBean bean = null;
+
+ try {
+ bean = ManagementFactory.newPlatformMXBeanProxy(platformBean,
+ "com.sun.management:type=HotSpotDiagnostic",
+ HotSpotDiagnosticMXBean.class);
+ deleteFile(heapName);
+ bean.dumpHeap(heapName, false);
+ } catch(Exception ex){
+ ex.printStackTrace();
+ }
+ }
+
+ public void dumpHeapIBM(){
+
+ }
+
+ public void deleteFile(String filename){
+ File theFile = new File(filename);
+ theFile.delete();
+ }
+
+ public void waitForInput() {
+ System.out.println("Press a key to end");
+ try {
+ System.in.read();
+ } catch (Exception ex) {
+ }
+ System.out.println("Continuing");
+ }
+
+ // final MemoryMXBean mb = ManagementFactory.getMemoryMXBean();
+ // com.sun.management.OperatingSystemMXBean if java.lang.management.OperationSystemMXBean
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/pom.xml
new file mode 100644
index 0000000000..f432a5d2d7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/performance/pom.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-performance</artifactId>
+ <name>Apache Tuscany SCA iTest Performance</name>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>performance-contribution1</module>
+ <module>performance-test</module>
+ </modules>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/pom.xml
new file mode 100644
index 0000000000..6a6af16ee3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/pom.xml
@@ -0,0 +1,54 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-policies</artifactId>
+ <name>Apache Tuscany SCA iTest Policies</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-policy-logging</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <!-- TODO: this test requires woodtox as it fails with the JDK parser which
+ presumably means Tuscany doesn't work properly without woodstox -->
+ <dependency>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>wstx-asl</artifactId>
+ <version>3.2.9</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ </dependencies>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CreditCard.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CreditCard.java
new file mode 100644
index 0000000000..fd33be01d6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CreditCard.java
@@ -0,0 +1,65 @@
+/*
+ * 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.itest.policies;
+
+import java.io.Serializable;
+
+/**
+ * Credit Card
+ */
+public class CreditCard implements Serializable {
+ private static final long serialVersionUID = -6107293191546007197L;
+ private String type;
+ private String number;
+ private String owner;
+ private int expMonth;
+ private int expYear;
+
+ public String getType() {
+ return type;
+ }
+ public void setType(String type) {
+ this.type = type;
+ }
+ public String getNumber() {
+ return number;
+ }
+ public void setNumber(String number) {
+ this.number = number;
+ }
+ public String getOwner() {
+ return owner;
+ }
+ public void setOwner(String owner) {
+ this.owner = owner;
+ }
+ public int getExpMonth() {
+ return expMonth;
+ }
+ public void setExpMonth(int expMonth) {
+ this.expMonth = expMonth;
+ }
+ public int getExpYear() {
+ return expYear;
+ }
+ public void setExpYear(int expYear) {
+ this.expYear = expYear;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CreditCardPayment.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CreditCardPayment.java
new file mode 100644
index 0000000000..368179dc29
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CreditCardPayment.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.policies;
+
+import org.oasisopen.sca.annotation.Authentication;
+import org.oasisopen.sca.annotation.Confidentiality;
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ *
+ */
+@Remotable
+@Authentication
+public interface CreditCardPayment {
+ String COMPLETED = "Completed";
+ String REJECTED = "Rejected";
+
+ @Confidentiality
+ String authorize(CreditCard creditCard, float amount);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/Customer.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/Customer.java
new file mode 100644
index 0000000000..05ea341466
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/Customer.java
@@ -0,0 +1,51 @@
+/*
+ * 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.itest.policies;
+
+import java.io.Serializable;
+
+/**
+ * Customer
+ */
+public class Customer implements Serializable {
+ private static final long serialVersionUID = 680227659536711695L;
+ private String id;
+ private String name;
+ private CreditCard creditCard;
+
+ public String getId() {
+ return id;
+ }
+ public void setId(String id) {
+ this.id = id;
+ }
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public CreditCard getCreditCard() {
+ return creditCard;
+ }
+ public void setCreditCard(CreditCard creditCard) {
+ this.creditCard = creditCard;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CustomerRegistry.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CustomerRegistry.java
new file mode 100644
index 0000000000..c9f50d08ee
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/CustomerRegistry.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.policies;
+
+/**
+ *
+ */
+public interface CustomerRegistry {
+ Customer find(String id);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/Payment.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/Payment.java
new file mode 100644
index 0000000000..cc7c555aff
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/Payment.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.policies;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ *
+ */
+@Remotable
+public interface Payment {
+ String charge(String customerID, float amount);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/CreditCardPaymentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/CreditCardPaymentImpl.java
new file mode 100644
index 0000000000..01cc8ac636
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/CreditCardPaymentImpl.java
@@ -0,0 +1,40 @@
+/*
+ * 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.itest.policies.impl;
+
+import org.apache.tuscany.sca.itest.policies.CreditCard;
+import org.apache.tuscany.sca.itest.policies.CreditCardPayment;
+
+/**
+ *
+ */
+public class CreditCardPaymentImpl implements CreditCardPayment {
+
+ public String authorize(CreditCard creditCard, float amount) {
+ System.out.println(creditCard.getType() + " " + creditCard.getNumber());
+ System.out.println(amount);
+ if (amount < 200f) {
+ return COMPLETED;
+ } else {
+ return REJECTED;
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/CustomerRegistryImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/CustomerRegistryImpl.java
new file mode 100644
index 0000000000..943720451f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/CustomerRegistryImpl.java
@@ -0,0 +1,78 @@
+/*
+ * 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.itest.policies.impl;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.tuscany.sca.itest.policies.CreditCard;
+import org.apache.tuscany.sca.itest.policies.Customer;
+import org.apache.tuscany.sca.itest.policies.CustomerRegistry;
+import org.oasisopen.sca.annotation.Destroy;
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Scope;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ *
+ */
+@Service(CustomerRegistry.class)
+@Scope("COMPOSITE")
+public class CustomerRegistryImpl implements CustomerRegistry {
+ private Map<String, Customer> customers = new HashMap<String, Customer>();
+
+
+ @Init
+ public void init() {
+ Customer c1 = new Customer();
+ c1.setId("001");
+ c1.setName("John Smith");
+ CreditCard creditCard = new CreditCard();
+ creditCard.setNumber("1234-5678-1234");
+ creditCard.setType("Visa");
+ creditCard.setOwner("John Smith");
+ creditCard.setExpMonth(6);
+ creditCard.setExpYear(2015);
+ c1.setCreditCard(creditCard);
+ customers.put(c1.getId(), c1);
+
+ Customer c2 = new Customer();
+ c2.setId("002");
+ c2.setName("Jane Smith");
+ creditCard = new CreditCard();
+ creditCard.setNumber("1234-5678-5678");
+ creditCard.setType("MasterCard");
+ creditCard.setOwner("Jane Smith");
+ creditCard.setExpMonth(9);
+ creditCard.setExpYear(2012);
+ c2.setCreditCard(creditCard);
+ customers.put(c2.getId(), c2);
+ }
+
+ public Customer find(String id) {
+ return customers.get(id);
+ }
+
+ @Destroy
+ public void destroy() {
+ customers.clear();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/PaymentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/PaymentImpl.java
new file mode 100644
index 0000000000..b712b99388
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/java/org/apache/tuscany/sca/itest/policies/impl/PaymentImpl.java
@@ -0,0 +1,54 @@
+/*
+ * 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.itest.policies.impl;
+
+import org.apache.tuscany.sca.itest.policies.CreditCard;
+import org.apache.tuscany.sca.itest.policies.CreditCardPayment;
+import org.apache.tuscany.sca.itest.policies.Customer;
+import org.apache.tuscany.sca.itest.policies.CustomerRegistry;
+import org.apache.tuscany.sca.itest.policies.Payment;
+import org.apache.tuscany.sca.policy.logging.Logging;
+import org.oasisopen.sca.annotation.Authentication;
+import org.oasisopen.sca.annotation.Confidentiality;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Requires;
+
+/**
+ *
+ */
+@Logging
+public class PaymentImpl implements Payment {
+
+ @Reference
+ protected CustomerRegistry customerRegistry;
+
+ @Reference
+ @Authentication
+ @Requires({Confidentiality.CONFIDENTIALITY_MESSAGE, Confidentiality.CONFIDENTIALITY_TRANSPORT})
+ protected CreditCardPayment creditCardPayment;
+
+ public String charge(String customerID, float amount) {
+ Customer customer = customerRegistry.find(customerID);
+ CreditCard creditCard = customer.getCreditCard();
+ String status = creditCardPayment.authorize(creditCard, amount);
+ return status;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/resources/Customer.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/resources/Customer.composite
new file mode 100644
index 0000000000..7c66c741f6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/resources/Customer.composite
@@ -0,0 +1,34 @@
+<?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:c="http://customer"
+ targetNamespace="http://customer"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ name="Customer">
+
+ <service name="Registry" promote="CustomerRegistry" requires="tuscany:logging">
+ <binding.sca/>
+ </service>
+
+ <component name="CustomerRegistry">
+ <implementation.java class="org.apache.tuscany.sca.itest.policies.impl.CustomerRegistryImpl" />
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/resources/LoggingMessages.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/resources/LoggingMessages.properties
new file mode 100644
index 0000000000..ada808be0e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/resources/LoggingMessages.properties
@@ -0,0 +1,16 @@
+# 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.
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/resources/META-INF/definitions.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/resources/META-INF/definitions.xml
new file mode 100644
index 0000000000..ffcae358b1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/resources/META-INF/definitions.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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 xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
+
+ <policySet name="JDKLoggingPolicy"
+ provides="tuscany:logging"
+ appliesTo="//sca:binding.sca"
+ attachTo="//sca:component[@name='CreditCardPayment']">
+ <tuscany:jdkLogger name="test.logger">
+ <tuscany:logLevel>FINE</tuscany:logLevel>
+ <tuscany:resourceBundle>LoggingMessages.properties</tuscany:resourceBundle>
+ </tuscany:jdkLogger>
+
+ </policySet>
+
+ <policySet name="JDKLoggingImplPolicy"
+ provides="tuscany:logging"
+ appliesTo="//sca:implementation.java"
+ attachTo="//sca:component[@name='CreditCardPayment']">
+ <tuscany:jdkLogger name="test.logger">
+ <tuscany:logLevel>INFO</tuscany:logLevel>
+ <tuscany:resourceBundle>LoggingMessages.properties</tuscany:resourceBundle>
+ </tuscany:jdkLogger>
+
+ </policySet>
+
+ <!-- A set of policy sets introduced just to ensure that intents are resolved -->
+
+ <policySet name="SuspendsTransactionPolicy"
+ provides="sca:suspendsTransaction"
+ appliesTo="//sca:binding.sca | //sca:implementation.java"
+ attachTo="IntentRefs('sca:suspendsTransaction')"/>
+
+ <policySet name="AuthorizationFineGrainPolicy"
+ provides="sca:authorization"
+ appliesTo="//sca:binding.sca | //sca:implementation.java"
+ attachTo="IntentRefs('sca:authorization')"/>
+
+ <policySet name="ConfidentialityTransportPolicy"
+ provides="sca:confidentiality.transport"
+ appliesTo="//sca:binding.sca | //sca:implementation.java"
+ attachTo="IntentRefs('sca:confidentiality.transport')"/>
+
+ <policySet name="ConfidentialityMessagePolicy"
+ provides="sca:confidentiality.message"
+ appliesTo="//sca:binding.sca | //sca:implementation.java"
+ attachTo="IntentRefs('sca:confidentiality.message')"/>
+
+ <policySet name="ClientAuthenticationTransportPolicy"
+ provides="sca:clientAuthentication.transport"
+ appliesTo="//sca:binding.sca | //sca:implementation.java"
+ attachTo="IntentRefs('sca:clientAuthentication.transport') | //sca:service[@name='CreditCardPayment']"/>
+
+ <policySet name="IntegrityTransportPolicy"
+ provides="sca:integrity.transport"
+ appliesTo="//sca:binding.sca | //sca:implementation.java"
+ attachTo="IntentRefs('sca:integrity.transport')"/>
+
+ <policySet name="ManagedTransactionGlobalPolicy"
+ provides="sca:managedTransaction.global"
+ appliesTo="//sca:implementation.composite | //sca:implementation.java"
+ attachTo="IntentRefs('sca:managedTransaction.global')"/>
+</definitions> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..d5d1840754
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/resources/META-INF/sca-contribution.xml
@@ -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:p="http://payment">
+ <deployable composite="p:Payment" />
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/resources/Payment.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/resources/Payment.composite
new file mode 100644
index 0000000000..87e8fe2bc9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/main/resources/Payment.composite
@@ -0,0 +1,56 @@
+<?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.
+-->
+
+<!--
+ NOTE - policy sets all defined at top level as external attach functions
+ not working yet so it's difficult to know precisely where to
+ attach policy to
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:p="http://payment"
+ xmlns:c="http://customer"
+ xmlns:sca = "http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ requires = "sca:authorization"
+ targetNamespace="http://payment"
+ name="Payment"
+ policySets="tuscany:JDKLoggingPolicy tuscany:JDKLoggingImplPolicy tuscany:SuspendsTransactionPolicy tuscany:AuthorizationFineGrainPolicy tuscany:ConfidentialityTransportPolicy tuscany:ConfidentialityMessagePolicy tuscany:ClientAuthenticationTransportPolicy tuscany:IntegrityTransportPolicy">
+
+ <component name="Payment">
+ <implementation.java class="org.apache.tuscany.sca.itest.policies.impl.PaymentImpl" />
+ <reference name="creditCardPayment">
+ <binding.sca requires="sca:integrity.transport tuscany:logging" uri="CreditCardPayment"/>
+ </reference>
+ <reference name="customerRegistry" target="Customer/Registry" requires="sca:suspendsTransaction tuscany:logging"/>
+ </component>
+
+ <component name="CreditCardPayment">
+ <implementation.java class="org.apache.tuscany.sca.itest.policies.impl.CreditCardPaymentImpl" />
+ <service name="CreditCardPayment" requires="tuscany:logging sca:confidentiality.message sca:confidentiality.transport"/>
+ </component>
+
+ <component name="Customer" requires="tuscany:logging">
+ <implementation.composite name="c:Customer" requires="sca:managedTransaction.global"/>
+ <service name="Registry" requires="sca:suspendsTransaction">
+ <binding.sca/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/test/java/org/apache/tuscany/sca/itest/policies/PaymentTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/test/java/org/apache/tuscany/sca/itest/policies/PaymentTestCase.java
new file mode 100644
index 0000000000..3385ee9071
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policies/src/test/java/org/apache/tuscany/sca/itest/policies/PaymentTestCase.java
@@ -0,0 +1,69 @@
+/*
+ * 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.itest.policies;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class PaymentTestCase {
+ private static Node node;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ try {
+ String location = ContributionLocationHelper.getContributionLocation("Payment.composite");
+ node = NodeFactory.newInstance().createNode(new Contribution("c1", location));
+ node.start();
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw e;
+ }
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+
+ @Test
+ public void testPayment() {
+ Payment payment = node.getService(Payment.class, "Payment");
+ String status = payment.charge("001", 100f);
+ Assert.assertEquals(CreditCardPayment.COMPLETED, status);
+
+ status = payment.charge("002", 300f);
+ Assert.assertEquals(CreditCardPayment.REJECTED, status);
+ }
+
+ public static void main(String[] args) throws Exception {
+ PaymentTestCase.init();
+ PaymentTestCase tester = new PaymentTestCase();
+ tester.testPayment();
+ PaymentTestCase.destroy();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy-transaction/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy-transaction/pom.xml
new file mode 100644
index 0000000000..1290a43937
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy-transaction/pom.xml
@@ -0,0 +1,57 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-policy-transaction</artifactId>
+ <name>Apache Tuscany SCA iTest Policy Transaction</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-policy-transaction-runtime-geronimo</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.5.3</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <version>1.5.3</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy-transaction/src/main/java/customer/Customer.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy-transaction/src/main/java/customer/Customer.java
new file mode 100644
index 0000000000..b58547bf47
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy-transaction/src/main/java/customer/Customer.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package customer;
+
+import java.io.Serializable;
+
+/**
+ * Customer
+ */
+public class Customer implements Serializable {
+ private static final long serialVersionUID = 680227659536711695L;
+ private String id;
+ private String name;
+
+ public String getId() {
+ return id;
+ }
+ public void setId(String id) {
+ this.id = id;
+ }
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy-transaction/src/main/java/customer/CustomerRegistry.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy-transaction/src/main/java/customer/CustomerRegistry.java
new file mode 100644
index 0000000000..4a05f0d0a8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy-transaction/src/main/java/customer/CustomerRegistry.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package customer;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ *
+ */
+@Remotable
+public interface CustomerRegistry {
+ Customer find(String id);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy-transaction/src/main/java/customer/impl/CustomerRegistryImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy-transaction/src/main/java/customer/impl/CustomerRegistryImpl.java
new file mode 100644
index 0000000000..d2d6aa1f44
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy-transaction/src/main/java/customer/impl/CustomerRegistryImpl.java
@@ -0,0 +1,63 @@
+/*
+ * 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 customer.impl;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.oasisopen.sca.annotation.Destroy;
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Scope;
+import org.oasisopen.sca.annotation.Service;
+
+import customer.Customer;
+import customer.CustomerRegistry;
+
+/**
+ *
+ */
+@Scope("COMPOSITE")
+@Service(CustomerRegistry.class)
+public class CustomerRegistryImpl implements CustomerRegistry {
+ private Map<String, Customer> customers = new HashMap<String, Customer>();
+
+ @Init
+ public void init() {
+ Customer c1 = new Customer();
+ c1.setId("001");
+ c1.setName("John Smith");
+ customers.put(c1.getId(), c1);
+
+ Customer c2 = new Customer();
+ c2.setId("002");
+ c2.setName("Jane Smith");
+ customers.put(c2.getId(), c2);
+ }
+
+ public Customer find(String id) {
+ return customers.get(id);
+ }
+
+ @Destroy
+ public void destroy() {
+ customers.clear();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy-transaction/src/main/resources/Customer.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy-transaction/src/main/resources/Customer.composite
new file mode 100644
index 0000000000..7047de3663
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy-transaction/src/main/resources/Customer.composite
@@ -0,0 +1,30 @@
+<?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:c="http://customer"
+ targetNamespace="http://customer"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ name="CustomerTransaction">
+
+ <component name="CustomerRegistryComponent">
+ <implementation.java class="customer.impl.CustomerRegistryImpl" requires="managedTransaction.local"/>
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy-transaction/src/test/java/org/apache/tuscany/sca/itest/policy/transaction/CustomerTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy-transaction/src/test/java/org/apache/tuscany/sca/itest/policy/transaction/CustomerTestCase.java
new file mode 100644
index 0000000000..2d83cd0ee5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy-transaction/src/test/java/org/apache/tuscany/sca/itest/policy/transaction/CustomerTestCase.java
@@ -0,0 +1,69 @@
+/*
+ * 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.itest.policy.transaction;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import customer.Customer;
+import customer.CustomerRegistry;
+
+public class CustomerTestCase {
+ private static Node node;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ try {
+ String location = ContributionLocationHelper.getContributionLocation("Customer.composite");
+ node = NodeFactory.newInstance().createNode("Customer.composite",new Contribution("c1", location));
+ node.start();
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw e;
+ }
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+
+ @Test
+ public void testCustomer() {
+ CustomerRegistry customerRegistry = node.getService(CustomerRegistry.class, "CustomerRegistryComponent");
+ Customer customer = customerRegistry.find("001");
+ Assert.assertEquals(customer.getName(), "John Smith");
+ }
+
+ public static void main(String[] args) throws Exception {
+ CustomerTestCase.init();
+ CustomerTestCase tester = new CustomerTestCase();
+ tester.testCustomer();
+ CustomerTestCase.destroy();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/pom.xml
new file mode 100644
index 0000000000..bf3b2b8d70
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/pom.xml
@@ -0,0 +1,57 @@
+<?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-policy</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-policy-interceptors</artifactId>
+ <name>Apache Tuscany SCA iTest Policy Interceptors</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.19</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorld.java
new file mode 100644
index 0000000000..1f5b8b365d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorld.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorld {
+
+ String getGreetings(String s);
+
+ String getGreetingsException(String s) throws HelloWorldException;
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorldClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorldClient.java
new file mode 100644
index 0000000000..7a94a90b19
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorldClient.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Requires;
+
+@Requires("{http://tuscany.apache.org/xmlns/sca/1.1}testIntent")
+public class HelloWorldClient implements HelloWorld {
+
+ @Reference
+ public HelloWorld helloWorldWS;
+
+ public String getGreetings(String s) {
+ StatusImpl.appendStatus("At client.getGreetings() pre-invoke", s);
+ String response = helloWorldWS.getGreetings(s);
+ StatusImpl.appendStatus("At client.getGreetings() post-invoke", response);
+ return response;
+ }
+
+ public String getGreetingsException(String s) throws HelloWorldException {
+ StatusImpl.appendStatus("At client.getGreetingsException() pre-invoke", s);
+ try {
+ String response = helloWorldWS.getGreetingsException(s);
+ StatusImpl.appendStatus("At client.getGreetingsException() post-invoke", response);
+ return response;
+ } catch (HelloWorldException ex){
+ StatusImpl.appendStatus("At client.getGreetingsException() post-exception", ex.getMessage());
+ throw ex;
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorldException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorldException.java
new file mode 100644
index 0000000000..b4a9fec640
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorldException.java
@@ -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 helloworld;
+
+
+public class HelloWorldException extends Exception {
+
+ private static final long serialVersionUID = 4608283774062947117L;
+
+ public HelloWorldException(){
+ }
+
+ public HelloWorldException(String message){
+ super(message);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..40c0c7618a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorldService.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld;
+
+import javax.security.auth.Subject;
+
+import org.oasisopen.sca.RequestContext;
+import org.oasisopen.sca.annotation.Context;
+
+public class HelloWorldService implements HelloWorld {
+
+ @Context
+ protected RequestContext requestContext;
+
+ public String getGreetings(String s) {
+ //Subject subject = requestContext.getSecuritySubject();
+ String response = "Hello " + s;
+ StatusImpl.appendStatus("At service.getGreetings()", response);
+ return response;
+ }
+
+ public String getGreetingsException(String s) throws HelloWorldException {
+ String response = "Hello " + s;
+ StatusImpl.appendStatus("At service.getGreetingsException()", response);
+ throw new HelloWorldException(response);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/helloworld/StatusImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/helloworld/StatusImpl.java
new file mode 100644
index 0000000000..644853d6c2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/helloworld/StatusImpl.java
@@ -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 helloworld;
+
+public class StatusImpl {
+
+ public static String statusString = "";
+
+ public static void appendStatus(String event, String location){
+ // remove any addresses from the strings
+ location = location.replaceAll("\\(@.*Endpoint", "Endpoint");
+ statusString += event + " - " + location + "\n";
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSAxisHandler.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSAxisHandler.java
new file mode 100644
index 0000000000..686866e12d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSAxisHandler.java
@@ -0,0 +1,45 @@
+/*
+ * 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 testbindingwspolicy;
+
+import helloworld.StatusImpl;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.handlers.AbstractHandler;
+
+/**
+ * An Axis handler to show that policy can add one of needs be
+ *
+ * @version $Rev: 881959 $ $Date: 2009-11-18 22:07:09 +0000 (Wed, 18 Nov 2009) $
+ */
+public class TestBindingWSAxisHandler extends AbstractHandler
+{
+ private String name;
+
+ public TestBindingWSAxisHandler(String name)
+ {
+ this.name = name;
+ }
+
+ public InvocationResponse invoke(MessageContext msgContext) throws AxisFault {
+ StatusImpl.appendStatus("TestAxisHandler.invoke()", name);
+ return InvocationResponse.CONTINUE;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSPolicy.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSPolicy.java
new file mode 100644
index 0000000000..c7803f03bc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSPolicy.java
@@ -0,0 +1,63 @@
+/*
+ * 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 testbindingwspolicy;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.assembly.Base;
+
+/**
+ * Implementation for policies that could be injected as parameter
+ * into the axis2config.
+ *
+ * @version $Rev: 824551 $ $Date: 2009-10-13 01:21:22 +0100 (Tue, 13 Oct 2009) $
+ */
+public class TestBindingWSPolicy {
+ static final String SCA11_NS = Base.SCA11_NS;
+ static final String SCA11_TUSCANY_NS = Base.SCA11_TUSCANY_NS;
+ static final QName TEST_BINDINGWS_POLICY_QNAME = new QName(SCA11_TUSCANY_NS, "testBindingWSPolicy");
+
+ private String testString;
+
+ public String getTestString() {
+ return testString;
+ }
+
+ public void setTestString(String testString) {
+ this.testString = testString;
+ }
+
+ public QName getSchemaName() {
+ return TEST_BINDINGWS_POLICY_QNAME;
+ }
+
+ public boolean isUnresolved() {
+ return false;
+ }
+
+ public void setUnresolved(boolean unresolved) {
+ }
+
+ @Override
+ public String toString() {
+ return "TestBindingWSPolicy [testString=" +
+ testString
+ + "]";
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSPolicyBuilder.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSPolicyBuilder.java
new file mode 100644
index 0000000000..4fdcde678d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSPolicyBuilder.java
@@ -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 testbindingwspolicy;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.assembly.Component;
+import org.apache.tuscany.sca.assembly.Endpoint;
+import org.apache.tuscany.sca.assembly.EndpointReference;
+import org.apache.tuscany.sca.assembly.Implementation;
+import org.apache.tuscany.sca.assembly.builder.BuilderContext;
+import org.apache.tuscany.sca.assembly.builder.PolicyBuilder;
+import org.apache.tuscany.sca.policy.PolicyExpression;
+import org.apache.tuscany.sca.policy.PolicySet;
+import org.apache.tuscany.sca.policy.PolicySubject;
+
+/**
+ *
+ */
+public class TestBindingWSPolicyBuilder implements PolicyBuilder<TestBindingWSPolicy> {
+
+ public boolean build(Endpoint endpoint, BuilderContext context) {
+ List<TestBindingWSPolicy> polices = getPolicies(endpoint);
+ System.out.println(endpoint + ": " + polices);
+ return true;
+ }
+
+ public boolean build(EndpointReference endpointReference, BuilderContext context) {
+ List<TestBindingWSPolicy> polices = getPolicies(endpointReference);
+ System.out.println(endpointReference + ": " + polices);
+ return true;
+ }
+
+ public boolean build(Component component, Implementation implementation, BuilderContext context) {
+ List<TestBindingWSPolicy> polices = getPolicies(implementation);
+ System.out.println(implementation + ": " + polices);
+ return true;
+ }
+
+ public QName getPolicyType() {
+ return TestBindingWSPolicy.TEST_BINDINGWS_POLICY_QNAME;
+ }
+
+ public List<QName> getSupportedBindings() {
+ return null;
+ }
+
+ private List<TestBindingWSPolicy> getPolicies(PolicySubject subject) {
+ List<TestBindingWSPolicy> polices = new ArrayList<TestBindingWSPolicy>();
+ for (PolicySet ps : subject.getPolicySets()) {
+ for (PolicyExpression exp : ps.getPolicies()) {
+ if (getPolicyType().equals(exp.getName())) {
+ polices.add((TestBindingWSPolicy)exp.getPolicy());
+ }
+ }
+ }
+ return polices;
+ }
+
+ public boolean build(EndpointReference endpointReference, Endpoint endpoint, BuilderContext context) {
+ return true;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSPolicyInterceptor.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSPolicyInterceptor.java
new file mode 100644
index 0000000000..aa33c74aea
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSPolicyInterceptor.java
@@ -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 testbindingwspolicy;
+
+import helloworld.StatusImpl;
+
+import java.util.List;
+
+import org.apache.tuscany.sca.assembly.Component;
+import org.apache.tuscany.sca.assembly.Endpoint;
+import org.apache.tuscany.sca.assembly.EndpointReference;
+import org.apache.tuscany.sca.core.invocation.InterceptorAsyncImpl;
+import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.invocation.Message;
+import org.apache.tuscany.sca.invocation.PhasedInterceptor;
+import org.apache.tuscany.sca.policy.PolicySubject;
+
+
+public class TestBindingWSPolicyInterceptor extends InterceptorAsyncImpl implements PhasedInterceptor {
+
+ private Operation operation;
+ private List<TestBindingWSPolicy> policies;
+ private PolicySubject subject;
+ private String context;
+ private String phase;
+
+ public TestBindingWSPolicyInterceptor(PolicySubject subject,
+ String context,
+ Operation operation,
+ List<TestBindingWSPolicy> policies,
+ String phase) {
+ super();
+ this.operation = operation;
+ this.policies = policies;
+ this.subject = subject;
+ this.phase = phase;
+ this.context = getContext();
+ }
+
+ private String getContext() {
+ if (subject instanceof Endpoint) {
+ Endpoint endpoint = (Endpoint)subject;
+ return endpoint.getURI();
+ } else if (subject instanceof EndpointReference) {
+ EndpointReference endpointReference = (EndpointReference)subject;
+ return endpointReference.getURI();
+ } else if (subject instanceof Component) {
+ Component component = (Component)subject;
+ return component.getURI();
+ }
+ return null;
+ }
+
+ public Message processRequest(Message msg) {
+ StatusImpl.appendStatus("TestBindingWSPolicyInterceptor.processRequest()", context + " @ " + phase);
+ return msg;
+ }
+
+ public Message processResponse(Message msg) {
+ StatusImpl.appendStatus("TestBindingWSPolicyInterceptor.processResponse()", context + " @ " + phase);
+ return msg;
+ }
+
+ public String getPhase() {
+ return phase;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSPolicyProcessor.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSPolicyProcessor.java
new file mode 100644
index 0000000000..2b013f7ba2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSPolicyProcessor.java
@@ -0,0 +1,99 @@
+/*
+ * 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 testbindingwspolicy;
+
+import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
+import static javax.xml.stream.XMLStreamConstants.START_ELEMENT;
+
+import java.util.logging.Level;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
+import org.apache.tuscany.sca.contribution.processor.ContributionResolveException;
+import org.apache.tuscany.sca.contribution.processor.ContributionWriteException;
+import org.apache.tuscany.sca.contribution.processor.ProcessorContext;
+import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
+import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+
+/**
+ *
+ * @version $Rev: 883438 $ $Date: 2009-11-23 18:07:34 +0000 (Mon, 23 Nov 2009) $
+ */
+public class TestBindingWSPolicyProcessor implements StAXArtifactProcessor<TestBindingWSPolicy> {
+
+ public QName getArtifactType() {
+ return TestBindingWSPolicy.TEST_BINDINGWS_POLICY_QNAME;
+ }
+
+ public TestBindingWSPolicyProcessor(FactoryExtensionPoint modelFactories) {
+ }
+
+
+ public TestBindingWSPolicy read(XMLStreamReader reader, ProcessorContext context) throws ContributionReadException, XMLStreamException {
+ TestBindingWSPolicy policy = new TestBindingWSPolicy();
+ int event = reader.getEventType();
+ QName name = null;
+
+
+ while (reader.hasNext()) {
+ event = reader.getEventType();
+ switch (event) {
+ case START_ELEMENT : {
+ name = reader.getName();
+ if ( name.equals("testString") ) {
+ String testString = reader.getAttributeValue(null, "testString");
+ policy.setTestString(testString);
+ }
+ break;
+ }
+ }
+
+ if ( event == END_ELEMENT ) {
+ if ( TestBindingWSPolicy.TEST_BINDINGWS_POLICY_QNAME.equals(reader.getName()) ) {
+ break;
+ }
+ }
+
+ //Read the next element
+ if (reader.hasNext()) {
+ reader.next();
+ }
+ }
+
+ return policy;
+ }
+
+ public void write(TestBindingWSPolicy policy, XMLStreamWriter writer, ProcessorContext context) throws ContributionWriteException, XMLStreamException {
+ // TODO
+ }
+
+ public Class<TestBindingWSPolicy> getModelType() {
+ return TestBindingWSPolicy.class;
+ }
+
+ public void resolve(TestBindingWSPolicy arg0, ModelResolver arg1, ProcessorContext context) throws ContributionResolveException {
+
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSPolicyProviderFactory.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSPolicyProviderFactory.java
new file mode 100644
index 0000000000..df626a10ff
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSPolicyProviderFactory.java
@@ -0,0 +1,69 @@
+/*
+ * 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 testbindingwspolicy;
+
+import org.apache.tuscany.sca.assembly.Endpoint;
+import org.apache.tuscany.sca.assembly.EndpointReference;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.provider.PolicyProvider;
+import org.apache.tuscany.sca.provider.PolicyProviderFactory;
+import org.apache.tuscany.sca.runtime.RuntimeComponent;
+
+/**
+ * @version $Rev: 792622 $ $Date: 2009-07-09 19:14:18 +0100 (Thu, 09 Jul 2009) $
+ */
+public class TestBindingWSPolicyProviderFactory implements PolicyProviderFactory<TestBindingWSPolicy> {
+ private ExtensionPointRegistry registry;
+
+ public TestBindingWSPolicyProviderFactory(ExtensionPointRegistry registry) {
+ super();
+ this.registry = registry;
+ }
+
+ /**
+ * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createImplementationPolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.assembly.Implementation)
+ */
+ public PolicyProvider createImplementationPolicyProvider(RuntimeComponent component) {
+ // no implementation provider for this binding specific policy
+ return null;
+ }
+
+ /**
+ * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createReferencePolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentReference, org.apache.tuscany.sca.assembly.Binding)
+ */
+ public PolicyProvider createReferencePolicyProvider(EndpointReference endpointReference) {
+ return new TestBindingWSPolicyProviderReference(endpointReference);
+ }
+
+ /**
+ * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createServicePolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentService, org.apache.tuscany.sca.assembly.Binding)
+ */
+ public PolicyProvider createServicePolicyProvider(Endpoint endpoint) {
+ return new TestBindingWSPolicyProviderService(endpoint);
+ }
+
+ /**
+ * @see org.apache.tuscany.sca.provider.ProviderFactory#getModelType()
+ */
+ public Class<TestBindingWSPolicy> getModelType() {
+ return TestBindingWSPolicy.class;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSPolicyProviderReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSPolicyProviderReference.java
new file mode 100644
index 0000000000..489c069ea8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSPolicyProviderReference.java
@@ -0,0 +1,72 @@
+/*
+ * 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 testbindingwspolicy;
+
+import helloworld.StatusImpl;
+
+import java.util.List;
+
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.tuscany.sca.assembly.EndpointReference;
+import org.apache.tuscany.sca.binding.ws.axis2.provider.Axis2BaseBindingProvider;
+import org.apache.tuscany.sca.invocation.Phase;
+import org.apache.tuscany.sca.invocation.PhasedInterceptor;
+import org.apache.tuscany.sca.provider.BasePolicyProvider;
+
+/**
+ * @version $Rev: 792641 $ $Date: 2009-07-09 20:13:08 +0100 (Thu, 09 Jul 2009) $
+ */
+public class TestBindingWSPolicyProviderReference extends BasePolicyProvider<TestBindingWSPolicy> {
+
+ public TestBindingWSPolicyProviderReference(EndpointReference endpointReference) {
+ super(TestBindingWSPolicy.class, endpointReference);
+ }
+
+ public void configureBinding(Object configuration) {
+ super.configureBinding(configuration);
+
+ StatusImpl.appendStatus("TestBindingWSPolicyProviderReference.configureBinding()", configuration.getClass().getName());
+
+ Axis2BaseBindingProvider bindingProvider = (Axis2BaseBindingProvider)configuration;
+ ConfigurationContext axisConfigurationContext = bindingProvider.getAxisConfigurationContext();
+ AxisConfiguration axisConfiguration = axisConfigurationContext.getAxisConfiguration();
+ List<org.apache.axis2.engine.Phase> outPhases = axisConfiguration.getOutFlowPhases();
+ outPhases.get(0).addHandler(new TestBindingWSAxisHandler("Reference OutFlow Handler"));
+ List<org.apache.axis2.engine.Phase> inPhases = axisConfiguration.getInFlowPhases();
+ inPhases.get(0).addHandler(new TestBindingWSAxisHandler("Reference InFlow Handler"));
+ List<org.apache.axis2.engine.Phase> inFaultPhases = axisConfiguration.getInFaultFlowPhases();
+ inFaultPhases.get(0).addHandler(new TestBindingWSAxisHandler("Reference InFaultFlow Handler"));
+ }
+
+ public PhasedInterceptor createBindingInterceptor() {
+ List<TestBindingWSPolicy> policies = findPolicies();
+
+ if (policies.isEmpty()){
+ return null;
+ } else {
+ return new TestBindingWSPolicyInterceptor(subject,
+ getContext(),
+ null,
+ policies,
+ Phase.REFERENCE_BINDING_POLICY);
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSPolicyProviderService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSPolicyProviderService.java
new file mode 100644
index 0000000000..9880bf04b0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testbindingwspolicy/TestBindingWSPolicyProviderService.java
@@ -0,0 +1,72 @@
+/*
+ * 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 testbindingwspolicy;
+
+import helloworld.StatusImpl;
+
+import java.util.List;
+
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.tuscany.sca.assembly.Endpoint;
+import org.apache.tuscany.sca.binding.ws.axis2.provider.Axis2BaseBindingProvider;
+import org.apache.tuscany.sca.invocation.Phase;
+import org.apache.tuscany.sca.invocation.PhasedInterceptor;
+import org.apache.tuscany.sca.provider.BasePolicyProvider;
+
+/**
+ * @version $Rev: 792641 $ $Date: 2009-07-09 20:13:08 +0100 (Thu, 09 Jul 2009) $
+ */
+public class TestBindingWSPolicyProviderService extends BasePolicyProvider<TestBindingWSPolicy> {
+
+ public TestBindingWSPolicyProviderService(Endpoint endpoint) {
+ super(TestBindingWSPolicy.class, endpoint);
+ }
+
+ public void configureBinding(Object configuration) {
+ super.configureBinding(configuration);
+
+ StatusImpl.appendStatus("TestBindingWSPolicyProviderService.configureBinding()", configuration.getClass().getName());
+
+ Axis2BaseBindingProvider bindingProvider = (Axis2BaseBindingProvider)configuration;
+ ConfigurationContext axisConfigurationContext = bindingProvider.getAxisConfigurationContext();
+ AxisConfiguration axisConfiguration = axisConfigurationContext.getAxisConfiguration();
+ List<org.apache.axis2.engine.Phase> inPhases = axisConfiguration.getInFlowPhases();
+ inPhases.get(0).addHandler(new TestBindingWSAxisHandler("Service InFlow Handler"));
+ List<org.apache.axis2.engine.Phase> outPhases = axisConfiguration.getOutFlowPhases();
+ outPhases.get(0).addHandler(new TestBindingWSAxisHandler("Service OutFlow Handler"));
+ List<org.apache.axis2.engine.Phase> outFaultPhases = axisConfiguration.getOutFaultFlowPhases();
+ outFaultPhases.get(0).addHandler(new TestBindingWSAxisHandler("Service OutFaultFlow Handler"));
+ }
+
+ public PhasedInterceptor createBindingInterceptor() {
+ List<TestBindingWSPolicy> policies = findPolicies();
+
+ if (policies.isEmpty()){
+ return null;
+ } else {
+ return new TestBindingWSPolicyInterceptor(subject,
+ getContext(),
+ null,
+ policies,
+ Phase.SERVICE_BINDING_POLICY);
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicy.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicy.java
new file mode 100644
index 0000000000..651208fa76
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicy.java
@@ -0,0 +1,63 @@
+/*
+ * 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 testpolicy;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.assembly.Base;
+
+/**
+ * Implementation for policies that could be injected as parameter
+ * into the axis2config.
+ *
+ * @version $Rev: 824551 $ $Date: 2009-10-13 01:21:22 +0100 (Tue, 13 Oct 2009) $
+ */
+public class TestPolicy {
+ static final String SCA11_NS = Base.SCA11_NS;
+ static final String SCA11_TUSCANY_NS = Base.SCA11_TUSCANY_NS;
+ static final QName TEST_POLICY_QNAME = new QName(SCA11_TUSCANY_NS, "testPolicy");
+
+ private String testString;
+
+ public String getTestString() {
+ return testString;
+ }
+
+ public void setTestString(String testString) {
+ this.testString = testString;
+ }
+
+ public QName getSchemaName() {
+ return TEST_POLICY_QNAME;
+ }
+
+ public boolean isUnresolved() {
+ return false;
+ }
+
+ public void setUnresolved(boolean unresolved) {
+ }
+
+ @Override
+ public String toString() {
+ return "TestPolicy [testString=" +
+ testString
+ + "]";
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyBuilder.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyBuilder.java
new file mode 100644
index 0000000000..a7cceec4de
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyBuilder.java
@@ -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 testpolicy;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.assembly.Component;
+import org.apache.tuscany.sca.assembly.Endpoint;
+import org.apache.tuscany.sca.assembly.EndpointReference;
+import org.apache.tuscany.sca.assembly.Implementation;
+import org.apache.tuscany.sca.assembly.builder.BuilderContext;
+import org.apache.tuscany.sca.assembly.builder.PolicyBuilder;
+import org.apache.tuscany.sca.policy.PolicyExpression;
+import org.apache.tuscany.sca.policy.PolicySet;
+import org.apache.tuscany.sca.policy.PolicySubject;
+
+/**
+ *
+ */
+public class TestPolicyBuilder implements PolicyBuilder<TestPolicy> {
+
+ public boolean build(Endpoint endpoint, BuilderContext context) {
+ List<TestPolicy> polices = getPolicies(endpoint);
+ System.out.println(endpoint + ": " + polices);
+ return true;
+ }
+
+ public boolean build(EndpointReference endpointReference, BuilderContext context) {
+ List<TestPolicy> polices = getPolicies(endpointReference);
+ System.out.println(endpointReference + ": " + polices);
+ return true;
+ }
+
+ public boolean build(Component component, Implementation implementation, BuilderContext context) {
+ List<TestPolicy> polices = getPolicies(implementation);
+ System.out.println(implementation + ": " + polices);
+ return true;
+ }
+
+ public QName getPolicyType() {
+ return TestPolicy.TEST_POLICY_QNAME;
+ }
+
+ public List<QName> getSupportedBindings() {
+ return null;
+ }
+
+ private List<TestPolicy> getPolicies(PolicySubject subject) {
+ List<TestPolicy> polices = new ArrayList<TestPolicy>();
+ for (PolicySet ps : subject.getPolicySets()) {
+ for (PolicyExpression exp : ps.getPolicies()) {
+ if (getPolicyType().equals(exp.getName())) {
+ polices.add((TestPolicy)exp.getPolicy());
+ }
+ }
+ }
+ return polices;
+ }
+
+ public boolean build(EndpointReference endpointReference, Endpoint endpoint, BuilderContext context) {
+ return true;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyInterceptor.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyInterceptor.java
new file mode 100644
index 0000000000..73b4ce2825
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyInterceptor.java
@@ -0,0 +1,102 @@
+/*
+ * 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 testpolicy;
+
+import helloworld.StatusImpl;
+
+import java.util.List;
+import java.util.logging.ConsoleHandler;
+import java.util.logging.Handler;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.assembly.Component;
+import org.apache.tuscany.sca.assembly.Endpoint;
+import org.apache.tuscany.sca.assembly.EndpointReference;
+import org.apache.tuscany.sca.core.invocation.InterceptorAsyncImpl;
+import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.invocation.Invoker;
+import org.apache.tuscany.sca.invocation.Message;
+import org.apache.tuscany.sca.invocation.PhasedInterceptor;
+import org.apache.tuscany.sca.policy.PolicySubject;
+
+
+public class TestPolicyInterceptor extends InterceptorAsyncImpl implements PhasedInterceptor {
+
+ private Operation operation;
+ private List<TestPolicy> policies;
+ private PolicySubject subject;
+ private String context;
+ private String phase;
+
+ public TestPolicyInterceptor(PolicySubject subject,
+ String context,
+ Operation operation,
+ List<TestPolicy> policies,
+ String phase) {
+ super();
+ this.operation = operation;
+ this.policies = policies;
+ this.subject = subject;
+ this.phase = phase;
+ this.context = getContext();
+ }
+
+ private String getContext() {
+ if (subject instanceof Endpoint) {
+ Endpoint endpoint = (Endpoint)subject;
+ return endpoint.getURI();
+ } else if (subject instanceof EndpointReference) {
+ EndpointReference endpointReference = (EndpointReference)subject;
+ return endpointReference.getURI();
+ } else if (subject instanceof Component) {
+ Component component = (Component)subject;
+ return component.getURI();
+ }
+ return null;
+ }
+
+ public Message processRequest(Message msg) {
+ StatusImpl.appendStatus("TestPolicyInterceptor.processRequest()", context + " @ " + phase);
+ return msg;
+ }
+
+ public Message postProcessRequest(Message msg, Throwable e) throws Throwable {
+ StatusImpl.appendStatus("TestPolicyInterceptor.postProcessRequest()", context + " @ " + phase);
+ return msg;
+ }
+
+ public Message processResponse(Message msg) {
+ StatusImpl.appendStatus("TestPolicyInterceptor.processResponse()", context + " @ " + phase);
+ return msg;
+ }
+/* not in interface - should we add it?
+ public Message postProcessResponse(Message msg) {
+ System.out.println("TestPolicyInterceptor.postProcessResponse() " + context + " @ " + phase);
+ return msg;
+ }
+*/
+
+ public String getPhase() {
+ return phase;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyProcessor.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyProcessor.java
new file mode 100644
index 0000000000..0916534248
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyProcessor.java
@@ -0,0 +1,99 @@
+/*
+ * 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 testpolicy;
+
+import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
+import static javax.xml.stream.XMLStreamConstants.START_ELEMENT;
+
+import java.util.logging.Level;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
+import org.apache.tuscany.sca.contribution.processor.ContributionResolveException;
+import org.apache.tuscany.sca.contribution.processor.ContributionWriteException;
+import org.apache.tuscany.sca.contribution.processor.ProcessorContext;
+import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
+import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+
+/**
+ *
+ * @version $Rev: 883438 $ $Date: 2009-11-23 18:07:34 +0000 (Mon, 23 Nov 2009) $
+ */
+public class TestPolicyProcessor implements StAXArtifactProcessor<TestPolicy> {
+
+ public QName getArtifactType() {
+ return TestPolicy.TEST_POLICY_QNAME;
+ }
+
+ public TestPolicyProcessor(FactoryExtensionPoint modelFactories) {
+ }
+
+
+ public TestPolicy read(XMLStreamReader reader, ProcessorContext context) throws ContributionReadException, XMLStreamException {
+ TestPolicy policy = new TestPolicy();
+ int event = reader.getEventType();
+ QName name = null;
+
+
+ while (reader.hasNext()) {
+ event = reader.getEventType();
+ switch (event) {
+ case START_ELEMENT : {
+ name = reader.getName();
+ if ( name.equals("testString") ) {
+ String testString = reader.getAttributeValue(null, "testString");
+ policy.setTestString(testString);
+ }
+ break;
+ }
+ }
+
+ if ( event == END_ELEMENT ) {
+ if ( TestPolicy.TEST_POLICY_QNAME.equals(reader.getName()) ) {
+ break;
+ }
+ }
+
+ //Read the next element
+ if (reader.hasNext()) {
+ reader.next();
+ }
+ }
+
+ return policy;
+ }
+
+ public void write(TestPolicy policy, XMLStreamWriter writer, ProcessorContext context) throws ContributionWriteException, XMLStreamException {
+ // TODO
+ }
+
+ public Class<TestPolicy> getModelType() {
+ return TestPolicy.class;
+ }
+
+ public void resolve(TestPolicy arg0, ModelResolver arg1, ProcessorContext context) throws ContributionResolveException {
+
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyProviderFactory.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyProviderFactory.java
new file mode 100644
index 0000000000..75cb298f2d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyProviderFactory.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package testpolicy;
+
+import org.apache.tuscany.sca.assembly.Endpoint;
+import org.apache.tuscany.sca.assembly.EndpointReference;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.provider.PolicyProvider;
+import org.apache.tuscany.sca.provider.PolicyProviderFactory;
+import org.apache.tuscany.sca.runtime.RuntimeComponent;
+
+/**
+ * @version $Rev: 792622 $ $Date: 2009-07-09 19:14:18 +0100 (Thu, 09 Jul 2009) $
+ */
+public class TestPolicyProviderFactory implements PolicyProviderFactory<TestPolicy> {
+ private ExtensionPointRegistry registry;
+
+ public TestPolicyProviderFactory(ExtensionPointRegistry registry) {
+ super();
+ this.registry = registry;
+ }
+
+ /**
+ * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createImplementationPolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.assembly.Implementation)
+ */
+ public PolicyProvider createImplementationPolicyProvider(RuntimeComponent component) {
+ return new TestPolicyProviderImplementation(component);
+ }
+
+ /**
+ * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createReferencePolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentReference, org.apache.tuscany.sca.assembly.Binding)
+ */
+ public PolicyProvider createReferencePolicyProvider(EndpointReference endpointReference) {
+ return new TestPolicyProviderReference(endpointReference);
+ }
+
+ /**
+ * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createServicePolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentService, org.apache.tuscany.sca.assembly.Binding)
+ */
+ public PolicyProvider createServicePolicyProvider(Endpoint endpoint) {
+ return new TestPolicyProviderService(endpoint);
+ }
+
+ /**
+ * @see org.apache.tuscany.sca.provider.ProviderFactory#getModelType()
+ */
+ public Class<TestPolicy> getModelType() {
+ return TestPolicy.class;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyProviderImplementation.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyProviderImplementation.java
new file mode 100644
index 0000000000..b027763d22
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyProviderImplementation.java
@@ -0,0 +1,56 @@
+/*
+ * 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 testpolicy;
+
+import java.util.List;
+
+import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.invocation.Phase;
+import org.apache.tuscany.sca.invocation.PhasedInterceptor;
+import org.apache.tuscany.sca.provider.BasePolicyProvider;
+import org.apache.tuscany.sca.runtime.RuntimeComponent;
+
+/**
+ * @version $Rev: 792641 $ $Date: 2009-07-09 20:13:08 +0100 (Thu, 09 Jul 2009) $
+ */
+public class TestPolicyProviderImplementation extends BasePolicyProvider<TestPolicy> {
+
+ public TestPolicyProviderImplementation(RuntimeComponent component) {
+ super(TestPolicy.class, component.getImplementation());
+ }
+
+ /**
+ * @see org.apache.tuscany.sca.provider.PolicyProvider#createInterceptor(org.apache.tuscany.sca.interfacedef.Operation)
+ */
+ public PhasedInterceptor createInterceptor(Operation operation) {
+ List<TestPolicy> policies = findPolicies();
+
+ if (policies.isEmpty()){
+ return null;
+ } else {
+ return new TestPolicyInterceptor(subject,
+ getContext(),
+ operation,
+ policies,
+ Phase.IMPLEMENTATION_POLICY);
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyProviderReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyProviderReference.java
new file mode 100644
index 0000000000..3e784aa62e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyProviderReference.java
@@ -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 testpolicy;
+
+import java.util.List;
+
+import org.apache.tuscany.sca.assembly.EndpointReference;
+import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.invocation.Phase;
+import org.apache.tuscany.sca.invocation.PhasedInterceptor;
+import org.apache.tuscany.sca.provider.BasePolicyProvider;
+
+/**
+ * @version $Rev: 792641 $ $Date: 2009-07-09 20:13:08 +0100 (Thu, 09 Jul 2009) $
+ */
+public class TestPolicyProviderReference extends BasePolicyProvider<TestPolicy> {
+
+ public TestPolicyProviderReference(EndpointReference endpointReference) {
+ super(TestPolicy.class, endpointReference);
+ }
+
+ public PhasedInterceptor createInterceptor(Operation operation) {
+ List<TestPolicy> policies = findPolicies();
+
+ if (policies.isEmpty()){
+ return null;
+ } else {
+ return new TestPolicyInterceptor(subject,
+ getContext(),
+ operation,
+ policies,
+ Phase.REFERENCE_POLICY);
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyProviderService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyProviderService.java
new file mode 100644
index 0000000000..5066193aa6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyProviderService.java
@@ -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 testpolicy;
+
+import java.util.List;
+
+import org.apache.tuscany.sca.assembly.Endpoint;
+import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.invocation.Phase;
+import org.apache.tuscany.sca.invocation.PhasedInterceptor;
+import org.apache.tuscany.sca.provider.BasePolicyProvider;
+
+/**
+ * @version $Rev: 792641 $ $Date: 2009-07-09 20:13:08 +0100 (Thu, 09 Jul 2009) $
+ */
+public class TestPolicyProviderService extends BasePolicyProvider<TestPolicy> {
+
+ public TestPolicyProviderService(Endpoint endpoint) {
+ super(TestPolicy.class, endpoint);
+ }
+
+ public PhasedInterceptor createInterceptor(Operation operation) {
+ List<TestPolicy> policies = findPolicies();
+
+ if (policies.isEmpty()){
+ return null;
+ } else {
+ return new TestPolicyInterceptor(subject,
+ getContext(),
+ operation,
+ policies,
+ Phase.SERVICE_POLICY);
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..350ad6be96
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/META-INF/sca-contribution.xml
@@ -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
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.PolicyBuilder b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.PolicyBuilder
new file mode 100644
index 0000000000..d2138222a6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.PolicyBuilder
@@ -0,0 +1,18 @@
+# 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.
+testpolicy.TestPolicyBuilder;qname=http://tuscany.apache.org/xmlns/sca/1.1#testPolicy
+testbindingwspolicy.TestBindingWSPolicyBuilder;qname=http://tuscany.apache.org/xmlns/sca/1.1#testBindingWSPolicy
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
new file mode 100644
index 0000000000..afe19cdffc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Implementation class for the artifact processor extension
+testpolicy.TestPolicyProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.1#testPolicy,model=testpolicy.TestPolicy
+testbindingwspolicy.TestBindingWSPolicyProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.1#testBindingWSPolicy,model=testbindingwspolicy.TestBindingWSPolicy
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions
new file mode 100644
index 0000000000..f362b64a1f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions
@@ -0,0 +1,17 @@
+# 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.xml
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory
new file mode 100644
index 0000000000..f5c82538be
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Implementation class for the policy extension
+testpolicy.TestPolicyProviderFactory;model=testpolicy.TestPolicy
+testbindingwspolicy.TestBindingWSPolicyProviderFactory;model=testbindingwspolicy.TestBindingWSPolicy
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/definitions.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/definitions.xml
new file mode 100644
index 0000000000..3182ae65de
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/definitions.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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 xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
+
+ <intent name="testIntent" constrains="sca:implementation sca:binding">
+ <description>a test intent</description>
+ </intent>
+
+ <sca:policySet name="TestInteractonPolicySet1"
+ attachTo="//sca:binding.ws"
+ provides="tuscany:testIntent"
+ appliesTo="//sca:binding.ws">
+ <tuscany:testPolicy testString="interaction"/>
+ </sca:policySet>
+
+ <sca:policySet name="TestInteractonPolicySet2"
+ attachTo="//sca:binding.ws"
+ provides="tuscany:testIntent"
+ appliesTo="//sca:binding.ws">
+ <tuscany:testBindingWSPolicy testString="interaction"/>
+ </sca:policySet>
+
+ <!--
+ don't seem to be able to attach the following to binding.sca probably because
+ attachment is performed before the default binding models are created
+ -->
+ <sca:policySet name="TestInteractonPolicySet3"
+ attachTo="//sca:component"
+ provides="tuscany:testIntent"
+ appliesTo="//sca:binding.sca">
+ <tuscany:testPolicy testString="interaction"/>
+ </sca:policySet>
+
+ <sca:policySet name="TestImplementationPolicySet2"
+ attachTo="//sca:implementation.java"
+ provides="tuscany:testIntent"
+ appliesTo="//sca:implementation.java">
+ <tuscany:testPolicy testString="implementation"/>
+ </sca:policySet>
+
+</definitions> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/helloworld.composite
new file mode 100644
index 0000000000..0edd2c2a7b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/helloworld.composite
@@ -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"
+ targetNamespace="http://www.tuscany.apache.org/itests/policy/interceptors"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ name="HelloWorld">
+
+ <component name="HelloWorldClient">
+ <implementation.java class="helloworld.HelloWorldClient"/>
+ <reference name="helloWorldWS"
+ target="HelloWorldService2/HelloWorld/BindingWS"
+ requires="tuscany:testIntent"/>
+ </component>
+
+ <component name="HelloWorldService1">
+ <implementation.java class="helloworld.HelloWorldService"
+ requires="tuscany:testIntent"/>
+ <service name="HelloWorld" requires="tuscany:testIntent">
+ <binding.ws name="BindingWS"/>
+ </service>
+ </component>
+
+ <component name="HelloWorldService2" requires="tuscany:testIntent">
+ <implementation.java class="helloworld.HelloWorldService"/>
+ <service name="HelloWorld">
+ <binding.ws name="BindingWS"/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/helloworld.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/helloworld.wsdl
new file mode 100644
index 0000000000..15b89dbcea
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/main/resources/helloworld.wsdl
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld"
+ xmlns:tns="http://helloworld"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ </wsdl:binding>
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort1">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService1"/>
+ </wsdl:port>
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort2">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService2"/>
+ </wsdl:port>
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort3">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService3"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/test/java/interceptors/HelloworldTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/test/java/interceptors/HelloworldTestCase.java
new file mode 100644
index 0000000000..e34e4c6a35
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/interceptors/src/test/java/interceptors/HelloworldTestCase.java
@@ -0,0 +1,155 @@
+/*
+ * 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 interceptors;
+
+import java.util.List;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import helloworld.HelloWorld;
+import helloworld.HelloWorldException;
+import helloworld.StatusImpl;
+
+import org.apache.tuscany.sca.assembly.Component;
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+import org.apache.tuscany.sca.policy.PolicySet;
+import org.junit.Ignore;
+
+public class HelloworldTestCase extends TestCase {
+
+ private Node node;
+ private HelloWorld helloWorld;
+
+ @Override
+ protected void setUp() throws Exception {
+ StatusImpl.statusString = "";
+
+ node = NodeFactory.newInstance().createNode("helloworld.composite", new Contribution("test", "target/classes"));
+ node.start();
+ helloWorld = node.getService(HelloWorld.class, "HelloWorldClient/HelloWorld");
+ }
+
+ public void testHelloWorld() throws Exception {
+ // check response from application
+ assertEquals("Hello fred", helloWorld.getGreetings("fred"));
+
+ // check sequences of interceptors
+ System.out.println(StatusImpl.statusString);
+ assertEquals("TestBindingWSPolicyProviderService.configureBinding() - org.apache.tuscany.sca.binding.ws.axis2.provider.Axis2ServiceBindingProvider\n" +
+ "TestBindingWSPolicyProviderService.configureBinding() - org.apache.tuscany.sca.binding.ws.axis2.provider.Axis2ServiceBindingProvider\n" +
+ "TestPolicyInterceptor.processRequest() - HelloWorldClient#reference-binding($self$.HelloWorld/HelloWorld) @ reference.policy\n" +
+ "TestPolicyInterceptor.processRequest() - HelloWorldClient#service-binding(HelloWorld/HelloWorld) @ service.policy\n" +
+ "TestPolicyInterceptor.processRequest() - null @ implementation.policy\n" +
+ "At client.getGreetings() pre-invoke - fred\n" +
+ "TestBindingWSPolicyProviderReference.configureBinding() - org.apache.tuscany.sca.binding.ws.axis2.provider.Axis2ReferenceBindingProvider\n" +
+ "TestPolicyInterceptor.processRequest() - HelloWorldClient#reference-binding(helloWorldWS/BindingWS) @ reference.policy\n" +
+ "TestBindingWSPolicyInterceptor.processRequest() - HelloWorldClient#reference-binding(helloWorldWS/BindingWS) @ reference.binding.policy\n" +
+ "TestAxisHandler.invoke() - Reference OutFlow Handler\n" +
+ "TestAxisHandler.invoke() - Service InFlow Handler\n" +
+ "TestBindingWSPolicyInterceptor.processRequest() - HelloWorldService2#service-binding(HelloWorld/BindingWS) @ service.binding.policy\n" +
+ "TestPolicyInterceptor.processRequest() - HelloWorldService2#service-binding(HelloWorld/BindingWS) @ service.policy\n" +
+ "TestPolicyInterceptor.processRequest() - null @ implementation.policy\n" +
+ "At service.getGreetings() - Hello fred\n" +
+ "TestPolicyInterceptor.processResponse() - null @ implementation.policy\n" +
+ "TestPolicyInterceptor.processResponse() - HelloWorldService2#service-binding(HelloWorld/BindingWS) @ service.policy\n" +
+ "TestBindingWSPolicyInterceptor.processResponse() - HelloWorldService2#service-binding(HelloWorld/BindingWS) @ service.binding.policy\n" +
+ "TestAxisHandler.invoke() - Service OutFlow Handler\n" +
+ "TestAxisHandler.invoke() - Reference InFlow Handler\n" +
+ "TestBindingWSPolicyInterceptor.processResponse() - HelloWorldClient#reference-binding(helloWorldWS/BindingWS) @ reference.binding.policy\n" +
+ "TestPolicyInterceptor.processResponse() - HelloWorldClient#reference-binding(helloWorldWS/BindingWS) @ reference.policy\n" +
+ "At client.getGreetings() post-invoke - Hello fred\n" +
+ "TestPolicyInterceptor.processResponse() - null @ implementation.policy\n" +
+ "TestPolicyInterceptor.processResponse() - HelloWorldClient#service-binding(HelloWorld/HelloWorld) @ service.policy\n" +
+ "TestPolicyInterceptor.processResponse() - HelloWorldClient#reference-binding($self$.HelloWorld/HelloWorld) @ reference.policy\n",
+ StatusImpl.statusString);
+
+ // check final intents on endpoint reference to see if the matching process
+ // results on the right set
+ Composite domainComposite = ((NodeImpl)node).getDomainComposite();
+ List<PolicySet> policySets = domainComposite.getComponents().get(0).getReferences().get(0).getEndpointReferences().get(0).getPolicySets();
+
+ assertEquals(2, policySets.size());
+ assertEquals("TestInteractonPolicySet2", policySets.get(0).getName().getLocalPart());
+ assertEquals("TestInteractonPolicySet1", policySets.get(1).getName().getLocalPart());
+
+ }
+
+ public void testHelloWorldException() throws Exception {
+
+ // check response from application
+ try {
+ helloWorld.getGreetingsException("fred");
+ Assert.fail();
+ } catch (HelloWorldException ex){
+ assertEquals("Hello fred", ex.getMessage());
+ }
+
+ // check sequences of interceptors
+ System.out.println(StatusImpl.statusString);
+ assertEquals("TestBindingWSPolicyProviderService.configureBinding() - org.apache.tuscany.sca.binding.ws.axis2.provider.Axis2ServiceBindingProvider\n" +
+ "TestBindingWSPolicyProviderService.configureBinding() - org.apache.tuscany.sca.binding.ws.axis2.provider.Axis2ServiceBindingProvider\n" +
+ "TestPolicyInterceptor.processRequest() - HelloWorldClient#reference-binding($self$.HelloWorld/HelloWorld) @ reference.policy\n" +
+ "TestPolicyInterceptor.processRequest() - HelloWorldClient#service-binding(HelloWorld/HelloWorld) @ service.policy\n" +
+ "TestPolicyInterceptor.processRequest() - null @ implementation.policy\n" +
+ "At client.getGreetingsException() pre-invoke - fred\n" +
+ "TestBindingWSPolicyProviderReference.configureBinding() - org.apache.tuscany.sca.binding.ws.axis2.provider.Axis2ReferenceBindingProvider\n" +
+ "TestPolicyInterceptor.processRequest() - HelloWorldClient#reference-binding(helloWorldWS/BindingWS) @ reference.policy\n" +
+ "TestBindingWSPolicyInterceptor.processRequest() - HelloWorldClient#reference-binding(helloWorldWS/BindingWS) @ reference.binding.policy\n" +
+ "TestAxisHandler.invoke() - Reference OutFlow Handler\n" +
+ "TestAxisHandler.invoke() - Service InFlow Handler\n" +
+ "TestBindingWSPolicyInterceptor.processRequest() - HelloWorldService2#service-binding(HelloWorld/BindingWS) @ service.binding.policy\n" +
+ "TestPolicyInterceptor.processRequest() - HelloWorldService2#service-binding(HelloWorld/BindingWS) @ service.policy\n" +
+ "TestPolicyInterceptor.processRequest() - null @ implementation.policy\n" +
+ "At service.getGreetingsException() - Hello fred\n" +
+ "TestPolicyInterceptor.processResponse() - null @ implementation.policy\n" +
+ "TestPolicyInterceptor.processResponse() - HelloWorldService2#service-binding(HelloWorld/BindingWS) @ service.policy\n" +
+ "TestBindingWSPolicyInterceptor.processResponse() - HelloWorldService2#service-binding(HelloWorld/BindingWS) @ service.binding.policy\n" +
+ "TestAxisHandler.invoke() - Service OutFaultFlow Handler\n" +
+ "TestAxisHandler.invoke() - Reference InFaultFlow Handler\n" +
+ "TestBindingWSPolicyInterceptor.processResponse() - HelloWorldClient#reference-binding(helloWorldWS/BindingWS) @ reference.binding.policy\n" +
+ "TestPolicyInterceptor.processResponse() - HelloWorldClient#reference-binding(helloWorldWS/BindingWS) @ reference.policy\n" +
+ "At client.getGreetingsException() post-exception - Hello fred\n" +
+ "TestPolicyInterceptor.processResponse() - null @ implementation.policy\n" +
+ "TestPolicyInterceptor.processResponse() - HelloWorldClient#service-binding(HelloWorld/HelloWorld) @ service.policy\n" +
+ "TestPolicyInterceptor.processResponse() - HelloWorldClient#reference-binding($self$.HelloWorld/HelloWorld) @ reference.policy\n",
+ StatusImpl.statusString);
+
+ // check final intents on endpoint reference to see if the matching process
+ // results on the right set
+ Composite domainComposite = ((NodeImpl)node).getDomainComposite();
+ List<PolicySet> policySets = domainComposite.getComponents().get(0).getReferences().get(0).getEndpointReferences().get(0).getPolicySets();
+
+ assertEquals(2, policySets.size());
+ assertEquals("TestInteractonPolicySet2", policySets.get(0).getName().getLocalPart());
+ assertEquals("TestInteractonPolicySet1", policySets.get(1).getName().getLocalPart());
+
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/pom.xml
new file mode 100644
index 0000000000..364d4b87e8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/pom.xml
@@ -0,0 +1,52 @@
+<?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-policy</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-policy-matching</artifactId>
+ <name>Apache Tuscany SCA iTest Policy Matching</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/java/org/apache/tuscany/sca/policy/matching/helloworld/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/java/org/apache/tuscany/sca/policy/matching/helloworld/HelloWorld.java
new file mode 100644
index 0000000000..16db3fd9fc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/java/org/apache/tuscany/sca/policy/matching/helloworld/HelloWorld.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.policy.matching.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorld {
+
+ String getGreetings(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/java/org/apache/tuscany/sca/policy/matching/helloworld/HelloWorldClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/java/org/apache/tuscany/sca/policy/matching/helloworld/HelloWorldClient.java
new file mode 100644
index 0000000000..d34591713b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/java/org/apache/tuscany/sca/policy/matching/helloworld/HelloWorldClient.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.policy.matching.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClient implements HelloWorld {
+
+ @Reference
+ public HelloWorld helloWorld;
+
+ public String getGreetings(String s) {
+ String response = helloWorld.getGreetings(s);
+ System.out.println("At client: " + response);
+ return response;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/java/org/apache/tuscany/sca/policy/matching/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/java/org/apache/tuscany/sca/policy/matching/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..31a2d2cb89
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/java/org/apache/tuscany/sca/policy/matching/helloworld/HelloWorldService.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.policy.matching.helloworld;
+
+public class HelloWorldService implements HelloWorld {
+
+ public String getGreetings(String s) {
+ String response = "Hello " + s;
+ System.out.println("At service: " + response);
+ return response;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..6ae1c88c42
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/resources/META-INF/sca-contribution.xml
@@ -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/policy">
+ <deployable composite="itest:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions
new file mode 100644
index 0000000000..45b6be47b7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions
@@ -0,0 +1,17 @@
+# 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.
+org/apache/tuscany/sca/policy/matching/helloworld/definitions.xml \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/definitions.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/definitions.xml
new file mode 100644
index 0000000000..c70aae996b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/definitions.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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 xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
+
+ <intent name="testIntent1" constrains="sca:binding" intentType="interaction"/>
+
+ <intent name="testIntent2" constrains="sca:binding" intentType="interaction"/>
+
+ <intent name="testIntent3" constrains="sca:binding" intentType="interaction" excludes="tuscany:testIntent1" />
+
+ <intent name="testIntent4" constrains="sca:binding" intentType="interaction"/>
+
+ <intent name="testIntent5" constrains="sca:binding" intentType="interaction"/>
+
+ <intent name="testIntent6" constrains="sca:binding" intentType="interaction"/>
+
+ <policySet name="testPolicy1"
+ provides="tuscany:testIntent1"
+ appliesTo="//sca:binding.sca | //sca:implementation.java">
+ </policySet>
+
+ <policySet name="testPolicy2"
+ provides="tuscany:testIntent4 tuscany:testIntent5"
+ appliesTo="//sca:binding.sca | //sca:implementation.java">
+ <tuscany:jdkLogger name="test.logger">
+ <tuscany:logLevel>FINE</tuscany:logLevel>
+ <tuscany:resourceBundle>LoggingMessages.properties</tuscany:resourceBundle>
+ </tuscany:jdkLogger>
+ </policySet>
+
+ <policySet name="testPolicy3"
+ provides="tuscany:testIntent6"
+ appliesTo="//sca:binding.sca | //sca:implementation.java">
+ <wsp:Policy>
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <tuscany:jdkLogger name="test.logger">
+ <tuscany:logLevel>FINE</tuscany:logLevel>
+ <tuscany:resourceBundle>LoggingMessages.properties</tuscany:resourceBundle>
+ </tuscany:jdkLogger>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+ </policySet>
+
+</definitions> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/helloworld.composite
new file mode 100644
index 0000000000..7dfe083bae
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/helloworld.composite
@@ -0,0 +1,86 @@
+<?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.
+-->
+
+<!--
+ NOTE - not using external attachment yet in this test because the
+ policy xpath functions are not working yet
+-->
+<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/policy"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ name="HelloWorld">
+
+ <component name="HelloWorldClientMutuallyExclusiveIntents">
+ <implementation.java class="org.apache.tuscany.sca.policy.matching.helloworld.HelloWorldClient"/>
+ <reference name="helloWorld" target="HelloWorldService2" requires="tuscany:testIntent3"/>
+ </component>
+
+ <component name="HelloWorldClientNoIntentsOrPolicies">
+ <implementation.java class="org.apache.tuscany.sca.policy.matching.helloworld.HelloWorldClient"/>
+ <reference name="helloWorld" target="HelloWorldService1" />
+ </component>
+
+ <component name="HelloUnresolvedIntentsOnReference">
+ <implementation.java class="org.apache.tuscany.sca.policy.matching.helloworld.HelloWorldClient"/>
+ <reference name="helloWorld" target="HelloWorldService2" requires="tuscany:testIntent1 tuscany:testIntent2" policySets="tuscany:testPolicy1"/>
+ </component>
+
+ <component name="HelloWorldClientIntentsButNoPolicies1">
+ <implementation.java class="org.apache.tuscany.sca.policy.matching.helloworld.HelloWorldClient"/>
+ <reference name="helloWorld" target="HelloWorldService2" />
+ </component>
+
+ <component name="HelloWorldClientIntentsButNoPolicies2">
+ <implementation.java class="org.apache.tuscany.sca.policy.matching.helloworld.HelloWorldClient"/>
+ <reference name="helloWorld" target="HelloWorldService2" requires="tuscany:testIntent1" policySets="tuscany:testPolicy1"/>
+ </component>
+
+ <component name="HelloWorldClientSomePoliciesOnOneSideButNoneOnTheOther">
+ <implementation.java class="org.apache.tuscany.sca.policy.matching.helloworld.HelloWorldClient"/>
+ <reference name="helloWorld" target="HelloWorldService3" />
+ </component>
+
+ <component name="HelloWorldClientPolicySetQNameMatch">
+ <implementation.java class="org.apache.tuscany.sca.policy.matching.helloworld.HelloWorldClient"/>
+ <reference name="helloWorld" target="HelloWorldService3" requires="tuscany:testIntent5" policySets="tuscany:testPolicy2"/>
+ </component>
+
+ <component name="HelloWorldClientDifferentPolicyLanguage">
+ <implementation.java class="org.apache.tuscany.sca.policy.matching.helloworld.HelloWorldClient"/>
+ <reference name="helloWorld" target="HelloWorldService3" requires="tuscany:testIntent6" policySets="tuscany:testPolicy3"/>
+ </component>
+
+ <component name="HelloWorldService1">
+ <implementation.java class="org.apache.tuscany.sca.policy.matching.helloworld.HelloWorldService"/>
+ <service name="HelloWorld"/>
+ </component>
+
+ <component name="HelloWorldService2">
+ <implementation.java class="org.apache.tuscany.sca.policy.matching.helloworld.HelloWorldService"/>
+ <service name="HelloWorld" requires="tuscany:testIntent1" policySets="tuscany:testPolicy1"/>
+ </component>
+
+ <component name="HelloWorldService3">
+ <implementation.java class="org.apache.tuscany.sca.policy.matching.helloworld.HelloWorldService"/>
+ <service name="HelloWorld" requires="tuscany:testIntent4" policySets="tuscany:testPolicy2"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/helloworld.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/helloworld.wsdl
new file mode 100644
index 0000000000..a352696b8e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/main/resources/org/apache/tuscany/sca/policy/matching/helloworld/helloworld.wsdl
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld"
+ xmlns:tns="http://helloworld"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ </wsdl:binding>
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort1">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService1"/>
+ </wsdl:port>
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort2">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService2"/>
+ </wsdl:port>
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort3">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService3"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/test/java/org/apache/tuscany/sca/policy/matching/MatchingTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/test/java/org/apache/tuscany/sca/policy/matching/MatchingTestCase.java
new file mode 100644
index 0000000000..5b1f971a3a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/matching/src/test/java/org/apache/tuscany/sca/policy/matching/MatchingTestCase.java
@@ -0,0 +1,130 @@
+/*
+ * 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.policy.matching;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.policy.matching.helloworld.HelloWorld;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/*
+ * Test the various conditions in the matching algorithm
+ * 1 - FAIL if there are intents that are mutually exclusive between reference and service
+ * 2 - PASS if there are no intents or policies present at reference and service
+ * 3 - FAIL if there are unresolved intents (intents with no policy set) at the reference (service should have been checked previously)
+ * 4 - PASS if there are no policies at reference and service (now we know all intents are resolved)
+ * 5 - FAIL if there are some policies on one side but not on the other
+ * 6 - PASS if the QName of the policy sets on each side match
+ * 7 - FAIL if the policy languages on both sides are different
+ * 8 - Perform policy specific match
+ */
+public class MatchingTestCase {
+
+ private static Node node;
+
+
+ @BeforeClass
+ public static void setUp() throws Exception {
+ try {
+ node = NodeFactory.newInstance().createNode(new Contribution("test", "target/classes"));
+ node.start();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+ }
+
+ @Test
+ public void testMutuallyExclusiveIntents() throws Exception {
+ HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClientMutuallyExclusiveIntents");
+ try {
+ helloWorld.getGreetings("petra");
+ fail("Exception expected");
+ } catch (Exception ex) {
+ assertTrue(ex.getMessage().indexOf("No match because the following intents are mutually exclusive {http://tuscany.apache.org/xmlns/sca/1.1}testIntent3 {http://tuscany.apache.org/xmlns/sca/1.1}testIntent1") > -1);
+ }
+ }
+
+ @Test
+ public void testNoIntentsOrPolicies() throws Exception {
+ HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClientNoIntentsOrPolicies");
+ assertEquals("Hello petra", helloWorld.getGreetings("petra"));
+ }
+
+ @Test
+ public void testUnresolvedIntentsOnReference() throws Exception {
+ HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloUnresolvedIntentsOnReference");
+ try {
+ helloWorld.getGreetings("petra");
+ fail("Exception expected");
+ } catch (Exception ex) {
+ assertTrue(ex.getMessage().indexOf("No match because there are unresolved intents [{http://tuscany.apache.org/xmlns/sca/1.1}testIntent2]") > -1);
+ }
+ }
+
+ @Test
+ public void testIntentsButNoPolicies() throws Exception {
+ HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClientIntentsButNoPolicies1");
+ assertEquals("Hello petra", helloWorld.getGreetings("petra"));
+
+ helloWorld = node.getService(HelloWorld.class, "HelloWorldClientIntentsButNoPolicies2");
+ assertEquals("Hello petra", helloWorld.getGreetings("petra"));
+ }
+
+ @Test
+ public void testSomePoliciesOnOneSideButNoneOnTheOther() throws Exception {
+ HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClientSomePoliciesOnOneSideButNoneOnTheOther");
+ assertEquals("Hello petra",helloWorld.getGreetings("petra"));
+ }
+
+ @Test
+ public void testPolicySetQNameMatch() throws Exception {
+ HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClientPolicySetQNameMatch");
+ assertEquals("Hello petra", helloWorld.getGreetings("petra"));
+ }
+
+ @Test
+ public void testDifferentPolicyLanguage() throws Exception {
+ try {
+ HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClientDifferentPolicyLanguage");
+ helloWorld.getGreetings("petra");
+ fail("Exception expected");
+ } catch (Exception ex) {
+ assertTrue(ex.getMessage().indexOf("No match because the policy sets on either side have policies in differnt languages {http://schemas.xmlsoap.org/ws/2004/09/policy}Policy and {http://tuscany.apache.org/xmlns/sca/1.1}jdkLogger") > -1);
+ }
+ }
+
+ @Test
+ public void testPolicySpecificMatch() throws Exception {
+ // TODO
+ }
+
+ @AfterClass
+ public static void tearDown() throws Exception {
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/pom.xml
new file mode 100644
index 0000000000..0096f4a5c0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/pom.xml
@@ -0,0 +1,76 @@
+<?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-policy</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-policy-operations</artifactId>
+ <name>Apache Tuscany SCA iTest Policy Operations</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-policy-logging</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-policy-security</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-policy-security-jsr250</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.19</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/java/org/apache/tuscany/sca/policy/operations/helloworld/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/java/org/apache/tuscany/sca/policy/operations/helloworld/HelloWorld.java
new file mode 100644
index 0000000000..313fc7d3ca
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/java/org/apache/tuscany/sca/policy/operations/helloworld/HelloWorld.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.policy.operations.helloworld;
+
+import org.oasisopen.sca.annotation.PolicySets;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorld {
+
+ @PolicySets("{http://tuscany.apache.org/xmlns/sca/1.1}JDKLoggingPolicy")
+ String getGreetings(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/java/org/apache/tuscany/sca/policy/operations/helloworld/HelloWorldClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/java/org/apache/tuscany/sca/policy/operations/helloworld/HelloWorldClient.java
new file mode 100644
index 0000000000..674731d61c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/java/org/apache/tuscany/sca/policy/operations/helloworld/HelloWorldClient.java
@@ -0,0 +1,39 @@
+/*
+ * 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.policy.operations.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClient implements HelloWorld {
+
+ @Reference
+ public HelloWorld helloWorldWS;
+
+ @Reference
+ public HelloWorld helloWorldWS1;
+
+ public String getGreetings(String s) {
+ String response = helloWorldWS.getGreetings(s);
+ response += helloWorldWS1.getGreetings(s);
+ System.out.println("At client: " + response);
+ return response;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/java/org/apache/tuscany/sca/policy/operations/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/java/org/apache/tuscany/sca/policy/operations/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..6113d415b0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/java/org/apache/tuscany/sca/policy/operations/helloworld/HelloWorldService.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.policy.operations.helloworld;
+
+import javax.annotation.security.PermitAll;
+
+public class HelloWorldService implements HelloWorld {
+
+ @PermitAll
+ public String getGreetings(String s) {
+ String response = "Hello " + s;
+ System.out.println("At service: " + response);
+ return response;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/java/org/apache/tuscany/sca/policy/operations/helloworld/HelloWorldService1.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/java/org/apache/tuscany/sca/policy/operations/helloworld/HelloWorldService1.java
new file mode 100644
index 0000000000..962c6afbf9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/java/org/apache/tuscany/sca/policy/operations/helloworld/HelloWorldService1.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.policy.operations.helloworld;
+
+import javax.annotation.security.PermitAll;
+
+@PermitAll
+public class HelloWorldService1 implements HelloWorld {
+
+ public String getGreetings(String s) {
+ String response = "Hello " + s;
+ System.out.println("At service: " + response);
+ return response;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/resources/LoggingMessages.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/resources/LoggingMessages.properties
new file mode 100644
index 0000000000..09c0e7565d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/resources/LoggingMessages.properties
@@ -0,0 +1,16 @@
+# 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.
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..d39cab491f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/resources/META-INF/sca-contribution.xml
@@ -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">
+ <deployable composite="itest:HelloWorld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions
new file mode 100644
index 0000000000..dfe2e6ff93
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions
@@ -0,0 +1,17 @@
+# 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.
+org/apache/tuscany/sca/policy/operations/helloworld/definitions.xml \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/resources/org/apache/tuscany/sca/policy/operations/helloworld/definitions.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/resources/org/apache/tuscany/sca/policy/operations/helloworld/definitions.xml
new file mode 100644
index 0000000000..0b969e07bc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/resources/org/apache/tuscany/sca/policy/operations/helloworld/definitions.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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 xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
+
+ <policySet name="JDKLoggingPolicy"
+ provides="tuscany:logging"
+ appliesTo="//sca:binding.ws">
+ <!-- attachTo="//sca:service | //sca:reference"-->
+ <wsp:Policy>
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <tuscany:jdkLogger name="test.logger">
+ <tuscany:logLevel>FINE</tuscany:logLevel>
+ <tuscany:resourceBundle>LoggingMessages.properties</tuscany:resourceBundle>
+ </tuscany:jdkLogger>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+ </policySet>
+
+</definitions> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/resources/org/apache/tuscany/sca/policy/operations/helloworld/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/resources/org/apache/tuscany/sca/policy/operations/helloworld/helloworld.composite
new file mode 100644
index 0000000000..f9f437f30e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/resources/org/apache/tuscany/sca/policy/operations/helloworld/helloworld.composite
@@ -0,0 +1,46 @@
+<?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"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ name="HelloWorld">
+
+ <component name="HelloWorldClient">
+ <implementation.java class="org.apache.tuscany.sca.policy.operations.helloworld.HelloWorldClient"/>
+ <reference name="helloWorldWS" target="HelloWorldService"/>
+ <reference name="helloWorldWS1" target="HelloWorldService1"/>
+ </component>
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.policy.operations.helloworld.HelloWorldService"/>
+ <service name="HelloWorld">
+ <binding.ws/>
+ </service>
+ </component>
+
+ <component name="HelloWorldService1">
+ <implementation.java class="org.apache.tuscany.sca.policy.operations.helloworld.HelloWorldService1"/>
+ <service name="HelloWorld">
+ <binding.ws/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/resources/org/apache/tuscany/sca/policy/operations/helloworld/helloworld.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/resources/org/apache/tuscany/sca/policy/operations/helloworld/helloworld.wsdl
new file mode 100644
index 0000000000..15b89dbcea
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/main/resources/org/apache/tuscany/sca/policy/operations/helloworld/helloworld.wsdl
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld"
+ xmlns:tns="http://helloworld"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ </wsdl:binding>
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort1">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService1"/>
+ </wsdl:port>
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort2">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService2"/>
+ </wsdl:port>
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort3">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService3"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/test/java/org/apache/tuscany/sca/policy/operations/OperationsPolicyTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/test/java/org/apache/tuscany/sca/policy/operations/OperationsPolicyTestCase.java
new file mode 100644
index 0000000000..452d448c59
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/operations/src/test/java/org/apache/tuscany/sca/policy/operations/OperationsPolicyTestCase.java
@@ -0,0 +1,65 @@
+/*
+ * 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.policy.operations;
+
+import javax.xml.namespace.QName;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.assembly.xml.Constants;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+import org.apache.tuscany.sca.policy.operations.helloworld.HelloWorld;
+
+public class OperationsPolicyTestCase extends TestCase {
+
+ private static final QName PERMIT_ALL = new QName(Constants.SCA11_TUSCANY_NS,"permitAll");
+
+ private Node node;
+ private HelloWorld helloWorld;
+
+ @Override
+ protected void setUp() throws Exception {
+ node = NodeFactory.newInstance().createNode(new Contribution("test", "target/classes"));
+ node.start();
+ helloWorld = node.getService(HelloWorld.class, "HelloWorldClient");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ }
+
+ public void testCalculator() throws Exception {
+ assertEquals("Hello petraHello petra", helloWorld.getGreetings("petra"));
+ Composite domainComposite = ((NodeImpl)node).getDomainComposite();
+
+ // Check that the operation level policy is present
+ assertEquals(PERMIT_ALL,
+ domainComposite.getComponents().get(1).getImplementation().getOperations().get(0).getPolicySets().get(0).getName());
+
+ // Check that the class level policy is present
+ assertEquals(PERMIT_ALL,
+ domainComposite.getComponents().get(2).getImplementation().getPolicySets().get(0).getName());
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/pom.xml
new file mode 100644
index 0000000000..9595b86364
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/pom.xml
@@ -0,0 +1,40 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <packaging>pom</packaging>
+ <artifactId>itest-policy</artifactId>
+ <name>Apache Tuscany SCA iTest Policy</name>
+
+ <modules>
+ <module>matching</module>
+ <module>wspolicy</module>
+ <module>operations</module>
+ <module>interceptors</module>
+ <module>reliability</module>
+ </modules>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/pom.xml
new file mode 100644
index 0000000000..a6cdaa8975
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/pom.xml
@@ -0,0 +1,57 @@
+<?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-policy</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-policy-reliability</artifactId>
+ <name>Apache Tuscany SCA iTest Policy Reliability</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.19</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/helloworld/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/helloworld/HelloWorld.java
new file mode 100644
index 0000000000..1f5b8b365d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/helloworld/HelloWorld.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorld {
+
+ String getGreetings(String s);
+
+ String getGreetingsException(String s) throws HelloWorldException;
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/helloworld/HelloWorldClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/helloworld/HelloWorldClient.java
new file mode 100644
index 0000000000..baeea9bb4b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/helloworld/HelloWorldClient.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Requires;
+
+public class HelloWorldClient implements HelloWorld {
+
+ @Reference
+ public HelloWorld helloWorldWS;
+
+ public String getGreetings(String s) {
+ StatusImpl.appendStatus("At client.getGreetings() pre-invoke", s);
+ String response = helloWorldWS.getGreetings(s);
+ StatusImpl.appendStatus("At client.getGreetings() post-invoke", response);
+ return response;
+ }
+
+ public String getGreetingsException(String s) throws HelloWorldException {
+ StatusImpl.appendStatus("At client.getGreetingsException() pre-invoke", s);
+ try {
+ String response = helloWorldWS.getGreetingsException(s);
+ StatusImpl.appendStatus("At client.getGreetingsException() post-invoke", response);
+ return response;
+ } catch (HelloWorldException ex){
+ StatusImpl.appendStatus("At client.getGreetingsException() post-exception", ex.getMessage());
+ throw ex;
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/helloworld/HelloWorldException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/helloworld/HelloWorldException.java
new file mode 100644
index 0000000000..b4a9fec640
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/helloworld/HelloWorldException.java
@@ -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 helloworld;
+
+
+public class HelloWorldException extends Exception {
+
+ private static final long serialVersionUID = 4608283774062947117L;
+
+ public HelloWorldException(){
+ }
+
+ public HelloWorldException(String message){
+ super(message);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..e4fb70af09
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/helloworld/HelloWorldService.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package helloworld;
+
+import org.oasisopen.sca.RequestContext;
+import org.oasisopen.sca.annotation.Context;
+
+public class HelloWorldService implements HelloWorld {
+
+ @Context
+ protected RequestContext requestContext;
+
+ public String getGreetings(String s) {
+ //Subject subject = requestContext.getSecuritySubject();
+ String response = "Hello " + s;
+ StatusImpl.appendStatus("At service.getGreetings()", response);
+ return response;
+ }
+
+ public String getGreetingsException(String s) throws HelloWorldException {
+ String response = "Hello " + s;
+ StatusImpl.appendStatus("At service.getGreetingsException()", response);
+ throw new HelloWorldException(response);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/helloworld/StatusImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/helloworld/StatusImpl.java
new file mode 100644
index 0000000000..644853d6c2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/helloworld/StatusImpl.java
@@ -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 helloworld;
+
+public class StatusImpl {
+
+ public static String statusString = "";
+
+ public static void appendStatus(String event, String location){
+ // remove any addresses from the strings
+ location = location.replaceAll("\\(@.*Endpoint", "Endpoint");
+ statusString += event + " - " + location + "\n";
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSAxisHandler.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSAxisHandler.java
new file mode 100644
index 0000000000..686866e12d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSAxisHandler.java
@@ -0,0 +1,45 @@
+/*
+ * 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 testbindingwspolicy;
+
+import helloworld.StatusImpl;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.handlers.AbstractHandler;
+
+/**
+ * An Axis handler to show that policy can add one of needs be
+ *
+ * @version $Rev: 881959 $ $Date: 2009-11-18 22:07:09 +0000 (Wed, 18 Nov 2009) $
+ */
+public class TestBindingWSAxisHandler extends AbstractHandler
+{
+ private String name;
+
+ public TestBindingWSAxisHandler(String name)
+ {
+ this.name = name;
+ }
+
+ public InvocationResponse invoke(MessageContext msgContext) throws AxisFault {
+ StatusImpl.appendStatus("TestAxisHandler.invoke()", name);
+ return InvocationResponse.CONTINUE;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSPolicy.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSPolicy.java
new file mode 100644
index 0000000000..c7803f03bc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSPolicy.java
@@ -0,0 +1,63 @@
+/*
+ * 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 testbindingwspolicy;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.assembly.Base;
+
+/**
+ * Implementation for policies that could be injected as parameter
+ * into the axis2config.
+ *
+ * @version $Rev: 824551 $ $Date: 2009-10-13 01:21:22 +0100 (Tue, 13 Oct 2009) $
+ */
+public class TestBindingWSPolicy {
+ static final String SCA11_NS = Base.SCA11_NS;
+ static final String SCA11_TUSCANY_NS = Base.SCA11_TUSCANY_NS;
+ static final QName TEST_BINDINGWS_POLICY_QNAME = new QName(SCA11_TUSCANY_NS, "testBindingWSPolicy");
+
+ private String testString;
+
+ public String getTestString() {
+ return testString;
+ }
+
+ public void setTestString(String testString) {
+ this.testString = testString;
+ }
+
+ public QName getSchemaName() {
+ return TEST_BINDINGWS_POLICY_QNAME;
+ }
+
+ public boolean isUnresolved() {
+ return false;
+ }
+
+ public void setUnresolved(boolean unresolved) {
+ }
+
+ @Override
+ public String toString() {
+ return "TestBindingWSPolicy [testString=" +
+ testString
+ + "]";
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSPolicyBuilder.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSPolicyBuilder.java
new file mode 100644
index 0000000000..4fdcde678d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSPolicyBuilder.java
@@ -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 testbindingwspolicy;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.assembly.Component;
+import org.apache.tuscany.sca.assembly.Endpoint;
+import org.apache.tuscany.sca.assembly.EndpointReference;
+import org.apache.tuscany.sca.assembly.Implementation;
+import org.apache.tuscany.sca.assembly.builder.BuilderContext;
+import org.apache.tuscany.sca.assembly.builder.PolicyBuilder;
+import org.apache.tuscany.sca.policy.PolicyExpression;
+import org.apache.tuscany.sca.policy.PolicySet;
+import org.apache.tuscany.sca.policy.PolicySubject;
+
+/**
+ *
+ */
+public class TestBindingWSPolicyBuilder implements PolicyBuilder<TestBindingWSPolicy> {
+
+ public boolean build(Endpoint endpoint, BuilderContext context) {
+ List<TestBindingWSPolicy> polices = getPolicies(endpoint);
+ System.out.println(endpoint + ": " + polices);
+ return true;
+ }
+
+ public boolean build(EndpointReference endpointReference, BuilderContext context) {
+ List<TestBindingWSPolicy> polices = getPolicies(endpointReference);
+ System.out.println(endpointReference + ": " + polices);
+ return true;
+ }
+
+ public boolean build(Component component, Implementation implementation, BuilderContext context) {
+ List<TestBindingWSPolicy> polices = getPolicies(implementation);
+ System.out.println(implementation + ": " + polices);
+ return true;
+ }
+
+ public QName getPolicyType() {
+ return TestBindingWSPolicy.TEST_BINDINGWS_POLICY_QNAME;
+ }
+
+ public List<QName> getSupportedBindings() {
+ return null;
+ }
+
+ private List<TestBindingWSPolicy> getPolicies(PolicySubject subject) {
+ List<TestBindingWSPolicy> polices = new ArrayList<TestBindingWSPolicy>();
+ for (PolicySet ps : subject.getPolicySets()) {
+ for (PolicyExpression exp : ps.getPolicies()) {
+ if (getPolicyType().equals(exp.getName())) {
+ polices.add((TestBindingWSPolicy)exp.getPolicy());
+ }
+ }
+ }
+ return polices;
+ }
+
+ public boolean build(EndpointReference endpointReference, Endpoint endpoint, BuilderContext context) {
+ return true;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSPolicyInterceptor.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSPolicyInterceptor.java
new file mode 100644
index 0000000000..aa33c74aea
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSPolicyInterceptor.java
@@ -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 testbindingwspolicy;
+
+import helloworld.StatusImpl;
+
+import java.util.List;
+
+import org.apache.tuscany.sca.assembly.Component;
+import org.apache.tuscany.sca.assembly.Endpoint;
+import org.apache.tuscany.sca.assembly.EndpointReference;
+import org.apache.tuscany.sca.core.invocation.InterceptorAsyncImpl;
+import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.invocation.Message;
+import org.apache.tuscany.sca.invocation.PhasedInterceptor;
+import org.apache.tuscany.sca.policy.PolicySubject;
+
+
+public class TestBindingWSPolicyInterceptor extends InterceptorAsyncImpl implements PhasedInterceptor {
+
+ private Operation operation;
+ private List<TestBindingWSPolicy> policies;
+ private PolicySubject subject;
+ private String context;
+ private String phase;
+
+ public TestBindingWSPolicyInterceptor(PolicySubject subject,
+ String context,
+ Operation operation,
+ List<TestBindingWSPolicy> policies,
+ String phase) {
+ super();
+ this.operation = operation;
+ this.policies = policies;
+ this.subject = subject;
+ this.phase = phase;
+ this.context = getContext();
+ }
+
+ private String getContext() {
+ if (subject instanceof Endpoint) {
+ Endpoint endpoint = (Endpoint)subject;
+ return endpoint.getURI();
+ } else if (subject instanceof EndpointReference) {
+ EndpointReference endpointReference = (EndpointReference)subject;
+ return endpointReference.getURI();
+ } else if (subject instanceof Component) {
+ Component component = (Component)subject;
+ return component.getURI();
+ }
+ return null;
+ }
+
+ public Message processRequest(Message msg) {
+ StatusImpl.appendStatus("TestBindingWSPolicyInterceptor.processRequest()", context + " @ " + phase);
+ return msg;
+ }
+
+ public Message processResponse(Message msg) {
+ StatusImpl.appendStatus("TestBindingWSPolicyInterceptor.processResponse()", context + " @ " + phase);
+ return msg;
+ }
+
+ public String getPhase() {
+ return phase;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSPolicyProcessor.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSPolicyProcessor.java
new file mode 100644
index 0000000000..2b013f7ba2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSPolicyProcessor.java
@@ -0,0 +1,99 @@
+/*
+ * 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 testbindingwspolicy;
+
+import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
+import static javax.xml.stream.XMLStreamConstants.START_ELEMENT;
+
+import java.util.logging.Level;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
+import org.apache.tuscany.sca.contribution.processor.ContributionResolveException;
+import org.apache.tuscany.sca.contribution.processor.ContributionWriteException;
+import org.apache.tuscany.sca.contribution.processor.ProcessorContext;
+import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
+import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+
+/**
+ *
+ * @version $Rev: 883438 $ $Date: 2009-11-23 18:07:34 +0000 (Mon, 23 Nov 2009) $
+ */
+public class TestBindingWSPolicyProcessor implements StAXArtifactProcessor<TestBindingWSPolicy> {
+
+ public QName getArtifactType() {
+ return TestBindingWSPolicy.TEST_BINDINGWS_POLICY_QNAME;
+ }
+
+ public TestBindingWSPolicyProcessor(FactoryExtensionPoint modelFactories) {
+ }
+
+
+ public TestBindingWSPolicy read(XMLStreamReader reader, ProcessorContext context) throws ContributionReadException, XMLStreamException {
+ TestBindingWSPolicy policy = new TestBindingWSPolicy();
+ int event = reader.getEventType();
+ QName name = null;
+
+
+ while (reader.hasNext()) {
+ event = reader.getEventType();
+ switch (event) {
+ case START_ELEMENT : {
+ name = reader.getName();
+ if ( name.equals("testString") ) {
+ String testString = reader.getAttributeValue(null, "testString");
+ policy.setTestString(testString);
+ }
+ break;
+ }
+ }
+
+ if ( event == END_ELEMENT ) {
+ if ( TestBindingWSPolicy.TEST_BINDINGWS_POLICY_QNAME.equals(reader.getName()) ) {
+ break;
+ }
+ }
+
+ //Read the next element
+ if (reader.hasNext()) {
+ reader.next();
+ }
+ }
+
+ return policy;
+ }
+
+ public void write(TestBindingWSPolicy policy, XMLStreamWriter writer, ProcessorContext context) throws ContributionWriteException, XMLStreamException {
+ // TODO
+ }
+
+ public Class<TestBindingWSPolicy> getModelType() {
+ return TestBindingWSPolicy.class;
+ }
+
+ public void resolve(TestBindingWSPolicy arg0, ModelResolver arg1, ProcessorContext context) throws ContributionResolveException {
+
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSPolicyProviderFactory.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSPolicyProviderFactory.java
new file mode 100644
index 0000000000..df626a10ff
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSPolicyProviderFactory.java
@@ -0,0 +1,69 @@
+/*
+ * 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 testbindingwspolicy;
+
+import org.apache.tuscany.sca.assembly.Endpoint;
+import org.apache.tuscany.sca.assembly.EndpointReference;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.provider.PolicyProvider;
+import org.apache.tuscany.sca.provider.PolicyProviderFactory;
+import org.apache.tuscany.sca.runtime.RuntimeComponent;
+
+/**
+ * @version $Rev: 792622 $ $Date: 2009-07-09 19:14:18 +0100 (Thu, 09 Jul 2009) $
+ */
+public class TestBindingWSPolicyProviderFactory implements PolicyProviderFactory<TestBindingWSPolicy> {
+ private ExtensionPointRegistry registry;
+
+ public TestBindingWSPolicyProviderFactory(ExtensionPointRegistry registry) {
+ super();
+ this.registry = registry;
+ }
+
+ /**
+ * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createImplementationPolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.assembly.Implementation)
+ */
+ public PolicyProvider createImplementationPolicyProvider(RuntimeComponent component) {
+ // no implementation provider for this binding specific policy
+ return null;
+ }
+
+ /**
+ * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createReferencePolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentReference, org.apache.tuscany.sca.assembly.Binding)
+ */
+ public PolicyProvider createReferencePolicyProvider(EndpointReference endpointReference) {
+ return new TestBindingWSPolicyProviderReference(endpointReference);
+ }
+
+ /**
+ * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createServicePolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentService, org.apache.tuscany.sca.assembly.Binding)
+ */
+ public PolicyProvider createServicePolicyProvider(Endpoint endpoint) {
+ return new TestBindingWSPolicyProviderService(endpoint);
+ }
+
+ /**
+ * @see org.apache.tuscany.sca.provider.ProviderFactory#getModelType()
+ */
+ public Class<TestBindingWSPolicy> getModelType() {
+ return TestBindingWSPolicy.class;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSPolicyProviderReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSPolicyProviderReference.java
new file mode 100644
index 0000000000..489c069ea8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSPolicyProviderReference.java
@@ -0,0 +1,72 @@
+/*
+ * 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 testbindingwspolicy;
+
+import helloworld.StatusImpl;
+
+import java.util.List;
+
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.tuscany.sca.assembly.EndpointReference;
+import org.apache.tuscany.sca.binding.ws.axis2.provider.Axis2BaseBindingProvider;
+import org.apache.tuscany.sca.invocation.Phase;
+import org.apache.tuscany.sca.invocation.PhasedInterceptor;
+import org.apache.tuscany.sca.provider.BasePolicyProvider;
+
+/**
+ * @version $Rev: 792641 $ $Date: 2009-07-09 20:13:08 +0100 (Thu, 09 Jul 2009) $
+ */
+public class TestBindingWSPolicyProviderReference extends BasePolicyProvider<TestBindingWSPolicy> {
+
+ public TestBindingWSPolicyProviderReference(EndpointReference endpointReference) {
+ super(TestBindingWSPolicy.class, endpointReference);
+ }
+
+ public void configureBinding(Object configuration) {
+ super.configureBinding(configuration);
+
+ StatusImpl.appendStatus("TestBindingWSPolicyProviderReference.configureBinding()", configuration.getClass().getName());
+
+ Axis2BaseBindingProvider bindingProvider = (Axis2BaseBindingProvider)configuration;
+ ConfigurationContext axisConfigurationContext = bindingProvider.getAxisConfigurationContext();
+ AxisConfiguration axisConfiguration = axisConfigurationContext.getAxisConfiguration();
+ List<org.apache.axis2.engine.Phase> outPhases = axisConfiguration.getOutFlowPhases();
+ outPhases.get(0).addHandler(new TestBindingWSAxisHandler("Reference OutFlow Handler"));
+ List<org.apache.axis2.engine.Phase> inPhases = axisConfiguration.getInFlowPhases();
+ inPhases.get(0).addHandler(new TestBindingWSAxisHandler("Reference InFlow Handler"));
+ List<org.apache.axis2.engine.Phase> inFaultPhases = axisConfiguration.getInFaultFlowPhases();
+ inFaultPhases.get(0).addHandler(new TestBindingWSAxisHandler("Reference InFaultFlow Handler"));
+ }
+
+ public PhasedInterceptor createBindingInterceptor() {
+ List<TestBindingWSPolicy> policies = findPolicies();
+
+ if (policies.isEmpty()){
+ return null;
+ } else {
+ return new TestBindingWSPolicyInterceptor(subject,
+ getContext(),
+ null,
+ policies,
+ Phase.REFERENCE_BINDING_POLICY);
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSPolicyProviderService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSPolicyProviderService.java
new file mode 100644
index 0000000000..9880bf04b0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testbindingwspolicy/TestBindingWSPolicyProviderService.java
@@ -0,0 +1,72 @@
+/*
+ * 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 testbindingwspolicy;
+
+import helloworld.StatusImpl;
+
+import java.util.List;
+
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.tuscany.sca.assembly.Endpoint;
+import org.apache.tuscany.sca.binding.ws.axis2.provider.Axis2BaseBindingProvider;
+import org.apache.tuscany.sca.invocation.Phase;
+import org.apache.tuscany.sca.invocation.PhasedInterceptor;
+import org.apache.tuscany.sca.provider.BasePolicyProvider;
+
+/**
+ * @version $Rev: 792641 $ $Date: 2009-07-09 20:13:08 +0100 (Thu, 09 Jul 2009) $
+ */
+public class TestBindingWSPolicyProviderService extends BasePolicyProvider<TestBindingWSPolicy> {
+
+ public TestBindingWSPolicyProviderService(Endpoint endpoint) {
+ super(TestBindingWSPolicy.class, endpoint);
+ }
+
+ public void configureBinding(Object configuration) {
+ super.configureBinding(configuration);
+
+ StatusImpl.appendStatus("TestBindingWSPolicyProviderService.configureBinding()", configuration.getClass().getName());
+
+ Axis2BaseBindingProvider bindingProvider = (Axis2BaseBindingProvider)configuration;
+ ConfigurationContext axisConfigurationContext = bindingProvider.getAxisConfigurationContext();
+ AxisConfiguration axisConfiguration = axisConfigurationContext.getAxisConfiguration();
+ List<org.apache.axis2.engine.Phase> inPhases = axisConfiguration.getInFlowPhases();
+ inPhases.get(0).addHandler(new TestBindingWSAxisHandler("Service InFlow Handler"));
+ List<org.apache.axis2.engine.Phase> outPhases = axisConfiguration.getOutFlowPhases();
+ outPhases.get(0).addHandler(new TestBindingWSAxisHandler("Service OutFlow Handler"));
+ List<org.apache.axis2.engine.Phase> outFaultPhases = axisConfiguration.getOutFaultFlowPhases();
+ outFaultPhases.get(0).addHandler(new TestBindingWSAxisHandler("Service OutFaultFlow Handler"));
+ }
+
+ public PhasedInterceptor createBindingInterceptor() {
+ List<TestBindingWSPolicy> policies = findPolicies();
+
+ if (policies.isEmpty()){
+ return null;
+ } else {
+ return new TestBindingWSPolicyInterceptor(subject,
+ getContext(),
+ null,
+ policies,
+ Phase.SERVICE_BINDING_POLICY);
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicy.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicy.java
new file mode 100644
index 0000000000..651208fa76
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicy.java
@@ -0,0 +1,63 @@
+/*
+ * 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 testpolicy;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.assembly.Base;
+
+/**
+ * Implementation for policies that could be injected as parameter
+ * into the axis2config.
+ *
+ * @version $Rev: 824551 $ $Date: 2009-10-13 01:21:22 +0100 (Tue, 13 Oct 2009) $
+ */
+public class TestPolicy {
+ static final String SCA11_NS = Base.SCA11_NS;
+ static final String SCA11_TUSCANY_NS = Base.SCA11_TUSCANY_NS;
+ static final QName TEST_POLICY_QNAME = new QName(SCA11_TUSCANY_NS, "testPolicy");
+
+ private String testString;
+
+ public String getTestString() {
+ return testString;
+ }
+
+ public void setTestString(String testString) {
+ this.testString = testString;
+ }
+
+ public QName getSchemaName() {
+ return TEST_POLICY_QNAME;
+ }
+
+ public boolean isUnresolved() {
+ return false;
+ }
+
+ public void setUnresolved(boolean unresolved) {
+ }
+
+ @Override
+ public String toString() {
+ return "TestPolicy [testString=" +
+ testString
+ + "]";
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicyBuilder.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicyBuilder.java
new file mode 100644
index 0000000000..a7cceec4de
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicyBuilder.java
@@ -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 testpolicy;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.assembly.Component;
+import org.apache.tuscany.sca.assembly.Endpoint;
+import org.apache.tuscany.sca.assembly.EndpointReference;
+import org.apache.tuscany.sca.assembly.Implementation;
+import org.apache.tuscany.sca.assembly.builder.BuilderContext;
+import org.apache.tuscany.sca.assembly.builder.PolicyBuilder;
+import org.apache.tuscany.sca.policy.PolicyExpression;
+import org.apache.tuscany.sca.policy.PolicySet;
+import org.apache.tuscany.sca.policy.PolicySubject;
+
+/**
+ *
+ */
+public class TestPolicyBuilder implements PolicyBuilder<TestPolicy> {
+
+ public boolean build(Endpoint endpoint, BuilderContext context) {
+ List<TestPolicy> polices = getPolicies(endpoint);
+ System.out.println(endpoint + ": " + polices);
+ return true;
+ }
+
+ public boolean build(EndpointReference endpointReference, BuilderContext context) {
+ List<TestPolicy> polices = getPolicies(endpointReference);
+ System.out.println(endpointReference + ": " + polices);
+ return true;
+ }
+
+ public boolean build(Component component, Implementation implementation, BuilderContext context) {
+ List<TestPolicy> polices = getPolicies(implementation);
+ System.out.println(implementation + ": " + polices);
+ return true;
+ }
+
+ public QName getPolicyType() {
+ return TestPolicy.TEST_POLICY_QNAME;
+ }
+
+ public List<QName> getSupportedBindings() {
+ return null;
+ }
+
+ private List<TestPolicy> getPolicies(PolicySubject subject) {
+ List<TestPolicy> polices = new ArrayList<TestPolicy>();
+ for (PolicySet ps : subject.getPolicySets()) {
+ for (PolicyExpression exp : ps.getPolicies()) {
+ if (getPolicyType().equals(exp.getName())) {
+ polices.add((TestPolicy)exp.getPolicy());
+ }
+ }
+ }
+ return polices;
+ }
+
+ public boolean build(EndpointReference endpointReference, Endpoint endpoint, BuilderContext context) {
+ return true;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicyInterceptor.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicyInterceptor.java
new file mode 100644
index 0000000000..f03247c4d5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicyInterceptor.java
@@ -0,0 +1,110 @@
+/*
+ * 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 testpolicy;
+
+import helloworld.StatusImpl;
+
+import java.util.List;
+import java.util.logging.ConsoleHandler;
+import java.util.logging.Handler;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.assembly.Component;
+import org.apache.tuscany.sca.assembly.Endpoint;
+import org.apache.tuscany.sca.assembly.EndpointReference;
+import org.apache.tuscany.sca.core.invocation.InterceptorAsyncImpl;
+import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.invocation.Invoker;
+import org.apache.tuscany.sca.invocation.Message;
+import org.apache.tuscany.sca.invocation.PhasedInterceptor;
+import org.apache.tuscany.sca.policy.PolicySubject;
+
+
+public class TestPolicyInterceptor extends InterceptorAsyncImpl implements PhasedInterceptor {
+
+ private Operation operation;
+ private List<TestPolicy> policies;
+ private PolicySubject subject;
+ private String context;
+ private String phase;
+
+ public TestPolicyInterceptor(PolicySubject subject,
+ String context,
+ Operation operation,
+ List<TestPolicy> policies,
+ String phase) {
+ super();
+ this.operation = operation;
+ this.policies = policies;
+ this.subject = subject;
+ this.phase = phase;
+ this.context = getContext();
+ }
+
+ private String getContext() {
+ if (subject instanceof Endpoint) {
+ Endpoint endpoint = (Endpoint)subject;
+ return endpoint.getURI();
+ } else if (subject instanceof EndpointReference) {
+ EndpointReference endpointReference = (EndpointReference)subject;
+ return endpointReference.getURI();
+ } else if (subject instanceof Component) {
+ Component component = (Component)subject;
+ return component.getURI();
+ }
+ return null;
+ }
+
+ public Message processRequest(Message msg) {
+ String policyStrings = "";
+ for (TestPolicy testPolicy : policies){
+ policyStrings += testPolicy.getTestString() + " ";
+ }
+ StatusImpl.appendStatus("TestPolicyInterceptor.processRequest()", context + " @ " + phase + " testPolicyStringes " + policyStrings);
+ return msg;
+ }
+
+ public Message postProcessRequest(Message msg, Throwable e) throws Throwable {
+ StatusImpl.appendStatus("TestPolicyInterceptor.postProcessRequest()", context + " @ " + phase);
+ return msg;
+ }
+
+ public Message processResponse(Message msg) {
+ String policyStrings = "";
+ for (TestPolicy testPolicy : policies){
+ policyStrings += testPolicy.getTestString() + " ";
+ }
+ StatusImpl.appendStatus("TestPolicyInterceptor.processResponse()", context + " @ " + phase + " testPolicyStringes " + policyStrings);
+ return msg;
+ }
+/* not in interface - should we add it?
+ public Message postProcessResponse(Message msg) {
+ System.out.println("TestPolicyInterceptor.postProcessResponse() " + context + " @ " + phase);
+ return msg;
+ }
+*/
+
+ public String getPhase() {
+ return phase;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicyProcessor.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicyProcessor.java
new file mode 100644
index 0000000000..df31399959
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicyProcessor.java
@@ -0,0 +1,99 @@
+/*
+ * 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 testpolicy;
+
+import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
+import static javax.xml.stream.XMLStreamConstants.START_ELEMENT;
+
+import java.util.logging.Level;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
+import org.apache.tuscany.sca.contribution.processor.ContributionResolveException;
+import org.apache.tuscany.sca.contribution.processor.ContributionWriteException;
+import org.apache.tuscany.sca.contribution.processor.ProcessorContext;
+import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
+import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+
+/**
+ *
+ * @version $Rev: 883438 $ $Date: 2009-11-23 18:07:34 +0000 (Mon, 23 Nov 2009) $
+ */
+public class TestPolicyProcessor implements StAXArtifactProcessor<TestPolicy> {
+
+ public QName getArtifactType() {
+ return TestPolicy.TEST_POLICY_QNAME;
+ }
+
+ public TestPolicyProcessor(FactoryExtensionPoint modelFactories) {
+ }
+
+
+ public TestPolicy read(XMLStreamReader reader, ProcessorContext context) throws ContributionReadException, XMLStreamException {
+ TestPolicy policy = new TestPolicy();
+ int event = reader.getEventType();
+ QName name = null;
+
+
+ while (reader.hasNext()) {
+ event = reader.getEventType();
+ switch (event) {
+ case START_ELEMENT : {
+ name = reader.getName();
+ if ( name.getLocalPart().equals("testPolicy") ) {
+ String testString = reader.getAttributeValue(null, "testString");
+ policy.setTestString(testString);
+ }
+ break;
+ }
+ }
+
+ if ( event == END_ELEMENT ) {
+ if ( TestPolicy.TEST_POLICY_QNAME.equals(reader.getName()) ) {
+ break;
+ }
+ }
+
+ //Read the next element
+ if (reader.hasNext()) {
+ reader.next();
+ }
+ }
+
+ return policy;
+ }
+
+ public void write(TestPolicy policy, XMLStreamWriter writer, ProcessorContext context) throws ContributionWriteException, XMLStreamException {
+ // TODO
+ }
+
+ public Class<TestPolicy> getModelType() {
+ return TestPolicy.class;
+ }
+
+ public void resolve(TestPolicy arg0, ModelResolver arg1, ProcessorContext context) throws ContributionResolveException {
+
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicyProviderFactory.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicyProviderFactory.java
new file mode 100644
index 0000000000..75cb298f2d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicyProviderFactory.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package testpolicy;
+
+import org.apache.tuscany.sca.assembly.Endpoint;
+import org.apache.tuscany.sca.assembly.EndpointReference;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.provider.PolicyProvider;
+import org.apache.tuscany.sca.provider.PolicyProviderFactory;
+import org.apache.tuscany.sca.runtime.RuntimeComponent;
+
+/**
+ * @version $Rev: 792622 $ $Date: 2009-07-09 19:14:18 +0100 (Thu, 09 Jul 2009) $
+ */
+public class TestPolicyProviderFactory implements PolicyProviderFactory<TestPolicy> {
+ private ExtensionPointRegistry registry;
+
+ public TestPolicyProviderFactory(ExtensionPointRegistry registry) {
+ super();
+ this.registry = registry;
+ }
+
+ /**
+ * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createImplementationPolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.assembly.Implementation)
+ */
+ public PolicyProvider createImplementationPolicyProvider(RuntimeComponent component) {
+ return new TestPolicyProviderImplementation(component);
+ }
+
+ /**
+ * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createReferencePolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentReference, org.apache.tuscany.sca.assembly.Binding)
+ */
+ public PolicyProvider createReferencePolicyProvider(EndpointReference endpointReference) {
+ return new TestPolicyProviderReference(endpointReference);
+ }
+
+ /**
+ * @see org.apache.tuscany.sca.provider.PolicyProviderFactory#createServicePolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentService, org.apache.tuscany.sca.assembly.Binding)
+ */
+ public PolicyProvider createServicePolicyProvider(Endpoint endpoint) {
+ return new TestPolicyProviderService(endpoint);
+ }
+
+ /**
+ * @see org.apache.tuscany.sca.provider.ProviderFactory#getModelType()
+ */
+ public Class<TestPolicy> getModelType() {
+ return TestPolicy.class;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicyProviderImplementation.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicyProviderImplementation.java
new file mode 100644
index 0000000000..b027763d22
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicyProviderImplementation.java
@@ -0,0 +1,56 @@
+/*
+ * 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 testpolicy;
+
+import java.util.List;
+
+import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.invocation.Phase;
+import org.apache.tuscany.sca.invocation.PhasedInterceptor;
+import org.apache.tuscany.sca.provider.BasePolicyProvider;
+import org.apache.tuscany.sca.runtime.RuntimeComponent;
+
+/**
+ * @version $Rev: 792641 $ $Date: 2009-07-09 20:13:08 +0100 (Thu, 09 Jul 2009) $
+ */
+public class TestPolicyProviderImplementation extends BasePolicyProvider<TestPolicy> {
+
+ public TestPolicyProviderImplementation(RuntimeComponent component) {
+ super(TestPolicy.class, component.getImplementation());
+ }
+
+ /**
+ * @see org.apache.tuscany.sca.provider.PolicyProvider#createInterceptor(org.apache.tuscany.sca.interfacedef.Operation)
+ */
+ public PhasedInterceptor createInterceptor(Operation operation) {
+ List<TestPolicy> policies = findPolicies();
+
+ if (policies.isEmpty()){
+ return null;
+ } else {
+ return new TestPolicyInterceptor(subject,
+ getContext(),
+ operation,
+ policies,
+ Phase.IMPLEMENTATION_POLICY);
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicyProviderReference.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicyProviderReference.java
new file mode 100644
index 0000000000..3e784aa62e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicyProviderReference.java
@@ -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 testpolicy;
+
+import java.util.List;
+
+import org.apache.tuscany.sca.assembly.EndpointReference;
+import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.invocation.Phase;
+import org.apache.tuscany.sca.invocation.PhasedInterceptor;
+import org.apache.tuscany.sca.provider.BasePolicyProvider;
+
+/**
+ * @version $Rev: 792641 $ $Date: 2009-07-09 20:13:08 +0100 (Thu, 09 Jul 2009) $
+ */
+public class TestPolicyProviderReference extends BasePolicyProvider<TestPolicy> {
+
+ public TestPolicyProviderReference(EndpointReference endpointReference) {
+ super(TestPolicy.class, endpointReference);
+ }
+
+ public PhasedInterceptor createInterceptor(Operation operation) {
+ List<TestPolicy> policies = findPolicies();
+
+ if (policies.isEmpty()){
+ return null;
+ } else {
+ return new TestPolicyInterceptor(subject,
+ getContext(),
+ operation,
+ policies,
+ Phase.REFERENCE_POLICY);
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicyProviderService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicyProviderService.java
new file mode 100644
index 0000000000..5066193aa6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/java/testpolicy/TestPolicyProviderService.java
@@ -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 testpolicy;
+
+import java.util.List;
+
+import org.apache.tuscany.sca.assembly.Endpoint;
+import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.invocation.Phase;
+import org.apache.tuscany.sca.invocation.PhasedInterceptor;
+import org.apache.tuscany.sca.provider.BasePolicyProvider;
+
+/**
+ * @version $Rev: 792641 $ $Date: 2009-07-09 20:13:08 +0100 (Thu, 09 Jul 2009) $
+ */
+public class TestPolicyProviderService extends BasePolicyProvider<TestPolicy> {
+
+ public TestPolicyProviderService(Endpoint endpoint) {
+ super(TestPolicy.class, endpoint);
+ }
+
+ public PhasedInterceptor createInterceptor(Operation operation) {
+ List<TestPolicy> policies = findPolicies();
+
+ if (policies.isEmpty()){
+ return null;
+ } else {
+ return new TestPolicyInterceptor(subject,
+ getContext(),
+ operation,
+ policies,
+ Phase.SERVICE_POLICY);
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..350ad6be96
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/META-INF/sca-contribution.xml
@@ -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
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.PolicyBuilder b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.PolicyBuilder
new file mode 100644
index 0000000000..d2138222a6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.PolicyBuilder
@@ -0,0 +1,18 @@
+# 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.
+testpolicy.TestPolicyBuilder;qname=http://tuscany.apache.org/xmlns/sca/1.1#testPolicy
+testbindingwspolicy.TestBindingWSPolicyBuilder;qname=http://tuscany.apache.org/xmlns/sca/1.1#testBindingWSPolicy
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
new file mode 100644
index 0000000000..afe19cdffc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Implementation class for the artifact processor extension
+testpolicy.TestPolicyProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.1#testPolicy,model=testpolicy.TestPolicy
+testbindingwspolicy.TestBindingWSPolicyProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.1#testBindingWSPolicy,model=testbindingwspolicy.TestBindingWSPolicy
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions
new file mode 100644
index 0000000000..f362b64a1f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions
@@ -0,0 +1,17 @@
+# 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.xml
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory
new file mode 100644
index 0000000000..f5c82538be
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Implementation class for the policy extension
+testpolicy.TestPolicyProviderFactory;model=testpolicy.TestPolicy
+testbindingwspolicy.TestBindingWSPolicyProviderFactory;model=testbindingwspolicy.TestBindingWSPolicy
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/definitions.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/definitions.xml
new file mode 100644
index 0000000000..39d3d25a78
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/definitions.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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 xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
+
+ <!-- We're not testing real repliability policy here. Just looking
+ at how the exactly once profile intent is handled. -->
+ <sca:policySet name="TestPolicySet1"
+ attachTo="//sca:binding.ws"
+ provides="sca:exactlyOnce"
+ appliesTo="//sca:binding.ws">
+ <tuscany:testPolicy testString="exactlyonce"/>
+ </sca:policySet>
+
+ <sca:policySet name="TestPolicySet2"
+ attachTo="//sca:binding.ws"
+ provides="sca:atLeastOnce"
+ appliesTo="//sca:binding.ws">
+ <tuscany:testPolicy testString="atleastonce"/>
+ </sca:policySet>
+
+ <sca:policySet name="TestPolicySet3"
+ attachTo="//sca:binding.ws"
+ provides="sca:atMostOnce"
+ appliesTo="//sca:binding.ws">
+ <tuscany:testPolicy testString="atmostonce"/>
+ </sca:policySet>
+
+</definitions> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/helloworld.composite
new file mode 100644
index 0000000000..28fef03db5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/helloworld.composite
@@ -0,0 +1,40 @@
+<?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"
+ targetNamespace="http://www.tuscany.apache.org/itests/policy/interceptors"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ name="HelloWorld">
+
+ <component name="HelloWorldClient">
+ <implementation.java class="helloworld.HelloWorldClient"/>
+ <reference name="helloWorldWS"
+ target="HelloWorldService/HelloWorld/BindingWS"
+ requires="exactlyOnce"/>
+ </component>
+
+ <component name="HelloWorldService">
+ <implementation.java class="helloworld.HelloWorldService"/>
+ <service name="HelloWorld" requires="exactlyOnce">
+ <binding.ws name="BindingWS"/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/helloworld.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/helloworld.wsdl
new file mode 100644
index 0000000000..15b89dbcea
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/main/resources/helloworld.wsdl
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld"
+ xmlns:tns="http://helloworld"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ </wsdl:binding>
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort1">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService1"/>
+ </wsdl:port>
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort2">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService2"/>
+ </wsdl:port>
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort3">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService3"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/test/java/interceptors/HelloworldTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/test/java/interceptors/HelloworldTestCase.java
new file mode 100644
index 0000000000..933c8e42cc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/reliability/src/test/java/interceptors/HelloworldTestCase.java
@@ -0,0 +1,87 @@
+/*
+ * 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 interceptors;
+
+import java.util.List;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import helloworld.HelloWorld;
+import helloworld.HelloWorldException;
+import helloworld.StatusImpl;
+
+import org.apache.tuscany.sca.assembly.Component;
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+import org.apache.tuscany.sca.policy.Intent;
+import org.apache.tuscany.sca.policy.PolicySet;
+import org.junit.Ignore;
+
+public class HelloworldTestCase extends TestCase {
+
+ private Node node;
+ private HelloWorld helloWorld;
+
+ @Override
+ protected void setUp() throws Exception {
+ StatusImpl.statusString = "";
+
+ node = NodeFactory.newInstance().createNode("helloworld.composite", new Contribution("test", "target/classes"));
+ node.start();
+ helloWorld = node.getService(HelloWorld.class, "HelloWorldClient/HelloWorld");
+ }
+
+ /*
+ * We're not testing real reliability policy here. Just checking that the
+ * exactlyOnce profile intent is handled correctly and presented as its
+ * constituent atMostOnce and atLeastOnce intents.
+ */
+ public void testReliabilityIntent() throws Exception {
+ // check response from application
+ assertEquals("Hello fred", helloWorld.getGreetings("fred"));
+
+ // check sequences of interceptors
+ System.out.println(StatusImpl.statusString);
+ assertTrue(StatusImpl.statusString.contains("atmostonce"));
+ assertTrue(StatusImpl.statusString.contains("exactlyonce"));
+ assertTrue(StatusImpl.statusString.contains("atleastonce"));
+
+
+ // check final intents on endpoint reference to see if the matching process
+ // results on the right set
+ Composite domainComposite = ((NodeImpl)node).getDomainComposite();
+ List<Intent> intents = domainComposite.getComponents().get(0).getReferences().get(0).getEndpointReferences().get(0).getRequiredIntents();
+
+ assertEquals(2, intents.size());
+ assertEquals("atMostOnce", intents.get(0).getName().getLocalPart());
+ assertEquals("atLeastOnce", intents.get(1).getName().getLocalPart());
+
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/pom.xml
new file mode 100644
index 0000000000..f59ea105a6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/pom.xml
@@ -0,0 +1,64 @@
+<?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-policy</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-policy-wspolicy</artifactId>
+ <name>Apache Tuscany SCA iTest Policy WS-Policy</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-policy-logging</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.19</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/java/org/apache/tuscany/sca/policy/wspolicy/helloworld/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/java/org/apache/tuscany/sca/policy/wspolicy/helloworld/HelloWorld.java
new file mode 100644
index 0000000000..a9835199d0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/java/org/apache/tuscany/sca/policy/wspolicy/helloworld/HelloWorld.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.policy.wspolicy.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorld {
+
+ String getGreetings(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/java/org/apache/tuscany/sca/policy/wspolicy/helloworld/HelloWorldClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/java/org/apache/tuscany/sca/policy/wspolicy/helloworld/HelloWorldClient.java
new file mode 100644
index 0000000000..620adad638
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/java/org/apache/tuscany/sca/policy/wspolicy/helloworld/HelloWorldClient.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.policy.wspolicy.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClient implements HelloWorld {
+
+ @Reference
+ public HelloWorld helloWorldWS;
+
+ public String getGreetings(String s) {
+ String response = helloWorldWS.getGreetings(s);
+ System.out.println("At client: " + response);
+ return response;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/java/org/apache/tuscany/sca/policy/wspolicy/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/java/org/apache/tuscany/sca/policy/wspolicy/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..b7955522f8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/java/org/apache/tuscany/sca/policy/wspolicy/helloworld/HelloWorldService.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.policy.wspolicy.helloworld;
+
+public class HelloWorldService implements HelloWorld {
+
+ public String getGreetings(String s) {
+ String response = "Hello " + s;
+ System.out.println("At service: " + response);
+ return response;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/resources/LoggingMessages.properties b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/resources/LoggingMessages.properties
new file mode 100644
index 0000000000..ada808be0e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/resources/LoggingMessages.properties
@@ -0,0 +1,16 @@
+# 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.
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..7e71dd465f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/resources/META-INF/sca-contribution.xml
@@ -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
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions
new file mode 100644
index 0000000000..961fdeb602
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions
@@ -0,0 +1,17 @@
+# 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.
+org/apache/tuscany/sca/policy/wspolicy/helloworld/definitions.xml \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/resources/org/apache/tuscany/sca/policy/wspolicy/helloworld/definitions.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/resources/org/apache/tuscany/sca/policy/wspolicy/helloworld/definitions.xml
new file mode 100644
index 0000000000..535c31d414
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/resources/org/apache/tuscany/sca/policy/wspolicy/helloworld/definitions.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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 xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
+
+ <policySet name="JDKLoggingPolicy"
+ provides="tuscany:logging"
+ appliesTo="//sca:binding.ws"
+ attachTo="//sca:service | //sca:reference">
+ <wsp:Policy>
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <tuscany:jdkLogger name="test.logger">
+ <tuscany:logLevel>FINE</tuscany:logLevel>
+ <tuscany:resourceBundle>LoggingMessages.properties</tuscany:resourceBundle>
+ </tuscany:jdkLogger>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+ </policySet>
+
+</definitions> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/resources/org/apache/tuscany/sca/policy/wspolicy/helloworld/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/resources/org/apache/tuscany/sca/policy/wspolicy/helloworld/helloworld.composite
new file mode 100644
index 0000000000..5a3a8f09a8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/resources/org/apache/tuscany/sca/policy/wspolicy/helloworld/helloworld.composite
@@ -0,0 +1,38 @@
+<?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"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ name="HelloWorld">
+
+ <component name="HelloWorldClient">
+ <implementation.java class="org.apache.tuscany.sca.policy.wspolicy.helloworld.HelloWorldClient"/>
+ <reference name="helloWorldWS" target="HelloWorldService" requires="tuscany:logging"/>
+ </component>
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.policy.wspolicy.helloworld.HelloWorldService"/>
+ <service name="HelloWorld" requires="tuscany:logging">
+ <binding.ws/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/resources/org/apache/tuscany/sca/policy/wspolicy/helloworld/helloworld.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/resources/org/apache/tuscany/sca/policy/wspolicy/helloworld/helloworld.wsdl
new file mode 100644
index 0000000000..a352696b8e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/main/resources/org/apache/tuscany/sca/policy/wspolicy/helloworld/helloworld.wsdl
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld"
+ xmlns:tns="http://helloworld"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ </wsdl:binding>
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort1">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService1"/>
+ </wsdl:port>
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort2">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService2"/>
+ </wsdl:port>
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort3">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService3"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/test/java/org/apache/tuscany/sca/policy/wspolicy/WSPolicyTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/test/java/org/apache/tuscany/sca/policy/wspolicy/WSPolicyTestCase.java
new file mode 100644
index 0000000000..4d6921f8a1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/policy/wspolicy/src/test/java/org/apache/tuscany/sca/policy/wspolicy/WSPolicyTestCase.java
@@ -0,0 +1,50 @@
+/*
+ * 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.policy.wspolicy;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.policy.wspolicy.helloworld.HelloWorld;
+
+public class WSPolicyTestCase extends TestCase {
+
+ private Node node;
+ private HelloWorld helloWorld;
+
+ public void testCalculator() throws Exception {
+ assertEquals("Hello petra", helloWorld.getGreetings("petra"));
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ node = NodeFactory.newInstance().createNode(new Contribution("test", "target/classes"));
+ node.start();
+ helloWorld = node.getService(HelloWorld.class, "HelloWorldClient");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/pom.xml
new file mode 100644
index 0000000000..e6fd106117
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/pom.xml
@@ -0,0 +1,125 @@
+<?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>tuscany-sca</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+ <artifactId>tuscany-itest</artifactId>
+ <packaging>pom</packaging>
+ <name>Apache Tuscany SCA Integration Tests</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>wstx-asl</artifactId>
+ <version>3.2.9</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <modules>
+ <!-- TUSCANY-4029 module>async-services</module -->
+ <module>base</module>
+ <module>builder</module>
+ <module>bpel</module>
+ <module>callback-api</module>
+ <module>callback-basic</module>
+ <module>callback-complex-type</module>
+ <module>callback-multiple-wires</module>
+ <module>callback-separatethread</module>
+ <module>callback-two-composites</module>
+ <module>callback-two-nodes</module>
+ <module>component-type</module>
+<!-- new test waiting for context discussion to bottom out
+ <module>context</module>
+-->
+ <module>contribution-doc-lit-disablewrapped</module>
+ <module>contribution-folder</module>
+ <module>contribution-zip</module>
+ <module>data-copy</module>
+ <module>databindings</module>
+ <module>distribution</module>
+ <module>domain-node-hazelcast</module>
+ <module>exceptions</module>
+ <module>implementation-composite</module>
+ <module>implementation-spring</module>
+ <module>import-export</module>
+ <module>interfaces</module>
+ <module>interface-matching</module>
+ <module>java-lifecycle-exceptions</module>
+ <module>jms</module>
+ <module>lifecycle</module>
+ <module>nodes</module>
+ <module>node-launcher-equinox</module>
+ <module>oneway</module>
+<!-- why commented out?
+ <module>operation-overloading</module>
+-->
+ <module>policy</module>
+ <module>policies</module>
+ <module>policy-transaction</module>
+ <module>properties</module>
+ <module>recursive-multi-level</module>
+ <module>references</module>
+ <module>scaclient-api</module>
+<!-- TUSCANY-3424 - SCAClient in JSE with OSGi runtime not yet supported
+ <module>scaclient-api-jse-osgi</module>
+-->
+ <module>scaclient-api-osgi</module>
+ <module>scaclient-api-remote</module>
+ <module>scopes</module>
+ <module>scdl</module>
+ <module>services</module>
+ <module>service-reference</module>
+ <!-- module>spi</module -->
+ <module>wires</module>
+ <module>ws</module>
+ <module>ws-jaxws</module>
+ <module>async-interactions</module>
+ <module>scabindingmapper</module>
+ </modules>
+
+ <!-- We don't want to deploy any of the test modules -->
+ <properties>
+ <maven.deploy.skip>true</maven.deploy.skip>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/pom.xml
new file mode 100644
index 0000000000..0e106df928
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/pom.xml
@@ -0,0 +1,80 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-properties</artifactId>
+ <name>Apache Tuscany SCA iTest Properties</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-api</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>2.0.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- XPathFactory -->
+ <dependency>
+ <groupId>xalan</groupId>
+ <artifactId>xalan</artifactId>
+ <version>2.7.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-core-databinding</artifactId>
+ <version>2.0.1</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-databinding-jaxb</artifactId>
+ <version>2.0.1</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sdo</groupId>
+ <artifactId>tuscany-sdo-api-r2.1</artifactId>
+ <version>1.1.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/mysca/test/myservice/impl/MyService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/mysca/test/myservice/impl/MyService.java
new file mode 100644
index 0000000000..b0fd64c9da
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/mysca/test/myservice/impl/MyService.java
@@ -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 mysca.test.myservice.impl;
+
+public interface MyService {
+ /**
+ * This is a method to get the location property value from the sca runtime environment. It is implemented in the
+ * class MyServiceImpl
+ */
+ String getLocation();
+
+ /**
+ * This is a method to get the year property value from the sca runtime environment. It is implemented in the class
+ * MyServiceImpl
+ */
+ String getYear();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/mysca/test/myservice/impl/MyServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/mysca/test/myservice/impl/MyServiceImpl.java
new file mode 100644
index 0000000000..80e1a0d0ca
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/mysca/test/myservice/impl/MyServiceImpl.java
@@ -0,0 +1,88 @@
+/*
+ * 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 mysca.test.myservice.impl;
+
+import java.util.logging.Logger;
+
+import org.oasisopen.sca.annotation.ComponentName;
+import org.oasisopen.sca.annotation.Destroy;
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Property;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class Implements the interface MyService and gives implementation for all methods which are declared in that
+ * interface. scope is specified as Composite using
+ *
+ * @scope annotation.
+ */
+
+@Service(MyService.class)
+public class MyServiceImpl implements MyService {
+
+ @Property(name = "location", required=false)
+ protected String location = "RTP";
+
+ @Property(name = "year", required=false)
+ protected String year = "2006";
+
+ @ComponentName
+ protected String componentName;
+
+ private Logger logger;
+
+ /**
+ * @ to print the message in the log
+ */
+ public MyServiceImpl() {
+ logger = Logger.getAnonymousLogger();
+ logger.info("creating service instance...");
+ }
+
+ /**
+ * @Init annotation to Start the service. Which is executed all the time
+ */
+ @Init
+ public void start() {
+ logger.info("Start service..");
+ }
+
+ /**
+ * @Destroy annotation to stop the service. Which is executed in the end
+ */
+ @Destroy
+ public void stop() {
+ logger.info("Stop service..");
+
+ }
+
+ public String getComponentName() {
+ return componentName;
+ }
+
+ public String getLocation() {
+ return location;
+ }
+
+ public String getYear() {
+ return year;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/mysca/test/myservice/impl/MyTotalServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/mysca/test/myservice/impl/MyTotalServiceImpl.java
new file mode 100644
index 0000000000..e8c4341cf2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/mysca/test/myservice/impl/MyTotalServiceImpl.java
@@ -0,0 +1,46 @@
+/*
+ * 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 mysca.test.myservice.impl;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class Implements the interface MyService and gives implementation for all methods which are declared in that
+ * interface. scope is specified as Composite using
+ *
+ * @scope annotation.
+ */
+
+@Service(MyService.class)
+public class MyTotalServiceImpl implements MyService {
+
+ // default required==true so it is 1:1
+ @Reference
+ public MyService myService;
+
+ public String getLocation() {
+ return myService.getLocation();
+ }
+
+ public String getYear() {
+ return myService.getYear();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponent.java
new file mode 100644
index 0000000000..68ce5a3cb6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponent.java
@@ -0,0 +1,50 @@
+/*
+ * 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.itest;
+
+/**
+ * It is an Interface which has method declarations. Methods which are to be accessed as a service are declared in this
+ * interface. Implementation for these methods is provided in ABCDComponentImpl Class
+ */
+public interface ABCDComponent {
+
+ /**
+ * This is a method to get a string property value from the SCA runtime environment. It is implemented in the class
+ * ABCDComponentImpl
+ */
+ String getA();
+
+ /**
+ * This is a method to get a string property value from the SCA runtime environment. It is implemented in the class
+ * ABCDComponentImpl
+ */
+ String getB();
+
+ /**
+ * This is a method to get a string property value from the SCA runtime environment. It is implemented in the class
+ * ABCDComponentImpl
+ */
+ String getC();
+
+ /**
+ * This is a method to get a string property value from the SCA runtime environment. It is implemented in the class
+ * ABCDComponentImpl
+ */
+ String getD();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponentImpl.java
new file mode 100644
index 0000000000..c8d0d4cae4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponentImpl.java
@@ -0,0 +1,73 @@
+/*
+ * 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.itest;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Scope;
+
+/**
+ * This class Implements the interface ABCDComponent and gives implementation for all methods which are declared in that
+ * interface. scope is specified as Composite using
+ *
+ * @scope annotation.
+ */
+@Scope("COMPOSITE")
+public class ABCDComponentImpl implements ABCDComponent {
+ private ABComponent abComponent;
+ private CDComponent cdComponent;
+
+ /**
+ * It is a method which injects the property value to the variable 'abComponent' from the SCA runtime environment
+ * using
+ *
+ * @Property Annotations.
+ */
+ @Reference
+ public void setAb(ABComponent component) {
+ this.abComponent = component;
+ }
+
+ /**
+ * It is a method which injects the property value to the variable 'cdComponent' from the SCA runtime environment
+ * using
+ *
+ * @Property Annotations.
+ */
+ @Reference
+ public void setCd(CDComponent component) {
+ this.cdComponent = component;
+ }
+
+ public String getA() {
+ return this.abComponent.getA();
+ }
+
+ public String getB() {
+ return this.abComponent.getB();
+ }
+
+ public String getC() {
+ return this.cdComponent.getC();
+ }
+
+ public String getD() {
+ return this.cdComponent.getD();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponent.java
new file mode 100644
index 0000000000..b727935bc1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponent.java
@@ -0,0 +1,75 @@
+/*
+ * 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.itest;
+
+import java.util.Collection;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * It is an Interface which has method declarations. Methods which are to be accessed as a service are declared in this
+ * interface. Implementation for these methods is provided in ABComponentImpl Class
+ */
+@Remotable
+public interface ABComponent {
+
+ /**
+ * This is a method to get a string property value from the SCA runtime environment. It is implemented in the class
+ * ABComponentImpl
+ */
+
+ String getA();
+
+ /**
+ * This is a method to get a string property value from the SCA runtime environment. It is implemented in the class
+ * ABComponentImpl
+ */
+ String getB();
+
+ /**
+ * This is a method to get a string property value from the SCA runtime environment. It is implemented in the class
+ * ABComponentImpl
+ */
+ String getZ();
+
+ /**
+ * This is a method to get an integer property value from the SCA runtime environment. It is implemented in the
+ * class ABComponentImpl
+ */
+ int getIntValue();
+
+ /**
+ * This is a method to get a string property value from the SCA runtime environment. It is implemented in the class
+ * ABComponentImpl
+ */
+ String getF();
+
+ /**
+ * This is a method to get collection of property values from the SCA runtime environment. It is implemented in the
+ * class ABComponentImpl
+ */
+ Collection<String> getManyStringValues();
+
+ /**
+ * This is a method to get collection of property value from the SCA runtime environment. It is implemented in the
+ * class ABComponentImpl
+ */
+ Collection<Integer> getManyIntegers();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponentImpl.java
new file mode 100644
index 0000000000..e402131ce2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponentImpl.java
@@ -0,0 +1,131 @@
+/*
+ * 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.itest;
+
+import java.util.Collection;
+
+import org.oasisopen.sca.annotation.Property;
+
+/**
+ * This class Implements the interface ABComponent and gives implementation for all methods which are declared in that
+ * interface.
+ */
+
+public class ABComponentImpl implements ABComponent {
+
+ private String aProperty;
+ private String bProperty;
+ private int intValue;
+ private Collection<String> manyStringValues;
+ private Collection<Integer> manyIntegerValues;
+ private String zProperty;
+ private String fProperty;
+
+ /**
+ * It is a method which injects the property value to the variable 'zProperty' from the SCA runtime environment
+ * using Annotations.
+ */
+ @Property(name = "xpath")
+ public void setZProperty(final String value) {
+ this.zProperty = value;
+ }
+
+ /**
+ * It is a method which injects collection of property values to the variable 'manyStringValues' from the SCA
+ * runtime environment using Annotations.
+ */
+ @Property(name = "foobar")
+ public void setManyStringValues(final Collection<String> value) {
+ this.manyStringValues = value;
+ }
+
+ /**
+ * It is a method which injects collection of integer property values to the variable 'manyIntegerValues' from the
+ * SCA runtime environment using Annotations.
+ */
+ @Property(name = "fooInts")
+ public void setManyIntegers(final Collection<Integer> value) {
+ this.manyIntegerValues = value;
+ }
+
+ /**
+ * It is a method which injects the property value to the variable 'aProperty' from the SCA runtime environment
+ * using Annotations.
+ */
+ @Property
+ public void setA(final String A) {
+ this.aProperty = A;
+ }
+
+ /**
+ * It is a method which injects the property value to the variable 'bProperty' from the SCA runtime environment
+ * using Annotations.
+ */
+ @Property
+ public void setB(final String B) {
+ this.bProperty = B;
+ }
+
+ /**
+ * It is a method which injects the property value to the variable 'fProperty' from the SCA runtime environment
+ * using Annotations.
+ */
+ @Property
+ public void setF(final String F) {
+ this.fProperty = F;
+ }
+
+ /**
+ * It is a method which injects integer property value to the variable 'intValue' from the SCA runtime environment
+ * using Annotations.
+ */
+ @Property
+ public void setOne(final int value) {
+ this.intValue = value;
+ }
+
+ public String getA() {
+ return this.aProperty;
+ }
+
+ public String getB() {
+ return this.bProperty;
+ }
+
+ public int getIntValue() {
+ return this.intValue;
+ }
+
+ public String getZ() {
+ return this.zProperty;
+ }
+
+ public String getF() {
+ return this.fProperty;
+ }
+
+ public Collection<String> getManyStringValues() {
+ return manyStringValues;
+ }
+
+ public Collection<Integer> getManyIntegers() {
+ return manyIntegerValues;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponent.java
new file mode 100644
index 0000000000..52f9871d1b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponent.java
@@ -0,0 +1,71 @@
+/*
+ * 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.itest;
+
+import java.util.Collection;
+
+/**
+ * It is an Interface which has method declarations. Methods which are to be accessed as a service are declared in this
+ * interface. Implementation for these methods is provided in CDComponentImpl Class
+ */
+public interface CDComponent {
+
+ /**
+ * This is a method to get a property value from the SCA runtime environment. It is implemented in the class
+ * CDComponentImpl Class
+ */
+ String getC();
+
+ /**
+ * This is a method to get a property value from the SCA runtime environment. It is implemented in the class
+ * CDComponentImpl Class
+ */
+ String getC2();
+
+ /**
+ * This is a method to get a property value from the SCA runtime environment. It is implemented in the class
+ * CDComponentImpl Class
+ */
+ String getD();
+
+ /**
+ * This is a method to get a property value from the SCA runtime environment. It is implemented in the class
+ * CDComponentImpl Class
+ */
+ String getNoSource();
+
+ /**
+ * This is a method to get a property value from the SCA runtime environment. It is implemented in the class
+ * CDComponentImpl Class
+ */
+ String getFileProperty();
+
+ /**
+ * This is a method to get a property value from the SCA runtime environment. It is implemented in the class
+ * CDComponentImpl Class
+ */
+ Collection<String> getManyValuesFileProperty();
+
+ /**
+ * This is a method to get a property value from the SCA runtime environment. It is implemented in the class
+ * CDComponentImpl Class
+ */
+ int getOverrideValue();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponentImpl.java
new file mode 100644
index 0000000000..fceda9d9ae
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponentImpl.java
@@ -0,0 +1,143 @@
+/*
+ * 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.itest;
+
+import java.util.Collection;
+
+import org.oasisopen.sca.annotation.Property;
+
+/**
+ * This class Implements the interface CDComponent and gives implementation for all methods which are declared in that
+ * interface.
+ */
+public class CDComponentImpl implements CDComponent {
+
+ private String cProperty;
+ private String dProperty;
+ private String nosource;
+ private String fileProperty;
+ private Collection<String> manyValuesFileProperty;
+ private int overrideNumber;
+ private String cProperty2;
+
+ /**
+ * It is a method which injects the property value to the variable 'cProperty2' from the SCA runtime environment
+ * using
+ *
+ * @Property Annotations.
+ */
+ @Property(name = "nonFileProperty")
+ public void setC2(final String value) {
+ this.cProperty2 = value;
+ }
+
+ /**
+ * It is a method which injects the property value to the variable 'overrideNumber' from the SCA runtime environment
+ * using
+ *
+ * @Property Annotations.
+ */
+ @Property(name = "two")
+ public void setOverrideNumber(final int value) {
+ this.overrideNumber = value;
+ }
+
+ /**
+ * It is a method which injects the property value to the variable 'fileProperty' from the SCA runtime environment
+ * using
+ *
+ * @Property Annotations.
+ */
+ @Property(name = "fileProperty")
+ public void setFileProp(final String value) {
+ this.fileProperty = value;
+ }
+
+ /**
+ * It is a method which injects the property value to the variable 'manyValuesFileProperty' from the SCA runtime
+ * environment using
+ *
+ * @Property Annotations.
+ */
+ @Property(name = "manyValuesFileProperty")
+ public void setFileManyValueProp(final Collection<String> values) {
+ this.manyValuesFileProperty = values;
+ }
+
+ /**
+ * It is a method which injects the property value to the variable 'cProperty' from the SCA runtime environment
+ * using
+ *
+ * @Property Annotations.
+ */
+ @Property
+ public void setC(final String C) {
+ this.cProperty = C;
+ }
+
+ /**
+ * It is a method which injects the property value to the variable 'dProperty' from the SCA runtime environment
+ * using
+ *
+ * @Property Annotations.
+ */
+ @Property
+ public void setD(final String D) {
+ this.dProperty = D;
+ }
+
+ /**
+ * It is a method which injects the property value to the variable 'nosource' from the SCA runtime environment using
+ *
+ * @Property Annotations.
+ */
+ @Property
+ public void setNosource(final String value) {
+ this.nosource = value;
+ }
+
+ public String getFileProperty() {
+ return this.fileProperty;
+ }
+
+ public String getC() {
+ return this.cProperty;
+ }
+
+ public String getC2() {
+ return this.cProperty2;
+ }
+
+ public String getD() {
+ return this.dProperty;
+ }
+
+ public String getNoSource() {
+ return this.nosource;
+ }
+
+ public int getOverrideValue() {
+ return this.overrideNumber;
+ }
+
+ public Collection<String> getManyValuesFileProperty() {
+ return this.manyValuesFileProperty;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ComplexPropertyBean.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ComplexPropertyBean.java
new file mode 100644
index 0000000000..1642ab55f5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ComplexPropertyBean.java
@@ -0,0 +1,151 @@
+/*
+ * 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.itest;
+
+/**
+ * This is a Java Bean which has setter and getter methods for for the variables used in the property tests.
+ */
+public class ComplexPropertyBean {
+
+ /**
+ * Variable declarations
+ */
+ protected int integerNumber = 25;
+ protected float floatNumber = 50;
+ protected double doubleNumber = 75;
+ protected int[] intArray = null;
+ protected double[] doubleArray = null;
+ protected String[] stringArray = null;
+
+ ComplexPropertyBean numberSet;
+ protected ComplexPropertyBean[] numberSetArray = null;
+
+ public ComplexPropertyBean() {
+
+ }
+
+ public double getDoubleNumber() {
+ return doubleNumber;
+ }
+
+ /**
+ * It is a setter method to set a value for the variable doubleNumber
+ */
+ public void setDoubleNumber(double doubleNumber) {
+ this.doubleNumber = doubleNumber;
+ }
+
+ /**
+ * It is a getter method to get a value for the variable floatNumber
+ */
+ public float getFloatNumber() {
+ return floatNumber;
+ }
+
+ /**
+ * It is a setter method to set a value for the variable floatNumber
+ */
+ public void setFloatNumber(float floatNumber) {
+ this.floatNumber = floatNumber;
+ }
+
+ /**
+ * It is a getter method to get a value for the variable floatNumber
+ */
+ public int getIntegerNumber() {
+ return integerNumber;
+ }
+
+ /**
+ * It is a getter method to get a value for the variable integerNumber
+ */
+ public void setIntegerNumber(int integerNumber) {
+ this.integerNumber = integerNumber;
+ }
+
+ /**
+ * It is a getter method to set a value for the variable numberSet
+ */
+ public ComplexPropertyBean getNumberSet() {
+ return numberSet;
+ }
+
+ /**
+ * It is a setter method to set a value for the variable numberSet
+ */
+ public void setNumberSet(ComplexPropertyBean numberSet) {
+ this.numberSet = numberSet;
+ }
+
+ /**
+ * It is a method which implements toString() function
+ */
+
+ public String toString() {
+ return Double.toString(integerNumber) + " - "
+ + Double.toString(floatNumber)
+ + " - "
+ + Double.toString(doubleNumber)
+ + " \n"
+ + ((intArray == null) ? "" : intArray[0] + " - " + intArray[1] + " \n ")
+ + ((doubleArray == null) ? "" : doubleArray[0] + " - " + doubleArray[1] + " \n ")
+ + ((stringArray == null) ? "" : stringArray[0] + " - " + stringArray[1] + " \n ")
+ + ((numberSetArray == null) ? "" : numberSetArray[0] + " - " + numberSetArray[1] + " \n ")
+ + ((numberSet == null) ? "" : numberSet.toString());
+ }
+
+ /**
+ * It is a setter method to set values for the variable stringArray
+ */
+ public String[] getStringArray() {
+ return stringArray;
+ }
+
+ /**
+ * It is a setter method to set values for the variable stringArray
+ */
+ public void setStringArray(String[] stringArray) {
+ this.stringArray = stringArray;
+ }
+
+ public int[] getIntArray() {
+ return intArray;
+ }
+
+ public void setIntArray(int[] intArray) {
+ this.intArray = intArray;
+ }
+
+ public double[] getDoubleArray() {
+ return doubleArray;
+ }
+
+ public void setDoubleArray(double[] doubleArray) {
+ this.doubleArray = doubleArray;
+ }
+
+ public ComplexPropertyBean[] getNumberSetArray() {
+ return numberSetArray;
+ }
+
+ public void setNumberSetArray(ComplexPropertyBean[] numberSetArray) {
+ this.numberSetArray = numberSetArray;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideService.java
new file mode 100644
index 0000000000..acd1f26670
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideService.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest;
+
+/**
+ * This is an Interface for the services
+ */
+public interface OverrideService {
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideServiceImpl.java
new file mode 100644
index 0000000000..71dce41efc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideServiceImpl.java
@@ -0,0 +1,28 @@
+/*
+ * 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.itest;
+
+/**
+ * An implementation for the interface OverrideService.
+ */
+
+public class OverrideServiceImpl implements OverrideService {
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponent.java
new file mode 100644
index 0000000000..9c7e8c3447
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponent.java
@@ -0,0 +1,114 @@
+/*
+ * 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.itest;
+
+import java.util.Collection;
+
+import test.jaxb.props.ReturnCodeProperties;
+
+/**
+ * It is an Interface which has method declarations. Methods which are to be accessed as a service are declared in this
+ * interface. Implementation for these methods is provided in PropertyComponentImpl Class
+ */
+public interface PropertyComponent {
+
+ /**
+ * This is a method to get a value for a property name 'location' from the SCA runtime environment. It is
+ * implemented in the class PropertyComponentImpl
+ */
+ public String getLocation();
+
+ /**
+ * This is a method to get a value for a property name 'year' from the SCA runtime environment. It is implemented in
+ * the class PropertyComponentImpl
+ */
+ public String getYear();
+
+ /**
+ * This method is used to test injecting a primitive String Array
+ *
+ * @return The injected array
+ */
+ public String[] getDaysOfTheWeek();
+
+ /**
+ * This method is used to test injecting an Object Integer Array
+ *
+ * @return The injected array
+ */
+ public Integer[] getIntegerNumbers();
+
+ /**
+ * This method is used to test injecting an int Array
+ *
+ * @return The injected array
+ */
+ public int[] getIntNumbers();
+
+ /**
+ * This is a method to get a property value from the SCA runtime environment. It is implemented in the class
+ * PropertyComponentImpl
+ */
+
+ public ComplexPropertyBean getComplexPropertyOne();
+
+ /**
+ * This is a method to get a property value from the SCA runtime environment. It is implemented in the class
+ * PropertyComponentImpl
+ */
+ public ComplexPropertyBean getComplexPropertyTwo();
+
+ /**
+ * This is a method to get a property value from the SCA runtime environment. It is implemented in the class
+ * PropertyComponentImpl
+ */
+ public ComplexPropertyBean getComplexPropertyThree();
+
+ /**
+ * This is a method to get a property value from the SCA runtime environment. It is implemented in the class
+ * PropertyComponentImpl
+ */
+ public Collection<ComplexPropertyBean> getComplexPropertyFour();
+
+ /**
+ * This is a method to get a property value from the SCA runtime environment. It is implemented in the class
+ * PropertyComponentImpl
+ */
+
+ public ComplexPropertyBean getComplexPropertyFive();
+
+ /**
+ * This is a method to get a property value from the SCA runtime environment. It is implemented in the class
+ * PropertyComponentImpl
+ */
+ public ReturnCodeProperties getComplexJAXBPropertyOne();
+
+ /**
+ * This is a method to get a property value from the SCA runtime environment. It is implemented in the class
+ * PropertyComponentImpl
+ */
+ public ReturnCodeProperties getComplexJAXBPropertyTwo();
+
+ /**
+ * @return
+ */
+ public String getLocationFromComponentContext();
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponentImpl.java
new file mode 100644
index 0000000000..27b686bf14
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponentImpl.java
@@ -0,0 +1,148 @@
+/*
+ * 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.itest;
+
+import java.util.Collection;
+
+import org.oasisopen.sca.ComponentContext;
+import org.oasisopen.sca.annotation.Context;
+import org.oasisopen.sca.annotation.Property;
+
+import test.jaxb.props.ReturnCodeProperties;
+
+/**
+ * This class Implements the interface PropertyComponent and gives implementation for all methods which are declared in
+ * that interface.
+ */
+public class PropertyComponentImpl implements PropertyComponent {
+ @Context
+ protected ComponentContext context;
+
+ protected ComplexPropertyBean complexPropertyOne;
+
+ @Property
+ protected ComplexPropertyBean complexPropertyTwo;
+
+ @Property
+ protected ComplexPropertyBean complexPropertyThree;
+
+ @Property
+ protected Collection<ComplexPropertyBean> complexPropertyFour;
+
+ @Property
+ protected ComplexPropertyBean complexPropertyFive;
+
+ @Property(name = "location")
+ protected String location;
+
+ @Property(name = "year")
+ protected String year;
+
+ @Property(name = "daysOfTheWeek")
+ protected String[] daysOfTheWeek;
+
+ @Property(name = "integerNumbers")
+ protected Integer[] integerNumbers;
+
+ @Property(name = "intNumbers")
+ protected int[] intNumbers;
+
+ @Property
+ protected ReturnCodeProperties complexJAXBPropertyOne;
+
+ @Property
+ protected ReturnCodeProperties complexJAXBPropertyTwo;
+
+ public String getLocation() {
+ return location;
+ }
+
+ public String getYear() {
+ return year;
+ }
+
+ @Property
+ public void setComplexPropertyOne(ComplexPropertyBean complexPropertyOne){
+ this.complexPropertyOne = complexPropertyOne;
+ }
+
+ public ComplexPropertyBean getComplexPropertyOne() {
+ //System.out.println(complexPropertyOne);
+ return complexPropertyOne;
+ }
+
+ public ComplexPropertyBean getComplexPropertyTwo() {
+ //System.out.println(complexPropertyTwo);
+ return complexPropertyTwo;
+ }
+
+ public ComplexPropertyBean getComplexPropertyThree() {
+ //System.out.println(complexPropertyThree);
+ return complexPropertyThree;
+ }
+
+ public Collection<ComplexPropertyBean> getComplexPropertyFour() {
+ //System.out.println(complexPropertyThree);
+ return complexPropertyFour;
+ }
+
+ public ComplexPropertyBean getComplexPropertyFive() {
+ return complexPropertyFive;
+ }
+
+ /**
+ * This method is used to test injecting an Array
+ *
+ * @return The injected array
+ */
+ public String[] getDaysOfTheWeek() {
+ return daysOfTheWeek;
+ }
+
+ /**
+ * This method is used to test injecting an Object Integer Array
+ *
+ * @return The injected array
+ */
+ public Integer[] getIntegerNumbers() {
+ return integerNumbers;
+ }
+
+ /**
+ * This method is used to test injecting an int Array
+ *
+ * @return The injected array
+ */
+ public int[] getIntNumbers() {
+ return intNumbers;
+ }
+
+ public String getLocationFromComponentContext() {
+ return context.getProperty(String.class, "location");
+ }
+
+ public ReturnCodeProperties getComplexJAXBPropertyOne() {
+ return complexJAXBPropertyOne;
+ }
+
+ public ReturnCodeProperties getComplexJAXBPropertyTwo() {
+ return complexJAXBPropertyTwo;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyService.java
new file mode 100644
index 0000000000..a57ccd90c8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyService.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest;
+
+/**
+ * This is an Interface for the services.
+ */
+public interface PropertyService {
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Bar.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Bar.java
new file mode 100644
index 0000000000..c147a2affe
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Bar.java
@@ -0,0 +1,23 @@
+/*
+ * 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.itest.cdi;
+
+public interface Bar {
+ public String getBar();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo1.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo1.java
new file mode 100644
index 0000000000..f44fed7389
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo1.java
@@ -0,0 +1,38 @@
+/*
+ * 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.itest.cdi;
+
+import org.oasisopen.sca.annotation.Constructor;
+import org.oasisopen.sca.annotation.Property;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(Bar.class)
+public class Foo1 implements Bar {
+
+ protected String bar;
+
+ @Constructor
+ public Foo1(@Property(name="bar") String b) {
+ this.bar = b;
+ }
+
+ public String getBar() {
+ return this.bar;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo2.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo2.java
new file mode 100644
index 0000000000..1d2e563095
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo2.java
@@ -0,0 +1,39 @@
+/*
+ * 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.itest.cdi;
+
+import org.oasisopen.sca.annotation.Constructor;
+import org.oasisopen.sca.annotation.Property;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(Bar.class)
+public class Foo2 implements Bar {
+
+ protected String bar;
+
+ @Constructor
+ public Foo2(@Property(name = "bar") String b) {
+ this.bar = b;
+ }
+
+ public String getBar() {
+ return this.bar;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo3.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo3.java
new file mode 100644
index 0000000000..54082e297a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/cdi/Foo3.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.cdi;
+
+import org.oasisopen.sca.annotation.Constructor;
+import org.oasisopen.sca.annotation.Property;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(Bar.class)
+public class Foo3 implements Bar {
+
+ protected String bar;
+
+ @Constructor
+ public Foo3() {
+ this.bar = "bar";
+ }
+
+ public String getBar() {
+ return this.bar;
+ }
+
+ @Property(name = "bar")
+ public void setBar(String b) {
+ this.bar = b;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/Annotated1CTCalcComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/Annotated1CTCalcComponentImpl.java
new file mode 100644
index 0000000000..d86c552c56
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/Annotated1CTCalcComponentImpl.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.ctcalc;
+
+import org.oasisopen.sca.annotation.Property;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(CTCalcComponent.class)
+public class Annotated1CTCalcComponentImpl extends BaseCTCalcComponentImpl {
+
+ private String aPropertyPrivate;
+ protected String aPropertyProtected;
+ public String aPropertyPublic;
+ @Property
+ public String aPropertyAnnotated;
+
+ public String test(){
+ return "Annotated";
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/Annotated2CTCalcComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/Annotated2CTCalcComponentImpl.java
new file mode 100644
index 0000000000..b0758d177c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/Annotated2CTCalcComponentImpl.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.ctcalc;
+
+import org.oasisopen.sca.annotation.Property;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(CTCalcComponent.class)
+public class Annotated2CTCalcComponentImpl extends AnnotatedBaseCTCalcComponentImpl {
+
+ private String aPropertyPrivate;
+ protected String aPropertyProtected;
+ public String aPropertyPublic;
+ @Property
+ public String aPropertyAnnotated;
+
+ public String test(){
+ return "Annotated";
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/AnnotatedBaseCTCalcComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/AnnotatedBaseCTCalcComponentImpl.java
new file mode 100644
index 0000000000..a474756c27
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/AnnotatedBaseCTCalcComponentImpl.java
@@ -0,0 +1,58 @@
+/*
+ * 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.itest.ctcalc;
+
+import org.oasisopen.sca.annotation.Property;
+
+public class AnnotatedBaseCTCalcComponentImpl implements CTCalcComponent {
+
+ private String notAPropertyPrivate;
+ protected String notAPropertyProtected;
+
+ @Property
+ public String aPropertyPublic;
+
+ public String getNotAPropertyPrivate() {
+ return notAPropertyPrivate;
+ }
+
+ public void setNotAPropertyPrivate(String notAPropertyPrivate) {
+ this.notAPropertyPrivate = notAPropertyPrivate;
+ }
+
+ public String getNotAPropertyProtected() {
+ return notAPropertyProtected;
+ }
+
+ public void setNotAPropertyProtected(String notAPropertyProtected) {
+ this.notAPropertyProtected = notAPropertyProtected;
+ }
+
+ public String getNotAPropertyPublic() {
+ return aPropertyPublic;
+ }
+
+ public void setNotAPropertyPublic(String notAPropertyPublic) {
+ this.aPropertyPublic = notAPropertyPublic;
+ }
+
+ public String test(){
+ return "XXX";
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/AnnotatedCTCalcComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/AnnotatedCTCalcComponentImpl.java
new file mode 100644
index 0000000000..c37a21ec8f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/AnnotatedCTCalcComponentImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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.itest.ctcalc;
+
+import org.oasisopen.sca.annotation.Service;
+
+import commonj.sdo.helper.HelperContext;
+
+@Service(CTCalcComponent.class)
+public class AnnotatedCTCalcComponentImpl extends BaseCTCalcComponentImpl {
+
+ private String aPropertyPrivate;
+ protected String aPropertyProtected;
+ public String aPropertyPublic;
+
+ @DefaultHelperContext
+ protected HelperContext hc;
+
+ public String test(){
+ return "Annotated";
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/BaseCTCalcComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/BaseCTCalcComponentImpl.java
new file mode 100644
index 0000000000..03fa878127
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/BaseCTCalcComponentImpl.java
@@ -0,0 +1,54 @@
+/*
+ * 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.itest.ctcalc;
+
+public class BaseCTCalcComponentImpl implements CTCalcComponent {
+
+ private String notAPropertyPrivate;
+ protected String notAPropertyProtected;
+ public String notAPropertyPublic;
+
+ public String getNotAPropertyPrivate() {
+ return notAPropertyPrivate;
+ }
+
+ public void setNotAPropertyPrivate(String notAPropertyPrivate) {
+ this.notAPropertyPrivate = notAPropertyPrivate;
+ }
+
+ public String getNotAPropertyProtected() {
+ return notAPropertyProtected;
+ }
+
+ public void setNotAPropertyProtected(String notAPropertyProtected) {
+ this.notAPropertyProtected = notAPropertyProtected;
+ }
+
+ public String getNotAPropertyPublic() {
+ return notAPropertyPublic;
+ }
+
+ public void setNotAPropertyPublic(String notAPropertyPublic) {
+ this.notAPropertyPublic = notAPropertyPublic;
+ }
+
+ public String test(){
+ return "XXX";
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/CTCalcComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/CTCalcComponent.java
new file mode 100644
index 0000000000..c5f17745fc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/CTCalcComponent.java
@@ -0,0 +1,23 @@
+/*
+ * 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.itest.ctcalc;
+
+public interface CTCalcComponent {
+ public String test();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/DefaultHelperContext.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/DefaultHelperContext.java
new file mode 100644
index 0000000000..cb5021d343
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/DefaultHelperContext.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.ctcalc;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+@Target({TYPE, METHOD, FIELD, PARAMETER})
+@Retention(RUNTIME)
+public @interface DefaultHelperContext {
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/UnannotatedCTCalcComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/UnannotatedCTCalcComponentImpl.java
new file mode 100644
index 0000000000..a776c0e29c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/UnannotatedCTCalcComponentImpl.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.ctcalc;
+
+import commonj.sdo.helper.HelperContext;
+
+public class UnannotatedCTCalcComponentImpl extends BaseCTCalcComponentImpl {
+
+ private String aPropertyPrivate;
+ protected String aPropertyProtected;
+ public String aPropertyPublic;
+
+ @DefaultHelperContext
+ protected HelperContext hc;
+
+ public String test(){
+ return "Unannotated";
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/test/jaxb/props/ObjectFactory.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/test/jaxb/props/ObjectFactory.java
new file mode 100644
index 0000000000..15fb49ea4e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/test/jaxb/props/ObjectFactory.java
@@ -0,0 +1,75 @@
+/*
+ * 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.
+ */
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.06.07 at 03:30:47 PM EDT
+//
+package test.jaxb.props;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the test.jaxb.props package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+ private final static QName _MyRCProps_QNAME = new QName("http://test.sca.jaxb/rcprops", "MyRCProps");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: test.jaxb.props
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link ReturnCodeProperties }
+ *
+ */
+ public ReturnCodeProperties createReturnCodeProperties() {
+ return new ReturnCodeProperties();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link ReturnCodeProperties }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://test.sca.jaxb/rcprops", name = "MyRCProps")
+ public JAXBElement<ReturnCodeProperties> createMyRCProps(ReturnCodeProperties value) {
+ return new JAXBElement<ReturnCodeProperties>(_MyRCProps_QNAME, ReturnCodeProperties.class, null, value);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/test/jaxb/props/ReturnCodeProperties.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/test/jaxb/props/ReturnCodeProperties.java
new file mode 100644
index 0000000000..0a1d4a34a3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/test/jaxb/props/ReturnCodeProperties.java
@@ -0,0 +1,103 @@
+/*
+ * 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.
+ */
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.06.07 at 03:30:47 PM EDT
+//
+package test.jaxb.props;
+
+import java.math.BigInteger;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>Java class for ReturnCodeProperties complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="ReturnCodeProperties">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;element name="AInt" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * &lt;element name="BInteger" type="{http://www.w3.org/2001/XMLSchema}integer"/>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "ReturnCodeProperties", namespace = "http://test.sca.jaxb/rcprops", propOrder = {"a", "b"})
+public class ReturnCodeProperties {
+
+ @XmlElement(name = "AInt")
+ protected int a;
+ @XmlElement(name = "BInteger", required = true)
+ protected BigInteger b;
+
+ /**
+ * Gets the value of the a property.
+ *
+ */
+ public int getA() {
+ return a;
+ }
+
+ /**
+ * Sets the value of the a property.
+ *
+ */
+ public void setA(int value) {
+ this.a = value;
+ }
+
+ /**
+ * Gets the value of the b property.
+ *
+ * @return
+ * possible object is
+ * {@link BigInteger }
+ *
+ */
+ public BigInteger getB() {
+ return b;
+ }
+
+ /**
+ * Sets the value of the b property.
+ *
+ * @param value
+ * allowed object is
+ * {@link BigInteger }
+ *
+ */
+ public void setB(BigInteger value) {
+ this.b = value;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/test/jaxb/props/package-info.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/test/jaxb/props/package-info.java
new file mode 100644
index 0000000000..6a6fdd00cc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/java/test/jaxb/props/package-info.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.06.07 at 03:30:47 PM EDT
+//
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://test.sca.jaxb/rcprops", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package test.jaxb.props;
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/CTCalcTest.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/CTCalcTest.composite
new file mode 100644
index 0000000000..db7b3be2d2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/CTCalcTest.composite
@@ -0,0 +1,42 @@
+<?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
+ * 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"
+ targetNamespace="http://foo"
+ name="CTCalcTest">
+
+ <component name="AnnotatedComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.ctcalc.AnnotatedCTCalcComponentImpl" />
+ </component>
+
+ <component name="UnannotatedComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.ctcalc.UnannotatedCTCalcComponentImpl" />
+ </component>
+
+ <component name="Annotated1Component">
+ <implementation.java class="org.apache.tuscany.sca.itest.ctcalc.Annotated1CTCalcComponentImpl" />
+ <property name="aPropertyAnnotated" value="xyz"/>
+ </component>
+
+ <component name="Annotated2Component">
+ <implementation.java class="org.apache.tuscany.sca.itest.ctcalc.Annotated2CTCalcComponentImpl" />
+ <property name="aPropertyAnnotated" value="xyz"/>
+ <property name="aPropertyPublic" value="abc"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/ConstructorPropertyInjection.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/ConstructorPropertyInjection.composite
new file mode 100644
index 0000000000..3587badb5d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/ConstructorPropertyInjection.composite
@@ -0,0 +1,39 @@
+<?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" targetNamespace="http://foo" name="ConstructorPropertyInjection">
+
+ <component name="Foo1Component">
+ <implementation.java class="org.apache.tuscany.sca.itest.cdi.Foo1" />
+ <property name="bar" value="fubar" />
+ </component>
+
+ <component name="Foo2Component">
+ <implementation.java class="org.apache.tuscany.sca.itest.cdi.Foo2" />
+ <property name="bar">fubar</property>
+ </component>
+
+ <component name="Foo3Component">
+ <implementation.java class="org.apache.tuscany.sca.itest.cdi.Foo3" />
+ <property name="bar">
+ <value>fubar</value>
+ </property>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/Outer.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/Outer.composite
new file mode 100644
index 0000000000..104662b26e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/Outer.composite
@@ -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
+ * 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:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:foo="http://foo"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xsi:schemaLocation="http://docs.oasis-open.org/ns/opencsa/sca/200912 http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ name="Iteration3Composite"
+ targetNamespace="http://foo"
+ local="true"
+ autowire="false">
+
+ <property name="newLocation" type="xsd:anyURI">Raleigh</property>
+ <property name="newYear" type="xsd:anyURI">2008</property>
+ <component name="MyServiceComponent">
+ <implementation.java class="mysca.test.myservice.impl.MyServiceImpl" />
+ </component>
+ <component name="MyServiceComponentNew">
+ <implementation.java class="mysca.test.myservice.impl.MyServiceImpl" />
+ <property name="location" source="$newLocation" />
+ <property name="year" source="$newYear" />
+ </component>
+ <component name="MyTotalServiceNewComponent">
+ <implementation.java class="mysca.test.myservice.impl.MyTotalServiceImpl" />
+ <reference name="myService" target="MyServiceComponentNew/MyService" />
+ </component>
+ <component name="MySimpleServiceInRecursiveAnother">
+ <implementation.composite name="foo:MySimpleService" />
+ <property name="newLocation">Durham</property>
+ <property name="newYear">2009</property>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/OuterPropertyTest.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/OuterPropertyTest.composite
new file mode 100644
index 0000000000..0c8714cbe1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/OuterPropertyTest.composite
@@ -0,0 +1,42 @@
+<?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
+ * 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:foo="http://foo"
+ targetNamespace="http://foo"
+ name="OuterPropertyTest"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <component name="OuterComponent">
+ <implementation.composite name="foo:PropertyTest" />
+ <property name="number">125</property>
+ <property name="complex" type="foo:MyComplexType">
+ <value>
+ <foo:a>Overriden A</foo:a>
+ <foo:b>Overriden B</foo:b>
+ <foo:c>Overriden C</foo:c>
+ <foo:d>Overriden D</foo:d>
+ <foo:x>
+ <foo:y>Overriden Y</foo:y>
+ <foo:z>Overriden Z</foo:z>
+ </foo:x>
+ </value>
+ </property>
+ </component>
+</composite>
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/PropertyTest.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/PropertyTest.composite
new file mode 100644
index 0000000000..d89c1f82e0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/PropertyTest.composite
@@ -0,0 +1,260 @@
+<?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
+ * 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:foo="http://foo"
+ xmlns:cust="http://www.example.com/Customer"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:rcp="http://test.sca.jaxb/rcprops"
+ targetNamespace="http://foo"
+ name="PropertyTest"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <service name="ProperterTestService" promote="ABComponent">
+ <interface.java interface="org.apache.tuscany.sca.itest.ABComponent"/>
+ </service>
+
+ <property name="number" type="xsd:int">1</property>
+ <property name="complex" type="foo:MyComplexType" >
+ <value>
+ <foo:a>a</foo:a>
+ <foo:b>b</foo:b>
+ <foo:c>c</foo:c>
+ <foo:d>d</foo:d>
+ <foo:x>
+ <foo:y>y</foo:y>
+ <foo:z>z</foo:z>
+ </foo:x>
+ </value>
+ </property>
+
+ <property name="moreComplex" type="MyMoreComplexType">
+ <value xmlns="">
+ <numberSetArray>
+ <integerNumber>1</integerNumber>
+ <floatNumber>11</floatNumber>
+ <doubleNumber>111</doubleNumber>
+ </numberSetArray>
+ <numberSetArray>
+ <integerNumber>2</integerNumber>
+ <floatNumber>22</floatNumber>
+ <doubleNumber>222</doubleNumber>
+ </numberSetArray>
+ <stringArray>TestString_1</stringArray>
+ <stringArray>TestString_2</stringArray>
+ <intArray>10</intArray>
+ <intArray>20</intArray>
+ <integerNumber>27</integerNumber>
+ <floatNumber>79.34</floatNumber>
+ <doubleNumber>184.52</doubleNumber>
+ <doubleArray>50.05</doubleArray>
+ <doubleArray>25.52</doubleArray>
+ <numberSet>
+ <integerNumber>54</integerNumber>
+ <floatNumber>158.68</floatNumber>
+ <doubleNumber>369.04</doubleNumber>
+ </numberSet>
+ </value>
+ </property>
+
+ <property name="complexFoo" type="MyMoreComplexType">
+ <value xmlns="">
+ <stringArray>TestString_3</stringArray>
+ <stringArray>TestString_4</stringArray>
+ <intArray>100</intArray>
+ <intArray>200</intArray>
+ </value>
+ </property>
+
+ <component name="ABCDComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.ABCDComponentImpl"/>
+ <reference name="ab" target="ABComponent"/>
+ <reference name="cd" target="CDComponent"/>
+ </component>
+
+ <component name="ABComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.ABComponentImpl"/>
+ <property name="a" source="$complex/foo:a"/>
+ <property name="b" source="$complex/foo:b"/>
+ <property name="f" source="$complex/foo:a">f</property>
+ <property name="xpath" source="$complex/foo:x/*[local-name()='z']"/>
+ <property name="one" source="$number"/>
+ <property name="foobar" many="true">
+ <value>Apache</value>
+ <value>Tuscany</value>
+ <value>Java SCA</value>
+ </property>
+ <property name="fooInts" many="true">
+ <value>123</value>
+ <value>456</value>
+ <value>789</value>
+ </property>
+ </component>
+
+
+ <component name="CDComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.CDComponentImpl"/>
+ <property name="c" source="$complex/foo:c"/>
+ <property name="d" source="$complex/foo:d"/>
+ <property name="nosource">aValue</property>
+ <property name="fileProperty" file="fileProperty.txt"/>
+ <property name="manyValuesFileProperty" many="true" file="manyValuesFileProperty.txt"/>
+ <property name="nonFileProperty" source="$complex/foo:c"/>
+ <property name="two" source="$number">25</property>
+ </component>
+
+ <component name="PropertyComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.PropertyComponentImpl"/>
+ <property name="complexPropertyOne" source="$moreComplex"></property>
+ <property name="complexPropertyTwo" type="MyMoreComplexType">
+ <value xmlns="">
+ <stringArray>TestString_1</stringArray>
+ <stringArray>TestString_2</stringArray>
+ <intArray>10</intArray>
+ <integerNumber>27</integerNumber>
+ <floatNumber>79.34</floatNumber>
+ <doubleArray>25.52</doubleArray>
+ <doubleNumber>184.52</doubleNumber>
+ <doubleArray>50.05</doubleArray>
+ <intArray>20</intArray>
+ <numberSetArray>
+ <integerNumber>1</integerNumber>
+ <floatNumber>11</floatNumber>
+ <doubleNumber>111</doubleNumber>
+ </numberSetArray>
+ <numberSetArray>
+ <integerNumber>2</integerNumber>
+ <floatNumber>22</floatNumber>
+ <doubleNumber>222</doubleNumber>
+ </numberSetArray>
+ <numberSet>
+ <integerNumber>54</integerNumber>
+ <floatNumber>158.68</floatNumber>
+ <doubleNumber>369.04</doubleNumber>
+ </numberSet>
+ </value>
+ </property>
+ <property name="complexPropertyThree" element="foo:PropertyThreeElement">
+ <PropertyThreeElement xmlns="">
+ <stringArray>TestElementString_1</stringArray>
+ <stringArray>TestElementString_2</stringArray>
+ <intArray>10</intArray>
+ <integerNumber>27</integerNumber>
+ <floatNumber>79.34</floatNumber>
+ <doubleArray>25.52</doubleArray>
+ <doubleNumber>184.52</doubleNumber>
+ <doubleArray>50.05</doubleArray>
+ <intArray>20</intArray>
+ <numberSetArray>
+ <integerNumber>1</integerNumber>
+ <floatNumber>11</floatNumber>
+ <doubleNumber>111</doubleNumber>
+ </numberSetArray>
+ <numberSetArray>
+ <integerNumber>2</integerNumber>
+ <floatNumber>22</floatNumber>
+ <doubleNumber>222</doubleNumber>
+ </numberSetArray>
+ <numberSet>
+ <integerNumber>54</integerNumber>
+ <floatNumber>158.68</floatNumber>
+ <doubleNumber>369.04</doubleNumber>
+ </numberSet>
+ </PropertyThreeElement>
+ </property>
+ <property name="complexPropertyFour" element="PropertyFourElement" many="true">
+ <PropertyFourElement xmlns="">
+ <integerNumber>1</integerNumber>
+ <floatNumber>11.11</floatNumber>
+ <doubleNumber>111.111</doubleNumber>
+ <numberSet>
+ <integerNumber>11</integerNumber>
+ <floatNumber>1111.1111</floatNumber>
+ <doubleNumber>11111.11111</doubleNumber>
+ </numberSet>
+ </PropertyFourElement>
+ <PropertyFourElement xmlns="">
+ <integerNumber>2</integerNumber>
+ <floatNumber>22.22</floatNumber>
+ <doubleNumber>222.222</doubleNumber>
+ <numberSet>
+ <integerNumber>22</integerNumber>
+ <floatNumber>2222.2222</floatNumber>
+ <doubleNumber>22222.22222</doubleNumber>
+ </numberSet>
+ </PropertyFourElement>
+ <PropertyFourElement xmlns="">
+ <integerNumber>3</integerNumber>
+ <floatNumber>33.33</floatNumber>
+ <doubleNumber>333.333</doubleNumber>
+ <numberSet>
+ <integerNumber>33</integerNumber>
+ <floatNumber>3333.3333</floatNumber>
+ <doubleNumber>33333.33333</doubleNumber>
+ </numberSet>
+ </PropertyFourElement>
+ </property>
+ <property name="complexPropertyFive" source="$complexFoo"/>
+ <property name="location" type="xsd:string">RTP</property>
+ <property name="year" type="xsd:string">2006</property>
+ <property name="daysOfTheWeek" many="true" type="xsd:string">
+ <value>Monday</value>
+ <value>Tuesday</value>
+ <value>Wednesday</value>
+ <value>Thursday</value>
+ <value>Friday</value>
+ <value>Saturday</value>
+ <value>Sunday</value>
+ </property>
+ <property name="integerNumbers" many="true" type="xsd:int">
+ <value>1</value>
+ <value>2</value>
+ <value>3</value>
+ <value>4</value>
+ <value>5</value>
+ <value>6</value>
+ <value>7</value>
+ <value>8</value>
+ <value>9</value>
+ <value>10</value>
+ </property>
+ <property name="intNumbers" many="true" type="xsd:int">
+ <value>10</value>
+ <value>9</value>
+ <value>8</value>
+ <value>7</value>
+ <value>6</value>
+ <value>5</value>
+ <value>4</value>
+ <value>3</value>
+ <value>2</value>
+ <value>1</value>
+ <value>0</value>
+ </property>
+
+ <property name="complexJAXBPropertyOne" type="rcp:ReturnCodeProperties">
+ <MyRCProps xmlns="http://test.sca.jaxb/rcprops">
+ <AInt>10</AInt>
+ <BInteger>10</BInteger>
+ </MyRCProps>
+ </property>
+ <property name="complexJAXBPropertyTwo" type="rcp:ReturnCodeProperties" file="rcProps.txt"/>
+ </component>
+</composite>
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/customer.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/customer.xsd
new file mode 100644
index 0000000000..7421750f1b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/customer.xsd
@@ -0,0 +1,30 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns="http://www.example.com/Customer" targetNamespace="http://www.example.com/Customer">
+
+ <xsd:element name="customer" type="Customer"/>
+ <xsd:complexType name="Customer">
+ <xsd:sequence>
+ <xsd:element name="firstName" type="xsd:string"/>
+ <xsd:element name="middleName" type="xsd:string"/>
+ <xsd:element name="lastName" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:schema>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/fileProperty.txt b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/fileProperty.txt
new file mode 100644
index 0000000000..71d0c25730
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/fileProperty.txt
@@ -0,0 +1,22 @@
+<?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.
+-->
+<values xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912">
+ <value>fileValue</value>
+</values> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/foo.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/foo.xsd
new file mode 100644
index 0000000000..5bf3e5f52a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/foo.xsd
@@ -0,0 +1,41 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns="http://foo"
+ targetNamespace="http://foo"
+ elementFormDefault="qualified">
+
+ <xsd:complexType name="MyComplexType">
+ <xsd:sequence>
+ <xsd:element name="a" type="xsd:string"/>
+ <xsd:element name="b" type="xsd:string"/>
+ <xsd:element name="c" type="xsd:string"/>
+ <xsd:element name="d" type="xsd:string"/>
+ <xsd:element name="x">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="y" type="xsd:string"/>
+ <xsd:element name="z" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ </xsd:schema> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/manyValuesFileProperty.txt b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/manyValuesFileProperty.txt
new file mode 100644
index 0000000000..3b58d863df
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/manyValuesFileProperty.txt
@@ -0,0 +1,25 @@
+<?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.
+-->
+<values xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912">
+ <manyFilePropertyValues>fileValueOne</manyFilePropertyValues>
+ <manyFilePropertyValues>fileValueTwo</manyFilePropertyValues>
+ <manyFilePropertyValues>fileValueThree</manyFilePropertyValues>
+ <manyFilePropertyValues>fileValueFour</manyFilePropertyValues>
+</values> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/mySimpleService.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/mySimpleService.composite
new file mode 100644
index 0000000000..347990cca8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/mySimpleService.composite
@@ -0,0 +1,40 @@
+<?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 autowire="false" local="true" name="MySimpleService"
+ targetNamespace="http://foo" xmlns:foo="http://foo" xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://docs.oasis-open.org/ns/opencsa/sca/200912 http://docs.oasis-open.org/ns/opencsa/sca/200912 ">
+
+
+ <service name="MyServiceNew1" promote="MyServiceComponentNew/MyService">
+ <interface.java interface="mysca.test.myservice.impl.MyService" />
+ </service>
+
+ <property name="newLocation" type="xsd:anyURI">Raleigh</property>
+ <property name="newYear" type="xsd:anyURI">2008</property>
+
+
+ <component name="MyServiceComponentNew">
+ <implementation.java class="mysca.test.myservice.impl.MyServiceImpl" />
+ <property name="location" source="$newLocation" />
+ <property name="year" source="$newYear" />
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/noNamespace.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/noNamespace.xsd
new file mode 100644
index 0000000000..f416ccc241
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/noNamespace.xsd
@@ -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.
+-->
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="unqualified">
+
+ <xsd:complexType name="NumberSetType">
+ <xsd:sequence>
+ <xsd:element name="integerNumber" type="xsd:int"/>
+ <xsd:element name="floatNumber" type="xsd:float"/>
+ <xsd:element name="doubleNumber" type="xsd:double"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="MyMoreComplexType">
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="numberSetArray" type="NumberSetType" />
+ <xsd:element name="stringArray" type="xsd:string" />
+ <xsd:element name="intArray" type="xsd:int" />
+ <xsd:element name="integerNumber" type="xsd:int" />
+ <xsd:element name="floatNumber" type="xsd:float" />
+ <xsd:element name="doubleNumber" type="xsd:double" />
+ <xsd:element name="doubleArray" type="xsd:double" />
+ <xsd:element name="numberSet" type="NumberSetType"/>
+ </xsd:choice>
+ </xsd:complexType>
+
+ <xsd:element name="PropertyThreeElement" type="MyMoreComplexType"/>
+
+ <xsd:element name="PropertyFourElement" type="MyMoreComplexType"/>
+
+ </xsd:schema> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/rcProps.txt b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/rcProps.txt
new file mode 100644
index 0000000000..07f4b4807a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/rcProps.txt
@@ -0,0 +1,25 @@
+<?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
+ * 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.
+-->
+
+<values xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912">
+ <MyRCProps xmlns="http://test.sca.jaxb/rcprops">
+ <AInt>20</AInt>
+ <BInteger>20</BInteger>
+ </MyRCProps>
+</values>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/rcprops.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/rcprops.xsd
new file mode 100644
index 0000000000..21289fa7b2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/main/resources/rcprops.xsd
@@ -0,0 +1,55 @@
+<!--
+ * 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
+ * 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.
+-->
+<schema elementFormDefault="qualified" targetNamespace="http://test.sca.jaxb/rcprops"
+ xmlns:tns="http://test.sca.jaxb/rcprops" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.0"
+ xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+
+ <!-- Use some JAXB customizations -->
+
+ <annotation>
+ <appinfo>
+ <jaxb:schemaBindings>
+ <jaxb:package name="test.jaxb.props" />
+ </jaxb:schemaBindings>
+ </appinfo>
+ </annotation>
+
+ <element name="MyRCProps" type="tns:ReturnCodeProperties" />
+
+ <complexType name="ReturnCodeProperties">
+ <sequence>
+ <element name="AInt" type="xsd:int">
+ <annotation>
+ <appinfo>
+ <jaxb:property name="a" />
+ </appinfo>
+ </annotation>
+ </element>
+ <element name="BInteger" type="xsd:integer">
+ <annotation>
+ <appinfo>
+ <jaxb:property name="b" />
+ </appinfo>
+ </annotation>
+ </element>
+ </sequence>
+ </complexType>
+</schema>
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/test/java/org/apache/tuscany/sca/itest/MyTotalServiceTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/test/java/org/apache/tuscany/sca/itest/MyTotalServiceTestCase.java
new file mode 100644
index 0000000000..efc635c72b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/test/java/org/apache/tuscany/sca/itest/MyTotalServiceTestCase.java
@@ -0,0 +1,104 @@
+/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+import mysca.test.myservice.impl.MyService;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class MyTotalServiceTestCase {
+ private static MyService service1;
+ private static MyService service2;
+ private static MyService service3;
+
+ private static Node node;
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the local
+ * property variables defined in the implementation file with the expected values 'RTP' and '2006'
+ */
+ @Test
+ public void testPropertyDefault() {
+ assertEquals("RTP", service1.getLocation());
+ assertEquals("2006", service1.getYear());
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property value obtained using service2 from the SCA runtime environment with the expected values 'Raleigh'
+ * and '2008'. This overrides the local property values
+ */
+ @Test
+ public void testPropertyOverride() {
+ assertEquals("Raleigh", service2.getLocation());
+ assertEquals("2008", service2.getYear());
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property value obtained using service3 from the SCA runtime environment with the expected values 'Durham'
+ * and '2009'
+ */
+ @Test
+ public void testPropertyNestedOverride() {
+ assertEquals("Durham", service3.getLocation());
+ assertEquals("2009", service3.getYear());
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @BeforeClass is used for one time set Up, it executes before every tests. This method is used to create a test
+ * Embedded SCA node, to start the SCA node and to get a reference to the 'outerABService' service
+ */
+ @BeforeClass
+ public static void setUp() throws Exception {
+
+ String location = ContributionLocationHelper.getContributionLocation("Outer.composite");
+ node = NodeFactory.newInstance().createNode("Outer.composite", new Contribution("c1", location));
+ node.start();
+ service1 = node.getService(MyService.class, "MyServiceComponent/MyService");
+ service2 = node.getService(MyService.class, "MyServiceComponentNew/MyService");
+ service3 = node.getService(MyService.class, "MySimpleServiceInRecursiveAnother");
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @AfterClass is used for one time Tear Down, it executes after every tests. This method is used to close the
+ * node, close any previously opened connections etc
+ */
+ @AfterClass
+ public static void tearDown() {
+ node.stop();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/test/java/org/apache/tuscany/sca/itest/OuterPropertyTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/test/java/org/apache/tuscany/sca/itest/OuterPropertyTestCase.java
new file mode 100644
index 0000000000..0906a45ab3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/test/java/org/apache/tuscany/sca/itest/OuterPropertyTestCase.java
@@ -0,0 +1,169 @@
+/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Iterator;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * This is a class which makes user of JUnit Framework, all tests are written using JUnit notation. These tests are used
+ * to test different property values returned from the SCA Runtime Environment which is initialized with the composite
+ * 'OuterPropertyTest.composite'. It basically tests the Simple type of property and Complex type of property from the
+ * SCA Runtime Environment.
+ */
+public class OuterPropertyTestCase {
+
+ private static Node node;
+ private static ABComponent outerABService;
+
+ /**
+ * Method annotated with
+ *
+ * @BeforeClass is used for one time set Up, it executes before every tests. This method is used to create a test
+ * Embedded SCA node, to start the SCA node and to get a reference to the 'outerABService' service
+ */
+ @BeforeClass
+ public static void init() throws Exception {
+ String location = ContributionLocationHelper.getContributionLocation("OuterPropertyTest.composite");
+ node = NodeFactory.newInstance().createNode("OuterPropertyTest.composite", new Contribution("c1", location));
+ node.start();
+ outerABService = node.getService(ABComponent.class, "OuterComponent");
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @AfterClass is used for one time Tear Down, it executes after every tests. This method is used to close the
+ * node, close any previously opened connections etc
+ */
+ @AfterClass
+ public static void destroy() throws Exception {
+ node.stop();
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property value obtained using a service from the SCA runtime environment with the expected value 'Overriden
+ * A'
+ */
+ @Test
+ public void testOverridenA() {
+ assertEquals("Overriden A", outerABService.getA());
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property value obtained using a service from the SCA runtime environment with the expected value 'Overriden
+ * B'
+ */
+ @Test
+ public void testOverridenB() {
+ assertEquals("Overriden B", outerABService.getB());
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property value obtained using a service from the SCA runtime environment with the expected value 'Overriden
+ * A'
+ */
+ @Test
+ public void testOverridenF() {
+ assertEquals("Overriden A", outerABService.getF());
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property value obtained using a service from the SCA runtime environment with the expected value 'Overriden
+ * Z'
+ */
+ @Test
+ public void testOverridenZ() {
+ assertEquals("Overriden Z", outerABService.getZ());
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property value obtained using a service from the SCA runtime environment with the expected value 125
+ */
+ @Test
+ public void testOverridenIntValue() {
+ assertEquals(125, outerABService.getIntValue());
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property value obtained using a service from the SCA runtime environment with the expected value 125
+ */
+ @Test
+ public void testDefaultValue() {
+ assertEquals(125, outerABService.getIntValue());
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property values obtained using a service from the SCA runtime environment with the expected values 'Apache' ,
+ * 'Tuscany' and 'Java SCA' respectively .
+ */
+ @Test
+ public void testManySimpleStringValues() {
+ Iterator<String> iterator = outerABService.getManyStringValues().iterator();
+ assertEquals("Apache", iterator.next());
+ assertEquals("Tuscany", iterator.next());
+ assertEquals("Java SCA", iterator.next());
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property values obtained using a service from the SCA runtime environment with the expected values 123, 456
+ * and 789
+ */
+ @Test
+ public void testManySimpleIntegerValues() {
+ Iterator<Integer> iterator = outerABService.getManyIntegers().iterator();
+ assertEquals(123, iterator.next().intValue());
+ assertEquals(456, iterator.next().intValue());
+ assertEquals(789, iterator.next().intValue());
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/test/java/org/apache/tuscany/sca/itest/PropertyTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/test/java/org/apache/tuscany/sca/itest/PropertyTestCase.java
new file mode 100644
index 0000000000..0106d8a665
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/test/java/org/apache/tuscany/sca/itest/PropertyTestCase.java
@@ -0,0 +1,422 @@
+/*
+ * 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.itest;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.math.BigInteger;
+import java.util.Arrays;
+import java.util.Iterator;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import test.jaxb.props.ReturnCodeProperties;
+
+/**
+ * This is a class which makes user of JUnit Framework, all tests are written using JUnit notation. These tests are used
+ * to test different property values returned from the SCA Runtime Environment which is initialized with the composite
+ * 'PropertyTest.composite'. It basically tests all types of property values returned from SCA runtime environment.
+ */
+public class PropertyTestCase {
+ private static Node node;
+ private static ABComponent abService;
+ private static CDComponent cdService;
+ private static ABCDComponent abcdService;
+ private static PropertyComponent propertyService;
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property value obtained using a service from the SCA runtime environment with the expected value 'a'
+ */
+ @Test
+ public void testA() {
+ assertEquals("a", abService.getA());
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property value obtained using a service from the SCA runtime environment with the expected value 'b'
+ */
+ @Test
+ public void testB() {
+ assertEquals("b", abService.getB());
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property value obtained using a service from the SCA runtime environment with the expected value 'c'
+ */
+ @Test
+ public void testC() {
+ assertEquals("c", cdService.getC());
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property value obtained using a service from the SCA runtime environment with the expected value 'c'
+ */
+ @Test
+ public void testC2() {
+ assertEquals("c", cdService.getC2());
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property value obtained using a service from the SCA runtime environment with the expected value 'd'
+ */
+ @Test
+ public void testD() {
+ assertEquals("d", cdService.getD());
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property value obtained using a service from the SCA runtime environment with the expected value 'a'
+ */
+ @Test
+ public void testF() {
+ assertEquals("a", abService.getF());
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property value obtained using a service from the SCA runtime environment with the expected value 'z'
+ */
+ @Test
+ public void testZ() {
+ assertEquals("z", abService.getZ());
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property value obtained using a service from the SCA runtime environment with the expected value 1.
+ */
+ @Test
+ public void testIntValue() {
+ assertEquals(1, abService.getIntValue());
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property value obtained using a service from the SCA runtime environment with the expected value 1.
+ */
+ @Test
+ public void testDefaultValue() {
+ assertEquals(1, abService.getIntValue());
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property value obtained using a service from the SCA runtime environment with the expected value 1.
+ */
+ @Test
+ public void testDefaultValueOverride() {
+ assertEquals(1, cdService.getOverrideValue());
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property value obtained using a service from the SCA runtime environment with the expected value 'aValue'
+ */
+ @Test
+ public void testNoSource() {
+ assertEquals("aValue", cdService.getNoSource());
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property value obtained using a service from the SCA runtime environment with the expected value
+ * 'fileValue'
+ */
+ @Test
+ public void testFileProperty() {
+ assertEquals("fileValue", cdService.getFileProperty());
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property values obtained using a service from the SCA runtime environment with the expected values 4 and
+ * 'fileValueTwo' respectively.
+ */
+ @Test
+ public void testManyValuesFileProperty() {
+ Iterator<String> iterator = cdService.getManyValuesFileProperty().iterator();
+ iterator.next();
+ String secondValue = iterator.next();
+ assertEquals(4, cdService.getManyValuesFileProperty().size());
+ assertEquals("fileValueTwo", secondValue);
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property values obtained using a service from the SCA runtime environment with the expected values 'a' ,
+ * 'b', 'c' and 'd' respectively.
+ */
+ @Test
+ public void testABCD() {
+ assertEquals("a", abcdService.getA());
+ assertEquals("b", abcdService.getB());
+ assertEquals("c", abcdService.getC());
+ assertEquals("d", abcdService.getD());
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property values obtained using a service from the SCA runtime environment with the expected values 'RTP'
+ * and '2006' respectively
+ */
+ @Test
+ public void testDefaultProperty() {
+ assertEquals("RTP", propertyService.getLocation());
+ assertEquals("2006", propertyService.getYear());
+
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property values obtained using a service from the SCA runtime environment with the expected values 'Apache' ,
+ * 'Tuscany' and 'Java SCA' respectively .
+ */
+ @Test
+ public void testManySimpleStringValues() {
+ Iterator<String> iterator = abService.getManyStringValues().iterator();
+ assertEquals("Apache", iterator.next());
+ assertEquals("Tuscany", iterator.next());
+ assertEquals("Java SCA", iterator.next());
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property values obtained using a service from the SCA runtime environment with the expected values 123, 456
+ * and 789 respectively.
+ */
+ @Test
+ public void testManySimpleIntegerValues() {
+ Iterator<Integer> iterator = abService.getManyIntegers().iterator();
+ assertEquals(123, iterator.next().intValue());
+ assertEquals(456, iterator.next().intValue());
+ assertEquals(789, iterator.next().intValue());
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property values obtained using a service from the SCA runtime environment with the expected values
+ * 'TestString_1' and 2 respectively.
+ */
+ @Test
+ public void testComplexPropertyOne() {
+ ComplexPropertyBean propBean = propertyService.getComplexPropertyOne();
+ assertNotNull(propBean);
+ assertEquals("TestString_1", propBean.getStringArray()[0]);
+ assertEquals(2, propBean.numberSetArray[1].integerNumber);
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property values obtained using a service from the SCA runtime environment with the expected integer number
+ * and a float number
+ */
+ @Test
+ public void testComplexPropertyTwo() {
+ ComplexPropertyBean propBean = propertyService.getComplexPropertyTwo();
+ assertNotNull(propBean);
+ assertEquals(10, propBean.intArray[0]);
+ assertEquals((float)22, propBean.numberSetArray[1].floatNumber, 0.1);
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property values obtained using a service from the SCA runtime environment with the expected value first
+ * element in the string array and the float number
+ */
+ @Test
+ public void testComplexPropertyThree() {
+ ComplexPropertyBean propBean = propertyService.getComplexPropertyThree();
+ assertNotNull(propBean);
+ assertEquals("TestElementString_1", propBean.stringArray[0]);
+ assertEquals((float)22, propBean.numberSetArray[1].floatNumber, 0.1);
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * complex property value obtained using a service from the SCA runtime environment with the expected values
+ * 1, 222.222 and 33 respectively.
+ */
+ @Test
+ public void testComplexPropertyFour() {
+ Object[] propBeanCollection = propertyService.getComplexPropertyFour().toArray();
+ assertNotNull(propBeanCollection);
+ assertEquals(1, ((ComplexPropertyBean)propBeanCollection[0]).getIntegerNumber());
+ assertEquals(222.222, ((ComplexPropertyBean)propBeanCollection[1]).getDoubleNumber(), 0.1);
+ assertEquals(33, ((ComplexPropertyBean)propBeanCollection[2]).getNumberSet().getIntegerNumber());
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @Test is a test method where testing logic is written using various assert methods. This test verifies the
+ * property values obtained using a service from the SCA runtime environment with the expected values
+ * 'TestString_3', 'TestString_4', 100 and 200.
+ */
+ @Test
+ public void testComplexPropertyFive() {
+ ComplexPropertyBean propBean = propertyService.getComplexPropertyFive();
+ assertNotNull(propBean);
+ assertEquals("TestString_3", propBean.getStringArray()[0]);
+ assertEquals("TestString_4", propBean.getStringArray()[1]);
+ assertEquals(100, propBean.getIntArray()[0]);
+ assertEquals(200, propBean.getIntArray()[1]);
+ }
+
+ @Test
+ public void testGetLocationFromComponentContext() {
+ String location = propertyService.getLocation();
+ assertNotNull(location);
+ String locationFromCC = propertyService.getLocationFromComponentContext();
+ assertNotNull(locationFromCC);
+ assertEquals(location, locationFromCC);
+ }
+
+ @Test
+ public void testGetInjectedStringArrayProperty() {
+ String[] daysOfWeek = propertyService.getDaysOfTheWeek();
+ assertNotNull(daysOfWeek);
+
+ String[] expected = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"};
+ Assert.assertTrue(Arrays.equals(expected, daysOfWeek));
+ }
+
+ @Test
+ public void testGetInjectedIntegerArrayProperty() {
+ Integer[] numbers = propertyService.getIntegerNumbers();
+ assertNotNull(numbers);
+
+ Integer[] expected = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
+ Assert.assertTrue(Arrays.equals(expected, numbers));
+ }
+
+ @Test
+ public void testGetInjectedIntArrayProperty() {
+ int[] numbers = propertyService.getIntNumbers();
+ assertNotNull(numbers);
+
+ int[] expected = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0};
+ Assert.assertTrue(Arrays.equals(expected, numbers));
+ }
+
+ @Test
+ public void testComplexJAXBProperty() {
+ ReturnCodeProperties rc = propertyService.getComplexJAXBPropertyOne();
+ assertEquals(10, rc.getA());
+ assertEquals(new BigInteger("10"), rc.getB());
+ }
+
+ @Test
+ public void testComplexJAXBPropertyFromFile() {
+ ReturnCodeProperties rc = propertyService.getComplexJAXBPropertyTwo();
+ System.out.println("SKSK: a =" + rc.getA());
+ System.out.println("SKSK: b =" + rc.getB());
+ assertEquals(20, rc.getA());
+ assertEquals(new BigInteger("20"), rc.getB());
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @BeforeClass is used for one time set Up, it executes before every tests. This method is used to create a test
+ * Embedded SCA node, to start the SCA node and to get a reference to 4 services namely 'abService'
+ * service, 'cdService' service, 'abcdService' service and 'propertyService' service
+ */
+ @BeforeClass
+ public static void init() throws Exception {
+ try {
+ String location = ContributionLocationHelper.getContributionLocation("PropertyTest.composite");
+ node = NodeFactory.newInstance().createNode("PropertyTest.composite", new Contribution("c1", location));
+ node.start();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ abService = node.getService(ABComponent.class, "ABComponent");
+ cdService = node.getService(CDComponent.class, "CDComponent");
+ abcdService = node.getService(ABCDComponent.class, "ABCDComponent");
+ propertyService = node.getService(PropertyComponent.class, "PropertyComponent");
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @AfterClass is used for one time Tear Down, it executes after every tests. This method is used to close the
+ * node, close any previously opened connections etc
+ */
+ @AfterClass
+ public static void destroy() throws Exception {
+ node.stop();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/test/java/org/apache/tuscany/sca/itest/cdi/ConstructorPropertyInjectionTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/test/java/org/apache/tuscany/sca/itest/cdi/ConstructorPropertyInjectionTestCase.java
new file mode 100644
index 0000000000..2207543b1e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/test/java/org/apache/tuscany/sca/itest/cdi/ConstructorPropertyInjectionTestCase.java
@@ -0,0 +1,73 @@
+/*
+ * 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.itest.cdi;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class ConstructorPropertyInjectionTestCase {
+ private static org.apache.tuscany.sca.node.Node node;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ try {
+ String location = ContributionLocationHelper.getContributionLocation("ConstructorPropertyInjection.composite");
+ node = NodeFactory.newInstance().createNode("ConstructorPropertyInjection.composite", new Contribution("c1", location));
+ node.start();
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw e;
+ }
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @AfterClass is used for one time Tear Down, it executes after every tests. This method is used to close the
+ * node, close any previously opened connections etc
+ */
+ @AfterClass
+ public static void destroy() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testFoo1() throws Exception {
+ Bar foo = node.getService(Bar.class, "Foo1Component");
+ assertEquals("fubar", foo.getBar());
+ }
+
+ @Test
+ public void testFoo2() throws Exception {
+ Bar foo = node.getService(Bar.class, "Foo2Component");
+ assertEquals("fubar", foo.getBar());
+ }
+
+ @Test
+ public void testFoo3() throws Exception {
+ Bar foo = node.getService(Bar.class, "Foo3Component");
+ assertEquals("fubar", foo.getBar());
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/test/java/org/apache/tuscany/sca/itest/ctcalc/CTCalcTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/test/java/org/apache/tuscany/sca/itest/ctcalc/CTCalcTestCase.java
new file mode 100644
index 0000000000..b0bd9ec8fe
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/properties/src/test/java/org/apache/tuscany/sca/itest/ctcalc/CTCalcTestCase.java
@@ -0,0 +1,104 @@
+/*
+ * 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.itest.ctcalc;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * This tests how properties are calculated in the case where the implementation class extends another class. Two
+ * cases are considered where the implementation class has:
+ * - SCA annotations
+ * - No SCA annotations
+ *
+ * In particular we're checking that the artifacts of the base class are ignored in both cases.
+ *
+ */
+public class CTCalcTestCase {
+
+ private static Node node;
+
+ private static CTCalcComponent annotatedComponent;
+ private static CTCalcComponent unannotatedComponent;
+
+
+ /**
+ * Method annotated with
+ *
+ * @BeforeClass is used for one time set Up, it executes before every tests. This method is used to create a test
+ * Embedded SCA node, to start the SCA node and to get a reference to the 'outerABService' service
+ */
+ @BeforeClass
+ public static void init() throws Exception {
+ String location = ContributionLocationHelper.getContributionLocation("CTCalcTest.composite");
+ node = NodeFactory.newInstance().createNode("CTCalcTest.composite", new Contribution("c1", location));
+ node.start();
+ annotatedComponent = node.getService(CTCalcComponent.class, "AnnotatedComponent");
+ unannotatedComponent = node.getService(CTCalcComponent.class, "UnannotatedComponent");
+ }
+
+ /**
+ * Method annotated with
+ *
+ * @AfterClass is used for one time Tear Down, it executes after every tests. This method is used to close the
+ * node, close any previously opened connections etc
+ */
+ @AfterClass
+ public static void destroy() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testAnnotatedExtension() {
+ assertEquals("Annotated", annotatedComponent.test());
+ assertEquals(0, ((NodeImpl)node).getDomainComposite().getComponents().get(0).getProperties().size());
+ System.out.println(((NodeImpl)node).getDomainComposite().getComponents().get(0).getProperties());
+ }
+
+ @Test
+ public void testUnannotatedExtension() {
+ assertEquals("Unannotated", unannotatedComponent.test());
+ assertEquals(4, ((NodeImpl)node).getDomainComposite().getComponents().get(1).getProperties().size());
+ System.out.println(((NodeImpl)node).getDomainComposite().getComponents().get(1).getProperties());
+ }
+
+ @Test
+ public void testAnnotated1Extension() {
+ assertEquals("Annotated", annotatedComponent.test());
+ assertEquals(1, ((NodeImpl)node).getDomainComposite().getComponents().get(2).getProperties().size());
+ System.out.println(((NodeImpl)node).getDomainComposite().getComponents().get(2).getProperties());
+ }
+
+ @Test
+ public void testAnnotated2Extension() {
+ assertEquals("Annotated", annotatedComponent.test());
+ assertEquals(2, ((NodeImpl)node).getDomainComposite().getComponents().get(3).getProperties().size());
+ System.out.println(((NodeImpl)node).getDomainComposite().getComponents().get(3).getProperties());
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/pom.xml
new file mode 100644
index 0000000000..ce616ac98f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/pom.xml
@@ -0,0 +1,39 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <!--relativePath>../pom.xml</relativePath-->
+ </parent>
+ <artifactId>itest-recursive-multi-level</artifactId>
+ <name>Apache Tuscany SCA iTest Builder Recusive Multi-Level</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MyService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MyService.java
new file mode 100644
index 0000000000..986c8305dd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MyService.java
@@ -0,0 +1,26 @@
+/*
+ * 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 mysca.test.myservice;
+
+public interface MyService {
+ String getLocation();
+
+ String getYear();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MyServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MyServiceImpl.java
new file mode 100644
index 0000000000..6cad998042
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MyServiceImpl.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package mysca.test.myservice;
+
+import org.oasisopen.sca.annotation.Property;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(MyService.class)
+public class MyServiceImpl implements MyService {
+
+ @Property(name = "location")
+ protected String location = "ABC";
+
+ @Property(name = "year")
+ protected String year = "2006";
+
+ public String getLocation() {
+ return location;
+ }
+
+ public String getYear() {
+ return year;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalService.java
new file mode 100644
index 0000000000..a10a430473
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalService.java
@@ -0,0 +1,28 @@
+/*
+ * 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 mysca.test.myservice;
+
+public interface MySimpleTotalService {
+ String getLocation();
+
+ String getYear();
+
+ String getYear2();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalServiceImpl.java
new file mode 100644
index 0000000000..d00b016e34
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/main/java/mysca/test/myservice/MySimpleTotalServiceImpl.java
@@ -0,0 +1,46 @@
+/*
+ * 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 mysca.test.myservice;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(MySimpleTotalService.class)
+public class MySimpleTotalServiceImpl implements MySimpleTotalService {
+ // default required==true so it is 1:1
+ @Reference
+ public MyService myService;
+
+ @Reference
+ private MyService myService2;
+
+ public String getLocation() {
+ return myService.getLocation();
+ }
+
+ public String getYear() {
+ return myService.getYear();
+ }
+
+ public String getYear2() {
+ return myService2.getYear();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/main/resources/TotalService1Auto.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/main/resources/TotalService1Auto.composite
new file mode 100644
index 0000000000..9ff53cca08
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/main/resources/TotalService1Auto.composite
@@ -0,0 +1,53 @@
+<?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:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:foo="http://foo"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xsi:schemaLocation="http://docs.oasis-open.org/ns/opencsa/sca/200912 http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ name="TotalComposite1Auto"
+ targetNamespace="http://foo"
+ local="true"
+ autowire="false">
+
+ <property name="newLocation" type="xsd:anyURI">Level 1</property>
+ <property name="newYear" type="xsd:anyURI">2001</property>
+
+ <component name="ServiceComponentLevel1Auto">
+ <implementation.java class="mysca.test.myservice.MyServiceImpl"/>
+ <property name="location" source="$newLocation"/>
+ <property name="year" source="$newYear"/>
+ </component>
+
+ <service name="MyServiceLevel1Auto" promote="TotalServiceComponentLevel1Auto/MySimpleTotalService">
+ <interface.java interface="mysca.test.myservice.MySimpleTotalService"/>
+ </service>
+
+ <component name="TotalServiceComponentLevel1Auto">
+ <implementation.java class="mysca.test.myservice.MySimpleTotalServiceImpl"/>
+ <reference name="myService" autowire="true"/>
+ <reference name="myService2" target="ServiceComponentLevel1Auto"/>
+ </component>
+
+ <reference name="myServiceReference1Auto" promote="TotalServiceComponentLevel1Auto/myService" multiplicity="1..1">
+ <interface.java interface="mysca.test.myservice.MyService"/>
+ </reference>
+</composite>
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/main/resources/TotalService2Auto.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/main/resources/TotalService2Auto.composite
new file mode 100644
index 0000000000..cf8506b4e7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/main/resources/TotalService2Auto.composite
@@ -0,0 +1,49 @@
+<?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:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:foo="http://foo"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xsi:schemaLocation="http://docs.oasis-open.org/ns/opencsa/sca/200912 http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ name="TotalComposite2Auto"
+ targetNamespace="http://foo"
+ local="true"
+ autowire="false">
+
+ <property name="newLocation" type="xsd:anyURI">Level 2</property>
+ <property name="newYear" type="xsd:anyURI">2002</property>
+
+ <component name="ServiceComponentLevel2Auto">
+ <implementation.java class="mysca.test.myservice.MyServiceImpl"/>
+ <property name="location">Default 2</property>
+ <property name="year">1992</property>
+ </component>
+
+ <service name="MyServiceLevel2Auto" promote="TotalServiceInRecursive2Auto/MyServiceLevel1Auto"/>
+
+ <component name="TotalServiceInRecursive2Auto">
+ <implementation.composite name="foo:TotalComposite1Auto"/>
+ <reference name="myServiceReference1Auto" autowire="true"/>
+ <property name="newLocation" source="$newLocation"/>
+ <property name="newYear" source="$newYear"/>
+ </component>
+
+ <reference name="myServiceReference2Auto" promote="TotalServiceInRecursive2Auto/myServiceReference1Auto" multiplicity="1..1"/>
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/main/resources/TotalService3Auto.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/main/resources/TotalService3Auto.composite
new file mode 100644
index 0000000000..7386404e71
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/main/resources/TotalService3Auto.composite
@@ -0,0 +1,52 @@
+<?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:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:foo="http://foo"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xsi:schemaLocation="http://docs.oasis-open.org/ns/opencsa/sca/200912 http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ name="TotalComposite3Auto"
+ targetNamespace="http://foo"
+ local="true"
+ autowire="false">
+
+ <property name="newLocation" type="xsd:anyURI">Level 3</property>
+ <property name="newYear" type="xsd:anyURI">2003</property>
+
+ <component name="ServiceComponentLevel3Auto">
+ <implementation.java class="mysca.test.myservice.MyServiceImpl"/>
+ <property name="location">Default 3</property>
+ <property name="year">1993</property>
+ </component>
+
+ <service name="MyServiceLevel3Auto" promote="TotalServiceInRecursive3Auto/MyServiceLevel2Auto">
+ </service>
+
+ <component name="TotalServiceInRecursive3Auto" autowire="true">
+ <implementation.composite name="foo:TotalComposite2Auto"/>
+ <reference name="myServiceReference2Auto"/>
+ <property name="newLocation" source="$newLocation"/>
+ <property name="newYear" source="$newYear"/>
+ </component>
+
+ <reference name="myServiceReference3Auto" promote="TotalServiceInRecursive3Auto/myServiceReference2Auto" multiplicity="1..1">
+ </reference>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/test/java/test/sca/tests/MultiLevelTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/test/java/test/sca/tests/MultiLevelTestCase.java
new file mode 100644
index 0000000000..2dc13c4f42
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/recursive-multi-level/src/test/java/test/sca/tests/MultiLevelTestCase.java
@@ -0,0 +1,92 @@
+/*
+ * 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 test.sca.tests;
+
+import static org.junit.Assert.assertEquals;
+import mysca.test.myservice.MySimpleTotalService;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Tests to make sure that autowiring and recusive composite work together
+ *
+ */
+public class MultiLevelTestCase {
+ private static Node node1;
+ private static Node node2;
+ private static Node node3;
+ private static MySimpleTotalService myService1;
+ private static MySimpleTotalService myService2;
+ private static MySimpleTotalService myService3;
+
+ @BeforeClass
+ public static void setUp() throws Exception {
+ String location = ContributionLocationHelper.getContributionLocation("TotalService1Auto.composite");
+ Contribution contribution = new Contribution("c1", location);
+ try {
+ node1 = NodeFactory.newInstance().createNode("TotalService1Auto.composite", contribution);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ node2 = NodeFactory.newInstance().createNode("TotalService2Auto.composite", contribution);
+ node3 = NodeFactory.newInstance().createNode("TotalService3Auto.composite", contribution);
+
+ node1.start();
+ node2.start();
+ node3.start();
+
+ myService1 = node1.getService(MySimpleTotalService.class, "TotalServiceComponentLevel1Auto");
+ myService2 = node2.getService(MySimpleTotalService.class, "TotalServiceInRecursive2Auto/MyServiceLevel1Auto");
+ myService3 = node3.getService(MySimpleTotalService.class, "TotalServiceInRecursive3Auto/MyServiceLevel2Auto");
+ }
+
+ @Test
+ public void testLevel1() {
+ assertEquals("Level 1", myService1.getLocation());
+ assertEquals("2001", myService1.getYear());
+ assertEquals("2001", myService1.getYear2());
+ }
+
+ @Test
+ public void testLevel2() {
+ assertEquals("Default 2", myService2.getLocation());
+ assertEquals("1992", myService2.getYear());
+ assertEquals("2002", myService2.getYear2());
+ }
+
+ @Test
+ public void testLevel3() {
+ assertEquals("Default 3", myService3.getLocation());
+ assertEquals("1993", myService3.getYear());
+ assertEquals("2003", myService3.getYear2());
+ }
+
+ @AfterClass
+ public static void tearDown() {
+ node1.stop();
+ node2.stop();
+ node3.stop();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/pom.xml
new file mode 100644
index 0000000000..7241fd3a40
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/pom.xml
@@ -0,0 +1,39 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-references</artifactId>
+ <name>Apache Tuscany SCA iTest References</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/AService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/AService.java
new file mode 100644
index 0000000000..cecb2d83dd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/AService.java
@@ -0,0 +1,56 @@
+/*
+ * 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.itest.allowspassbyreference;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * The service interface
+ */
+@Remotable
+public interface AService {
+ /**
+ * Create a new object
+ * @param req
+ * @return
+ */
+ MutableObject create(MutableObject req);
+
+ /**
+ *
+ * @param req
+ * @return
+ */
+ MutableObject read(MutableObject req);
+
+ /**
+ *
+ * @param req
+ * @return
+ */
+ MutableObject update(MutableObject req);
+
+ /**
+ *
+ * @param req
+ * @return
+ */
+ MutableObject delete(MutableObject req);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/AServiceClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/AServiceClient.java
new file mode 100644
index 0000000000..2c746fcbb2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/AServiceClient.java
@@ -0,0 +1,55 @@
+/*
+ * 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.itest.allowspassbyreference;
+
+
+/**
+ * The client interface
+ */
+public interface AServiceClient {
+ /**
+ * Create a new object with the given state
+ * @param state
+ * @return the id
+ */
+ int create(String state);
+
+ /**
+ * Read the object state by id
+ * @param id
+ * @return
+ */
+ String read(int id);
+
+ /**
+ * Update the state
+ * @param id
+ * @param newState
+ * @return
+ */
+ String update(int id, String newState);
+
+ /**
+ * Delete the object by id
+ * @param id
+ * @return
+ */
+ boolean delete(int id);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ClientImplA.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ClientImplA.java
new file mode 100644
index 0000000000..59c3768964
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ClientImplA.java
@@ -0,0 +1,87 @@
+/*
+ * 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.itest.allowspassbyreference;
+
+import junit.framework.Assert;
+
+import org.oasisopen.sca.annotation.ComponentName;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Scope;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ *
+ */
+@Service(AServiceClient.class)
+@Scope("COMPOSITE")
+public class ClientImplA implements AServiceClient {
+ @ComponentName
+ private String componentName;
+
+ @Reference
+ private AService service;
+
+ @Override
+ public int create(String state) {
+ MutableObject req = new MutableObject(state);
+ MutableObject res = service.create(req);
+ if ("ClientA1Component".equals(componentName)) {
+ Assert.assertTrue(req.getId() == -1);
+ Assert.assertNotSame(req, res);
+ } else if ("ClientA2Component".equals(componentName)) {
+ Assert.assertTrue(req.getId() == -1);
+ Assert.assertNotSame(req, res);
+ }
+ return res.getId();
+ }
+
+ @Override
+ public String read(int id) {
+ MutableObject req = new MutableObject(id);
+ MutableObject res = service.read(req);
+ if ("ClientA1Component".equals(componentName)) {
+ Assert.assertTrue(req.getState() == null);
+ Assert.assertNotSame(req, res);
+ } else if ("ClientA2Component".equals(componentName)) {
+ Assert.assertTrue(req.getState() == null);
+ }
+ return res.getState();
+ }
+
+ @Override
+ public String update(int id, String newState) {
+ MutableObject req = new MutableObject(id, newState);
+ MutableObject res = service.update(req);
+ if ("ClientA1Component".equals(componentName)) {
+ Assert.assertTrue(req.getState() == newState);
+ } else if ("ClientA2Component".equals(componentName)) {
+ Assert.assertTrue(req.getState() == newState);
+ }
+ return res.getState();
+ }
+
+ @Override
+ public boolean delete(int id) {
+ MutableObject req = new MutableObject(id);
+ MutableObject res = service.delete(req);
+ return res != null;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ClientImplB.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ClientImplB.java
new file mode 100644
index 0000000000..01b2c5d946
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ClientImplB.java
@@ -0,0 +1,90 @@
+/*
+ * 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.itest.allowspassbyreference;
+
+import junit.framework.Assert;
+
+import org.oasisopen.sca.annotation.AllowsPassByReference;
+import org.oasisopen.sca.annotation.ComponentName;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Scope;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ *
+ */
+@Service(AServiceClient.class)
+@Scope("COMPOSITE")
+public class ClientImplB implements AServiceClient {
+ @ComponentName
+ private String componentName;
+
+ @Reference
+ @AllowsPassByReference
+ private AService service;
+
+ @Override
+ public int create(String state) {
+ MutableObject req = new MutableObject(state);
+ MutableObject res = service.create(req);
+ if ("ClientB1Component".equals(componentName)) {
+ Assert.assertTrue(req.getId() == -1);
+ Assert.assertNotSame(req, res);
+ } else if ("ClientB2Component".equals(componentName)) {
+ // Both sides allow PBR, so the id is changed (for the purpose of checking if PBR is used)
+ Assert.assertTrue(req.getId() != -1);
+ }
+ return res.getId();
+ }
+
+ @Override
+ public String read(int id) {
+ MutableObject req = new MutableObject(id);
+ MutableObject res = service.read(req);
+ if ("ClientB1Component".equals(componentName)) {
+ Assert.assertTrue("READ".equals(req.getState()));
+ Assert.assertNotSame(req, res);
+ } else if ("ClientB2Component".equals(componentName)) {
+ Assert.assertTrue("READ".equals(req.getState()));
+ }
+ return res.getState();
+ }
+
+ @Override
+ public String update(int id, String newState) {
+ MutableObject req = new MutableObject(id, newState);
+ MutableObject res = service.update(req);
+ if ("ClientB1Component".equals(componentName)) {
+ Assert.assertTrue(req.getState() == newState);
+ Assert.assertNotSame(req, res);
+ } else if ("ClientB2Component".equals(componentName)) {
+ Assert.assertTrue(req.getState() == newState);
+ }
+ return res.getState();
+ }
+
+ @Override
+ public boolean delete(int id) {
+ MutableObject req = new MutableObject(id);
+ MutableObject res = service.delete(req);
+ return res != null;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/MutableObject.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/MutableObject.java
new file mode 100644
index 0000000000..6fc28e36b2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/MutableObject.java
@@ -0,0 +1,77 @@
+/*
+ * 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.itest.allowspassbyreference;
+
+/**
+ * A mutable object
+ */
+public class MutableObject implements Cloneable {
+ private int id = -1;
+ private String state;
+
+ public MutableObject() {
+ }
+
+ public MutableObject(int id, String state) {
+ super();
+ this.id = id;
+ this.state = state;
+ }
+
+ public MutableObject(String state) {
+ super();
+ this.state = state;
+ }
+
+ public MutableObject(int id) {
+ super();
+ this.id = id;
+ }
+
+ public String getState() {
+ return state;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public MutableObject clone() {
+ MutableObject copy = new MutableObject();
+ copy.id = id;
+ copy.state = state;
+ return copy;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder builder = new StringBuilder();
+ builder.append("MutableObject [id=").append(id).append(", state=").append(state).append("]");
+ return builder.toString();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ServiceImplA.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ServiceImplA.java
new file mode 100644
index 0000000000..43a9e71f44
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ServiceImplA.java
@@ -0,0 +1,61 @@
+/*
+ * 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.itest.allowspassbyreference;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.oasisopen.sca.annotation.AllowsPassByReference;
+import org.oasisopen.sca.annotation.Scope;
+
+/**
+ *
+ */
+@Scope("COMPOSITE")
+public class ServiceImplA implements AService {
+ private volatile int count = 0;
+ private Map<Integer, MutableObject> objects = new HashMap<Integer, MutableObject>();
+
+ @Override
+ public MutableObject create(MutableObject req) {
+ req.setId(count++);
+ objects.put(req.getId(), req);
+ return req;
+ }
+
+ @AllowsPassByReference
+ public MutableObject read(MutableObject req) {
+ // Change the state of the request so that the client side can verify if PBR is used
+ req.setState("READ");
+ return objects.get(req.getId());
+ }
+
+ @Override
+ public MutableObject update(MutableObject req) {
+ objects.put(req.getId(), req);
+ return req;
+ }
+
+ @Override
+ public MutableObject delete(MutableObject req) {
+ return objects.remove(req.getId());
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ServiceImplB.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ServiceImplB.java
new file mode 100644
index 0000000000..a0ad7746d7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/allowspassbyreference/ServiceImplB.java
@@ -0,0 +1,70 @@
+/*
+ * 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.itest.allowspassbyreference;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.oasisopen.sca.annotation.AllowsPassByReference;
+import org.oasisopen.sca.annotation.Scope;
+
+/**
+ *
+ */
+@AllowsPassByReference
+@Scope("COMPOSITE")
+public class ServiceImplB implements AService {
+
+ private volatile int count = 0;
+ private Map<Integer, MutableObject> objects = new HashMap<Integer, MutableObject>();
+
+ @Override
+ public MutableObject create(MutableObject req) {
+ // Change the id of the request so that the client side can verify if PBR is used
+ req.setId(count++);
+ req = req.clone();
+ objects.put(req.getId(), req);
+ return req;
+ }
+
+ @Override
+ public MutableObject read(MutableObject req) {
+ // Change the state of the request so that the client side can verify if PBR is used
+ req.setState("READ");
+ return objects.get(req.getId()).clone();
+ }
+
+ @Override
+ public MutableObject update(MutableObject req) {
+ req = req.clone();
+ objects.put(req.getId(), req);
+ return req;
+ }
+
+ @Override
+ public MutableObject delete(MutableObject req) {
+ MutableObject obj = objects.remove(req.getId());
+ if (obj != null) {
+ return obj.clone();
+ }
+ return obj;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponent.java
new file mode 100644
index 0000000000..f8c0850118
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponent.java
@@ -0,0 +1,40 @@
+/*
+ * 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.itest.references;
+
+public interface AComponent {
+
+ String fooB();
+
+ String fooC();
+
+ String fooBC();
+
+ String fooD1();
+
+ String fooD2();
+
+ String fooMultipleD();
+
+ String fooMultipleDArray();
+
+ String fooMultipleDServiceRef();
+
+ DComponent getDReference();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponentImpl.java
new file mode 100644
index 0000000000..cd0aad3eea
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponentImpl.java
@@ -0,0 +1,125 @@
+/*
+ * 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.itest.references;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.oasisopen.sca.ServiceReference;
+import org.oasisopen.sca.annotation.Reference;
+
+public class AComponentImpl implements AComponent {
+
+ @Reference(name = "bReference")
+ protected BComponent b;
+
+ @Reference
+ private CComponent cReference;
+
+ @Reference(required = false)
+ protected DComponent dReference;
+
+ @Reference(name = "dReferences")
+ public Collection<DComponent> dReferences;
+
+ @Reference(name = "dReferenceArray")
+ public DComponent[] dReferenceArray;
+
+ @Reference(name = "dServiceReferences")
+ public List<ServiceReference<DComponent>> dServiceReferences;
+
+ private DComponent dReference1;
+
+ private DComponent dReference2;
+
+ @Reference(name = "dReference1", required = false)
+ public void setDReference(DComponent dReference) {
+ this.dReference1 = dReference;
+ }
+
+ @Reference
+ public void setDReference2(DComponent dReference2) {
+ this.dReference2 = dReference2;
+ }
+
+ public String fooB() {
+ return b.bFoo();
+ }
+
+ public String fooC() {
+ return cReference.cFoo();
+ }
+
+ public String fooBC() {
+ return b.fooC();
+ }
+
+ public String fooD() {
+ return dReference1.dFoo();
+ }
+
+ public String fooD1() {
+ return dReference1.dFoo();
+ }
+
+ public String fooD2() {
+ return dReference2.dFoo();
+ }
+
+ public String fooMultipleDArray() {
+ StringBuffer str = new StringBuffer();
+ for (DComponent d : dReferenceArray) {
+ str.append(d.getComponentName());
+ str.append(',');
+ }
+ if (str.length() > 0) {
+ str.deleteCharAt(str.length() - 1);
+ }
+ return str.toString();
+ }
+
+ public String fooMultipleD() {
+ StringBuffer str = new StringBuffer();
+ for (DComponent d : dReferences) {
+ str.append(d.getComponentName());
+ str.append(',');
+ }
+ if (str.length() > 0) {
+ str.deleteCharAt(str.length() - 1);
+ }
+ return str.toString();
+ }
+
+ public String fooMultipleDServiceRef() {
+ StringBuffer str = new StringBuffer();
+ for (ServiceReference<DComponent> d : dServiceReferences) {
+ str.append(d.getService().getComponentName());
+ str.append(',');
+ }
+ if (str.length() > 0) {
+ str.deleteCharAt(str.length() - 1);
+ }
+ return str.toString();
+ }
+
+ public DComponent getDReference() {
+ return dReference;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponent.java
new file mode 100644
index 0000000000..785920bb2d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponent.java
@@ -0,0 +1,26 @@
+/*
+ * 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.itest.references;
+
+public interface BComponent {
+
+ String bFoo();
+
+ String fooC();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentImpl.java
new file mode 100644
index 0000000000..211e6160f6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentImpl.java
@@ -0,0 +1,39 @@
+/*
+ * 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.itest.references;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class BComponentImpl implements BComponent {
+
+ protected CComponent cReference;
+
+ public BComponentImpl(@Reference(name = "cReference") CComponent cReference) {
+ this.cReference = cReference;
+ }
+
+ public String bFoo() {
+ return "BComponent";
+ }
+
+ public String fooC() {
+ return "B" + cReference.cFoo();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentWrongTargetImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentWrongTargetImpl.java
new file mode 100644
index 0000000000..47a1f9bde8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentWrongTargetImpl.java
@@ -0,0 +1,39 @@
+/*
+ * 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.itest.references;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class BComponentWrongTargetImpl implements BComponent {
+
+ protected CComponent cReference;
+
+ public BComponentWrongTargetImpl(@Reference(name = "cReference") CComponent cReference) {
+ this.cReference = cReference;
+ }
+
+ public String bFoo() {
+ return "BComponentWrongTarget";
+ }
+
+ public String fooC() {
+ return "B" + cReference.cFoo();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponent.java
new file mode 100644
index 0000000000..d436c28adc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponent.java
@@ -0,0 +1,24 @@
+/*
+ * 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.itest.references;
+
+public interface CComponent {
+
+ String cFoo();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponentImpl.java
new file mode 100644
index 0000000000..a1823e1cdc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponentImpl.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.references;
+
+public class CComponentImpl implements CComponent {
+
+ public String cFoo() {
+ return "CComponent";
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponent.java
new file mode 100644
index 0000000000..80617bdec2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponent.java
@@ -0,0 +1,26 @@
+/*
+ * 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.itest.references;
+
+public interface DComponent {
+
+ String dFoo();
+
+ String getComponentName();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponentImpl.java
new file mode 100644
index 0000000000..d181ac96ca
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponentImpl.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.references;
+
+import org.oasisopen.sca.annotation.ComponentName;
+
+public class DComponentImpl implements DComponent {
+ @ComponentName
+ public String name;
+
+ public String dFoo() {
+ return "DComponent";
+ }
+
+ public String getComponentName() {
+ return name;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/resources/AllowsPBRTest.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/resources/AllowsPBRTest.composite
new file mode 100644
index 0000000000..98ebddafc0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/resources/AllowsPBRTest.composite
@@ -0,0 +1,50 @@
+<?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
+ * 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:foo="http://foo" targetNamespace="http://foo"
+ name="AllowsPBRTest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <component name="ClientA1Component">
+ <implementation.java class="org.apache.tuscany.sca.itest.allowspassbyreference.ClientImplA" />
+ <reference name="service" target="ServiceAComponent"/>
+ </component>
+
+ <component name="ClientB1Component">
+ <implementation.java class="org.apache.tuscany.sca.itest.allowspassbyreference.ClientImplB" />
+ <reference name="service" target="ServiceAComponent"/>
+ </component>
+
+ <component name="ClientA2Component">
+ <implementation.java class="org.apache.tuscany.sca.itest.allowspassbyreference.ClientImplA" />
+ <reference name="service" target="ServiceBComponent"/>
+ </component>
+
+ <component name="ClientB2Component">
+ <implementation.java class="org.apache.tuscany.sca.itest.allowspassbyreference.ClientImplB" />
+ <reference name="service" target="ServiceBComponent"/>
+ </component>
+
+ <component name="ServiceAComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.allowspassbyreference.ServiceImplA" />
+ </component>
+
+ <component name="ServiceBComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.allowspassbyreference.ServiceImplB" />
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/resources/AutoWiredReferencesTest.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/resources/AutoWiredReferencesTest.composite
new file mode 100644
index 0000000000..14899fce62
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/resources/AutoWiredReferencesTest.composite
@@ -0,0 +1,61 @@
+<?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
+ * 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:foo="http://foo" targetNamespace="http://foo"
+ name="AutowireReferencesTest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" autowire="true">
+
+ <component name="AComponent" autowire="false">
+ <implementation.java class="org.apache.tuscany.sca.itest.references.AComponentImpl" />
+ <reference name="bReference" target="BComponent" />
+ <reference name="cReference" autowire="true" />
+ <reference name="dReference1" multiplicity="0..1"/>
+ <!--
+ <reference name="dReference1" target="DComponent" />
+ -->
+ <reference name="DReference2" target="DComponent" />
+ <reference name="dReferences" autowire="true" />
+ <reference name="dReferenceArray" autowire="true" />
+ <reference name="dServiceReferences" target="DComponent DComponent1" />
+
+ </component>
+
+ <component name="AComponentAutowire" autowire="true">
+ <implementation.java class="org.apache.tuscany.sca.itest.references.AComponentImpl" />
+ <reference name="bReference" target="BComponent" />
+ </component>
+
+ <component name="BComponentWrongTarget">
+ <implementation.java class="org.apache.tuscany.sca.itest.references.BComponentWrongTargetImpl" />
+ </component>
+
+ <component name="BComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.references.BComponentImpl" />
+ </component>
+
+ <component name="CComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.references.CComponentImpl" />
+ </component>
+
+ <component name="DComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.references.DComponentImpl" />
+ </component>
+
+ <component name="DComponent1">
+ <implementation.java class="org.apache.tuscany.sca.itest.references.DComponentImpl" />
+ </component>
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/resources/InnerReferencesTest.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/resources/InnerReferencesTest.composite
new file mode 100644
index 0000000000..7048eaf371
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/resources/InnerReferencesTest.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
+ * 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:foo="http://foo" targetNamespace="http://foo"
+ name="InnerReferencesTest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+
+ <component name="AComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.references.AComponentImpl" />
+ <reference name="bReference" target="BComponent" />
+ <reference name="cReference" target="CComponent" />
+ <reference name="dReference1" target="DComponent" />
+ <reference name="DReference2" target="DComponent" />
+ <reference name="dReferences" target="DComponent DComponent1" />
+ <reference name="dReferenceArray" target="DComponent1" />
+ <reference name="dServiceReferences" target="DComponent DComponent1" />
+ </component>
+
+ <component name="BComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.references.BComponentImpl" />
+ <reference name="cReference" target="CComponent" />
+ </component>
+
+ <component name="CComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.references.CComponentImpl" />
+ </component>
+
+ <component name="DComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.references.DComponentImpl" />
+ </component>
+
+ <component name="DComponent1">
+ <implementation.java class="org.apache.tuscany.sca.itest.references.DComponentImpl" />
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/resources/ManualWiredReferencesTest.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/resources/ManualWiredReferencesTest.composite
new file mode 100644
index 0000000000..dbf72f67b6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/main/resources/ManualWiredReferencesTest.composite
@@ -0,0 +1,59 @@
+<?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
+ * 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:foo="http://foo" targetNamespace="http://foo"
+ name="ManualWiredReferencesTest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" autowire="true">
+
+ <component name="AComponent" >
+ <implementation.java class="org.apache.tuscany.sca.itest.references.AComponentImpl" />
+ <reference name="bReference" target="BComponent" />
+ <reference name="cReference" target="CComponent/CComponentImpl">
+ <!-- reference name="cReference" target="CComponent"-->
+ </reference>
+ <reference name="dReference1" >
+ <binding.sca uri="DComponent"/>
+ </reference>
+ <reference name="DReference2" target="DComponent" >
+ <!-- binding.ws uri="DComponent"/-->
+ </reference>
+ <reference name="dReferences" target="DComponent DComponent1" />
+ <reference name="dReferenceArray" target="DComponent DComponent1" />
+ <reference name="dServiceReferences" target="DComponent DComponent1" />
+
+ </component>
+
+ <component name="BComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.references.BComponentImpl" />
+ </component>
+
+ <component name="CComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.references.CComponentImpl" />
+ </component>
+
+ <component name="DComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.references.DComponentImpl" />
+ <service name="DComponentImpl">
+ <binding.sca/>
+ <!-- binding.ws/-->
+ </service>
+ </component>
+
+ <component name="DComponent1">
+ <implementation.java class="org.apache.tuscany.sca.itest.references.DComponentImpl" />
+ </component>
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/AllowsPBRTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/AllowsPBRTestCase.java
new file mode 100644
index 0000000000..adabc65a25
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/AllowsPBRTestCase.java
@@ -0,0 +1,77 @@
+/*
+ * 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.itest.references;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.itest.allowspassbyreference.AServiceClient;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class AllowsPBRTestCase {
+ private static Node node;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ String location = ContributionLocationHelper.getContributionLocation("AllowsPBRTest.composite");
+ node = NodeFactory.newInstance().createNode("AllowsPBRTest.composite", new Contribution("c1", location));
+ node.start();
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testClientA1() {
+ test("ClientA1Component");
+ }
+
+ @Test
+ public void testClientA2() {
+ test("ClientA2Component");
+ }
+
+ @Test
+ public void testClientB1() {
+ test("ClientB1Component");
+ }
+
+ @Test
+ public void testClientB2() {
+ test("ClientB2Component");
+ }
+
+ private void test(String serviceName) {
+ AServiceClient client = node.getService(AServiceClient.class, serviceName);
+ int id = client.create("A");
+ String state = client.read(id);
+ Assert.assertEquals("A", state);
+ state = client.update(id, "B");
+ Assert.assertEquals("B", state);
+ client.delete(id);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/AutoWiredReferenceTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/AutoWiredReferenceTestCase.java
new file mode 100644
index 0000000000..76264d308f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/AutoWiredReferenceTestCase.java
@@ -0,0 +1,114 @@
+/*
+ * 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.itest.references;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.oasisopen.sca.ServiceUnavailableException;
+
+public class AutoWiredReferenceTestCase {
+ private static Node node;
+ private static AComponent acomponent;
+ private static AComponent acomponentAutowire;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ try {
+ String location = ContributionLocationHelper.getContributionLocation("AutoWiredReferencesTest.composite");
+ node =
+ NodeFactory.newInstance().createNode("AutoWiredReferencesTest.composite",
+ new Contribution("c1", location));
+ node.start();
+ acomponent = node.getService(AComponent.class, "AComponent");
+ acomponentAutowire = node.getService(AComponent.class, "AComponentAutowire");
+ } catch (Throwable e) {
+ e.printStackTrace();
+ }
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testBReference() {
+ assertEquals("BComponent", acomponent.fooB());
+ }
+
+ @Test
+ public void testCReference() {
+ assertEquals("CComponent", acomponent.fooC());
+ }
+
+ @Test
+ public void testBCReference() {
+ assertEquals("BCComponent", acomponent.fooBC());
+ }
+
+ @Test(expected = Exception.class)
+ public void testD1Reference() {
+ acomponent.fooD1();
+ }
+
+ @Test
+ public void testD2Reference() {
+ assertEquals("DComponent", acomponent.fooD2());
+ }
+
+ @Test
+ public void testMultiDReferenceArray() {
+ String components = acomponent.fooMultipleDArray();
+ Assert.assertTrue(components.contains("DComponent1"));
+ }
+
+ @Test
+ public void testMultiDServiceReference() {
+ String components = acomponent.fooMultipleDServiceRef();
+ Assert.assertTrue(components.contains("DComponent"));
+ Assert.assertTrue(components.contains("DComponent1"));
+ }
+
+ @Test
+ public void testRequiredFalseReference() {
+ try {
+ acomponent.getDReference().dFoo();
+ } catch (Exception e) {
+ Assert.assertTrue(true);
+ }
+ }
+
+ @Test
+ public void testTargetPrecendence() {
+ try {
+ assertEquals("BComponent", acomponentAutowire.fooB());
+ } catch (Exception e) {
+ Assert.assertTrue(true);
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/InnerReferenceTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/InnerReferenceTestCase.java
new file mode 100644
index 0000000000..6e4212fd9a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/InnerReferenceTestCase.java
@@ -0,0 +1,99 @@
+/*
+ * 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.itest.references;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class InnerReferenceTestCase {
+ private static Node node;
+ private static AComponent acomponent;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ String location = ContributionLocationHelper.getContributionLocation("InnerReferencesTest.composite");
+ node = NodeFactory.newInstance().createNode("InnerReferencesTest.composite", new Contribution("c1", location));
+ node.start();
+ acomponent = node.getService(AComponent.class, "AComponent");
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testBReference() {
+ assertEquals("BComponent", acomponent.fooB());
+ }
+
+ @Test
+ public void testCReference() {
+ assertEquals("CComponent", acomponent.fooC());
+ }
+
+ @Test
+ public void testBCReference() {
+ assertEquals("BCComponent", acomponent.fooBC());
+ }
+
+ @Test
+ public void testD1Reference() {
+ assertEquals("DComponent", acomponent.fooD1());
+ }
+
+ @Test
+ public void testD2Reference() {
+ assertEquals("DComponent", acomponent.fooD2());
+ }
+
+ @Test
+ public void testMultiDReference() {
+ String components = acomponent.fooMultipleD();
+ Assert.assertTrue(components.contains("DComponent"));
+ Assert.assertTrue(components.contains("DComponent1"));
+ }
+
+ @Test
+ public void testMultiDReferenceArray() {
+ String components = acomponent.fooMultipleDArray();
+ Assert.assertTrue(components.equals("DComponent1"));
+ }
+
+ @Test
+ public void testMultiDServiceReference() {
+ String components = acomponent.fooMultipleDServiceRef();
+ Assert.assertTrue(components.contains("DComponent"));
+ Assert.assertTrue(components.contains("DComponent1"));
+ }
+
+ @Test(expected = Exception.class)
+ public void testRequiredFalseReference() {
+ acomponent.getDReference().dFoo();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/ManualWiredReferenceTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/ManualWiredReferenceTestCase.java
new file mode 100644
index 0000000000..2fce95401e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/ManualWiredReferenceTestCase.java
@@ -0,0 +1,97 @@
+/*
+ * 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.itest.references;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+
+public class ManualWiredReferenceTestCase {
+ private static Node node;
+ private static AComponent acomponent;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ String location = ContributionLocationHelper.getContributionLocation("ManualWiredReferencesTest.composite");
+ node = NodeFactory.newInstance().createNode("ManualWiredReferencesTest.composite", new Contribution("c1", location));
+ node.start();
+ acomponent = node.getService(AComponent.class, "AComponent");
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testBReference() {
+ assertEquals("BComponent", acomponent.fooB());
+ }
+
+ @Test
+ public void testCReference() {
+ assertEquals("CComponent", acomponent.fooC());
+ }
+
+ @Test
+ public void testBCReference() {
+ assertEquals("BCComponent", acomponent.fooBC());
+ }
+
+ @Test
+ public void testD1Reference() {
+ acomponent.fooD1();
+ }
+
+ @Test
+ public void testD2Reference() {
+ assertEquals("DComponent", acomponent.fooD2());
+ }
+
+ @Test
+ public void testMultiDReferenceArray() {
+ String components = acomponent.fooMultipleDArray();
+ Assert.assertTrue(components.contains("DComponent1"));
+ }
+
+ @Test
+ public void testMultiDServiceReference() {
+ String components = acomponent.fooMultipleDServiceRef();
+ Assert.assertTrue(components.contains("DComponent"));
+ Assert.assertTrue(components.contains("DComponent1"));
+ }
+
+ @Test
+ public void testRequiredFalseReference() {
+ try {
+ acomponent.getDReference().dFoo();
+ } catch (Exception e) {
+ Assert.assertTrue(true);
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/samples/helloworld/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/samples/helloworld/pom.xml
new file mode 100644
index 0000000000..df67312a8a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/samples/helloworld/pom.xml
@@ -0,0 +1,38 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-samples-helloworld</artifactId>
+ <name>Apache Tuscany SCA iTest Samples Helloworld</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-domain-node</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/samples/helloworld/src/test/java/itest/helloworld/Helloworld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/samples/helloworld/src/test/java/itest/helloworld/Helloworld.java
new file mode 100644
index 0000000000..38dc80bed3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/samples/helloworld/src/test/java/itest/helloworld/Helloworld.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package itest.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface Helloworld {
+ String sayHello(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/samples/helloworld/src/test/java/itest/helloworld/HelloworldDomainNodeTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/samples/helloworld/src/test/java/itest/helloworld/HelloworldDomainNodeTestCase.java
new file mode 100644
index 0000000000..dd46d68547
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/samples/helloworld/src/test/java/itest/helloworld/HelloworldDomainNodeTestCase.java
@@ -0,0 +1,51 @@
+/*
+ * 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 itest.helloworld;
+
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.domain.node.DomainNode;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+public class HelloworldDomainNodeTestCase {
+
+ DomainNode node;
+
+ @Before
+ public void setUp() throws Exception {
+ node = new DomainNode("../../../samples/helloworld/target/sample-helloworld.zip");
+ }
+
+ @Test
+ public void testHelloworld() throws NoSuchServiceException {
+ assertEquals(1, node.getServiceNames().size());
+ assertEquals("HelloworldComponent/Helloworld", node.getServiceNames().get(0));
+ Helloworld service = node.getService(Helloworld.class, "HelloworldComponent");
+ assertEquals("Hello petra", service.sayHello("petra"));
+ }
+
+ @After
+ public void stop() {
+ node.stop();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/samples/helloworld/src/test/java/itest/helloworld/HelloworldNodeTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/samples/helloworld/src/test/java/itest/helloworld/HelloworldNodeTestCase.java
new file mode 100644
index 0000000000..37950f1276
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/samples/helloworld/src/test/java/itest/helloworld/HelloworldNodeTestCase.java
@@ -0,0 +1,49 @@
+/*
+ * 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 itest.helloworld;
+
+
+import static org.junit.Assert.assertEquals;
+
+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;
+
+public class HelloworldNodeTestCase {
+
+ Node node;
+
+ @Before
+ public void setUp() throws Exception {
+ node = NodeFactory.newInstance().createNode(null, new String[]{"../../../samples/helloworld/target/sample-helloworld.zip"}).start();
+ }
+
+ @Test
+ public void testHelloworld() {
+ Helloworld service = node.getService(Helloworld.class, "HelloworldComponent");
+ assertEquals("Hello petra", service.sayHello("petra"));
+ }
+
+ @After
+ public void stop() {
+ node.stop();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/pom.xml
new file mode 100644
index 0000000000..2c21becb73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/pom.xml
@@ -0,0 +1,63 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-scabindingmapper</artifactId>
+ <name>Apache Tuscany Integration Tests SCA Binding Mapper</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <version>2.0.1</version>
+ <type>pom</type>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-jsonp-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.19</version>
+ </dependency>
+
+ </dependencies>
+ <build>
+ <plugins>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/main/java/itest/scabindingmapper/MyMapper.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/main/java/itest/scabindingmapper/MyMapper.java
new file mode 100644
index 0000000000..8a8865889d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/main/java/itest/scabindingmapper/MyMapper.java
@@ -0,0 +1,72 @@
+/*
+ * 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 itest.scabindingmapper;
+
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.binding.jsonp.JSONPBinding;
+import org.apache.tuscany.sca.binding.sca.provider.DefaultSCABindingMapper;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
+import org.apache.tuscany.sca.runtime.RuntimeEndpointReference;
+
+/**
+ * A test SCABindingMapper to demonstrate changing the protocol on a per service basis.
+ * This uses JSONP if the service name ends with a "2" character.
+ * Uses a high ranking in the The meta-inf/services file to override the default mapper.
+ */
+public class MyMapper extends DefaultSCABindingMapper {
+
+ public MyMapper(ExtensionPointRegistry registry, Map<String, String> attributes) {
+ super(registry, attributes);
+ alwaysDistributed = true;
+ }
+
+ @Override
+ protected QName chooseBinding(RuntimeEndpoint endpoint) {
+ QName bindingType = super.chooseBinding(endpoint);
+
+ if (!bindingType.equals(super.defaultLocalBinding)) {
+ if (endpoint.getComponent().getName().endsWith("2")) {
+ bindingType = JSONPBinding.TYPE;
+ } else {
+ bindingType = super.defaultMappedBinding;
+ }
+ }
+ return bindingType;
+ }
+
+ @Override
+ protected QName chooseBinding(RuntimeEndpointReference endpointReference) {
+ QName bindingType = super.chooseBinding(endpointReference);
+
+ if (!bindingType.equals(super.defaultLocalBinding)) {
+ if (endpointReference.getBinding().getURI().contains("Service2")) {
+ bindingType = JSONPBinding.TYPE;
+ } else {
+ bindingType = super.defaultMappedBinding;
+ }
+ }
+ return bindingType;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/main/java/itest/scabindingmapper/MyUnknownEndpointHandler.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/main/java/itest/scabindingmapper/MyUnknownEndpointHandler.java
new file mode 100644
index 0000000000..1b75cf5bf5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/main/java/itest/scabindingmapper/MyUnknownEndpointHandler.java
@@ -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 itest.scabindingmapper;
+
+import org.apache.tuscany.sca.assembly.Binding;
+import org.apache.tuscany.sca.assembly.EndpointReference;
+import org.apache.tuscany.sca.assembly.SCABinding;
+import org.apache.tuscany.sca.assembly.impl.SCABindingFactoryImpl;
+import org.apache.tuscany.sca.runtime.UnknownEndpointHandler;
+
+public class MyUnknownEndpointHandler implements UnknownEndpointHandler {
+
+ @Override
+ public Binding handleUnknownEndpoint(EndpointReference endpointReference) {
+
+ if (endpointReference.getTargetEndpoint().getURI().endsWith("Service1")) {
+ SCABinding b = new SCABindingFactoryImpl().createSCABinding();
+ b.setURI("http://localhost:8085/Service1/Helloworld");
+ return b;
+
+ } else if (endpointReference.getTargetEndpoint().getURI().endsWith("Service2")) {
+ SCABinding b = new SCABindingFactoryImpl().createSCABinding();
+ b.setURI("http://localhost:8085/Service2/Helloworld");
+ return b;
+ }
+
+ return null;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCABindingMapper b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCABindingMapper
new file mode 100644
index 0000000000..ef32d42058
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCABindingMapper
@@ -0,0 +1,18 @@
+# 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.
+itest.scabindingmapper.MyMapper,ranking=4321
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/main/resources/META-INF/services/org.apache.tuscany.sca.runtime.UnknownEndpointHandler b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/main/resources/META-INF/services/org.apache.tuscany.sca.runtime.UnknownEndpointHandler
new file mode 100644
index 0000000000..11828b7b2b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/main/resources/META-INF/services/org.apache.tuscany.sca.runtime.UnknownEndpointHandler
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+itest.scabindingmapper.MyUnknownEndpointHandler
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/java/itest/helloworld/Helloworld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/java/itest/helloworld/Helloworld.java
new file mode 100644
index 0000000000..244d077f0b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/java/itest/helloworld/Helloworld.java
@@ -0,0 +1,28 @@
+/*
+ * 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 itest.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface Helloworld {
+
+ String sayHello(String name);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/java/itest/helloworld/HelloworldClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/java/itest/helloworld/HelloworldClientImpl.java
new file mode 100644
index 0000000000..8d69e1d31b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/java/itest/helloworld/HelloworldClientImpl.java
@@ -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 itest.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloworldClientImpl implements Helloworld{
+
+ @Reference
+ public Helloworld ref;
+
+ @Override
+ public String sayHello(String name) {
+ return ref.sayHello(name);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/java/itest/helloworld/HelloworldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/java/itest/helloworld/HelloworldServiceImpl.java
new file mode 100644
index 0000000000..12e194f6dc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/java/itest/helloworld/HelloworldServiceImpl.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package itest.helloworld;
+
+public class HelloworldServiceImpl implements Helloworld {
+
+ @Override
+ public String sayHello(String name) {
+ return "Hello " + name;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/java/itest/helloworld/Mapper1TestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/java/itest/helloworld/Mapper1TestCase.java
new file mode 100644
index 0000000000..b6b6d406f8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/java/itest/helloworld/Mapper1TestCase.java
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package itest.helloworld;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.URL;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class Mapper1TestCase {
+
+ static {
+ org.apache.tuscany.sca.http.jetty.JettyServer.portDefault = 8085;
+ }
+
+ Node node;
+
+ @Test
+ public void testSCABindingFactory() throws IOException {
+ node = NodeFactory.newInstance().createNode("test.composite", new String[]{"target/test-classes"}) ;
+ node.start();
+
+ // test the service invocations work
+ Helloworld helloworld = node.getService(Helloworld.class, "Client1");
+ Assert.assertEquals("Hello Petra", helloworld.sayHello("Petra"));
+
+ helloworld = node.getService(Helloworld.class, "Client2");
+ Assert.assertEquals("Hello Petra", helloworld.sayHello("Petra"));
+
+ // verify service1 is exposed as a WS endpoint and service2 is a jsonp endpoint
+ URL wsService = new URL("http://localhost:8085/Service1/Helloworld?wsdl");
+ Assert.assertTrue(getContent(wsService).contains("definitions name=\"HelloworldService\""));
+
+ URL jsonpService = new URL("http://localhost:8085/Client2/Helloworld/sayHello?name=Petra");
+ Assert.assertEquals("\"Hello Petra\"", getContent(jsonpService));
+ }
+
+ private String getContent(URL url) throws IOException {
+ BufferedReader reader = null;
+ try {
+ reader = new BufferedReader(new InputStreamReader(url.openStream()));
+ StringBuffer sb = new StringBuffer();
+ String str;
+ while ((str = reader.readLine()) != null) {
+ sb.append(str);
+ }
+ return sb.toString();
+ } finally {
+ if (reader != null) {
+ reader.close();
+ }
+ }
+ }
+
+ @After
+ public void shutdown() {
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/java/itest/helloworld/UnknownEndpointTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/java/itest/helloworld/UnknownEndpointTestCase.java
new file mode 100644
index 0000000000..f35a71b30e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/java/itest/helloworld/UnknownEndpointTestCase.java
@@ -0,0 +1,58 @@
+/*
+ * 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 itest.helloworld;
+
+import java.io.IOException;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class UnknownEndpointTestCase {
+
+ static {
+ org.apache.tuscany.sca.http.jetty.JettyServer.portDefault = 8085;
+ }
+
+ Node servicesnode;
+ Node node;
+
+ @Test
+ public void testUnknownEndpoints() throws IOException, InterruptedException {
+ servicesnode = NodeFactory.getInstance().createNode("services.composite", new String[]{"target/test-classes"}) ;
+ servicesnode.start();
+ node = NodeFactory.getInstance().createNode("clients.composite", new String[]{"target/test-classes"}) ;
+ node.start();
+
+ // test the service invocations work
+ Helloworld helloworld = node.getService(Helloworld.class, "Client1");
+ Assert.assertEquals("Hello Petra", helloworld.sayHello("Petra"));
+
+ helloworld = node.getService(Helloworld.class, "Client2");
+ Assert.assertEquals("Hello Petra", helloworld.sayHello("Petra"));
+ }
+
+ @After
+ public void shutdown() throws InterruptedException {
+ node.stop();
+ servicesnode.stop();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/resources/clients.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/resources/clients.composite
new file mode 100644
index 0000000000..5597ec112c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/resources/clients.composite
@@ -0,0 +1,34 @@
+<?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"
+ targetNamespace="http://Scopes"
+ name="clients">
+
+ <component name="Client1">
+ <implementation.java class="itest.helloworld.HelloworldClientImpl"/>
+ <reference name="ref" target="Service1" />
+ </component>
+
+ <component name="Client2">
+ <implementation.java class="itest.helloworld.HelloworldClientImpl"/>
+ <reference name="ref" target="Service2" />
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/resources/services.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/resources/services.composite
new file mode 100644
index 0000000000..bb1161c1ac
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/resources/services.composite
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://Scopes"
+ name="services">
+
+ <component name="Service1">
+ <implementation.java class="itest.helloworld.HelloworldServiceImpl"/>
+ </component>
+
+ <component name="Service2">
+ <implementation.java class="itest.helloworld.HelloworldServiceImpl"/>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/resources/test.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/resources/test.composite
new file mode 100644
index 0000000000..d29c636f77
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scabindingmapper/src/test/resources/test.composite
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://Scopes"
+ name="mappertest">
+
+ <component name="Client1">
+ <implementation.java class="itest.helloworld.HelloworldClientImpl"/>
+ <reference name="ref" target="Service1" />
+ </component>
+
+ <component name="Service1">
+ <implementation.java class="itest.helloworld.HelloworldServiceImpl"/>
+ </component>
+
+ <component name="Client2">
+ <implementation.java class="itest.helloworld.HelloworldClientImpl"/>
+ <reference name="ref" target="Service2" />
+ </component>
+
+ <component name="Service2">
+ <implementation.java class="itest.helloworld.HelloworldServiceImpl"/>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-jse-osgi/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-jse-osgi/pom.xml
new file mode 100644
index 0000000000..32f84c3503
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-jse-osgi/pom.xml
@@ -0,0 +1,57 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-scaclient-api-jse-osgi</artifactId>
+ <name>Apache Tuscany SCA iTest SCAClient API JSE and OSGI</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-launcher-equinox</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-api</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ </dependency>
+
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-jse-osgi/src/main/java/itest/HelloworldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-jse-osgi/src/main/java/itest/HelloworldService.java
new file mode 100644
index 0000000000..1c7edaefb6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-jse-osgi/src/main/java/itest/HelloworldService.java
@@ -0,0 +1,25 @@
+/*
+ * 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 itest;
+
+public interface HelloworldService {
+
+ String sayHello(String name);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-jse-osgi/src/main/java/itest/HelloworldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-jse-osgi/src/main/java/itest/HelloworldServiceImpl.java
new file mode 100644
index 0000000000..7793bdd544
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-jse-osgi/src/main/java/itest/HelloworldServiceImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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 itest;
+
+import org.oasisopen.sca.annotation.EagerInit;
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Scope;
+
+@EagerInit
+@Scope("COMPOSITE")
+public class HelloworldServiceImpl implements HelloworldService {
+
+ public String sayHello(String name) {
+ return "Hello " + name;
+ }
+
+ @Init
+ public void init() {
+ System.out.println("Init - " + sayHello("world"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-jse-osgi/src/main/resources/Helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-jse-osgi/src/main/resources/Helloworld.composite
new file mode 100644
index 0000000000..2d5ae6a57c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-jse-osgi/src/main/resources/Helloworld.composite
@@ -0,0 +1,29 @@
+<?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:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://itest"
+ name="Helloworld">
+
+ <component name="HelloworldComponent">
+ <implementation.java class="itest.HelloworldServiceImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-jse-osgi/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-jse-osgi/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..56e127b539
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-jse-osgi/src/main/resources/META-INF/sca-contribution.xml
@@ -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://itest">
+ <deployable composite="itest:Helloworld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-jse-osgi/src/test/java/test/scaclient/SCAClientTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-jse-osgi/src/test/java/test/scaclient/SCAClientTestCase.java
new file mode 100644
index 0000000000..8bf162dfd9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-jse-osgi/src/test/java/test/scaclient/SCAClientTestCase.java
@@ -0,0 +1,63 @@
+/*
+ * 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 test.scaclient;
+
+import java.net.URI;
+
+import itest.HelloworldService;
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.equinox.launcher.Contribution;
+import org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher;
+import org.oasisopen.sca.client.SCAClientFactory;
+
+/**
+ * Test SCADomain.newInstance and invocation of a service.
+ *
+ * @version $Rev$ $Date$
+ */
+public class SCAClientTestCase extends TestCase {
+
+ private static NodeLauncher launcher;
+ private static Node node;
+
+ @Override
+ protected void setUp() throws Exception {
+ launcher = NodeLauncher.newInstance();
+ node = launcher.createNode(null, new Contribution("test", "./target/classes"));
+ System.out.println("SCA Node API ClassLoader: " + node.getClass().getClassLoader());
+ node.start();
+ }
+
+ public void testInvoke() throws Exception {
+ // At the moment the SCAClientFactory assumes that only one domain is active
+ // in a JVM. So we pass in null for the domain name and get what we're given
+ HelloworldService service =
+ SCAClientFactory.newInstance(URI.create("default")).getService(HelloworldService.class, "HelloworldComponent");
+ assertEquals("Hello petra", service.sayHello("petra"));
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-osgi/META-INF/MANIFEST.MF b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-osgi/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..ae6704f97d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-osgi/META-INF/MANIFEST.MF
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Private-Package: helloworld;version="2.0.0"
+Tool: Bnd-0.0.255
+Bundle-Name: Apache Tuscany SCA SCAClient API OSGi itest
+Created-By: 1.6.0_07 (Sun Microsystems Inc.)
+Bundle-Vendor: The Apache Software Foundation
+Eclipse-LazyStart: false
+Bundle-Version: 2.0.0
+Bnd-LastModified: 1223949424781
+Bundle-ManifestVersion: 2
+Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
+Bundle-Description: Apache Tuscany SCA SCAClient API OSGi itest
+Import-Package: org.apache.tuscany.sca.node;version="2.0.0",
+ org.oasisopen.sca;version="2.0.0",
+ org.oasisopen.sca.annotation;version="2.0.0",
+ org.oasisopen.sca.client;version="2.0.0",
+ org.osgi.framework;version="1.4"
+Bundle-SymbolicName: itest-scaclient-apo-osgi
+Bundle-DocURL: http://www.apache.org/
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-osgi/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-osgi/pom.xml
new file mode 100644
index 0000000000..0bbb38f57e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-osgi/pom.xml
@@ -0,0 +1,109 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-scaclient-api-osgi</artifactId>
+ <name>Apache Tuscany SCA iTest SCAClient API OSGi</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-feature-api</artifactId>
+ <version>2.0.1</version>
+ <type>pom</type>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-feature-core</artifactId>
+ <version>2.0.1</version>
+ <type>pom</type>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ <plugins>
+ <plugin>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <version>2.5.1</version>
+ <configuration>
+ <buildcommands>
+ <buildcommand>org.eclipse.pde.ManifestBuilder</buildcommand>
+ <buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>
+ </buildcommands>
+ <projectnatures>
+ <projectnature>org.eclipse.jdt.core.javanature</projectnature>
+ <projectnature>org.eclipse.pde.PluginNature</projectnature>
+ </projectnatures>
+ <classpathContainers>
+ <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER
+ </classpathContainer>
+ </classpathContainers>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifestFile>${basedir}/META-INF/MANIFEST.MF</manifestFile>
+ </archive>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.tuscany.maven.plugins</groupId>
+ <artifactId>maven-osgi-junit-plugin</artifactId>
+ <version>1.0</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-launcher-equinox</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <id>osgi-test</id>
+ <phase>test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration></configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-osgi/src/main/java/itest/HelloworldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-osgi/src/main/java/itest/HelloworldService.java
new file mode 100644
index 0000000000..1c7edaefb6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-osgi/src/main/java/itest/HelloworldService.java
@@ -0,0 +1,25 @@
+/*
+ * 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 itest;
+
+public interface HelloworldService {
+
+ String sayHello(String name);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-osgi/src/main/java/itest/HelloworldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-osgi/src/main/java/itest/HelloworldServiceImpl.java
new file mode 100644
index 0000000000..3eecc59439
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-osgi/src/main/java/itest/HelloworldServiceImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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 itest;
+
+import org.oasisopen.sca.annotation.EagerInit;
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Scope;
+
+@EagerInit
+@Scope("COMPOSITE")
+public class HelloworldServiceImpl implements HelloworldService {
+
+ public String sayHello(String name) {
+ return "Hello " + name;
+ }
+
+ @Init
+ public void init() {
+ System.out.println("Result from Init = " + sayHello("world"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-osgi/src/main/resources/Helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-osgi/src/main/resources/Helloworld.composite
new file mode 100644
index 0000000000..2d5ae6a57c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-osgi/src/main/resources/Helloworld.composite
@@ -0,0 +1,29 @@
+<?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:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://itest"
+ name="Helloworld">
+
+ <component name="HelloworldComponent">
+ <implementation.java class="itest.HelloworldServiceImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-osgi/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-osgi/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..56e127b539
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-osgi/src/main/resources/META-INF/sca-contribution.xml
@@ -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://itest">
+ <deployable composite="itest:Helloworld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-osgi/src/test/java/test/scaclient/SCAClientTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-osgi/src/test/java/test/scaclient/SCAClientTestCase.java
new file mode 100644
index 0000000000..431b2995aa
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-osgi/src/test/java/test/scaclient/SCAClientTestCase.java
@@ -0,0 +1,65 @@
+/*
+ * 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 test.scaclient;
+
+import java.net.URI;
+
+import itest.HelloworldService;
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.oasisopen.sca.NoSuchDomainException;
+import org.oasisopen.sca.NoSuchServiceException;
+import org.oasisopen.sca.client.SCAClientFactory;
+
+/**
+ * Test SCADomain.newInstance and invocation of a service.
+ *
+ * @version $Rev$ $Date$
+ */
+public class SCAClientTestCase extends TestCase {
+
+ private static Node node;
+
+ @Override
+ protected void setUp() throws Exception {
+ String location = ContributionLocationHelper.getContributionLocation(HelloworldService.class);
+ node = NodeFactory.getInstance().createNode("Helloworld.composite", new Contribution("test", "./target/classes"));
+ System.out.println("SCA Node API ClassLoader: " + node.getClass().getClassLoader());
+ node.start();
+ }
+
+ public void testInvoke() throws NoSuchServiceException, NoSuchDomainException {
+ HelloworldService service =
+ SCAClientFactory.newInstance(URI.create("default")).getService(HelloworldService.class, "HelloworldComponent");
+ String result = service.sayHello("petra");
+ assertEquals("Hello petra", result);
+ System.out.println("Result from SCAClient call = " + result);
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-remote/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-remote/pom.xml
new file mode 100644
index 0000000000..8ae4642f16
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-remote/pom.xml
@@ -0,0 +1,46 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-scaclient-api-remote</artifactId>
+ <name>Apache Tuscany SCA iTest SCAClient API with Hazelcast client</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-domain-hazelcast</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-remote/src/main/java/itest/HelloworldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-remote/src/main/java/itest/HelloworldService.java
new file mode 100644
index 0000000000..f97d2c3a83
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-remote/src/main/java/itest/HelloworldService.java
@@ -0,0 +1,28 @@
+/*
+ * 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 itest;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloworldService {
+
+ String sayHello(String name);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-remote/src/main/java/itest/HelloworldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-remote/src/main/java/itest/HelloworldServiceImpl.java
new file mode 100644
index 0000000000..a04b40279f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-remote/src/main/java/itest/HelloworldServiceImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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 itest;
+
+import org.oasisopen.sca.annotation.EagerInit;
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Scope;
+
+@EagerInit
+@Scope("COMPOSITE")
+public class HelloworldServiceImpl implements HelloworldService {
+
+ public String sayHello(String name) {
+ return "Hello " + name;
+ }
+
+ @Init
+ public void init() {
+ System.out.println(sayHello("world"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-remote/src/main/resources/Helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-remote/src/main/resources/Helloworld.composite
new file mode 100644
index 0000000000..d37c93857d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-remote/src/main/resources/Helloworld.composite
@@ -0,0 +1,29 @@
+<?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:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://itest"
+ name="Helloworld">
+
+ <component name="HelloworldComponent">
+ <implementation.java class="itest.HelloworldServiceImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-remote/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-remote/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..e178823296
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-remote/src/main/resources/META-INF/sca-contribution.xml
@@ -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://itest">
+ <deployable composite="itest:Helloworld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-remote/src/test/java/test/scaclient/SCAClientTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-remote/src/test/java/test/scaclient/SCAClientTestCase.java
new file mode 100644
index 0000000000..432d51dc27
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api-remote/src/test/java/test/scaclient/SCAClientTestCase.java
@@ -0,0 +1,121 @@
+/*
+ * 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 test.scaclient;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+import itest.HelloworldService;
+
+import java.net.URI;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchDomainException;
+import org.oasisopen.sca.client.SCAClientFactory;
+
+/**
+ * Test SCADomain.newInstance and invocation of a service.
+ *
+ * @version $Rev: 904064 $ $Date: 2010-01-28 12:31:36 +0000 (Thu, 28 Jan 2010) $
+ */
+public class SCAClientTestCase {
+
+ private Node node;
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ }
+
+ @Test
+ public void testDefault() throws Exception {
+
+ node = NodeFactory.newInstance().createNode((String)null, new String[] {"target/classes"});
+ node.start();
+
+ HelloworldService service = SCAClientFactory.newInstance(URI.create("default")).getService(HelloworldService.class, "HelloworldComponent");
+ assertEquals("Hello petra", service.sayHello("petra"));
+ }
+
+ @Test
+ public void testURIconfig() throws Exception {
+
+ node = NodeFactory.newInstance("uri:somedomain").createNode((String)null, new String[] {"target/classes"});
+ node.start();
+
+ HelloworldService service = SCAClientFactory.newInstance(URI.create("somedomain")).getService(HelloworldService.class, "HelloworldComponent");
+ assertEquals("Hello petra", service.sayHello("petra"));
+ try {
+ service = SCAClientFactory.newInstance(URI.create("nosuchdomain")).getService(HelloworldService.class, "HelloworldComponent");
+ service.sayHello("petra");
+ fail();
+ } catch (NoSuchDomainException e) {
+ //expected
+ }
+ }
+
+ @Test
+ public void testExplicit() throws Exception {
+ node = NodeFactory.newInstance().createNode(URI.create("myFooDomain"), new String[] {"target/classes"});
+ node.start();
+
+ HelloworldService service = SCAClientFactory.newInstance(URI.create("myFooDomain")).getService(HelloworldService.class, "HelloworldComponent");
+ assertEquals("Hello petra", service.sayHello("petra"));
+ }
+
+ @Test
+ public void testExplicitRemote() throws Exception {
+ node = NodeFactory.newInstance("uri:myFooDomain?bind=127.0.0.1:14821").createNode((String)null, new String[] {"target/classes"});
+ node.start();
+
+ // TUSCANY-3670 - why factory takes URI while node factory take configuration string?
+ // hacked this for now to make the client domain name match the domain
+ // name that's pulled out of the factory URI
+ //HelloworldService service = SCAClientFactory.newInstance(URI.create("uri:myFooDomain?wka=127.0.0.1:14821")).getService(HelloworldService.class, "HelloworldComponent");
+ HelloworldService service = SCAClientFactory.newInstance(URI.create("myFooDomain")).getService(HelloworldService.class, "HelloworldComponent");
+ assertEquals("Hello petra", service.sayHello("petra"));
+ }
+
+ @Test
+ public void testExplicitRemote2() throws Exception {
+ node = NodeFactory.newInstance("uri:myFooDomain?bind=127.0.0.1:14821").createNode((String)null, new String[] {"target/classes"});
+ node.start();
+
+ // TUSCANY-3670 - why factory takes URI while node factory take configuration string?
+ // hacked this for now to make the client domain name match the domain
+ // name that's pulled out of the factory URI
+ //HelloworldService service = SCAClientFactory.newInstance(URI.create("uri:myFooDomain?wka=127.0.0.1:14821")).getService(HelloworldService.class, "HelloworldComponent");
+ HelloworldService service = SCAClientFactory.newInstance(URI.create("myFooDomain")).getService(HelloworldService.class, "HelloworldComponent");
+ assertEquals("Hello petra", service.sayHello("petra"));
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/pom.xml
new file mode 100644
index 0000000000..2a15b359cf
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/pom.xml
@@ -0,0 +1,54 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-scaclient-api</artifactId>
+ <name>Apache Tuscany SCA iTest SCAClient API</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-rmi-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-jetty</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/HelloworldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/HelloworldService.java
new file mode 100644
index 0000000000..1c7edaefb6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/HelloworldService.java
@@ -0,0 +1,25 @@
+/*
+ * 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 itest;
+
+public interface HelloworldService {
+
+ String sayHello(String name);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/HelloworldServiceAgain.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/HelloworldServiceAgain.java
new file mode 100644
index 0000000000..e3205559d2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/HelloworldServiceAgain.java
@@ -0,0 +1,25 @@
+/*
+ * 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 itest;
+
+public interface HelloworldServiceAgain {
+
+ String sayHello(String name);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/HelloworldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/HelloworldServiceImpl.java
new file mode 100644
index 0000000000..5af221313e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/HelloworldServiceImpl.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package itest;
+
+import org.oasisopen.sca.annotation.EagerInit;
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Scope;
+import org.oasisopen.sca.annotation.Service;
+
+@EagerInit
+@Scope("COMPOSITE")
+@Service({HelloworldService.class, RemoteHelloworldService.class})
+public class HelloworldServiceImpl implements HelloworldService, RemoteHelloworldService {
+
+ public String sayHello(String name) {
+ return "Hello " + name;
+ }
+
+ public String sayHelloRemote(String name) {
+ return "Hello " + name;
+ }
+
+ @Init
+ public void init() {
+ System.out.println(sayHello("world"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/MultipleServiceClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/MultipleServiceClientImpl.java
new file mode 100644
index 0000000000..f2617d8a7c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/MultipleServiceClientImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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 itest;
+
+import org.oasisopen.sca.annotation.EagerInit;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Scope;
+import org.oasisopen.sca.annotation.Service;
+
+@EagerInit
+@Scope("COMPOSITE")
+@Service(HelloworldService.class)
+public class MultipleServiceClientImpl implements HelloworldService {
+
+ @Reference
+ public HelloworldServiceAgain helloWorld;
+
+ public String sayHello(String name) {
+ return "Hello " + helloWorld.sayHello(name);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/MultipleServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/MultipleServiceImpl.java
new file mode 100644
index 0000000000..6dab51f527
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/MultipleServiceImpl.java
@@ -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 itest;
+
+import org.oasisopen.sca.annotation.EagerInit;
+import org.oasisopen.sca.annotation.Scope;
+import org.oasisopen.sca.annotation.Service;
+
+@EagerInit
+@Scope("COMPOSITE")
+@Service({HelloworldService.class, HelloworldServiceAgain.class})
+public class MultipleServiceImpl implements HelloworldService, HelloworldServiceAgain {
+
+ public String sayHello(String name) {
+ return "Hello " + name;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/RemotableHelloworldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/RemotableHelloworldImpl.java
new file mode 100644
index 0000000000..58968fbd47
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/RemotableHelloworldImpl.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package itest;
+
+public class RemotableHelloworldImpl implements RemoteHelloworldService {
+
+ @Override
+ public String sayHelloRemote(String name) {
+ return "Remote hi " + name;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/RemoteHelloworldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/RemoteHelloworldService.java
new file mode 100644
index 0000000000..a8640bf484
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/RemoteHelloworldService.java
@@ -0,0 +1,28 @@
+/*
+ * 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 itest;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface RemoteHelloworldService {
+
+ String sayHelloRemote(String name);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/SingleServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/SingleServiceImpl.java
new file mode 100644
index 0000000000..93ce660c6a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/java/itest/SingleServiceImpl.java
@@ -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 itest;
+
+import org.oasisopen.sca.annotation.EagerInit;
+import org.oasisopen.sca.annotation.Scope;
+import org.oasisopen.sca.annotation.Service;
+
+@EagerInit
+@Scope("COMPOSITE")
+@Service(HelloworldService.class)
+public class SingleServiceImpl implements HelloworldService {
+
+ public String sayHello(String name) {
+ return "Hello " + name;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/resources/Helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/resources/Helloworld.composite
new file mode 100644
index 0000000000..b2b2509ce9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/resources/Helloworld.composite
@@ -0,0 +1,66 @@
+<?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:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://itest"
+ name="Helloworld">
+
+ <component name="HelloworldComponent">
+ <implementation.java class="itest.HelloworldServiceImpl"/>
+ </component>
+
+ <component name="SingleServiceComponent">
+ <implementation.java class="itest.SingleServiceImpl"/>
+ </component>
+
+ <component name="MultipleServiceClientComponent">
+ <implementation.java class="itest.MultipleServiceClientImpl"/>
+ <reference name="helloWorld" target="MultipleServiceComponent"/>
+ </component>
+
+ <component name="MultipleServiceComponent">
+ <implementation.java class="itest.MultipleServiceImpl"/>
+ </component>
+
+ <component name="OnlyWSBindingComponent">
+ <implementation.java class="itest.HelloworldServiceImpl"/>
+ <service name="RemoteHelloworldService">
+ <binding.ws />
+ </service>
+ </component>
+
+ <component name="MultipleBindingsComponent">
+ <implementation.java class="itest.HelloworldServiceImpl"/>
+ <service name="RemoteHelloworldService">
+ <binding.ws name="ws" />
+ <binding.sca />
+ <tuscany:binding.rmi name="rmi" />
+ </service>
+ </component>
+
+ <component name="MultipleBindingsSingleServiceComponent">
+ <implementation.java class="itest.RemotableHelloworldImpl"/>
+ <service name="RemoteHelloworldService">
+ <binding.ws name="ws" />
+ <binding.sca />
+ <tuscany:binding.rmi name="rmi" />
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..56e127b539
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/main/resources/META-INF/sca-contribution.xml
@@ -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://itest">
+ <deployable composite="itest:Helloworld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/test/java/test/scaclient/SCAClientTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/test/java/test/scaclient/SCAClientTestCase.java
new file mode 100644
index 0000000000..6016f101e8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-api/src/test/java/test/scaclient/SCAClientTestCase.java
@@ -0,0 +1,198 @@
+/*
+ * 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 test.scaclient;
+
+import itest.HelloworldService;
+import itest.RemoteHelloworldService;
+
+import java.net.URI;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchDomainException;
+import org.oasisopen.sca.NoSuchServiceException;
+import org.oasisopen.sca.ServiceRuntimeException;
+import org.oasisopen.sca.client.SCAClientFactory;
+
+/**
+ * Test SCADomain.newInstance and invocation of a service.
+ *
+ * @version $Rev$ $Date$
+ */
+public class SCAClientTestCase extends TestCase {
+
+ private Node node;
+
+ @Test
+ public void testDefault() throws Exception {
+
+ node = NodeFactory.getInstance().createNode((String)null, new String[] {"target/classes"});
+ node.start();
+
+ SCAClientFactory clientFactory = SCAClientFactory.newInstance(URI.create("default"));
+ HelloworldService service = clientFactory.getService(HelloworldService.class, "HelloworldComponent/HelloworldService");
+ assertEquals("Hello petra", service.sayHello("petra"));
+
+ RemoteHelloworldService remoteService = clientFactory.getService(RemoteHelloworldService.class, "HelloworldComponent/RemoteHelloworldService");
+ assertEquals("Hello petra", remoteService.sayHelloRemote("petra"));
+
+ }
+
+ @Test
+ public void testExplicit() throws Exception {
+ node = NodeFactory.getInstance().createNode(URI.create("myFooDomain"), new String[] {"target/classes"});
+ node.start();
+
+ SCAClientFactory clientFactory = SCAClientFactory.newInstance(URI.create("myFooDomain"));
+ HelloworldService service = clientFactory.getService(HelloworldService.class, "HelloworldComponent/HelloworldService");
+ assertEquals("Hello petra", service.sayHello("petra"));
+
+ RemoteHelloworldService remoteService = clientFactory.getService(RemoteHelloworldService.class, "HelloworldComponent/RemoteHelloworldService");
+ assertEquals("Hello petra", remoteService.sayHelloRemote("petra"));
+ assertEquals("Hello petra", service.sayHello("petra"));
+ }
+
+ @Test
+ public void testWithoutServiceName() throws Exception {
+ node = NodeFactory.getInstance().createNode(URI.create("myFooDomain"), new String[] {"target/classes"});
+ node.start();
+
+ SCAClientFactory clientFactory = SCAClientFactory.newInstance(URI.create("myFooDomain"));
+ try {
+ clientFactory.getService(HelloworldService.class, "HelloworldComponent");
+ fail("expecting ServiceRuntimeException");
+ } catch (ServiceRuntimeException e) {
+ assertTrue(e.getMessage().contains("More than one service is declared on component"));
+ }
+ }
+
+ @Test
+ public void testWithoutServiceNameSingleService() throws Exception {
+ node = NodeFactory.getInstance().createNode(URI.create("myFooDomain"), new String[] {"target/classes"});
+ node.start();
+
+ SCAClientFactory clientFactory = SCAClientFactory.newInstance(URI.create("myFooDomain"));
+ HelloworldService service = clientFactory.getService(HelloworldService.class, "SingleServiceComponent");
+ assertEquals("Hello petra", service.sayHello("petra"));
+ }
+
+ @Test
+ public void testWithoutServiceNameMultipleService() throws Exception {
+ node = NodeFactory.getInstance().createNode(URI.create("myFooDomain"), new String[] {"target/classes"});
+ node.start();
+
+ SCAClientFactory clientFactory = SCAClientFactory.newInstance(URI.create("myFooDomain"));
+
+ // test multiple service error reported at the SCAClient wire
+ try {
+ HelloworldService service = clientFactory.getService(HelloworldService.class, "MultipleServiceComponent");
+ assertEquals("Hello petra", service.sayHello("petra"));
+ fail();
+ } catch (ServiceRuntimeException e) {
+ // expected
+ }
+
+ // test multiple service error reported at the wire associated with a reference of
+ // the component the SCAClient is talking to
+ HelloworldService service = clientFactory.getService(HelloworldService.class, "MultipleServiceClientComponent");
+
+ try {
+ assertEquals("Hello Hello again petra", service.sayHello("petra"));
+ fail();
+ } catch (ServiceRuntimeException e) {
+ // expected
+ }
+ }
+
+ @Test
+ public void testWithBadServiceName() throws Exception {
+ node = NodeFactory.getInstance().createNode(URI.create("myFooDomain"), new String[] {"target/classes"});
+ node.start();
+
+ SCAClientFactory clientFactory = SCAClientFactory.newInstance(URI.create("myFooDomain"));
+ try {
+ clientFactory.getService(HelloworldService.class, "HelloworldComponent/foo");
+ fail();
+ } catch (NoSuchServiceException e) {
+ // expected
+ }
+ }
+
+ @Test
+ public void testWithBadDomainName() throws Exception {
+ node = NodeFactory.getInstance().createNode(URI.create("myFooDomain"), new String[] {"target/classes"});
+ node.start();
+
+ try {
+ SCAClientFactory clientFactory = SCAClientFactory.newInstance(URI.create("someBadDomainName"));
+ fail();
+ } catch (NoSuchDomainException e) {
+ // expected
+ }
+ }
+
+ @Test
+ public void testOnlyWSBinding() throws Exception {
+ node = NodeFactory.getInstance().createNode(URI.create("myFooDomain"), new String[] {"target/classes"});
+ node.start();
+
+ SCAClientFactory clientFactory = SCAClientFactory.newInstance(URI.create("myFooDomain"));
+ RemoteHelloworldService service = clientFactory.getService(RemoteHelloworldService.class, "OnlyWSBindingComponent/RemoteHelloworldService");
+ assertEquals("Hello petra", service.sayHelloRemote("petra"));
+ }
+
+ @Test
+ public void testMultipleBindings() throws Exception {
+ node = NodeFactory.getInstance().createNode(URI.create("myFooDomain"), new String[] {"target/classes"});
+ node.start();
+
+ SCAClientFactory clientFactory = SCAClientFactory.newInstance(URI.create("myFooDomain"));
+ RemoteHelloworldService service = clientFactory.getService(RemoteHelloworldService.class, "MultipleBindingsComponent/RemoteHelloworldService");
+ assertEquals("Hello petra", service.sayHelloRemote("petra"));
+ }
+
+ @Test
+ public void testMultipleBindingsSingleService() throws Exception {
+ node = NodeFactory.getInstance().createNode(URI.create("myFooDomain"), new String[] {"target/classes"});
+ node.start();
+
+ SCAClientFactory clientFactory = SCAClientFactory.newInstance(URI.create("myFooDomain"));
+ RemoteHelloworldService service = clientFactory.getService(RemoteHelloworldService.class, "MultipleBindingsSingleServiceComponent");
+ assertEquals("Remote hi petra", service.sayHelloRemote("petra"));
+ }
+
+ // @Test @Ignore
+// public void testHTTPURI() throws Exception {
+// node = NodeFactory.getInstance().createNode(URI.create("http://defaultDomain"), new String[] {"target/classes"});
+// node.start();
+//
+// HelloworldService service = SCAClientFactory.newInstance(URI.create("http://defaultDomain")).getService(HelloworldService.class, "HelloworldComponent");
+// assertEquals("Hello petra", service.sayHello("petra"));
+// }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-remote/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-remote/pom.xml
new file mode 100644
index 0000000000..28b8d546f4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-remote/pom.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-scaclient-remote</artifactId>
+ <name>Apache Tuscany SCA iTest SCAClient Remote</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-domain-hazelcast</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-maven-plugin</artifactId>
+ <version>2.0.1</version>
+ <configuration>
+ <domainURI>uri:default?bind=127.0.0.1:9876</domainURI>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>process-test-classes</phase>
+ <goals>
+ <goal>start</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>stop</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>stop</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-remote/src/main/java/itest/HelloworldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-remote/src/main/java/itest/HelloworldService.java
new file mode 100644
index 0000000000..708f313509
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-remote/src/main/java/itest/HelloworldService.java
@@ -0,0 +1,28 @@
+/*
+ * 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 itest;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloworldService {
+
+ String sayHello(String name);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-remote/src/main/java/itest/HelloworldServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-remote/src/main/java/itest/HelloworldServiceImpl.java
new file mode 100644
index 0000000000..86ba76ff50
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-remote/src/main/java/itest/HelloworldServiceImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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 itest;
+
+import org.oasisopen.sca.annotation.EagerInit;
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Scope;
+
+@EagerInit
+@Scope("COMPOSITE")
+public class HelloworldServiceImpl implements HelloworldService {
+
+ public String sayHello(String name) {
+ return "Hello " + name;
+ }
+
+ @Init
+ public void init() {
+ System.out.println("init: " + sayHello("world"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-remote/src/main/java/itest/RemoteHelloworldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-remote/src/main/java/itest/RemoteHelloworldService.java
new file mode 100644
index 0000000000..a8640bf484
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-remote/src/main/java/itest/RemoteHelloworldService.java
@@ -0,0 +1,28 @@
+/*
+ * 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 itest;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface RemoteHelloworldService {
+
+ String sayHelloRemote(String name);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-remote/src/main/resources/Helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-remote/src/main/resources/Helloworld.composite
new file mode 100644
index 0000000000..2d5ae6a57c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-remote/src/main/resources/Helloworld.composite
@@ -0,0 +1,29 @@
+<?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:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://itest"
+ name="Helloworld">
+
+ <component name="HelloworldComponent">
+ <implementation.java class="itest.HelloworldServiceImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-remote/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-remote/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..56e127b539
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-remote/src/main/resources/META-INF/sca-contribution.xml
@@ -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://itest">
+ <deployable composite="itest:Helloworld"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-remote/src/test/java/test/scaclient/SCAClientTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-remote/src/test/java/test/scaclient/SCAClientTestCase.java
new file mode 100644
index 0000000000..4e3a15c862
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scaclient-remote/src/test/java/test/scaclient/SCAClientTestCase.java
@@ -0,0 +1,45 @@
+/*
+ * 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 test.scaclient;
+
+import itest.HelloworldService;
+
+import java.net.URI;
+
+import junit.framework.TestCase;
+
+import org.junit.Test;
+import org.oasisopen.sca.client.SCAClientFactory;
+
+/**
+ * Test SCADomain.newInstance and invocation of a service.
+ *
+ * @version $Rev$ $Date$
+ */
+public class SCAClientTestCase extends TestCase {
+
+ @Test
+ public void testDefault() throws Exception {
+ SCAClientFactory clientFactory = SCAClientFactory.newInstance(URI.create("uri:default?wka=127.0.0.1:9876"));
+ HelloworldService service = clientFactory.getService(HelloworldService.class, "HelloworldComponent");
+ assertEquals("Hello petra", service.sayHello("petra"));
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scdl/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scdl/pom.xml
new file mode 100644
index 0000000000..d40977818f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scdl/pom.xml
@@ -0,0 +1,59 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-scdl</artifactId>
+ <name>Apache Tuscany SCA iTest SCDL</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <!-- Copy all the dependencies so the test can verify only the expected ones get dragged in -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ContributionTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ContributionTestCase.java
new file mode 100644
index 0000000000..64329a3303
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ContributionTestCase.java
@@ -0,0 +1,80 @@
+/*
+ * 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.itest.scdl;
+
+import java.io.File;
+import java.net.URL;
+import java.util.Arrays;
+import java.util.List;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.assembly.Component;
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.assembly.Implementation;
+import org.apache.tuscany.sca.assembly.Reference;
+import org.apache.tuscany.sca.contribution.Contribution;
+import org.apache.tuscany.sca.deployment.DefaultDeployer;
+import org.apache.tuscany.sca.deployment.Deployer;
+import org.apache.tuscany.sca.implementation.java.JavaImplementation;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Test case for reading and writing SCDL
+ */
+public class ContributionTestCase {
+
+ @Test
+ public void testRead() throws Exception {
+ Deployer deployer = new DefaultDeployer();
+ File file = new File("src/test/resources/sample-binding-sca-calculator-contribution.jar");
+ URL url = file.toURI().toURL();
+ Monitor monitor = deployer.createMonitor();
+ Contribution contribution = deployer.loadContribution(url.toURI(), url, monitor);
+ deployer.build(Arrays.asList(contribution), Arrays.asList(contribution), null, monitor);
+
+ // Ferkle around in the contribution verifying it looks as expected
+ Assert.assertNotNull(contribution);
+ List<Composite> deployables = contribution.getDeployables();
+ Assert.assertEquals(2, deployables.size());
+ Composite calculatorComposte = deployables.get(0);
+ Assert.assertEquals("Calculator", calculatorComposte.getName().getLocalPart());
+ Assert.assertEquals(5, calculatorComposte.getComponents().size());
+ Component calcComp = calculatorComposte.getComponent("CalculatorServiceComponent");
+ Assert.assertNotNull(calcComp);
+ Assert.assertEquals(4, calcComp.getReferences().size());
+ Reference ref = calcComp.getReference("addService");
+ Assert.assertEquals("AddServiceComponent", ref.getTargets().get(0).getName());
+ Implementation impl = calcComp.getImplementation();
+ Assert.assertTrue(impl instanceof JavaImplementation);
+ Assert.assertEquals("calculator.CalculatorServiceImpl", ((JavaImplementation)impl).getJavaClass().getName());
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/SCDLTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/SCDLTestCase.java
new file mode 100644
index 0000000000..7dd52c5942
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/SCDLTestCase.java
@@ -0,0 +1,109 @@
+/*
+ * 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.itest.scdl;
+
+import java.net.URI;
+import java.net.URL;
+import java.util.Arrays;
+
+import javax.xml.stream.XMLStreamException;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.assembly.Component;
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.assembly.Service;
+import org.apache.tuscany.sca.binding.jms.JMSBinding;
+import org.apache.tuscany.sca.binding.jsonp.JSONPBinding;
+import org.apache.tuscany.sca.binding.rmi.RMIBinding;
+import org.apache.tuscany.sca.contribution.Contribution;
+import org.apache.tuscany.sca.contribution.processor.ContributionReadException;
+import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.UtilityExtensionPoint;
+import org.apache.tuscany.sca.deployment.Deployer;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.junit.Test;
+
+/**
+ * Test case for reading and writing a composite
+ */
+public class SCDLTestCase {
+
+ @Test
+ public void testRead() throws ContributionReadException, XMLStreamException {
+ ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
+ Deployer deployer = registry.getExtensionPoint(UtilityExtensionPoint.class).getUtility(Deployer.class);
+
+ URL r = getClass().getResource("/test.composite");
+ Composite composite = deployer.loadXMLDocument(r, null);
+ Assert.assertNotNull(composite);
+
+ Component JavaComp = composite.getComponent("JavaComponent");
+ Assert.assertNotNull(JavaComp);
+
+ Component bpelComp = composite.getComponent("BPELComponent");
+ Assert.assertNotNull(bpelComp);
+
+ Service jsonpService = composite.getService("JSONPService");
+ Assert.assertNotNull(jsonpService);
+ Assert.assertEquals(1, jsonpService.getBindings().size());
+ JSONPBinding jsonpBinding = jsonpService.getBinding(JSONPBinding.class);
+ Assert.assertNotNull(jsonpBinding);
+
+ Service jmsService = composite.getService("JMSService");
+ Assert.assertNotNull(jmsService);
+ Assert.assertEquals(1, jmsService.getBindings().size());
+ JMSBinding jmsBinding = jmsService.getBinding(JMSBinding.class);
+ Assert.assertNotNull(jmsBinding);
+
+ Service rmiService = composite.getService("RMIService");
+ Assert.assertNotNull(rmiService);
+ Assert.assertEquals(1, rmiService.getBindings().size());
+ RMIBinding rmiBinding = rmiService.getBinding(RMIBinding.class);
+ Assert.assertNotNull(rmiBinding);
+
+// TODO: WS binding drags in entire runtime
+// Service wsService = composite.getService("WSService");
+// Assert.assertNotNull(wsService);
+// Assert.assertEquals(1, wsService.getBindings().size());
+// WSBinding wsBinding = wsService.getBinding(WSBinding.class);
+// Assert.assertNotNull(wsBinding);
+ }
+
+ @Test
+ public void testBuild() throws Exception {
+ ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
+ Deployer deployer = registry.getExtensionPoint(UtilityExtensionPoint.class).getUtility(Deployer.class);
+ URL r = getClass().getResource("/test.composite");
+ r = new URL(r, "../");
+ Monitor monitor = deployer.createMonitor();
+ Contribution contribution = deployer.loadContribution(URI.create("c1"), r, monitor);
+ deployer.build(Arrays.asList(contribution), Arrays.asList(contribution), null, monitor);
+ int i = 0;
+ for (Problem p : monitor.getProblems()) {
+ System.err.println(i + ": " + p);
+ i++;
+ }
+ Assert.assertTrue(i > 0);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ValidateDependenciesTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ValidateDependenciesTestCase.java
new file mode 100644
index 0000000000..8b8abd3a4e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scdl/src/test/java/org/apache/tuscany/sca/itest/scdl/ValidateDependenciesTestCase.java
@@ -0,0 +1,60 @@
+/*
+ * 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.itest.scdl;
+
+import java.io.File;
+
+import junit.framework.Assert;
+
+import org.junit.Test;
+
+/**
+ * Test case for verifying only SCDL jars are needed
+ *
+ * Uses maven-dependency-plugin config in the pom.xml
+ *
+ * Current required jars are:
+ *
+ * asm-3.1.jar
+ * cglib-2.2.jar
+ * junit-4.8.1.jar
+ * tuscany-base-runtime-2.0-SNAPSHOT.jar
+ * wsdl4j-1.6.2.jar
+ * XmlSchema-1.4.3.jar
+ *
+ */
+public class ValidateDependenciesTestCase {
+
+ @Test
+ public void countDependencies() {
+
+ File dependenciesDir = new File("target/dependency");
+ Assert.assertTrue(dependenciesDir.exists());
+
+ File[] dependencyFiles = dependenciesDir.listFiles();
+ String vend = System.getProperty("java.vendor");
+
+ if(vend.equals("IBM Corporation")) {
+ Assert.assertEquals(12, dependencyFiles.length);
+ } else {
+ Assert.assertEquals(8, dependencyFiles.length);
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scdl/src/test/resources/sample-binding-sca-calculator-contribution.jar b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scdl/src/test/resources/sample-binding-sca-calculator-contribution.jar
new file mode 100644
index 0000000000..8a79413c1b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scdl/src/test/resources/sample-binding-sca-calculator-contribution.jar
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scdl/src/test/resources/test.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scdl/src/test/resources/test.composite
new file mode 100644
index 0000000000..6fa81b6e47
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scdl/src/test/resources/test.composite
@@ -0,0 +1,50 @@
+<?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"
+ targetNamespace="http://itest"
+ xmlns:hns="http://tuscany.apache.org/implementation/bpel/example/helloworld"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ name="SCDLTest">
+
+ <component name="JavaComponent">
+ <implementation.java class="itest.FooImpl"/>
+ </component>
+
+ <component name="BPELComponent">
+ <implementation.bpel process="hns:HelloWorld"/>
+ </component>
+
+ <service name="JSONPService" promote="JavaComponent">
+ <tuscany:binding.jsonp/>
+ </service>
+
+ <service name="JMSService" promote="JavaComponent">
+ <binding.jms/>
+ </service>
+
+ <service name="RMIService" promote="JavaComponent">
+ <tuscany:binding.rmi/>
+ </service>
+
+ <service name="WSService" promote="JavaComponent">
+ <binding.ws/>
+ </service>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scopes/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scopes/pom.xml
new file mode 100644
index 0000000000..561a4fd754
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scopes/pom.xml
@@ -0,0 +1,40 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <name>Apache Tuscany SCA iTest Scopes</name>
+ <artifactId>itest-scopes</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/CompositeScopeStateVerifierImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/CompositeScopeStateVerifierImpl.java
new file mode 100644
index 0000000000..208ac3ba44
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/CompositeScopeStateVerifierImpl.java
@@ -0,0 +1,46 @@
+/*
+ * 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.itest.scopes;
+
+import org.oasisopen.sca.annotation.Scope;
+
+/**
+ * Test Composite scope
+ */
+@Scope("COMPOSITE")
+public class CompositeScopeStateVerifierImpl implements StateVerifier {
+
+ // State data for this module (composite).
+ // In order to support thread-based state verification,
+ // the module state needs to be a ThreadLocal.
+ ThreadLocal<Integer> moduleState;
+
+ public CompositeScopeStateVerifierImpl() {
+ moduleState = new ThreadLocal<Integer>();
+ }
+
+ public void setState(int i) {
+ moduleState.set(i);
+ }
+
+ public boolean checkState(int i) {
+ return (moduleState.get() == i);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/StateVerifier.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/StateVerifier.java
new file mode 100644
index 0000000000..e6bf08ccf2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/StateVerifier.java
@@ -0,0 +1,25 @@
+/*
+ * 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.itest.scopes;
+
+public interface StateVerifier {
+ void setState(int i);
+
+ boolean checkState(int i);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scopes/src/main/resources/scopes.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scopes/src/main/resources/scopes.composite
new file mode 100644
index 0000000000..ed67bf5953
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scopes/src/main/resources/scopes.composite
@@ -0,0 +1,29 @@
+<?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"
+ targetNamespace="http://Scopes"
+ name="Scopes">
+
+ <!-- Components used to test scopes. -->
+ <component name="ModuleScopeComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.scopes.CompositeScopeStateVerifierImpl"/>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scopes/src/test/java/org/apache/tuscany/sca/test/ScopeTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scopes/src/test/java/org/apache/tuscany/sca/test/ScopeTestCase.java
new file mode 100644
index 0000000000..594bdd5038
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/scopes/src/test/java/org/apache/tuscany/sca/test/ScopeTestCase.java
@@ -0,0 +1,89 @@
+/*
+ * 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.test;
+
+import static org.junit.Assert.fail;
+
+import org.apache.tuscany.sca.itest.scopes.StateVerifier;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+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;
+
+public class ScopeTestCase {
+
+ /**
+ * Number of threads to drive each scope container.
+ */
+ private static final int NUM_THREADS = 4;
+
+ /**
+ * Number of iterations per thread.
+ */
+ private static final int ITERATIONS = 200;
+
+ private Node node;
+
+ @Before
+ public void setUp() throws Exception {
+ String location = ContributionLocationHelper.getContributionLocation("scopes.composite");
+ node = NodeFactory.newInstance().createNode("scopes.composite", new Contribution("c1", location));
+ node.start();
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testScopes() throws InterruptedException {
+
+ Thread[] moduleScopeThreadTable = new Thread[NUM_THREADS];
+
+ for (int i = 0; i < NUM_THREADS; i++) {
+ moduleScopeThreadTable[i] = new ModuleScopeTestThread();
+ }
+ for (int j = 0; j < NUM_THREADS; j++) {
+ moduleScopeThreadTable[j].start();
+ }
+ for (int k = 0; k < NUM_THREADS; k++) {
+ moduleScopeThreadTable[k].join();
+ }
+ }
+
+ private class ModuleScopeTestThread extends Thread {
+
+ public void run() {
+ StateVerifier moduleScopeService = node.getService(StateVerifier.class, "ModuleScopeComponent");
+ for (int i = 1; i <= ITERATIONS; i++) {
+ moduleScopeService.setState(i);
+ if (!moduleScopeService.checkState(i)) {
+ fail("The module scope service lost its state on iteration " + i);
+ }
+ }
+ }
+ }
+
+
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/pom.xml
new file mode 100644
index 0000000000..3d8ac1c939
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/pom.xml
@@ -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.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-service-reference</artifactId>
+ <name>Apache Tuscany SCA iTest ServiceReference</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</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/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/AComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/AComponent.java
new file mode 100644
index 0000000000..8b5cf4d29a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/AComponent.java
@@ -0,0 +1,39 @@
+/*
+ * 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.itest.serviceref;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface AComponent {
+ String foo();
+
+ String fooB();
+ String fooB1();
+
+ String fooC();
+ String fooC1();
+
+ String fooStringD();
+ String fooD();
+
+ String fooBC();
+
+ String invokeDReference();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/AComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/AComponentImpl.java
new file mode 100644
index 0000000000..3f68ac828a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/AComponentImpl.java
@@ -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.itest.serviceref;
+
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectOutputStream;
+
+import org.oasisopen.sca.ComponentContext;
+import org.oasisopen.sca.ServiceReference;
+import org.oasisopen.sca.annotation.Context;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(AComponent.class)
+public class AComponentImpl implements AComponent {
+
+ @Context
+ protected ComponentContext componentContext;
+
+ @Reference(name = "bReference")
+ protected BComponent b;
+
+ @Reference
+ protected CComponent cReference;
+
+ @Reference
+ protected ServiceReference<CComponent> cServiceReference;
+
+ @Reference(required=false)
+ protected DComponent dReference;
+
+ protected DComponent dReference1;
+
+ @Reference(name = "dReference1")
+ public void setDReference(DComponent dReference) {
+ this.dReference1 = dReference;
+ }
+
+ public String foo() {
+ return "AComponent";
+ }
+
+ public String fooB() {
+ return b.foo();
+ }
+
+ public String fooB1() {
+ ServiceReference<BComponent> bRef = componentContext.cast(b);
+ return bRef.getService().foo();
+ }
+
+ public String fooC() {
+ return cReference.foo();
+ }
+
+ public String fooC1() {
+ return cServiceReference.getService().foo();
+ }
+
+ public String fooBC() {
+ ServiceReference<CComponent> cReference = componentContext.getServiceReference(CComponent.class, "cReference");
+ return b.fooC(cReference);
+ }
+
+ public String fooD() {
+ ServiceReference<AComponent> aReference = componentContext.createSelfReference(AComponent.class);
+ return dReference1.foo(aReference);
+ }
+
+ /**
+ * A test case to work out what needs to be done in a transformer to get the
+ * CallableReference across the wire. Left here for interest in case anyone
+ * is looking for how to get at the innards of CallableReferences
+ */
+ public String fooStringD() {
+ ServiceReference<AComponent> aReference = componentContext.createSelfReference(AComponent.class);
+ ByteArrayOutputStream bos = null;
+
+ try {
+ bos = new ByteArrayOutputStream();
+ ObjectOutputStream oos = new ObjectOutputStream(bos);
+ oos.writeObject(aReference);
+ } catch (Exception ex) {
+ System.out.println(ex.toString());
+ return null;
+ }
+
+ String aReferenceString = Base64Binary.encode(bos.toByteArray());
+ return dReference1.fooString(aReferenceString);
+ }
+
+ public String invokeDReference() {
+ return dReference.foo(null);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/BComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/BComponent.java
new file mode 100644
index 0000000000..18242cd594
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/BComponent.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.serviceref;
+
+import org.oasisopen.sca.ServiceReference;
+import org.oasisopen.sca.annotation.Remotable;
+
+
+@Remotable
+public interface BComponent {
+
+ String foo();
+
+ String fooC(ServiceReference<CComponent> cComponent);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/BComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/BComponentImpl.java
new file mode 100644
index 0000000000..dd143df036
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/BComponentImpl.java
@@ -0,0 +1,38 @@
+/*
+ * 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.itest.serviceref;
+
+import org.oasisopen.sca.ServiceReference;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(BComponent.class)
+public class BComponentImpl implements BComponent {
+
+ public BComponentImpl() {
+ }
+
+ public String foo() {
+ return "BComponent";
+ }
+
+ public String fooC(ServiceReference<CComponent> cReference) {
+ return "B" + cReference.getService().foo();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/Base64Binary.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/Base64Binary.java
new file mode 100644
index 0000000000..fb436ae10c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/Base64Binary.java
@@ -0,0 +1,297 @@
+/*
+ * 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.itest.serviceref;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.Writer;
+
+/**
+ *
+ */
+
+public final class Base64Binary {
+ private static final char[] S_BASE64CHAR =
+ {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',
+ 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
+ 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/'};
+
+ private static final char S_BASE64PAD = '=';
+
+ private static final byte[] S_DECODETABLE = new byte[128];
+
+ static {
+ for (int i = 0; i < S_DECODETABLE.length; i++) {
+ S_DECODETABLE[i] = Byte.MAX_VALUE; // 127
+ }
+ for (int i = 0; i < S_BASE64CHAR.length; i++) {
+ // 0 to 63
+ S_DECODETABLE[S_BASE64CHAR[i]] = (byte)i;
+ }
+ }
+
+ private Base64Binary() {
+ }
+
+ /**
+ *
+ */
+ public static byte[] decode(char[] data, int off, int len) {
+ char[] ibuf = new char[4];
+ int ibufcount = 0;
+ byte[] obuf = new byte[len / 4 * 3 + 3];
+ int obufcount = 0;
+ for (int i = off; i < off + len; i++) {
+ char ch = data[i];
+ if (ch == S_BASE64PAD || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) {
+ ibuf[ibufcount++] = ch;
+ if (ibufcount == ibuf.length) {
+ ibufcount = 0;
+ obufcount += decode0(ibuf, obuf, obufcount);
+ }
+ }
+ }
+ if (obufcount == obuf.length) {
+ return obuf;
+ }
+ byte[] ret = new byte[obufcount];
+ System.arraycopy(obuf, 0, ret, 0, obufcount);
+ return ret;
+ }
+
+ /**
+ *
+ */
+ public static void decode(char[] data, int off, int len, OutputStream ostream) throws IOException {
+ char[] ibuf = new char[4];
+ int ibufcount = 0;
+ byte[] obuf = new byte[3];
+ for (int i = off; i < off + len; i++) {
+ char ch = data[i];
+ if (ch == S_BASE64PAD || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) {
+ ibuf[ibufcount++] = ch;
+ if (ibufcount == ibuf.length) {
+ ibufcount = 0;
+ int obufcount = decode0(ibuf, obuf, 0);
+ ostream.write(obuf, 0, obufcount);
+ }
+ }
+ }
+ }
+
+ /**
+ *
+ */
+ public static byte[] decode(String data) {
+ char[] ibuf = new char[4];
+ int ibufcount = 0;
+ byte[] obuf = new byte[data.length() / 4 * 3 + 3];
+ int obufcount = 0;
+ for (int i = 0; i < data.length(); i++) {
+ char ch = data.charAt(i);
+ if (ch == S_BASE64PAD || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) {
+ ibuf[ibufcount++] = ch;
+ if (ibufcount == ibuf.length) {
+ ibufcount = 0;
+ obufcount += decode0(ibuf, obuf, obufcount);
+ }
+ }
+ }
+ if (obufcount == obuf.length) {
+ return obuf;
+ }
+ byte[] ret = new byte[obufcount];
+ System.arraycopy(obuf, 0, ret, 0, obufcount);
+ return ret;
+ }
+
+ /**
+ *
+ */
+ public static void decode(String data, OutputStream ostream) throws IOException {
+ char[] ibuf = new char[4];
+ int ibufcount = 0;
+ byte[] obuf = new byte[3];
+ for (int i = 0; i < data.length(); i++) {
+ char ch = data.charAt(i);
+ if (ch == S_BASE64PAD || ch < S_DECODETABLE.length && S_DECODETABLE[ch] != Byte.MAX_VALUE) {
+ ibuf[ibufcount++] = ch;
+ if (ibufcount == ibuf.length) {
+ ibufcount = 0;
+ int obufcount = decode0(ibuf, obuf, 0);
+ ostream.write(obuf, 0, obufcount);
+ }
+ }
+ }
+ }
+
+ private static int decode0(char[] ibuf, byte[] obuf, int index) {
+ int wp = index;
+ int outlen = 3;
+ if (ibuf[3] == S_BASE64PAD) {
+ outlen = 2;
+ }
+ if (ibuf[2] == S_BASE64PAD) {
+ outlen = 1;
+ }
+ int b0 = S_DECODETABLE[ibuf[0]];
+ int b1 = S_DECODETABLE[ibuf[1]];
+ int b2 = S_DECODETABLE[ibuf[2]];
+ int b3 = S_DECODETABLE[ibuf[3]];
+ switch (outlen) {
+ case 1:
+ obuf[wp] = (byte)(b0 << 2 & 0xfc | b1 >> 4 & 0x3);
+ return 1;
+ case 2:
+ obuf[wp++] = (byte)(b0 << 2 & 0xfc | b1 >> 4 & 0x3);
+ obuf[wp] = (byte)(b1 << 4 & 0xf0 | b2 >> 2 & 0xf);
+ return 2;
+ case 3:
+ obuf[wp++] = (byte)(b0 << 2 & 0xfc | b1 >> 4 & 0x3);
+ obuf[wp++] = (byte)(b1 << 4 & 0xf0 | b2 >> 2 & 0xf);
+ obuf[wp] = (byte)(b2 << 6 & 0xc0 | b3 & 0x3f);
+ return 3;
+ default:
+ throw new IllegalArgumentException("The character sequence is not base64 encoded.");
+ }
+ }
+
+ /**
+ * Returns base64 representation of specified byte array.
+ */
+ public static String encode(byte[] data) {
+ return encode(data, 0, data.length);
+ }
+
+ /**
+ * Returns base64 representation of specified byte array.
+ */
+ public static String encode(byte[] data, int off, int len) {
+ if (len <= 0) {
+ return "";
+ }
+ char[] out = new char[len / 3 * 4 + 4];
+ int rindex = off;
+ int windex = 0;
+ int rest = len - off;
+ while (rest >= 3) {
+ int i = ((data[rindex] & 0xff) << 16) + ((data[rindex + 1] & 0xff) << 8) + (data[rindex + 2] & 0xff);
+ out[windex++] = S_BASE64CHAR[i >> 18];
+ out[windex++] = S_BASE64CHAR[(i >> 12) & 0x3f];
+ out[windex++] = S_BASE64CHAR[(i >> 6) & 0x3f];
+ out[windex++] = S_BASE64CHAR[i & 0x3f];
+ rindex += 3;
+ rest -= 3;
+ }
+ if (rest == 1) {
+ int i = data[rindex] & 0xff;
+ out[windex++] = S_BASE64CHAR[i >> 2];
+ out[windex++] = S_BASE64CHAR[(i << 4) & 0x3f];
+ out[windex++] = S_BASE64PAD;
+ out[windex++] = S_BASE64PAD;
+ } else if (rest == 2) {
+ int i = ((data[rindex] & 0xff) << 8) + (data[rindex + 1] & 0xff);
+ out[windex++] = S_BASE64CHAR[i >> 10];
+ out[windex++] = S_BASE64CHAR[(i >> 4) & 0x3f];
+ out[windex++] = S_BASE64CHAR[(i << 2) & 0x3f];
+ out[windex++] = S_BASE64PAD;
+ }
+ return new String(out, 0, windex);
+ }
+
+ /**
+ * Outputs base64 representation of the specified byte array to a byte stream.
+ */
+ public static void encode(byte[] data, int off, int len, OutputStream ostream) throws IOException {
+ if (len <= 0) {
+ return;
+ }
+ byte[] out = new byte[4];
+ int rindex = off;
+ int rest = len - off;
+ while (rest >= 3) {
+ int i = ((data[rindex] & 0xff) << 16) + ((data[rindex + 1] & 0xff) << 8) + (data[rindex + 2] & 0xff);
+ out[0] = (byte)S_BASE64CHAR[i >> 18];
+ out[1] = (byte)S_BASE64CHAR[(i >> 12) & 0x3f];
+ out[2] = (byte)S_BASE64CHAR[(i >> 6) & 0x3f];
+ out[3] = (byte)S_BASE64CHAR[i & 0x3f];
+ ostream.write(out, 0, 4);
+ rindex += 3;
+ rest -= 3;
+ }
+ if (rest == 1) {
+ int i = data[rindex] & 0xff;
+ out[0] = (byte)S_BASE64CHAR[i >> 2];
+ out[1] = (byte)S_BASE64CHAR[(i << 4) & 0x3f];
+ out[2] = (byte)S_BASE64PAD;
+ out[3] = (byte)S_BASE64PAD;
+ ostream.write(out, 0, 4);
+ } else if (rest == 2) {
+ int i = ((data[rindex] & 0xff) << 8) + (data[rindex + 1] & 0xff);
+ out[0] = (byte)S_BASE64CHAR[i >> 10];
+ out[1] = (byte)S_BASE64CHAR[(i >> 4) & 0x3f];
+ out[2] = (byte)S_BASE64CHAR[(i << 2) & 0x3f];
+ out[3] = (byte)S_BASE64PAD;
+ ostream.write(out, 0, 4);
+ }
+ }
+
+ /**
+ * Outputs base64 representation of the specified byte array to a character stream.
+ */
+ public static void encode(byte[] data, int off, int len, Writer writer) throws IOException {
+ if (len <= 0) {
+ return;
+ }
+ char[] out = new char[4];
+ int rindex = off;
+ int rest = len - off;
+ int output = 0;
+ while (rest >= 3) {
+ int i = ((data[rindex] & 0xff) << 16) + ((data[rindex + 1] & 0xff) << 8) + (data[rindex + 2] & 0xff);
+ out[0] = S_BASE64CHAR[i >> 18];
+ out[1] = S_BASE64CHAR[(i >> 12) & 0x3f];
+ out[2] = S_BASE64CHAR[(i >> 6) & 0x3f];
+ out[3] = S_BASE64CHAR[i & 0x3f];
+ writer.write(out, 0, 4);
+ rindex += 3;
+ rest -= 3;
+ output += 4;
+ if (output % 76 == 0) {
+ writer.write("\n");
+ }
+ }
+ if (rest == 1) {
+ int i = data[rindex] & 0xff;
+ out[0] = S_BASE64CHAR[i >> 2];
+ out[1] = S_BASE64CHAR[(i << 4) & 0x3f];
+ out[2] = S_BASE64PAD;
+ out[3] = S_BASE64PAD;
+ writer.write(out, 0, 4);
+ } else if (rest == 2) {
+ int i = ((data[rindex] & 0xff) << 8) + (data[rindex + 1] & 0xff);
+ out[0] = S_BASE64CHAR[i >> 10];
+ out[1] = S_BASE64CHAR[(i >> 4) & 0x3f];
+ out[2] = S_BASE64CHAR[(i << 2) & 0x3f];
+ out[3] = S_BASE64PAD;
+ writer.write(out, 0, 4);
+ }
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/CComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/CComponent.java
new file mode 100644
index 0000000000..fc15b632d2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/CComponent.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.serviceref;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface CComponent {
+
+ String foo();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/CComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/CComponentImpl.java
new file mode 100644
index 0000000000..276093b69f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/CComponentImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.serviceref;
+
+import org.oasisopen.sca.annotation.Service;
+
+@Service(CComponent.class)
+public class CComponentImpl implements CComponent {
+
+ public String foo() {
+ return "CComponent";
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/DComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/DComponent.java
new file mode 100644
index 0000000000..84e15b5eb2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/DComponent.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.itest.serviceref;
+
+import org.oasisopen.sca.ServiceReference;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface DComponent {
+
+ String foo(ServiceReference<AComponent> aReference);
+
+ String fooString(String aReferenceString);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/DComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/DComponentImpl.java
new file mode 100644
index 0000000000..db99472385
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/java/org/apache/tuscany/sca/itest/serviceref/DComponentImpl.java
@@ -0,0 +1,64 @@
+/*
+ * 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.itest.serviceref;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+
+import org.oasisopen.sca.RequestContext;
+import org.oasisopen.sca.ServiceReference;
+import org.oasisopen.sca.annotation.Context;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(DComponent.class)
+public class DComponentImpl implements DComponent {
+
+ @Context
+ protected RequestContext requestContext;
+
+ public String foo(ServiceReference<AComponent> aReference) {
+ try {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ ObjectOutputStream oos = new ObjectOutputStream(bos);
+ oos.writeObject(aReference);
+ ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray()));
+ Object obj = ois.readObject();
+ aReference = (ServiceReference<AComponent>) obj;
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ System.out.println("Invoking service: " + requestContext.getServiceName());
+ return "D" + aReference.getService().foo();
+ }
+
+ public String fooString(String aReferenceString) {
+ ServiceReference<AComponent> aReference = null;
+ try {
+ ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(Base64Binary.decode(aReferenceString)));
+ Object obj = ois.readObject();
+ aReference = (ServiceReference<AComponent>) obj;
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ System.out.println("Invoking service: " + requestContext.getServiceName());
+ return "D" + aReference.getService().foo();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/resources/nodeA/CompositeA.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/resources/nodeA/CompositeA.composite
new file mode 100644
index 0000000000..9a1fa0a7f7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/resources/nodeA/CompositeA.composite
@@ -0,0 +1,44 @@
+<?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
+ * 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:foo="http://foo"
+ targetNamespace="http://foo"
+ name="CompositeA"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <component name="AComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.serviceref.AComponentImpl" />
+ <service name="AComponent">
+ <binding.ws uri="http://localhost:8084/AComponent"/>
+ </service>
+ <reference name="bReference">
+ <binding.ws uri="http://localhost:8085/BComponent" />
+ </reference>
+ <reference name="cReference">
+ <binding.ws uri="http://localhost:8085/CComponent" />
+ </reference>
+ <reference name="cServiceReference">
+ <binding.ws uri="http://localhost:8085/CComponent" />
+ </reference>
+ <reference name="dReference1">
+ <binding.ws uri="http://localhost:8085/DComponent" />
+ </reference>
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/resources/nodeB/CompositeB.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/resources/nodeB/CompositeB.composite
new file mode 100644
index 0000000000..a72f5949ed
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/resources/nodeB/CompositeB.composite
@@ -0,0 +1,46 @@
+<?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
+ * 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:foo="http://foo"
+ targetNamespace="http://foo"
+ name="CompositeB"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <component name="BComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.serviceref.BComponentImpl" />
+ <service name="BComponent">
+ <binding.ws uri="http://localhost:8085/BComponent"/>
+ </service>
+ </component>
+
+ <component name="CComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.serviceref.CComponentImpl" />
+ <service name="CComponent">
+ <binding.ws uri="http://localhost:8085/CComponent"/>
+ </service>
+ </component>
+
+ <component name="DComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.serviceref.DComponentImpl" />
+ <service name="DComponent">
+ <binding.ws uri="http://localhost:8085/DComponent"/>
+ </service>
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/resources/servicereference/ServiceReferenceTest.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/resources/servicereference/ServiceReferenceTest.composite
new file mode 100644
index 0000000000..bc5ede7605
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/main/resources/servicereference/ServiceReferenceTest.composite
@@ -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
+ * 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:foo="http://foo"
+ targetNamespace="http://foo"
+ name="InnerReferencesTest"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <service name="AComponent" promote="AComponent">
+ <interface.java interface="org.apache.tuscany.sca.itest.serviceref.AComponent" />
+ </service>
+
+ <component name="AComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.serviceref.AComponentImpl" />
+ <reference name="bReference" target="BComponent" />
+ <reference name="cReference" target="CComponent" />
+ <reference name="cServiceReference" target="CComponent" />
+ <reference name="dReference1" target="DComponent" />
+ </component>
+
+ <component name="BComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.serviceref.BComponentImpl" />
+ </component>
+
+ <component name="CComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.serviceref.CComponentImpl" />
+ </component>
+
+ <component name="DComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.serviceref.DComponentImpl" />
+ </component>
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/test/java/org/apache/tuscany/sca/itest/serviceref/CallableReferenceRemoteTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/test/java/org/apache/tuscany/sca/itest/serviceref/CallableReferenceRemoteTestCase.java
new file mode 100644
index 0000000000..843afe207c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/test/java/org/apache/tuscany/sca/itest/serviceref/CallableReferenceRemoteTestCase.java
@@ -0,0 +1,139 @@
+/*
+ * 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.itest.serviceref;
+
+import static junit.framework.Assert.assertEquals;
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.itest.serviceref.AComponent;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+
+
+/**
+ * Runs a distributed domain in a single VM by using and in memory
+ * implementation of the distributed domain
+ */
+public class CallableReferenceRemoteTestCase {
+
+ private static Node nodeA;
+ private static Node nodeB;
+
+ private static AComponent acomponent;
+
+ @BeforeClass
+ public static void init() throws Exception {
+
+ try {
+
+ System.out.println("Setting up nodes");
+
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+
+ nodeA = nodeFactory.createNode("nodeA/CompositeA.composite", new Contribution("contrib","target/classes"));
+ nodeA.start();
+
+ nodeB = nodeFactory.createNode("nodeB/CompositeB.composite", new Contribution("contrib","target/classes"));
+ nodeB.start();
+
+ acomponent = nodeA.getService(AComponent.class, "AComponent/AComponent");
+
+ } catch (Throwable ex) {
+ System.out.println(ex.toString());
+ // Print detailed cause information.
+ ex.printStackTrace();
+ StringBuffer sb = new StringBuffer();
+ Throwable cause = ex.getCause();
+ while ( cause != null ) {
+ sb.append( " " );
+ System.out.println( sb.toString() + "Cause: " + cause );
+ if (cause instanceof java.lang.reflect.InvocationTargetException)
+ System.out.println( sb.toString() + "Target Exception: " + ((java.lang.reflect.InvocationTargetException)cause).getTargetException() );
+ cause = cause.getCause();
+ }
+ }
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ // stop the nodes and hence the domains they contain
+ nodeA.stop();
+ nodeB.stop();
+ }
+
+ //@Test
+ public void testKeepServerRunning1() throws Exception {
+ System.out.println("press enter to continue");
+ System.in.read();
+ }
+
+ @Test
+ public void testBReference() {
+ assertEquals("BComponent", acomponent.fooB());
+ }
+
+ @Test
+ public void testBCast() {
+ assertEquals("BComponent", acomponent.fooB1());
+ }
+
+ @Test
+ public void testCReference() {
+ assertEquals("CComponent", acomponent.fooC());
+ }
+
+ @Test
+ public void testCServiceReference() {
+ assertEquals("CComponent", acomponent.fooC1());
+ }
+
+ @Test
+ public void testDReferenceString() {
+ assertEquals("DAComponent", acomponent.fooStringD());
+ }
+
+ @Test
+ @Ignore
+ public void testDReference() {
+ assertEquals("DAComponent", acomponent.fooD());
+ }
+
+
+ @Test
+ @Ignore
+ public void testBCReference() {
+ assertEquals("BCComponent", acomponent.fooBC());
+ }
+
+ @Test
+ public void testRequiredFalseReference() {
+ try {
+ acomponent.invokeDReference();
+ } catch (Exception e) {
+ Assert.assertTrue(true);
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/test/java/org/apache/tuscany/sca/itest/serviceref/ServiceReferenceTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/test/java/org/apache/tuscany/sca/itest/serviceref/ServiceReferenceTestCase.java
new file mode 100644
index 0000000000..1a454c939a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/service-reference/src/test/java/org/apache/tuscany/sca/itest/serviceref/ServiceReferenceTestCase.java
@@ -0,0 +1,88 @@
+/*
+ * 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.itest.serviceref;
+
+import static junit.framework.Assert.assertEquals;
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.itest.serviceref.AComponent;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class ServiceReferenceTestCase {
+ private static Node node;
+ private static AComponent acomponent;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ node = NodeFactory.newInstance().createNode("ServiceReferenceTest.composite",
+ new Contribution("contrib","src/main/resources/servicereference"));
+ node.start();
+ acomponent = node.getService(AComponent.class, "AComponent");
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testBReference() {
+ assertEquals("BComponent", acomponent.fooB());
+ }
+
+ @Test
+ public void testBCast() {
+ assertEquals("BComponent", acomponent.fooB1());
+ }
+
+ @Test
+ public void testCReference() {
+ assertEquals("CComponent", acomponent.fooC());
+ }
+
+ @Test
+ public void testCServiceReference() {
+ assertEquals("CComponent", acomponent.fooC1());
+ }
+
+ @Test
+ public void testDReference() {
+ assertEquals("DAComponent", acomponent.fooD());
+ }
+
+ @Test
+ public void testBCReference() {
+ assertEquals("BCComponent", acomponent.fooBC());
+ }
+
+ @Test
+ public void testRequiredFalseReference() {
+ try {
+ acomponent.invokeDReference();
+ } catch (Exception e) {
+ Assert.assertTrue(true);
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/pom.xml
new file mode 100644
index 0000000000..1f73e76cf3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/pom.xml
@@ -0,0 +1,40 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-services</artifactId>
+ <name>Apache Tuscany SCA iTest Services</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponent.java
new file mode 100644
index 0000000000..26e58dc530
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponent.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.services;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface AComponent {
+ String foo();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponentImpl.java
new file mode 100644
index 0000000000..627ff4976f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponentImpl.java
@@ -0,0 +1,28 @@
+/*
+ * 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.itest.services;
+
+public class AComponentImpl implements AComponent {
+
+ public String foo() {
+ return "AComponent";
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponent.java
new file mode 100644
index 0000000000..d04bd1b985
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponent.java
@@ -0,0 +1,25 @@
+/*
+ * 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.itest.services;
+
+public interface BComponent {
+
+ String foo();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponentImpl.java
new file mode 100644
index 0000000000..01df89a8fa
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponentImpl.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.services;
+
+import org.oasisopen.sca.annotation.Service;
+
+@Service(BComponent.class)
+public class BComponentImpl implements BComponent {
+
+ public String foo() {
+ return "BComponent";
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponent.java
new file mode 100644
index 0000000000..07397e4502
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponent.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.services;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface CComponent {
+ String foo();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponentImpl.java
new file mode 100644
index 0000000000..8713e5ab22
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponentImpl.java
@@ -0,0 +1,28 @@
+/*
+ * 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.itest.services;
+
+public class CComponentImpl implements CComponent {
+
+ public String foo() {
+ return "CComponent";
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/D1Component.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/D1Component.java
new file mode 100644
index 0000000000..842a85e000
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/D1Component.java
@@ -0,0 +1,24 @@
+/*
+ * 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.itest.services;
+
+public interface D1Component {
+ String foo1();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponent.java
new file mode 100644
index 0000000000..8a3923b351
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponent.java
@@ -0,0 +1,24 @@
+/*
+ * 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.itest.services;
+
+public interface DComponent {
+ String foo();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponentImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponentImpl.java
new file mode 100644
index 0000000000..e52692fbf4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponentImpl.java
@@ -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.itest.services;
+
+import org.oasisopen.sca.annotation.Service;
+
+@Service({DComponent.class, D1Component.class})
+public class DComponentImpl implements DComponent, D1Component {
+
+ public String foo() {
+ return "DComponent";
+ }
+
+ public String foo1() {
+ return "DComponent";
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/SubGenericsService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/SubGenericsService.java
new file mode 100644
index 0000000000..2cc6cde689
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/SubGenericsService.java
@@ -0,0 +1,25 @@
+/*
+ * 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.itest.services;
+
+public interface SubGenericsService extends SuperGenericsService<String> {
+
+ void print();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/SubGenericsServiceClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/SubGenericsServiceClient.java
new file mode 100644
index 0000000000..8a156b6ee9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/SubGenericsServiceClient.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.services;
+
+public interface SubGenericsServiceClient<T> {
+
+ void print();
+
+ T doIt(T anything);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/SubGenericsServiceClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/SubGenericsServiceClientImpl.java
new file mode 100644
index 0000000000..63c4c195ec
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/SubGenericsServiceClientImpl.java
@@ -0,0 +1,51 @@
+/*
+ * 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.itest.services;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(SubGenericsServiceClient.class)
+public class SubGenericsServiceClientImpl implements SubGenericsServiceClient<String> {
+
+ private SubGenericsService subGenericsService;
+
+ public String doIt(String anything) {
+ return subGenericsService.doIt(anything);
+ }
+
+ public void print() {
+ subGenericsService.print();
+
+ }
+
+ public SubGenericsService getSubGenericsService() {
+ return subGenericsService;
+ }
+
+ @Reference
+ public void setSubGenericsService(SubGenericsService subGenericsService) {
+ this.subGenericsService = subGenericsService;
+ }
+
+
+
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/SubGenericsServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/SubGenericsServiceImpl.java
new file mode 100644
index 0000000000..6b2ddfbe8c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/SubGenericsServiceImpl.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.services;
+
+
+public class SubGenericsServiceImpl extends SuperGenericsServiceImpl<String>
+ implements SubGenericsService{
+
+ public void print(){
+ System.out.println("I am print.");
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/SuperGenericsService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/SuperGenericsService.java
new file mode 100644
index 0000000000..9a3e0f0925
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/SuperGenericsService.java
@@ -0,0 +1,28 @@
+/*
+ * 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.itest.services;
+
+/**
+ * The interface for SuperGenericsService.
+ *
+ */
+public interface SuperGenericsService<T> {
+
+ T doIt(T anything);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/SuperGenericsServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/SuperGenericsServiceImpl.java
new file mode 100644
index 0000000000..cce2a5d355
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/SuperGenericsServiceImpl.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest.services;
+
+
+public abstract class SuperGenericsServiceImpl<T> implements SuperGenericsService<T>{
+
+ public T doIt(T anything){
+ return anything;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..a687b3481a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/resources/META-INF/sca-contribution.xml
@@ -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:foo="http://foo">
+ <deployable composite="foo:InnerServicesTest" />
+</contribution> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/resources/ServicesTest.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/resources/ServicesTest.composite
new file mode 100644
index 0000000000..94c7fd33e4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/main/resources/ServicesTest.composite
@@ -0,0 +1,81 @@
+<?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:foo="http://foo" targetNamespace="http://foo"
+ name="InnerServicesTest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <component name="AComponent1">
+ <implementation.java class="org.apache.tuscany.sca.itest.services.AComponentImpl" />
+ </component>
+
+ <component name="AComponent2">
+ <implementation.java class="org.apache.tuscany.sca.itest.services.AComponentImpl" />
+ <service name="AComponent">
+ <interface.java interface="org.apache.tuscany.sca.itest.services.AComponent" />
+ </service>
+ </component>
+
+ <component name="BComponent1">
+ <implementation.java class="org.apache.tuscany.sca.itest.services.BComponentImpl" />
+ </component>
+
+ <component name="BComponent2">
+ <implementation.java class="org.apache.tuscany.sca.itest.services.BComponentImpl" />
+ <service name="BComponent">
+ <interface.java interface="org.apache.tuscany.sca.itest.services.BComponent" />
+ </service>
+ </component>
+
+ <component name="CComponent1">
+ <implementation.java class="org.apache.tuscany.sca.itest.services.CComponentImpl" />
+ </component>
+
+ <component name="CComponent2">
+ <implementation.java class="org.apache.tuscany.sca.itest.services.CComponentImpl" />
+ <service name="CComponent">
+ <interface.java interface="org.apache.tuscany.sca.itest.services.CComponent" />
+ </service>
+ </component>
+
+ <component name="DComponent1">
+ <implementation.java class="org.apache.tuscany.sca.itest.services.DComponentImpl" />
+ </component>
+
+ <component name="DComponent2">
+ <implementation.java class="org.apache.tuscany.sca.itest.services.DComponentImpl" />
+ <service name="DComponent">
+ <interface.java interface="org.apache.tuscany.sca.itest.services.DComponent" />
+ </service>
+ <service name="D1Component">
+ <interface.java interface="org.apache.tuscany.sca.itest.services.D1Component" />
+ </service>
+ </component>
+
+
+ <!-- Component used to implement SubGenericsService -->
+ <component name="SubGenericsServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.services.SubGenericsServiceImpl"/>
+ </component>
+
+ <!-- A SubGenericsServiceClientImpl component that uses SCA binding to invoke SubGenericsService service -->
+ <component name="SubGenericsServiceClientSCAComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.services.SubGenericsServiceClientImpl" />
+ <reference name="subGenericsService" target="SubGenericsServiceComponent"/>
+ </component>
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java
new file mode 100644
index 0000000000..05f1c98bc7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java
@@ -0,0 +1,127 @@
+/*
+ * 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.itest.services;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.oasisopen.sca.ServiceRuntimeException;
+
+public class ServicesTestCase {
+ private static Node node;
+
+ @BeforeClass
+ public static void init() throws Exception {
+ String location = ContributionLocationHelper.getContributionLocation("ServicesTest.composite");
+ node = NodeFactory.newInstance().createNode("ServicesTest.composite", new Contribution("c1", location));
+ node.start();
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ node.stop();
+ }
+
+ @Test
+ public void testAService() {
+ AComponent a1 = node.getService(AComponent.class, "AComponent1");
+ assertEquals("AComponent", a1.foo());
+
+ AComponent a2 = node.getService(AComponent.class, "AComponent2/AComponent");
+ assertEquals("AComponent", a2.foo());
+ }
+
+ @Test
+ public void testBService() {
+ BComponent a1 = node.getService(BComponent.class, "BComponent1");
+ assertEquals("BComponent", a1.foo());
+
+ BComponent a2 = node.getService(BComponent.class, "BComponent2/BComponent");
+ assertEquals("BComponent", a2.foo());
+ }
+
+ @Test
+ public void testCService() {
+ CComponent a1 = node.getService(CComponent.class, "CComponent1");
+ assertEquals("CComponent", a1.foo());
+
+ CComponent a2 = node.getService(CComponent.class, "CComponent2/CComponent");
+ assertEquals("CComponent", a2.foo());
+ }
+
+ @Test
+ public void testDService() {
+ DComponent a1 = node.getService(DComponent.class, "DComponent1/DComponent");
+ assertEquals("DComponent", a1.foo());
+
+ D1Component a2 = node.getService(D1Component.class, "DComponent1/D1Component");
+ assertEquals("DComponent", a2.foo1());
+
+ try {
+ node.getService(DComponent.class, "DComponent1");
+ Assert.fail("The service name is required");
+ } catch (ServiceRuntimeException e) {
+ Assert.assertTrue("The service name is required", true);
+ }
+
+ DComponent a3 = node.getService(DComponent.class, "DComponent2/DComponent");
+ assertEquals("DComponent", a3.foo());
+
+ D1Component a4 = node.getService(D1Component.class, "DComponent2/D1Component");
+ assertEquals("DComponent", a4.foo1());
+
+ }
+
+
+ @Test
+ public void testSCASubGenericsServiceDoIt() throws Exception{
+ @SuppressWarnings("unchecked")
+ SubGenericsServiceClient<String> subGenericsServiceClient = node.getService(SubGenericsServiceClient.class, "SubGenericsServiceClientSCAComponent");
+ String actual = "noting";
+ String expected = subGenericsServiceClient.doIt(actual);
+ Assert.assertEquals(actual, expected);
+ }
+
+ @Test
+ public void testSCASubGenericsServicePrint() throws Exception{
+ @SuppressWarnings("unchecked")
+ SubGenericsServiceClient<String> subGenericsServiceClient = node.getService(SubGenericsServiceClient.class, "SubGenericsServiceClientSCAComponent");
+ subGenericsServiceClient.print();
+ }
+
+ public static void main(String[] args) throws Exception {
+ ServicesTestCase.init();
+ ServicesTestCase tester = new ServicesTestCase();
+ tester.testAService();
+ tester.testBService();
+ tester.testCService();
+ tester.testDService();
+ tester.testSCASubGenericsServiceDoIt();
+ tester.testSCASubGenericsServicePrint();
+ ServicesTestCase.destroy();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/spi/build.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/spi/build.xml
new file mode 100644
index 0000000000..1f169966d0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/spi/build.xml
@@ -0,0 +1,134 @@
+<!--
+ * 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 name="itest-spi" default="run">
+
+ <!-- create a fileset containing the file name of each SPI class or interface -->
+ <fileset id="file.names"
+ dir="${basedir}/../../../modules">
+ <patternset id="assembly">
+ <include name="assembly/src/main/java/org/apache/tuscany/sca/assembly/*"/>
+ <!--include name="assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/*"/-->
+ <include name="assembly/src/main/java/org/apache/tuscany/sca/definitions/*"/>
+ <include name="assembly/src/main/java/org/apache/tuscany/sca/interfacedef/*"/>
+ <!--include name="assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/*"/-->
+ <!--include name="assembly/src/main/java/org/apache/tuscany/sca/interfacedef.util/*"/-->
+ <include name="assembly/src/main/java/org/apache/tuscany/sca/policy/*"/>
+ </patternset>
+ <patternset id="contribution">
+ <include name="contribution/src/main/java/org/apache/tuscany/sca/contribution/*"/>
+ <include name="contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/*"/>
+ <include name="contribution/src/main/java/org/apache/tuscany/sca/contribution/resolver/*"/>
+ </patternset>
+ <patternset id="core-spi">
+ <include name="core-spi/src/main/java/org/apache/tuscany/sca/context/*"/>
+ <include name="core-spi/src/main/java/org/apache/tuscany/sca/invocation/*"/>
+ <include name="core-spi/src/main/java/org/apache/tuscany/sca/provider/*"/>
+ <include name="core-spi/src/main/java/org/apache/tuscany/sca/runtime/*"/>
+ <include name="core-spi/src/main/java/org/apache/tuscany/sca/work/*"/>
+ </patternset>
+ <patternset id="core">
+ <include name="core/src/main/java/org/apache/tuscany/sca/core/assembly/*"/>
+ <include name="core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/*"/>
+ <include name="core/src/main/java/org/apache/tuscany/sca/core/context/*"/>
+ <include name="core/src/main/java/org/apache/tuscany/sca/core/factory/*"/>
+ <include name="core/src/main/java/org/apache/tuscany/sca/core/invocation/*"/>
+ <include name="core/src/main/java/org/apache/tuscany/sca/core/scope/*"/>
+ </patternset>
+ <patternset id="databinding">
+ <include name="databinding/src/main/java/org/apache/tuscany/sca/databinding/*"/>
+ <include name="databinding/src/main/java/org/apache/tuscany/sca/databinding/annotation/*"/>
+ <include name="databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/*"/>
+ <include name="databinding/src/main/java/org/apache/tuscany/sca/databinding/xml/*"/>
+ </patternset>
+ <patternset id="deployment">
+ <include name="deployment/src/main/java/org/apache/tuscany/sca/deployment/*"/>
+ </patternset>
+ <patternset id="extensibility">
+ <include name="extensibility/src/main/java/org/apache/tuscany/sca/core/*"/>
+ <include name="extensibility/src/main/java/org/apache/tuscany/sca/extensibility/*"/>
+ </patternset>
+ <patternset id="interface-java">
+ <include name="interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/*"/>
+ </patternset>
+ <patternset id="interface-wsdl">
+ <include name="interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/*"/>
+ </patternset>
+ <patternset id="monitor">
+ <include name="monitor/src/main/java/org/apache/tuscany/sca/monitor/*"/>
+ </patternset>
+ <patternset id="node-api">
+ <include name="node-api/src/main/java/org/apache/tuscany/sca/node/*"/>
+ <include name="node-api/src/main/java/org/apache/tuscany/sca/node/configuration/*"/>
+ </patternset>
+ <patternset id="sca-api">
+ <include name="sca-api/src/main/java/org/oasisopen/sca/*"/>
+ <include name="sca-api/src/main/java/org/oasisopen/sca/annotation/*"/>
+ </patternset>
+ <patternset id="xsd">
+ <include name="xsd/src/main/java/org/apache/tuscany/sca/xsd/*"/>
+ <include name="xsd/src/main/java/org/apache/tuscany/sca/xsd/xml/*"/>
+ </patternset>
+ </fileset>
+
+ <target name="run-javap">
+ <!-- convert the filenames into class names -->
+ <pathconvert pathsep=" "
+ property="class.names"
+ refid="file.names">
+ <chainedmapper>
+ <regexpmapper from="^.*/src/main/java/(.*)\.java" to="\1" handledirsep="yes"/>
+ <packagemapper from="*" to="*"/>
+ </chainedmapper>
+ </pathconvert>
+
+ <!-- create a single file containing all the decompiled SPI classes -->
+ <exec executable="javap"
+ output="spi.txt">
+ <arg value="-classpath"/>
+ <arg value="${runtime_classpath}"/>
+ <arg line="${class.names}"/>
+ </exec>
+ </target>
+
+ <target name="run-javadoc">
+ <!-- convert the filesnames into a LF seaprated list and exclude anything but.java -->
+ <pathconvert pathsep="${line.separator}"
+ property="file.names.separate.lines"
+ refid="file.names">
+ <globmapper from="*.java" to="*.java"/>
+ </pathconvert>
+
+ <!-- write the list out to a file so that the javadoc command line doesn't blow up -->
+ <echo file="target/tuscany-spi-files.txt">${file.names.separate.lines}</echo>
+
+ <!-- use exec rather than the javadoc task so that we can read from a file -->
+ <exec executable="javadoc"
+ output="target/javadoc-generation-report.txt">
+ <arg value="-d"/>
+ <arg value="target/javadoc"/>
+ <arg value="-use"/>
+ <arg value="-windowtitle"/>
+ <arg value="'Tuscany SPI'"/>
+ <arg value="@target/tuscany-spi-files.txt"/>
+ </exec>
+ </target>
+
+ <target name="run" depends="run-javap, run-javadoc"/>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/spi/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/spi/pom.xml
new file mode 100644
index 0000000000..316761d42d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/spi/pom.xml
@@ -0,0 +1,80 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-spi</artifactId>
+ <name>Apache Tuscany SCA iTest SPI</name>
+ <version>2.0.1</version>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.6</version>
+ <executions>
+ <execution>
+ <id>spi</id>
+ <phase>test-compile</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target unless="maven.test.skip">
+ <property name="tuscany.version" value="${project.version}" />
+ <property name="runtime_classpath" refid="maven.runtime.classpath"/>
+ <ant antfile="./build.xml" target="run"/>
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-nodeps</artifactId>
+ <version>1.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>regexp</groupId>
+ <artifactId>regexp</artifactId>
+ <version>1.3</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/spi/spi-safe.txt b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/spi/spi-safe.txt
new file mode 100644
index 0000000000..3db3472d8b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/spi/spi-safe.txt
@@ -0,0 +1,4102 @@
+Compiled from "AbstractContract.java"
+public interface org.apache.tuscany.sca.assembly.AbstractContract extends org.apache.tuscany.sca.assembly.Base,org.apache.tuscany.sca.assembly.Extensible,org.apache.tuscany.sca.policy.PolicySubject{
+ public abstract java.lang.String getName();
+ public abstract void setName(java.lang.String);
+ public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract getInterfaceContract();
+ public abstract void setInterfaceContract(org.apache.tuscany.sca.interfacedef.InterfaceContract);
+ public abstract boolean isForCallback();
+ public abstract void setForCallback(boolean);
+}
+
+Compiled from "AbstractProperty.java"
+public interface org.apache.tuscany.sca.assembly.AbstractProperty extends org.apache.tuscany.sca.assembly.Base,org.apache.tuscany.sca.assembly.Extensible{
+ public abstract java.lang.String getName();
+ public abstract void setName(java.lang.String);
+ public abstract java.lang.Object getValue();
+ public abstract void setValue(java.lang.Object);
+ public abstract boolean isMany();
+ public abstract void setMany(boolean);
+ public abstract boolean isMustSupply();
+ public abstract void setMustSupply(boolean);
+ public abstract javax.xml.namespace.QName getXSDType();
+ public abstract void setXSDType(javax.xml.namespace.QName);
+ public abstract javax.xml.namespace.QName getXSDElement();
+ public abstract void setXSDElement(javax.xml.namespace.QName);
+ public abstract org.apache.tuscany.sca.interfacedef.DataType getDataType();
+ public abstract void setDataType(org.apache.tuscany.sca.interfacedef.DataType);
+ public abstract java.lang.Object getXSDDefinition();
+ public abstract void setXSDDefinition(java.lang.Object);
+}
+
+Compiled from "AbstractReference.java"
+public interface org.apache.tuscany.sca.assembly.AbstractReference extends org.apache.tuscany.sca.assembly.AbstractContract{
+ public abstract org.apache.tuscany.sca.assembly.Multiplicity getMultiplicity();
+ public abstract void setMultiplicity(org.apache.tuscany.sca.assembly.Multiplicity);
+}
+
+Compiled from "AbstractService.java"
+public interface org.apache.tuscany.sca.assembly.AbstractService extends org.apache.tuscany.sca.assembly.AbstractContract{
+}
+
+Compiled from "AssemblyFactory.java"
+public interface org.apache.tuscany.sca.assembly.AssemblyFactory{
+ public abstract org.apache.tuscany.sca.assembly.AbstractProperty createAbstractProperty();
+ public abstract org.apache.tuscany.sca.assembly.AbstractReference createAbstractReference();
+ public abstract org.apache.tuscany.sca.assembly.AbstractService createAbstractService();
+ public abstract org.apache.tuscany.sca.assembly.Callback createCallback();
+ public abstract org.apache.tuscany.sca.assembly.Component createComponent();
+ public abstract org.apache.tuscany.sca.assembly.ComponentProperty createComponentProperty();
+ public abstract org.apache.tuscany.sca.assembly.ComponentReference createComponentReference();
+ public abstract org.apache.tuscany.sca.assembly.ComponentService createComponentService();
+ public abstract org.apache.tuscany.sca.assembly.ComponentType createComponentType();
+ public abstract org.apache.tuscany.sca.assembly.Composite createComposite();
+ public abstract org.apache.tuscany.sca.assembly.CompositeReference createCompositeReference();
+ public abstract org.apache.tuscany.sca.assembly.CompositeService createCompositeService();
+ public abstract org.apache.tuscany.sca.assembly.Property createProperty();
+ public abstract org.apache.tuscany.sca.assembly.Reference createReference();
+ public abstract org.apache.tuscany.sca.assembly.Service createService();
+ public abstract org.apache.tuscany.sca.assembly.Wire createWire();
+ public abstract org.apache.tuscany.sca.assembly.Extension createExtension();
+ public abstract org.apache.tuscany.sca.assembly.Endpoint createEndpoint();
+ public abstract org.apache.tuscany.sca.assembly.EndpointReference createEndpointReference();
+ public abstract org.apache.tuscany.sca.assembly.ConfiguredOperation createConfiguredOperation();
+}
+
+Compiled from "Base.java"
+public interface org.apache.tuscany.sca.assembly.Base{
+ public static final java.lang.String SCA11_NS;
+ public static final java.lang.String SCA11_TUSCANY_NS;
+ public abstract boolean isUnresolved();
+ public abstract void setUnresolved(boolean);
+}
+
+Compiled from "Binding.java"
+public interface org.apache.tuscany.sca.assembly.Binding extends org.apache.tuscany.sca.assembly.Base,java.lang.Cloneable{
+ public abstract java.lang.String getURI();
+ public abstract void setURI(java.lang.String);
+ public abstract java.lang.String getName();
+ public abstract void setName(java.lang.String);
+ public abstract java.lang.Object clone() throws java.lang.CloneNotSupportedException;
+ public abstract javax.xml.namespace.QName getType();
+ public abstract org.apache.tuscany.sca.assembly.WireFormat getRequestWireFormat();
+ public abstract void setRequestWireFormat(org.apache.tuscany.sca.assembly.WireFormat);
+ public abstract org.apache.tuscany.sca.assembly.WireFormat getResponseWireFormat();
+ public abstract void setResponseWireFormat(org.apache.tuscany.sca.assembly.WireFormat);
+ public abstract org.apache.tuscany.sca.assembly.OperationSelector getOperationSelector();
+ public abstract void setOperationSelector(org.apache.tuscany.sca.assembly.OperationSelector);
+}
+
+Compiled from "Callback.java"
+public interface org.apache.tuscany.sca.assembly.Callback extends org.apache.tuscany.sca.assembly.Base,org.apache.tuscany.sca.assembly.Extensible,org.apache.tuscany.sca.policy.PolicySubject{
+ public abstract java.util.List getBindings();
+ public abstract org.apache.tuscany.sca.assembly.Contract getParentContract();
+ public abstract void setParentContract(org.apache.tuscany.sca.assembly.Contract);
+}
+
+Compiled from "Component.java"
+public interface org.apache.tuscany.sca.assembly.Component extends org.apache.tuscany.sca.assembly.Base,org.apache.tuscany.sca.assembly.Extensible,org.apache.tuscany.sca.policy.PolicySubject,java.lang.Cloneable{
+ public abstract java.lang.String getURI();
+ public abstract void setURI(java.lang.String);
+ public abstract java.lang.String getName();
+ public abstract void setName(java.lang.String);
+ public abstract org.apache.tuscany.sca.assembly.Implementation getImplementation();
+ public abstract void setImplementation(org.apache.tuscany.sca.assembly.Implementation);
+ public abstract java.util.List getReferences();
+ public abstract org.apache.tuscany.sca.assembly.ComponentReference getReference(java.lang.String);
+ public abstract java.util.List getServices();
+ public abstract org.apache.tuscany.sca.assembly.ComponentService getService(java.lang.String);
+ public abstract java.util.List getProperties();
+ public abstract org.apache.tuscany.sca.assembly.ComponentProperty getProperty(java.lang.String);
+ public abstract java.lang.Boolean getAutowire();
+ public abstract void setAutowire(java.lang.Boolean);
+ public abstract java.lang.Object clone() throws java.lang.CloneNotSupportedException;
+}
+
+Compiled from "ComponentProperty.java"
+public interface org.apache.tuscany.sca.assembly.ComponentProperty extends org.apache.tuscany.sca.assembly.Property{
+ public abstract org.apache.tuscany.sca.assembly.Property getProperty();
+ public abstract void setProperty(org.apache.tuscany.sca.assembly.Property);
+ public abstract java.lang.String getSource();
+ public abstract void setSource(java.lang.String);
+ public abstract javax.xml.xpath.XPathExpression getSourceXPathExpression();
+ public abstract void setSourceXPathExpression(javax.xml.xpath.XPathExpression);
+ public abstract java.lang.String getFile();
+ public abstract void setFile(java.lang.String);
+}
+
+Compiled from "ComponentReference.java"
+public interface org.apache.tuscany.sca.assembly.ComponentReference extends org.apache.tuscany.sca.assembly.Reference{
+ public abstract org.apache.tuscany.sca.assembly.Reference getReference();
+ public abstract void setReference(org.apache.tuscany.sca.assembly.Reference);
+ public abstract java.lang.Boolean getAutowire();
+ public abstract void setAutowire(java.lang.Boolean);
+ public abstract org.apache.tuscany.sca.assembly.ComponentService getCallbackService();
+ public abstract void setCallbackService(org.apache.tuscany.sca.assembly.ComponentService);
+ public abstract boolean isNonOverridable();
+ public abstract void setNonOverridable(boolean);
+ public abstract void setPromoted(boolean);
+ public abstract boolean isPromoted();
+}
+
+Compiled from "ComponentService.java"
+public interface org.apache.tuscany.sca.assembly.ComponentService extends org.apache.tuscany.sca.assembly.Service{
+ public abstract org.apache.tuscany.sca.assembly.Service getService();
+ public abstract void setService(org.apache.tuscany.sca.assembly.Service);
+ public abstract org.apache.tuscany.sca.assembly.ComponentReference getCallbackReference();
+ public abstract void setCallbackReference(org.apache.tuscany.sca.assembly.ComponentReference);
+}
+
+Compiled from "ComponentType.java"
+public interface org.apache.tuscany.sca.assembly.ComponentType extends org.apache.tuscany.sca.assembly.Base,org.apache.tuscany.sca.policy.PolicySubject{
+ public abstract java.lang.String getURI();
+ public abstract void setURI(java.lang.String);
+ public abstract java.util.List getServices();
+ public abstract org.apache.tuscany.sca.assembly.Service getService(java.lang.String);
+ public abstract java.util.List getReferences();
+ public abstract org.apache.tuscany.sca.assembly.Reference getReference(java.lang.String);
+ public abstract java.util.List getProperties();
+ public abstract org.apache.tuscany.sca.assembly.Property getProperty(java.lang.String);
+}
+
+Compiled from "Composite.java"
+public interface org.apache.tuscany.sca.assembly.Composite extends org.apache.tuscany.sca.assembly.Implementation,org.apache.tuscany.sca.assembly.Extensible,java.lang.Cloneable,org.apache.tuscany.sca.policy.PolicySubject{
+ public static final javax.xml.namespace.QName DOMAIN_COMPOSITE;
+ public static final javax.xml.namespace.QName TYPE;
+ public abstract java.lang.String getSpecVersion();
+ public abstract void setSpecVersion(java.lang.String);
+ public abstract javax.xml.namespace.QName getName();
+ public abstract void setName(javax.xml.namespace.QName);
+ public abstract java.util.List getIncludes();
+ public abstract java.util.List getComponents();
+ public abstract org.apache.tuscany.sca.assembly.Component getComponent(java.lang.String);
+ public abstract java.util.List getWires();
+ public abstract boolean isLocal();
+ public abstract void setLocal(boolean);
+ public abstract java.lang.Boolean getAutowire();
+ public abstract void setAutowire(java.lang.Boolean);
+ public abstract java.lang.Object clone() throws java.lang.CloneNotSupportedException;
+ static {};
+}
+
+Compiled from "CompositeReference.java"
+public interface org.apache.tuscany.sca.assembly.CompositeReference extends org.apache.tuscany.sca.assembly.Reference{
+ public abstract java.util.List getPromotedComponents();
+ public abstract java.util.List getPromotedReferences();
+}
+
+Compiled from "CompositeService.java"
+public interface org.apache.tuscany.sca.assembly.CompositeService extends org.apache.tuscany.sca.assembly.Service{
+ public abstract org.apache.tuscany.sca.assembly.Component getPromotedComponent();
+ public abstract void setPromotedComponent(org.apache.tuscany.sca.assembly.Component);
+ public abstract org.apache.tuscany.sca.assembly.ComponentService getPromotedService();
+ public abstract void setPromotedService(org.apache.tuscany.sca.assembly.ComponentService);
+}
+
+Compiled from "ConfiguredOperation.java"
+public interface org.apache.tuscany.sca.assembly.ConfiguredOperation extends org.apache.tuscany.sca.assembly.Base,org.apache.tuscany.sca.policy.PolicySubject{
+ public abstract java.lang.String getName();
+ public abstract void setName(java.lang.String);
+ public abstract java.lang.String getContractName();
+ public abstract void setContractName(java.lang.String);
+}
+
+Compiled from "Contract.java"
+public interface org.apache.tuscany.sca.assembly.Contract extends org.apache.tuscany.sca.assembly.AbstractContract,org.apache.tuscany.sca.policy.PolicySubject,java.lang.Cloneable{
+ public abstract java.util.List getBindings();
+ public abstract java.lang.Object getBinding(java.lang.Class);
+ public abstract java.lang.Object getCallbackBinding(java.lang.Class);
+ public abstract org.apache.tuscany.sca.assembly.Callback getCallback();
+ public abstract void setCallback(org.apache.tuscany.sca.assembly.Callback);
+ public abstract java.lang.Object clone() throws java.lang.CloneNotSupportedException;
+ public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract getInterfaceContract(org.apache.tuscany.sca.assembly.Binding);
+ public abstract boolean isOverridingBindings();
+ public abstract void setOverridingBindings(boolean);
+}
+
+Compiled from "DefaultAssemblyFactory.java"
+public class org.apache.tuscany.sca.assembly.DefaultAssemblyFactory extends org.apache.tuscany.sca.assembly.impl.AssemblyFactoryImpl implements org.apache.tuscany.sca.assembly.AssemblyFactory{
+ public org.apache.tuscany.sca.assembly.DefaultAssemblyFactory(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public org.apache.tuscany.sca.assembly.DefaultAssemblyFactory();
+}
+
+Compiled from "Endpoint.java"
+public interface org.apache.tuscany.sca.assembly.Endpoint extends org.apache.tuscany.sca.assembly.Base,org.apache.tuscany.sca.policy.PolicySubject,java.lang.Cloneable,java.io.Serializable{
+ public abstract java.lang.String getURI();
+ public abstract void setURI(java.lang.String);
+ public abstract org.apache.tuscany.sca.assembly.Component getComponent();
+ public abstract void setComponent(org.apache.tuscany.sca.assembly.Component);
+ public abstract org.apache.tuscany.sca.assembly.ComponentService getService();
+ public abstract void setService(org.apache.tuscany.sca.assembly.ComponentService);
+ public abstract org.apache.tuscany.sca.assembly.Binding getBinding();
+ public abstract void setBinding(org.apache.tuscany.sca.assembly.Binding);
+ public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract getComponentServiceInterfaceContract();
+ public abstract java.util.List getCallbackEndpointReferences();
+ public abstract boolean isRemote();
+ public abstract void setRemote(boolean);
+ public abstract java.lang.Object clone() throws java.lang.CloneNotSupportedException;
+ public abstract boolean matches(java.lang.String);
+ public abstract boolean isAsyncInvocation();
+}
+
+Compiled from "EndpointReference.java"
+public interface org.apache.tuscany.sca.assembly.EndpointReference extends org.apache.tuscany.sca.assembly.Base,org.apache.tuscany.sca.policy.PolicySubject,java.lang.Cloneable,java.io.Serializable{
+ public abstract java.lang.String getURI();
+ public abstract void setURI(java.lang.String);
+ public abstract java.lang.Object clone() throws java.lang.CloneNotSupportedException;
+ public abstract org.apache.tuscany.sca.assembly.Component getComponent();
+ public abstract void setComponent(org.apache.tuscany.sca.assembly.Component);
+ public abstract org.apache.tuscany.sca.assembly.ComponentReference getReference();
+ public abstract void setReference(org.apache.tuscany.sca.assembly.ComponentReference);
+ public abstract org.apache.tuscany.sca.assembly.Binding getBinding();
+ public abstract void setBinding(org.apache.tuscany.sca.assembly.Binding);
+ public abstract org.apache.tuscany.sca.assembly.Endpoint getTargetEndpoint();
+ public abstract void setTargetEndpoint(org.apache.tuscany.sca.assembly.Endpoint);
+ public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract getComponentReferenceInterfaceContract();
+ public abstract org.apache.tuscany.sca.assembly.Endpoint getCallbackEndpoint();
+ public abstract void setCallbackEndpoint(org.apache.tuscany.sca.assembly.Endpoint);
+ public abstract org.apache.tuscany.sca.assembly.EndpointReference$Status getStatus();
+ public abstract void setStatus(org.apache.tuscany.sca.assembly.EndpointReference$Status);
+ public abstract boolean isAsyncInvocation();
+}
+
+Compiled from "Extensible.java"
+public interface org.apache.tuscany.sca.assembly.Extensible extends org.apache.tuscany.sca.assembly.Base{
+ public abstract java.util.List getExtensions();
+ public abstract java.util.List getAttributeExtensions();
+}
+
+Compiled from "Extension.java"
+public interface org.apache.tuscany.sca.assembly.Extension{
+ public abstract javax.xml.namespace.QName getQName();
+ public abstract void setQName(javax.xml.namespace.QName);
+ public abstract java.lang.Object getValue();
+ public abstract void setValue(java.lang.Object);
+ public abstract boolean isAttribute();
+ public abstract void setAttribute(boolean);
+}
+
+Compiled from "Implementation.java"
+public interface org.apache.tuscany.sca.assembly.Implementation extends org.apache.tuscany.sca.assembly.ComponentType{
+ public abstract javax.xml.namespace.QName getType();
+ public abstract java.util.List getOperations();
+}
+
+Compiled from "Multiplicity.java"
+public final class org.apache.tuscany.sca.assembly.Multiplicity extends java.lang.Enum{
+ public static final org.apache.tuscany.sca.assembly.Multiplicity ZERO_ONE;
+ public static final org.apache.tuscany.sca.assembly.Multiplicity ONE_ONE;
+ public static final org.apache.tuscany.sca.assembly.Multiplicity ZERO_N;
+ public static final org.apache.tuscany.sca.assembly.Multiplicity ONE_N;
+ public static org.apache.tuscany.sca.assembly.Multiplicity[] values();
+ public static org.apache.tuscany.sca.assembly.Multiplicity valueOf(java.lang.String);
+ static {};
+}
+
+Compiled from "OperationSelector.java"
+public interface org.apache.tuscany.sca.assembly.OperationSelector extends org.apache.tuscany.sca.assembly.Base,java.lang.Cloneable{
+}
+
+Compiled from "OperationsConfigurator.java"
+public interface org.apache.tuscany.sca.assembly.OperationsConfigurator{
+ public abstract java.util.List getConfiguredOperations();
+}
+
+Compiled from "Property.java"
+public interface org.apache.tuscany.sca.assembly.Property extends org.apache.tuscany.sca.assembly.AbstractProperty,java.lang.Cloneable{
+ public abstract java.lang.Object clone() throws java.lang.CloneNotSupportedException;
+}
+
+Compiled from "Reference.java"
+public interface org.apache.tuscany.sca.assembly.Reference extends org.apache.tuscany.sca.assembly.AbstractReference,org.apache.tuscany.sca.assembly.Contract{
+ public abstract boolean isWiredByImpl();
+ public abstract void setWiredByImpl(boolean);
+ public abstract java.util.List getTargets();
+ public abstract java.util.List getEndpointReferences();
+ public abstract boolean isAllowsPassByReference();
+ public abstract void setAllowsPassByReference(boolean);
+}
+
+Compiled from "SCABinding.java"
+public interface org.apache.tuscany.sca.assembly.SCABinding extends org.apache.tuscany.sca.assembly.Binding{
+ public static final javax.xml.namespace.QName TYPE;
+ static {};
+}
+
+Compiled from "SCABindingFactory.java"
+public interface org.apache.tuscany.sca.assembly.SCABindingFactory{
+ public abstract org.apache.tuscany.sca.assembly.SCABinding createSCABinding();
+}
+
+Compiled from "Service.java"
+public interface org.apache.tuscany.sca.assembly.Service extends org.apache.tuscany.sca.assembly.AbstractService,org.apache.tuscany.sca.assembly.Contract{
+ public abstract java.util.List getEndpoints();
+ public abstract boolean isJAXWSService();
+ public abstract void setJAXWSService(boolean);
+}
+
+Compiled from "Wire.java"
+public interface org.apache.tuscany.sca.assembly.Wire extends org.apache.tuscany.sca.assembly.Base,org.apache.tuscany.sca.assembly.Extensible,org.apache.tuscany.sca.policy.PolicySubject,java.lang.Cloneable{
+ public abstract org.apache.tuscany.sca.assembly.ComponentReference getSource();
+ public abstract void setSource(org.apache.tuscany.sca.assembly.ComponentReference);
+ public abstract org.apache.tuscany.sca.assembly.ComponentService getTarget();
+ public abstract void setTarget(org.apache.tuscany.sca.assembly.ComponentService);
+ public abstract boolean isReplace();
+ public abstract void setReplace(boolean);
+ public abstract java.lang.Object clone() throws java.lang.CloneNotSupportedException;
+}
+
+Compiled from "WireFormat.java"
+public interface org.apache.tuscany.sca.assembly.WireFormat extends org.apache.tuscany.sca.assembly.Base,java.lang.Cloneable{
+ public abstract javax.xml.namespace.QName getSchemaName();
+}
+
+Compiled from "DefaultDefinitionsFactory.java"
+public class org.apache.tuscany.sca.definitions.DefaultDefinitionsFactory extends java.lang.Object implements org.apache.tuscany.sca.definitions.DefinitionsFactory{
+ public org.apache.tuscany.sca.definitions.DefaultDefinitionsFactory();
+ public org.apache.tuscany.sca.definitions.Definitions createDefinitions();
+}
+
+Compiled from "Definitions.java"
+public interface org.apache.tuscany.sca.definitions.Definitions{
+ public abstract java.lang.String getTargetNamespace();
+ public abstract void setTargetNamespace(java.lang.String);
+ public abstract java.util.List getIntents();
+ public abstract java.util.List getPolicySets();
+ public abstract java.util.List getBindingTypes();
+ public abstract java.util.List getImplementationTypes();
+ public abstract java.util.List getBindings();
+ public abstract java.util.List getExternalAttachments();
+}
+
+Compiled from "DefinitionsBuilder.java"
+public interface org.apache.tuscany.sca.definitions.DefinitionsBuilder{
+ public abstract void build(org.apache.tuscany.sca.definitions.Definitions) throws org.apache.tuscany.sca.definitions.DefinitionsBuilderException;
+}
+
+Compiled from "DefinitionsBuilderException.java"
+public class org.apache.tuscany.sca.definitions.DefinitionsBuilderException extends java.lang.Exception{
+ public org.apache.tuscany.sca.definitions.DefinitionsBuilderException();
+ public org.apache.tuscany.sca.definitions.DefinitionsBuilderException(java.lang.String);
+ public org.apache.tuscany.sca.definitions.DefinitionsBuilderException(java.lang.Throwable);
+ public org.apache.tuscany.sca.definitions.DefinitionsBuilderException(java.lang.String, java.lang.Throwable);
+}
+
+Compiled from "DefinitionsFactory.java"
+public interface org.apache.tuscany.sca.definitions.DefinitionsFactory{
+ public abstract org.apache.tuscany.sca.definitions.Definitions createDefinitions();
+}
+
+Compiled from "Compatibility.java"
+public final class org.apache.tuscany.sca.interfacedef.Compatibility extends java.lang.Enum{
+ public static final org.apache.tuscany.sca.interfacedef.Compatibility SUPERSET;
+ public static final org.apache.tuscany.sca.interfacedef.Compatibility SUBSET;
+ public static final org.apache.tuscany.sca.interfacedef.Compatibility MUTUAL;
+ public static final org.apache.tuscany.sca.interfacedef.Compatibility INCOMPATIBLE;
+ public static org.apache.tuscany.sca.interfacedef.Compatibility[] values();
+ public static org.apache.tuscany.sca.interfacedef.Compatibility valueOf(java.lang.String);
+ static {};
+}
+
+Compiled from "DataType.java"
+public interface org.apache.tuscany.sca.interfacedef.DataType extends java.lang.Cloneable{
+ public abstract void setPhysical(java.lang.Class);
+ public abstract java.lang.Class getPhysical();
+ public abstract java.lang.reflect.Type getGenericType();
+ public abstract void setGenericType(java.lang.reflect.Type);
+ public abstract java.lang.Object getLogical();
+ public abstract java.lang.String getDataBinding();
+ public abstract void setDataBinding(java.lang.String);
+ public abstract java.lang.Object clone() throws java.lang.CloneNotSupportedException;
+ public abstract void setLogical(java.lang.Object);
+ public abstract java.lang.Object getMetaData(java.lang.Class);
+ public abstract void setMetaData(java.lang.Class, java.lang.Object);
+}
+
+Compiled from "FaultExceptionMapper.java"
+public interface org.apache.tuscany.sca.interfacedef.FaultExceptionMapper{
+ public abstract boolean introspectFaultDataType(org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.Operation, boolean);
+ public abstract java.lang.Throwable wrapFaultInfo(org.apache.tuscany.sca.interfacedef.DataType, java.lang.String, java.lang.Object, java.lang.Throwable, org.apache.tuscany.sca.interfacedef.Operation);
+ public abstract java.lang.Object getFaultInfo(java.lang.Throwable, java.lang.Class, org.apache.tuscany.sca.interfacedef.Operation);
+}
+
+Compiled from "IncompatibleInterfaceContractException.java"
+public class org.apache.tuscany.sca.interfacedef.IncompatibleInterfaceContractException extends java.lang.Exception{
+ public org.apache.tuscany.sca.interfacedef.IncompatibleInterfaceContractException(java.lang.String, org.apache.tuscany.sca.interfacedef.InterfaceContract, org.apache.tuscany.sca.interfacedef.InterfaceContract);
+ public org.apache.tuscany.sca.interfacedef.IncompatibleInterfaceContractException(java.lang.String, org.apache.tuscany.sca.interfacedef.InterfaceContract, org.apache.tuscany.sca.interfacedef.InterfaceContract, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation);
+ public org.apache.tuscany.sca.interfacedef.InterfaceContract getTarget();
+ public org.apache.tuscany.sca.interfacedef.InterfaceContract getSource();
+ public org.apache.tuscany.sca.interfacedef.Operation getSourceOperation();
+ public org.apache.tuscany.sca.interfacedef.Operation getTargetOperation();
+}
+
+Compiled from "Interface.java"
+public interface org.apache.tuscany.sca.interfacedef.Interface extends java.lang.Cloneable,org.apache.tuscany.sca.policy.PolicySubject{
+ public abstract boolean isRemotable();
+ public abstract void setRemotable(boolean);
+ public abstract boolean isRemotableSet();
+ public abstract java.util.List getOperations();
+ public abstract void setDefaultDataBinding(java.lang.String);
+ public abstract void resetDataBinding(java.lang.String);
+ public abstract void resetInterfaceInputTypes(org.apache.tuscany.sca.interfacedef.Interface);
+ public abstract void resetInterfaceOutputTypes(org.apache.tuscany.sca.interfacedef.Interface);
+ public abstract boolean isDynamic();
+ public abstract java.util.Map getAttributes();
+ public abstract java.lang.Object clone() throws java.lang.CloneNotSupportedException;
+}
+
+Compiled from "InterfaceContract.java"
+public interface org.apache.tuscany.sca.interfacedef.InterfaceContract extends java.lang.Cloneable{
+ public abstract org.apache.tuscany.sca.interfacedef.Interface getInterface();
+ public abstract void setInterface(org.apache.tuscany.sca.interfacedef.Interface);
+ public abstract org.apache.tuscany.sca.interfacedef.Interface getCallbackInterface();
+ public abstract void setCallbackInterface(org.apache.tuscany.sca.interfacedef.Interface);
+ public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract makeUnidirectional(boolean);
+ public abstract java.lang.Object clone() throws java.lang.CloneNotSupportedException;
+ public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract getNormalizedWSDLContract();
+ public abstract void setNormailizedWSDLContract(org.apache.tuscany.sca.interfacedef.InterfaceContract);
+}
+
+Compiled from "InterfaceContractMapper.java"
+public interface org.apache.tuscany.sca.interfacedef.InterfaceContractMapper{
+ public abstract boolean checkCompatibility(org.apache.tuscany.sca.interfacedef.InterfaceContract, org.apache.tuscany.sca.interfacedef.InterfaceContract, org.apache.tuscany.sca.interfacedef.Compatibility, boolean, boolean) throws org.apache.tuscany.sca.interfacedef.IncompatibleInterfaceContractException;
+ public abstract boolean checkCompatibility(org.apache.tuscany.sca.interfacedef.InterfaceContract, org.apache.tuscany.sca.interfacedef.InterfaceContract, org.apache.tuscany.sca.interfacedef.Compatibility, boolean, boolean, org.apache.tuscany.sca.interfacedef.util.Audit) throws org.apache.tuscany.sca.interfacedef.IncompatibleInterfaceContractException;
+ public abstract boolean isCompatible(org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType, boolean);
+ public abstract boolean isCompatible(org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Compatibility);
+ public abstract boolean isCompatibleByReference(org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Compatibility);
+ public abstract boolean isCompatibleByValue(org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Compatibility);
+ public abstract boolean isCompatibleWithoutUnwrapByValue(org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Compatibility);
+ public abstract boolean isCompatibleSubset(org.apache.tuscany.sca.interfacedef.Interface, org.apache.tuscany.sca.interfacedef.Interface);
+ public abstract boolean isCompatibleSubset(org.apache.tuscany.sca.interfacedef.InterfaceContract, org.apache.tuscany.sca.interfacedef.InterfaceContract);
+ public abstract boolean isCompatibleSubset(org.apache.tuscany.sca.interfacedef.InterfaceContract, org.apache.tuscany.sca.interfacedef.InterfaceContract, org.apache.tuscany.sca.interfacedef.util.Audit);
+ public abstract boolean isMutuallyCompatible(org.apache.tuscany.sca.interfacedef.Interface, org.apache.tuscany.sca.interfacedef.Interface);
+ public abstract boolean isMutuallyCompatible(org.apache.tuscany.sca.interfacedef.InterfaceContract, org.apache.tuscany.sca.interfacedef.InterfaceContract);
+ public abstract org.apache.tuscany.sca.interfacedef.Operation map(org.apache.tuscany.sca.interfacedef.Interface, org.apache.tuscany.sca.interfacedef.Operation);
+}
+
+Compiled from "InvalidAnnotationException.java"
+public class org.apache.tuscany.sca.interfacedef.InvalidAnnotationException extends org.apache.tuscany.sca.interfacedef.InvalidInterfaceException{
+ public org.apache.tuscany.sca.interfacedef.InvalidAnnotationException(java.lang.String, java.lang.Class);
+ public java.lang.Class getAnnotation();
+}
+
+Compiled from "InvalidCallbackException.java"
+public class org.apache.tuscany.sca.interfacedef.InvalidCallbackException extends org.apache.tuscany.sca.interfacedef.InvalidInterfaceException{
+ public org.apache.tuscany.sca.interfacedef.InvalidCallbackException(java.lang.String);
+}
+
+Compiled from "InvalidInterfaceException.java"
+public abstract class org.apache.tuscany.sca.interfacedef.InvalidInterfaceException extends java.lang.Exception{
+ public org.apache.tuscany.sca.interfacedef.InvalidInterfaceException();
+ public org.apache.tuscany.sca.interfacedef.InvalidInterfaceException(java.lang.String);
+ public org.apache.tuscany.sca.interfacedef.InvalidInterfaceException(java.lang.String, java.lang.Throwable);
+ public org.apache.tuscany.sca.interfacedef.InvalidInterfaceException(java.lang.Throwable);
+}
+
+Compiled from "InvalidOperationException.java"
+public class org.apache.tuscany.sca.interfacedef.InvalidOperationException extends org.apache.tuscany.sca.interfacedef.InvalidInterfaceException{
+ public org.apache.tuscany.sca.interfacedef.InvalidOperationException(java.lang.String, java.lang.reflect.Method);
+ public java.lang.reflect.Method getOperation();
+}
+
+Compiled from "Operation.java"
+public interface org.apache.tuscany.sca.interfacedef.Operation extends java.lang.Cloneable,org.apache.tuscany.sca.policy.PolicySubject{
+ public static final java.lang.String IDL_INPUT;
+ public static final java.lang.String IDL_OUTPUT;
+ public static final java.lang.String IDL_FAULT;
+ public abstract java.lang.String getName();
+ public abstract void setName(java.lang.String);
+ public abstract boolean isUnresolved();
+ public abstract void setUnresolved(boolean);
+ public abstract org.apache.tuscany.sca.interfacedef.DataType getInputType();
+ public abstract void setInputType(org.apache.tuscany.sca.interfacedef.DataType);
+ public abstract org.apache.tuscany.sca.interfacedef.DataType getOutputType();
+ public abstract void setOutputType(org.apache.tuscany.sca.interfacedef.DataType);
+ public abstract java.util.List getFaultTypes();
+ public abstract void setFaultTypes(java.util.List);
+ public abstract org.apache.tuscany.sca.interfacedef.Interface getInterface();
+ public abstract void setInterface(org.apache.tuscany.sca.interfacedef.Interface);
+ public abstract boolean isNonBlocking();
+ public abstract boolean isAsyncServer();
+ public abstract void setNonBlocking(boolean);
+ public abstract org.apache.tuscany.sca.interfacedef.util.WrapperInfo getWrapper();
+ public abstract void setWrapper(org.apache.tuscany.sca.interfacedef.util.WrapperInfo);
+ public abstract boolean isWrapperStyle();
+ public abstract void setWrapperStyle(boolean);
+ public abstract java.lang.String getDataBinding();
+ public abstract void setDataBinding(java.lang.String);
+ public abstract boolean isDynamic();
+ public abstract void setDynamic(boolean);
+ public abstract java.util.Map getFaultBeans();
+ public abstract void setFaultBeans(java.util.Map);
+ public abstract java.util.Map getAttributes();
+ public abstract java.lang.Object clone() throws java.lang.CloneNotSupportedException;
+ public abstract java.util.List getParameterModes();
+ public abstract boolean hasArrayWrappedOutput();
+ public abstract void setHasArrayWrappedOutput(boolean);
+ public abstract void setNotSubjectToWrapping(boolean);
+ public abstract boolean isNotSubjectToWrapping();
+}
+
+Compiled from "OverloadedOperationException.java"
+public class org.apache.tuscany.sca.interfacedef.OverloadedOperationException extends org.apache.tuscany.sca.interfacedef.InvalidInterfaceException{
+ public org.apache.tuscany.sca.interfacedef.OverloadedOperationException(java.lang.reflect.Method);
+ public java.lang.reflect.Method getOperation();
+}
+
+Compiled from "ParameterMode.java"
+public final class org.apache.tuscany.sca.interfacedef.ParameterMode extends java.lang.Enum{
+ public static final org.apache.tuscany.sca.interfacedef.ParameterMode IN;
+ public static final org.apache.tuscany.sca.interfacedef.ParameterMode OUT;
+ public static final org.apache.tuscany.sca.interfacedef.ParameterMode INOUT;
+ public static org.apache.tuscany.sca.interfacedef.ParameterMode[] values();
+ public static org.apache.tuscany.sca.interfacedef.ParameterMode valueOf(java.lang.String);
+ static {};
+}
+
+Compiled from "BindingType.java"
+public interface org.apache.tuscany.sca.policy.BindingType extends org.apache.tuscany.sca.policy.ExtensionType{
+}
+
+Compiled from "DefaultPolicyFactory.java"
+public class org.apache.tuscany.sca.policy.DefaultPolicyFactory extends org.apache.tuscany.sca.policy.impl.PolicyFactoryImpl implements org.apache.tuscany.sca.policy.PolicyFactory{
+ public org.apache.tuscany.sca.policy.DefaultPolicyFactory();
+}
+
+Compiled from "ExtensionType.java"
+public interface org.apache.tuscany.sca.policy.ExtensionType{
+ public static final javax.xml.namespace.QName BINDING_BASE;
+ public static final javax.xml.namespace.QName IMPLEMENTATION_BASE;
+ public abstract javax.xml.namespace.QName getType();
+ public abstract void setType(javax.xml.namespace.QName);
+ public abstract javax.xml.namespace.QName getBaseType();
+ public abstract java.util.List getAlwaysProvidedIntents();
+ public abstract java.util.List getMayProvidedIntents();
+ public abstract boolean isUnresolved();
+ public abstract void setUnresolved(boolean);
+ static {};
+}
+
+Compiled from "ExternalAttachment.java"
+public interface org.apache.tuscany.sca.policy.ExternalAttachment{
+ public abstract java.lang.String getAttachTo();
+ public abstract void setAttachTo(java.lang.String);
+ public abstract javax.xml.xpath.XPathExpression getAttachToXPathExpression();
+ public abstract void setAttachToXPathExpression(javax.xml.xpath.XPathExpression);
+ public abstract java.util.List getPolicySets();
+ public abstract java.util.List getIntents();
+ public abstract boolean isUnresolved();
+ public abstract void setUnresolved(boolean);
+}
+
+Compiled from "ImplementationType.java"
+public interface org.apache.tuscany.sca.policy.ImplementationType extends org.apache.tuscany.sca.policy.ExtensionType{
+}
+
+Compiled from "Intent.java"
+public interface org.apache.tuscany.sca.policy.Intent{
+ public abstract javax.xml.namespace.QName getName();
+ public abstract void setName(javax.xml.namespace.QName);
+ public abstract java.util.List getConstrainedTypes();
+ public abstract java.util.List getRequiredIntents();
+ public abstract java.util.List getExcludedIntents();
+ public abstract java.util.List getQualifiedIntents();
+ public abstract org.apache.tuscany.sca.policy.Intent getDefaultQualifiedIntent();
+ public abstract void setDefaultQualifiedIntent(org.apache.tuscany.sca.policy.Intent);
+ public abstract org.apache.tuscany.sca.policy.Intent$Type getType();
+ public abstract void setType(org.apache.tuscany.sca.policy.Intent$Type);
+ public abstract boolean isMutuallyExclusive();
+ public abstract void setMutuallyExclusive(boolean);
+ public abstract java.lang.String getDescription();
+ public abstract void setDescription(java.lang.String);
+ public abstract org.apache.tuscany.sca.policy.Intent getQualifiableIntent();
+ public abstract void setQualifiableIntent(org.apache.tuscany.sca.policy.Intent);
+ public abstract boolean isUnresolved();
+ public abstract void setUnresolved(boolean);
+}
+
+Compiled from "IntentMap.java"
+public interface org.apache.tuscany.sca.policy.IntentMap{
+ public abstract org.apache.tuscany.sca.policy.Intent getProvidedIntent();
+ public abstract void setProvidedIntent(org.apache.tuscany.sca.policy.Intent);
+ public abstract java.util.List getQualifiers();
+}
+
+Compiled from "PolicyAttachment.java"
+public interface org.apache.tuscany.sca.policy.PolicyAttachment{
+ public abstract org.apache.tuscany.sca.policy.PolicySet getPolicySet();
+ public abstract void setPolicySet(org.apache.tuscany.sca.policy.PolicySet);
+ public abstract java.util.List getPolicySubjects();
+}
+
+Compiled from "PolicyContainer.java"
+public interface org.apache.tuscany.sca.policy.PolicyContainer{
+ public abstract java.lang.Object getChildPolicy(java.lang.Class);
+}
+
+Compiled from "PolicyExpression.java"
+public interface org.apache.tuscany.sca.policy.PolicyExpression{
+ public abstract javax.xml.namespace.QName getName();
+ public abstract void setName(javax.xml.namespace.QName);
+ public abstract java.lang.Object getPolicy();
+ public abstract void setPolicy(java.lang.Object);
+ public abstract void setUnresolved(boolean);
+ public abstract boolean isUnresolved();
+}
+
+Compiled from "PolicyFactory.java"
+public interface org.apache.tuscany.sca.policy.PolicyFactory{
+ public abstract org.apache.tuscany.sca.policy.Intent createIntent();
+ public abstract org.apache.tuscany.sca.policy.PolicySet createPolicySet();
+ public abstract org.apache.tuscany.sca.policy.IntentMap createIntentMap();
+ public abstract org.apache.tuscany.sca.policy.Qualifier createQualifier();
+ public abstract org.apache.tuscany.sca.policy.PolicyExpression createPolicyExpression();
+ public abstract org.apache.tuscany.sca.policy.ExtensionType createExtensionType();
+ public abstract org.apache.tuscany.sca.policy.BindingType createBindingType();
+ public abstract org.apache.tuscany.sca.policy.ImplementationType createImplementationType();
+ public abstract org.apache.tuscany.sca.policy.ExternalAttachment createExternalAttachment();
+}
+
+Compiled from "PolicySet.java"
+public interface org.apache.tuscany.sca.policy.PolicySet{
+ public abstract javax.xml.namespace.QName getName();
+ public abstract void setName(javax.xml.namespace.QName);
+ public abstract java.util.List getReferencedPolicySets();
+ public abstract java.util.List getProvidedIntents();
+ public abstract java.util.List getPolicies();
+ public abstract boolean isUnresolved();
+ public abstract void setUnresolved(boolean);
+ public abstract java.lang.String getAppliesTo();
+ public abstract void setAppliesTo(java.lang.String);
+ public abstract java.lang.String getAttachTo();
+ public abstract void setAttachTo(java.lang.String);
+ public abstract javax.xml.xpath.XPathExpression getAttachToXPathExpression();
+ public abstract void setAttachToXPathExpression(javax.xml.xpath.XPathExpression);
+ public abstract java.util.List getIntentMaps();
+ public abstract javax.xml.xpath.XPathExpression getAppliesToXPathExpression();
+ public abstract void setAppliesToXPathExpression(javax.xml.xpath.XPathExpression);
+ public abstract boolean isExternalAttachment();
+ public abstract void setIsExternalAttachment(boolean);
+}
+
+Compiled from "PolicySubject.java"
+public interface org.apache.tuscany.sca.policy.PolicySubject{
+ public abstract java.util.List getRequiredIntents();
+ public abstract java.util.List getPolicySets();
+ public abstract org.apache.tuscany.sca.policy.ExtensionType getExtensionType();
+ public abstract void setExtensionType(org.apache.tuscany.sca.policy.ExtensionType);
+}
+
+Compiled from "Qualifier.java"
+public interface org.apache.tuscany.sca.policy.Qualifier{
+ public abstract org.apache.tuscany.sca.policy.Intent getIntent();
+ public abstract void setIntent(org.apache.tuscany.sca.policy.Intent);
+ public abstract java.util.List getPolicies();
+}
+
+Compiled from "Artifact.java"
+public interface org.apache.tuscany.sca.contribution.Artifact extends org.apache.tuscany.sca.assembly.Base{
+ public abstract java.lang.String getURI();
+ public abstract void setURI(java.lang.String);
+ public abstract java.lang.String getLocation();
+ public abstract void setLocation(java.lang.String);
+ public abstract java.lang.Object getModel();
+ public abstract void setModel(java.lang.Object);
+}
+
+Compiled from "ContentType.java"
+public interface org.apache.tuscany.sca.contribution.ContentType{
+ public static final java.lang.String JAR;
+ public static final java.lang.String FOLDER;
+}
+
+Compiled from "Contribution.java"
+public interface org.apache.tuscany.sca.contribution.Contribution extends org.apache.tuscany.sca.contribution.Artifact,org.apache.tuscany.sca.assembly.Extensible{
+ public static final java.lang.String SCA_CONTRIBUTION_META;
+ public static final java.lang.String SCA_CONTRIBUTION_GENERATED_META;
+ public abstract java.util.List getExports();
+ public abstract java.util.List getImports();
+ public abstract java.util.List getDeployables();
+ public abstract java.util.List getArtifacts();
+ public abstract org.apache.tuscany.sca.contribution.resolver.ModelResolver getModelResolver();
+ public abstract void setModelResolver(org.apache.tuscany.sca.contribution.resolver.ModelResolver);
+ public abstract java.util.List getDependencies();
+ public abstract java.lang.ClassLoader getClassLoader();
+ public abstract void setClassLoader(java.lang.ClassLoader);
+ public abstract java.util.Set getTypes();
+}
+
+Compiled from "ContributionFactory.java"
+public interface org.apache.tuscany.sca.contribution.ContributionFactory{
+ public abstract org.apache.tuscany.sca.contribution.Contribution createContribution();
+ public abstract org.apache.tuscany.sca.contribution.ContributionMetadata createContributionMetadata();
+ public abstract org.apache.tuscany.sca.contribution.Artifact createArtifact();
+ public abstract org.apache.tuscany.sca.contribution.DefaultImport createDefaultImport();
+ public abstract org.apache.tuscany.sca.contribution.DefaultExport createDefaultExport();
+}
+
+Compiled from "ContributionMetadata.java"
+public interface org.apache.tuscany.sca.contribution.ContributionMetadata extends org.apache.tuscany.sca.assembly.Base,org.apache.tuscany.sca.assembly.Extensible{
+ public abstract java.lang.String getSpecVersion();
+ public abstract void setSpecVersion(java.lang.String);
+ public abstract java.util.List getExports();
+ public abstract java.util.List getImports();
+ public abstract java.util.List getDeployables();
+}
+
+Compiled from "DefaultContributionFactory.java"
+public class org.apache.tuscany.sca.contribution.DefaultContributionFactory extends org.apache.tuscany.sca.contribution.impl.ContributionFactoryImpl{
+ public org.apache.tuscany.sca.contribution.DefaultContributionFactory();
+}
+
+Compiled from "DefaultExport.java"
+public interface org.apache.tuscany.sca.contribution.DefaultExport extends org.apache.tuscany.sca.contribution.Export{
+}
+
+Compiled from "DefaultImport.java"
+public interface org.apache.tuscany.sca.contribution.DefaultImport extends org.apache.tuscany.sca.contribution.Import{
+}
+
+Compiled from "Export.java"
+public interface org.apache.tuscany.sca.contribution.Export extends org.apache.tuscany.sca.assembly.Extensible{
+ public abstract org.apache.tuscany.sca.contribution.resolver.ModelResolver getModelResolver();
+ public abstract void setModelResolver(org.apache.tuscany.sca.contribution.resolver.ModelResolver);
+}
+
+Compiled from "Import.java"
+public interface org.apache.tuscany.sca.contribution.Import extends org.apache.tuscany.sca.assembly.Extensible{
+ public abstract org.apache.tuscany.sca.contribution.resolver.ModelResolver getModelResolver();
+ public abstract void setModelResolver(org.apache.tuscany.sca.contribution.resolver.ModelResolver);
+ public abstract boolean match(org.apache.tuscany.sca.contribution.Export);
+}
+
+Compiled from "PackageType.java"
+public interface org.apache.tuscany.sca.contribution.PackageType{
+ public static final java.lang.String JAR;
+ public static final java.lang.String ZIP;
+ public static final java.lang.String FOLDER;
+ public static final java.lang.String BUNDLE;
+ public static final java.lang.String WAR;
+ public static final java.lang.String EAR;
+}
+
+Compiled from "ArtifactProcessor.java"
+public interface org.apache.tuscany.sca.contribution.processor.ArtifactProcessor{
+ public abstract void resolve(java.lang.Object, org.apache.tuscany.sca.contribution.resolver.ModelResolver, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionResolveException;
+ public abstract java.lang.Class getModelType();
+}
+
+Compiled from "BaseStAXArtifactProcessor.java"
+public abstract class org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor extends java.lang.Object{
+ public org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor();
+ protected javax.xml.namespace.QName getQNameValue(javax.xml.stream.XMLStreamReader, java.lang.String);
+ protected boolean getBoolean(javax.xml.stream.XMLStreamReader, java.lang.String);
+ protected javax.xml.namespace.QName getQName(javax.xml.stream.XMLStreamReader, java.lang.String);
+ protected java.util.List getQNames(javax.xml.stream.XMLStreamReader, java.lang.String);
+ protected java.lang.String getString(javax.xml.stream.XMLStreamReader, java.lang.String);
+ protected java.lang.String getURIString(javax.xml.stream.XMLStreamReader, java.lang.String);
+ protected boolean isSet(javax.xml.stream.XMLStreamReader, java.lang.String);
+ protected javax.xml.namespace.QName getXSIType(javax.xml.stream.XMLStreamReader);
+ protected boolean nextChildElement(javax.xml.stream.XMLStreamReader) throws javax.xml.stream.XMLStreamException;
+ protected void skipToEndElement(javax.xml.stream.XMLStreamReader) throws javax.xml.stream.XMLStreamException;
+ protected void writeStart(javax.xml.stream.XMLStreamWriter, java.lang.String, java.lang.String, org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor$XAttr[]) throws javax.xml.stream.XMLStreamException;
+ protected void writeStart(javax.xml.stream.XMLStreamWriter, javax.xml.namespace.QName, org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor$XAttr[]) throws javax.xml.stream.XMLStreamException;
+ protected void writeEnd(javax.xml.stream.XMLStreamWriter) throws javax.xml.stream.XMLStreamException;
+ protected void writeStartDocument(javax.xml.stream.XMLStreamWriter, java.lang.String, java.lang.String, org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor$XAttr[]) throws javax.xml.stream.XMLStreamException;
+ protected void writeStartDocument(javax.xml.stream.XMLStreamWriter, javax.xml.namespace.QName, org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor$XAttr[]) throws javax.xml.stream.XMLStreamException;
+ protected void writeEndDocument(javax.xml.stream.XMLStreamWriter) throws javax.xml.stream.XMLStreamException;
+ protected void writeAttributes(javax.xml.stream.XMLStreamWriter, org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor$XAttr[]) throws javax.xml.stream.XMLStreamException;
+ protected void readExtendedAttributes(javax.xml.stream.XMLStreamReader, org.apache.tuscany.sca.assembly.Extensible, org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor, org.apache.tuscany.sca.assembly.AssemblyFactory, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException, javax.xml.stream.XMLStreamException;
+ protected void writeExtendedAttributes(javax.xml.stream.XMLStreamWriter, org.apache.tuscany.sca.assembly.Extensible, org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionWriteException, javax.xml.stream.XMLStreamException;
+ protected void readExtendedElement(javax.xml.stream.XMLStreamReader, org.apache.tuscany.sca.assembly.Extensible, org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException, javax.xml.stream.XMLStreamException;
+ protected void writeExtendedElements(javax.xml.stream.XMLStreamWriter, org.apache.tuscany.sca.assembly.Extensible, org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionWriteException, javax.xml.stream.XMLStreamException;
+ static org.apache.tuscany.sca.common.xml.stax.StAXHelper access$000();
+ static {};
+}
+
+Compiled from "ContributionException.java"
+public class org.apache.tuscany.sca.contribution.processor.ContributionException extends java.lang.Exception{
+ protected org.apache.tuscany.sca.contribution.processor.ContributionException();
+ protected org.apache.tuscany.sca.contribution.processor.ContributionException(java.lang.String);
+ protected org.apache.tuscany.sca.contribution.processor.ContributionException(java.lang.String, java.lang.Throwable);
+ public org.apache.tuscany.sca.contribution.processor.ContributionException(java.lang.Throwable);
+}
+
+Compiled from "ContributionReadException.java"
+public class org.apache.tuscany.sca.contribution.processor.ContributionReadException extends org.apache.tuscany.sca.contribution.processor.ContributionException{
+ public static final int UNDEFINED;
+ public org.apache.tuscany.sca.contribution.processor.ContributionReadException(java.lang.String);
+ public org.apache.tuscany.sca.contribution.processor.ContributionReadException(java.lang.String, java.lang.Throwable);
+ public org.apache.tuscany.sca.contribution.processor.ContributionReadException(java.lang.Throwable);
+ public java.lang.String getResourceURI();
+ public void setResourceURI(java.lang.String);
+ public int getLine();
+ public void setLine(int);
+ public int getColumn();
+ public void setColumn(int);
+}
+
+Compiled from "ContributionResolveException.java"
+public class org.apache.tuscany.sca.contribution.processor.ContributionResolveException extends org.apache.tuscany.sca.contribution.processor.ContributionException{
+ public org.apache.tuscany.sca.contribution.processor.ContributionResolveException(java.lang.String);
+ public org.apache.tuscany.sca.contribution.processor.ContributionResolveException(java.lang.String, java.lang.Throwable);
+ public org.apache.tuscany.sca.contribution.processor.ContributionResolveException(java.lang.Throwable);
+}
+
+Compiled from "ContributionRuntimeException.java"
+public class org.apache.tuscany.sca.contribution.processor.ContributionRuntimeException extends java.lang.RuntimeException{
+ protected org.apache.tuscany.sca.contribution.processor.ContributionRuntimeException();
+ protected org.apache.tuscany.sca.contribution.processor.ContributionRuntimeException(java.lang.String);
+ protected org.apache.tuscany.sca.contribution.processor.ContributionRuntimeException(java.lang.String, java.lang.Throwable);
+ public org.apache.tuscany.sca.contribution.processor.ContributionRuntimeException(java.lang.Throwable);
+}
+
+Compiled from "ContributionWriteException.java"
+public class org.apache.tuscany.sca.contribution.processor.ContributionWriteException extends org.apache.tuscany.sca.contribution.processor.ContributionException{
+ public org.apache.tuscany.sca.contribution.processor.ContributionWriteException(java.lang.String);
+ public org.apache.tuscany.sca.contribution.processor.ContributionWriteException(java.lang.String, java.lang.Throwable);
+ public org.apache.tuscany.sca.contribution.processor.ContributionWriteException(java.lang.Throwable);
+ public java.lang.String getResourceURI();
+ public void setResourceURI(java.lang.String);
+}
+
+Compiled from "DefaultArtifactProcessorExtensionPoint.java"
+abstract class org.apache.tuscany.sca.contribution.processor.DefaultArtifactProcessorExtensionPoint extends java.lang.Object{
+ protected final java.util.Map processorsByArtifactType;
+ protected final java.util.Map processorsByModelType;
+ org.apache.tuscany.sca.contribution.processor.DefaultArtifactProcessorExtensionPoint();
+ public org.apache.tuscany.sca.contribution.processor.ArtifactProcessor getProcessor(java.lang.Object);
+ public org.apache.tuscany.sca.contribution.processor.ArtifactProcessor getProcessor(java.lang.Class);
+}
+
+Compiled from "DefaultStAXArtifactProcessorExtensionPoint.java"
+public class org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint extends org.apache.tuscany.sca.contribution.processor.DefaultArtifactProcessorExtensionPoint implements org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint{
+ public org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public void addArtifactProcessor(org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor);
+ public void removeArtifactProcessor(org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor);
+ public org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor getProcessor(java.lang.Class);
+ public org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor getProcessor(java.lang.Object);
+ public org.apache.tuscany.sca.contribution.processor.ArtifactProcessor getProcessor(java.lang.Class);
+ public org.apache.tuscany.sca.contribution.processor.ArtifactProcessor getProcessor(java.lang.Object);
+}
+
+Compiled from "DefaultStAXAttributeProcessorExtensionPoint.java"
+public class org.apache.tuscany.sca.contribution.processor.DefaultStAXAttributeProcessorExtensionPoint extends org.apache.tuscany.sca.contribution.processor.DefaultArtifactProcessorExtensionPoint implements org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessorExtensionPoint{
+ public org.apache.tuscany.sca.contribution.processor.DefaultStAXAttributeProcessorExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public void addArtifactProcessor(org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor);
+ public void removeArtifactProcessor(org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor);
+ public org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor getProcessor(java.lang.Class);
+ public org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor getProcessor(java.lang.Object);
+ public org.apache.tuscany.sca.contribution.processor.ArtifactProcessor getProcessor(java.lang.Class);
+ public org.apache.tuscany.sca.contribution.processor.ArtifactProcessor getProcessor(java.lang.Object);
+}
+
+Compiled from "DefaultURLArtifactProcessorExtensionPoint.java"
+public class org.apache.tuscany.sca.contribution.processor.DefaultURLArtifactProcessorExtensionPoint extends org.apache.tuscany.sca.contribution.processor.DefaultArtifactProcessorExtensionPoint implements org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint{
+ public org.apache.tuscany.sca.contribution.processor.DefaultURLArtifactProcessorExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public void addArtifactProcessor(org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor);
+ public void removeArtifactProcessor(org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor);
+ public org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor getProcessor(java.lang.Class);
+ public java.util.Collection getProcessors(java.lang.Object);
+ public org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor getProcessor(java.lang.Object);
+ public org.apache.tuscany.sca.contribution.processor.ArtifactProcessor getProcessor(java.lang.Class);
+ public org.apache.tuscany.sca.contribution.processor.ArtifactProcessor getProcessor(java.lang.Object);
+}
+
+Compiled from "DefaultValidatingXMLInputFactory.java"
+public class org.apache.tuscany.sca.contribution.processor.DefaultValidatingXMLInputFactory extends org.apache.tuscany.sca.contribution.processor.ValidatingXMLInputFactory implements org.w3c.dom.ls.LSResourceResolver{
+ public static final javax.xml.namespace.QName XSD;
+ public org.apache.tuscany.sca.contribution.processor.DefaultValidatingXMLInputFactory(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public org.apache.tuscany.sca.contribution.processor.DefaultValidatingXMLInputFactory(javax.xml.stream.XMLInputFactory, org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint);
+ public javax.xml.stream.XMLEventReader createFilteredReader(javax.xml.stream.XMLEventReader, javax.xml.stream.EventFilter) throws javax.xml.stream.XMLStreamException;
+ public javax.xml.stream.XMLStreamReader createFilteredReader(javax.xml.stream.XMLStreamReader, javax.xml.stream.StreamFilter) throws javax.xml.stream.XMLStreamException;
+ public javax.xml.stream.XMLEventReader createXMLEventReader(java.io.InputStream, java.lang.String) throws javax.xml.stream.XMLStreamException;
+ public javax.xml.stream.XMLEventReader createXMLEventReader(java.io.InputStream) throws javax.xml.stream.XMLStreamException;
+ public javax.xml.stream.XMLEventReader createXMLEventReader(java.io.Reader) throws javax.xml.stream.XMLStreamException;
+ public javax.xml.stream.XMLEventReader createXMLEventReader(javax.xml.transform.Source) throws javax.xml.stream.XMLStreamException;
+ public javax.xml.stream.XMLEventReader createXMLEventReader(java.lang.String, java.io.InputStream) throws javax.xml.stream.XMLStreamException;
+ public javax.xml.stream.XMLEventReader createXMLEventReader(java.lang.String, java.io.Reader) throws javax.xml.stream.XMLStreamException;
+ public javax.xml.stream.XMLEventReader createXMLEventReader(javax.xml.stream.XMLStreamReader) throws javax.xml.stream.XMLStreamException;
+ public javax.xml.stream.XMLStreamReader createXMLStreamReader(java.io.InputStream, java.lang.String) throws javax.xml.stream.XMLStreamException;
+ public javax.xml.stream.XMLStreamReader createXMLStreamReader(java.io.InputStream) throws javax.xml.stream.XMLStreamException;
+ public javax.xml.stream.XMLStreamReader createXMLStreamReader(java.io.Reader) throws javax.xml.stream.XMLStreamException;
+ public javax.xml.stream.XMLStreamReader createXMLStreamReader(javax.xml.transform.Source) throws javax.xml.stream.XMLStreamException;
+ public javax.xml.stream.XMLStreamReader createXMLStreamReader(java.lang.String, java.io.InputStream) throws javax.xml.stream.XMLStreamException;
+ public javax.xml.stream.XMLStreamReader createXMLStreamReader(java.lang.String, java.io.Reader) throws javax.xml.stream.XMLStreamException;
+ public javax.xml.stream.util.XMLEventAllocator getEventAllocator();
+ public java.lang.Object getProperty(java.lang.String) throws java.lang.IllegalArgumentException;
+ public javax.xml.stream.XMLReporter getXMLReporter();
+ public javax.xml.stream.XMLResolver getXMLResolver();
+ public boolean isPropertySupported(java.lang.String);
+ public void setEventAllocator(javax.xml.stream.util.XMLEventAllocator);
+ public void setProperty(java.lang.String, java.lang.Object) throws java.lang.IllegalArgumentException;
+ public void setXMLReporter(javax.xml.stream.XMLReporter);
+ public void setXMLResolver(javax.xml.stream.XMLResolver);
+ public org.w3c.dom.ls.LSInput resolveResource(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String);
+ static {};
+}
+
+Compiled from "DefaultValidationSchemaExtensionPoint.java"
+public class org.apache.tuscany.sca.contribution.processor.DefaultValidationSchemaExtensionPoint extends java.lang.Object implements org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint{
+ public org.apache.tuscany.sca.contribution.processor.DefaultValidationSchemaExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry, java.util.Map);
+ public void addSchema(java.lang.String);
+ public void removeSchema(java.lang.String);
+ public java.util.List getSchemas();
+ public boolean isEnabled();
+ public void setEnabled(boolean);
+}
+
+Compiled from "ExtendedArtifactProcessor.java"
+public interface org.apache.tuscany.sca.contribution.processor.ExtendedArtifactProcessor extends org.apache.tuscany.sca.contribution.processor.ArtifactProcessor{
+ public abstract void preResolve(java.lang.Object, org.apache.tuscany.sca.contribution.resolver.ModelResolver, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionResolveException;
+}
+
+Compiled from "ExtendedURLArtifactProcessor.java"
+public interface org.apache.tuscany.sca.contribution.processor.ExtendedURLArtifactProcessor extends org.apache.tuscany.sca.contribution.processor.ExtendedArtifactProcessor,org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor{
+}
+
+Compiled from "ExtensibleStAXArtifactProcessor.java"
+public class org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor extends java.lang.Object implements org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor{
+ public static final javax.xml.namespace.QName ANY_ELEMENT;
+ public org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor(org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint, javax.xml.stream.XMLInputFactory, javax.xml.stream.XMLOutputFactory);
+ public org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public java.lang.Object read(javax.xml.stream.XMLStreamReader, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException, javax.xml.stream.XMLStreamException;
+ public void write(java.lang.Object, javax.xml.stream.XMLStreamWriter, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionWriteException, javax.xml.stream.XMLStreamException;
+ public void resolve(java.lang.Object, org.apache.tuscany.sca.contribution.resolver.ModelResolver, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionResolveException;
+ public java.lang.Object read(java.io.InputStream, java.lang.Class, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException;
+ public void write(java.lang.Object, java.io.OutputStream, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionWriteException;
+ public javax.xml.namespace.QName getArtifactType();
+ public java.lang.Class getModelType();
+ static {};
+}
+
+Compiled from "ExtensibleStAXAttributeProcessor.java"
+public class org.apache.tuscany.sca.contribution.processor.ExtensibleStAXAttributeProcessor extends java.lang.Object implements org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor{
+ public static final javax.xml.namespace.QName ANY_ATTRIBUTE;
+ public org.apache.tuscany.sca.contribution.processor.ExtensibleStAXAttributeProcessor(org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessorExtensionPoint, javax.xml.stream.XMLInputFactory, javax.xml.stream.XMLOutputFactory);
+ public java.lang.Object read(javax.xml.namespace.QName, javax.xml.stream.XMLStreamReader, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException, javax.xml.stream.XMLStreamException;
+ public void write(java.lang.Object, javax.xml.stream.XMLStreamWriter, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionWriteException, javax.xml.stream.XMLStreamException;
+ public void resolve(java.lang.Object, org.apache.tuscany.sca.contribution.resolver.ModelResolver, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionResolveException;
+ public java.lang.Object read(java.io.InputStream, java.lang.Class) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException;
+ public void write(java.lang.Object, java.io.OutputStream, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionWriteException;
+ public javax.xml.namespace.QName getArtifactType();
+ public java.lang.Class getModelType();
+ static {};
+}
+
+Compiled from "ExtensibleURLArtifactProcessor.java"
+public class org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor extends java.lang.Object implements org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor{
+ public org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor(org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint);
+ public java.lang.Object read(java.net.URL, java.net.URI, java.net.URL, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException;
+ public void resolve(java.lang.Object, org.apache.tuscany.sca.contribution.resolver.ModelResolver, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionResolveException;
+ public java.lang.Object read(java.net.URL, java.net.URI, java.net.URL, org.apache.tuscany.sca.contribution.processor.ProcessorContext, java.lang.Class) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException;
+ public java.lang.String getArtifactType();
+ public java.lang.Class getModelType();
+}
+
+Compiled from "ProcessorContext.java"
+public class org.apache.tuscany.sca.contribution.processor.ProcessorContext extends java.lang.Object{
+ protected org.apache.tuscany.sca.contribution.Contribution contribution;
+ protected org.apache.tuscany.sca.contribution.Artifact artifact;
+ protected org.apache.tuscany.sca.monitor.Monitor monitor;
+ protected java.lang.Object parentModel;
+ public org.apache.tuscany.sca.contribution.processor.ProcessorContext(org.apache.tuscany.sca.contribution.Contribution, org.apache.tuscany.sca.monitor.Monitor);
+ public org.apache.tuscany.sca.contribution.processor.ProcessorContext(org.apache.tuscany.sca.monitor.Monitor);
+ public org.apache.tuscany.sca.contribution.processor.ProcessorContext(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public org.apache.tuscany.sca.contribution.processor.ProcessorContext();
+ public org.apache.tuscany.sca.contribution.Contribution getContribution();
+ public org.apache.tuscany.sca.contribution.Contribution setContribution(org.apache.tuscany.sca.contribution.Contribution);
+ public org.apache.tuscany.sca.monitor.Monitor getMonitor();
+ public org.apache.tuscany.sca.monitor.Monitor setMonitor(org.apache.tuscany.sca.monitor.Monitor);
+ public java.lang.Object getParentModel();
+ public java.lang.Object setParentModel(java.lang.Object);
+ public org.apache.tuscany.sca.contribution.Artifact getArtifact();
+ public org.apache.tuscany.sca.contribution.Artifact setArtifact(org.apache.tuscany.sca.contribution.Artifact);
+}
+
+Compiled from "StAXArtifactProcessor.java"
+public interface org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor extends org.apache.tuscany.sca.contribution.processor.ArtifactProcessor{
+ public abstract java.lang.Object read(javax.xml.stream.XMLStreamReader, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException, javax.xml.stream.XMLStreamException;
+ public abstract void write(java.lang.Object, javax.xml.stream.XMLStreamWriter, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionWriteException, javax.xml.stream.XMLStreamException;
+ public abstract javax.xml.namespace.QName getArtifactType();
+}
+
+Compiled from "StAXArtifactProcessorExtensionPoint.java"
+public interface org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint{
+ public abstract void addArtifactProcessor(org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor);
+ public abstract void removeArtifactProcessor(org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor);
+ public abstract org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor getProcessor(java.lang.Object);
+ public abstract org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor getProcessor(java.lang.Class);
+}
+
+Compiled from "StAXAttributeProcessor.java"
+public interface org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor extends org.apache.tuscany.sca.contribution.processor.ArtifactProcessor{
+ public abstract java.lang.Object read(javax.xml.namespace.QName, javax.xml.stream.XMLStreamReader, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException, javax.xml.stream.XMLStreamException;
+ public abstract void write(java.lang.Object, javax.xml.stream.XMLStreamWriter, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionWriteException, javax.xml.stream.XMLStreamException;
+ public abstract javax.xml.namespace.QName getArtifactType();
+}
+
+Compiled from "StAXAttributeProcessorExtensionPoint.java"
+public interface org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessorExtensionPoint{
+ public abstract void addArtifactProcessor(org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor);
+ public abstract void removeArtifactProcessor(org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor);
+ public abstract org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor getProcessor(java.lang.Object);
+ public abstract org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor getProcessor(java.lang.Class);
+}
+
+Compiled from "URLArtifactProcessor.java"
+public interface org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor extends org.apache.tuscany.sca.contribution.processor.ArtifactProcessor{
+ public abstract java.lang.Object read(java.net.URL, java.net.URI, java.net.URL, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException;
+ public abstract java.lang.String getArtifactType();
+}
+
+Compiled from "URLArtifactProcessorExtensionPoint.java"
+public interface org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint{
+ public abstract void addArtifactProcessor(org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor);
+ public abstract void removeArtifactProcessor(org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor);
+ public abstract org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor getProcessor(java.lang.Object);
+ public abstract org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor getProcessor(java.lang.Class);
+ public abstract java.util.Collection getProcessors(java.lang.Object);
+}
+
+Compiled from "UnrecognizedElementException.java"
+public class org.apache.tuscany.sca.contribution.processor.UnrecognizedElementException extends org.apache.tuscany.sca.contribution.processor.ContributionReadException{
+ public org.apache.tuscany.sca.contribution.processor.UnrecognizedElementException(javax.xml.namespace.QName);
+ public javax.xml.namespace.QName getElement();
+}
+
+Compiled from "UnsupportedContentTypeException.java"
+public class org.apache.tuscany.sca.contribution.processor.UnsupportedContentTypeException extends org.apache.tuscany.sca.contribution.processor.ContributionException{
+ public org.apache.tuscany.sca.contribution.processor.UnsupportedContentTypeException(java.lang.String);
+}
+
+Compiled from "UnsupportedPackageTypeException.java"
+public class org.apache.tuscany.sca.contribution.processor.UnsupportedPackageTypeException extends org.apache.tuscany.sca.contribution.processor.ContributionException{
+ public org.apache.tuscany.sca.contribution.processor.UnsupportedPackageTypeException(java.lang.String);
+}
+
+Compiled from "ValidatingXMLInputFactory.java"
+public abstract class org.apache.tuscany.sca.contribution.processor.ValidatingXMLInputFactory extends javax.xml.stream.XMLInputFactory{
+ public org.apache.tuscany.sca.contribution.processor.ValidatingXMLInputFactory();
+ public static void setMonitor(javax.xml.stream.XMLStreamReader, org.apache.tuscany.sca.monitor.Monitor);
+}
+
+Compiled from "ValidatingXMLStreamReader.java"
+class org.apache.tuscany.sca.contribution.processor.ValidatingXMLStreamReader extends javax.xml.stream.util.StreamReaderDelegate implements javax.xml.stream.XMLStreamReader{
+ org.apache.tuscany.sca.contribution.processor.ValidatingXMLStreamReader(javax.xml.stream.XMLStreamReader, javax.xml.validation.Schema, org.apache.tuscany.sca.monitor.Monitor) throws javax.xml.stream.XMLStreamException;
+ void setMonitor(org.apache.tuscany.sca.monitor.Monitor);
+ public int next() throws javax.xml.stream.XMLStreamException;
+ public int nextTag() throws javax.xml.stream.XMLStreamException;
+ public java.lang.String getElementText() throws javax.xml.stream.XMLStreamException;
+ public javax.xml.namespace.NamespaceContext getNamespaceContext();
+ static org.apache.tuscany.sca.monitor.Monitor access$100(org.apache.tuscany.sca.contribution.processor.ValidatingXMLStreamReader);
+ static java.util.logging.Logger access$200();
+ static void access$300(org.apache.tuscany.sca.contribution.processor.ValidatingXMLStreamReader, java.lang.String, java.lang.Object, java.lang.Object[]);
+ static void access$400(org.apache.tuscany.sca.contribution.processor.ValidatingXMLStreamReader, java.lang.String, java.lang.Object, java.lang.Object[]);
+ static {};
+}
+
+Compiled from "ValidationSchemaExtensionPoint.java"
+public interface org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint{
+ public abstract void setEnabled(boolean);
+ public abstract boolean isEnabled();
+ public abstract void addSchema(java.lang.String);
+ public abstract void removeSchema(java.lang.String);
+ public abstract java.util.List getSchemas();
+}
+
+Compiled from "ClassReference.java"
+public class org.apache.tuscany.sca.contribution.resolver.ClassReference extends java.lang.Object implements org.apache.tuscany.sca.assembly.Base{
+ public org.apache.tuscany.sca.contribution.resolver.ClassReference(java.lang.Class);
+ public org.apache.tuscany.sca.contribution.resolver.ClassReference(java.lang.String);
+ public java.lang.Class getJavaClass();
+ public java.lang.String getClassName();
+ public boolean isUnresolved();
+ public void setUnresolved(boolean);
+ public int hashCode();
+ public boolean equals(java.lang.Object);
+ public org.apache.tuscany.sca.contribution.Contribution getContributionContainingClass();
+ public void setContributionContainingClass(org.apache.tuscany.sca.contribution.Contribution);
+}
+
+Compiled from "DefaultDelegatingModelResolver.java"
+public class org.apache.tuscany.sca.contribution.resolver.DefaultDelegatingModelResolver extends java.lang.Object implements org.apache.tuscany.sca.contribution.resolver.ModelResolver{
+ public org.apache.tuscany.sca.contribution.resolver.DefaultDelegatingModelResolver(java.util.List);
+ public void addModel(java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext);
+ public java.lang.Object removeModel(java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext);
+ public java.lang.Object resolveModel(java.lang.Class, java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext);
+}
+
+Compiled from "DefaultImportAllModelResolver.java"
+public class org.apache.tuscany.sca.contribution.resolver.DefaultImportAllModelResolver extends java.lang.Object implements org.apache.tuscany.sca.contribution.resolver.ModelResolver{
+ public org.apache.tuscany.sca.contribution.resolver.DefaultImportAllModelResolver(org.apache.tuscany.sca.contribution.Import, java.util.List);
+ public void addModel(java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext);
+ public java.lang.Object removeModel(java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext);
+ public java.lang.Object resolveModel(java.lang.Class, java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext);
+}
+
+Compiled from "DefaultImportModelResolver.java"
+public class org.apache.tuscany.sca.contribution.resolver.DefaultImportModelResolver extends java.lang.Object implements org.apache.tuscany.sca.contribution.resolver.ModelResolver{
+ public org.apache.tuscany.sca.contribution.resolver.DefaultImportModelResolver(java.util.List);
+ public void addModel(java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext);
+ public java.lang.Object removeModel(java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext);
+ public java.lang.Object resolveModel(java.lang.Class, java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext);
+}
+
+Compiled from "DefaultModelResolver.java"
+public class org.apache.tuscany.sca.contribution.resolver.DefaultModelResolver extends java.lang.Object implements org.apache.tuscany.sca.contribution.resolver.ModelResolver{
+ public org.apache.tuscany.sca.contribution.resolver.DefaultModelResolver();
+ public org.apache.tuscany.sca.contribution.resolver.DefaultModelResolver(org.apache.tuscany.sca.contribution.Contribution, org.apache.tuscany.sca.core.FactoryExtensionPoint);
+ public java.lang.Object resolveModel(java.lang.Class, java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext);
+ public void addModel(java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext);
+ public java.lang.Object removeModel(java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext);
+ public java.util.Map getModels();
+}
+
+Compiled from "DefaultModelResolverExtensionPoint.java"
+public class org.apache.tuscany.sca.contribution.resolver.DefaultModelResolverExtensionPoint extends java.lang.Object implements org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint{
+ public org.apache.tuscany.sca.contribution.resolver.DefaultModelResolverExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public void addResolver(java.lang.Class, java.lang.Class);
+ public void removeResolver(java.lang.Class);
+ public java.lang.Class getResolver(java.lang.Class);
+}
+
+Compiled from "ExtensibleModelResolver.java"
+public class org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver extends java.lang.Object implements org.apache.tuscany.sca.contribution.resolver.ModelResolver{
+ public org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver(org.apache.tuscany.sca.contribution.Contribution, org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint, org.apache.tuscany.sca.core.FactoryExtensionPoint);
+ public void addModel(java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext);
+ public java.lang.Object removeModel(java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext);
+ public java.lang.Object resolveModel(java.lang.Class, java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext);
+ public org.apache.tuscany.sca.contribution.resolver.ModelResolver getDefaultModelResolver();
+}
+
+Compiled from "ModelResolver.java"
+public interface org.apache.tuscany.sca.contribution.resolver.ModelResolver{
+ public abstract java.lang.Object resolveModel(java.lang.Class, java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext);
+ public abstract void addModel(java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext);
+ public abstract java.lang.Object removeModel(java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext);
+}
+
+Compiled from "ModelResolverExtensionPoint.java"
+public interface org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint{
+ public abstract void addResolver(java.lang.Class, java.lang.Class);
+ public abstract void removeResolver(java.lang.Class);
+ public abstract java.lang.Class getResolver(java.lang.Class);
+}
+
+Compiled from "ResolverExtension.java"
+public interface org.apache.tuscany.sca.contribution.resolver.ResolverExtension{
+ public abstract org.apache.tuscany.sca.contribution.resolver.ModelResolver getModelResolver();
+ public abstract void setModelResolver(org.apache.tuscany.sca.contribution.resolver.ModelResolver);
+}
+
+Compiled from "ResourceReference.java"
+public class org.apache.tuscany.sca.contribution.resolver.ResourceReference extends java.lang.Object{
+ public org.apache.tuscany.sca.contribution.resolver.ResourceReference(java.lang.String, java.net.URL);
+ public org.apache.tuscany.sca.contribution.resolver.ResourceReference(java.lang.String);
+ public java.net.URL getResource();
+ public java.lang.String getResourceName();
+ public boolean isUnresolved();
+ public int hashCode();
+ public boolean equals(java.lang.Object);
+}
+
+Compiled from "ComponentContextFactory.java"
+public interface org.apache.tuscany.sca.context.ComponentContextFactory{
+ public abstract org.oasisopen.sca.ComponentContext createComponentContext(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeComponent);
+}
+
+Compiled from "CompositeContext.java"
+public class org.apache.tuscany.sca.context.CompositeContext extends java.lang.Object{
+ protected org.apache.tuscany.sca.core.ExtensionPointRegistry extensionPointRegistry;
+ protected org.apache.tuscany.sca.runtime.EndpointRegistry endpointRegistry;
+ protected org.apache.tuscany.sca.context.ComponentContextFactory componentContextFactory;
+ protected org.apache.tuscany.sca.assembly.Composite domainComposite;
+ protected java.lang.String nodeURI;
+ protected java.lang.String domainURI;
+ protected org.apache.tuscany.sca.definitions.Definitions systemDefinitions;
+ protected java.util.Map attributes;
+ public org.apache.tuscany.sca.context.CompositeContext(org.apache.tuscany.sca.core.ExtensionPointRegistry, org.apache.tuscany.sca.runtime.EndpointRegistry, org.apache.tuscany.sca.assembly.Composite, java.lang.String, java.lang.String, org.apache.tuscany.sca.definitions.Definitions);
+ public org.apache.tuscany.sca.context.CompositeContext(org.apache.tuscany.sca.core.ExtensionPointRegistry, org.apache.tuscany.sca.runtime.EndpointRegistry);
+ public static org.apache.tuscany.sca.runtime.RuntimeComponent getCurrentComponent();
+ public static org.apache.tuscany.sca.context.CompositeContext getCurrentCompositeContext();
+ public void bindComponent(org.apache.tuscany.sca.runtime.RuntimeComponent);
+ public void bindEndpointReference(org.apache.tuscany.sca.assembly.EndpointReference);
+ public org.apache.tuscany.sca.core.ExtensionPointRegistry getExtensionPointRegistry();
+ public org.apache.tuscany.sca.runtime.EndpointRegistry getEndpointRegistry();
+ public org.apache.tuscany.sca.assembly.Composite getDomainComposite();
+ public java.lang.String getNodeURI();
+ public java.lang.String getDomainURI();
+ public org.apache.tuscany.sca.definitions.Definitions getSystemDefinitions();
+ public java.lang.Object getAttribute(java.lang.String);
+ public void setAttribute(java.lang.String, java.lang.Object);
+ public java.util.Map getAttributes();
+}
+
+Compiled from "ContextFactoryExtensionPoint.java"
+public interface org.apache.tuscany.sca.context.ContextFactoryExtensionPoint{
+ public abstract void addFactory(java.lang.Object);
+ public abstract void removeFactory(java.lang.Object);
+ public abstract java.lang.Object getFactory(java.lang.Class);
+}
+
+Compiled from "DefaultContextFactoryExtensionPoint.java"
+public class org.apache.tuscany.sca.context.DefaultContextFactoryExtensionPoint extends java.lang.Object implements org.apache.tuscany.sca.context.ContextFactoryExtensionPoint{
+ public org.apache.tuscany.sca.context.DefaultContextFactoryExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public void addFactory(java.lang.Object) throws java.lang.IllegalArgumentException;
+ public void removeFactory(java.lang.Object) throws java.lang.IllegalArgumentException;
+ public java.lang.Object getFactory(java.lang.Class) throws java.lang.IllegalArgumentException;
+}
+
+Compiled from "PropertyValueFactory.java"
+public interface org.apache.tuscany.sca.context.PropertyValueFactory{
+ public abstract java.lang.Object createPropertyValue(org.apache.tuscany.sca.assembly.ComponentProperty, java.lang.Class);
+}
+
+Compiled from "RequestContextFactory.java"
+public interface org.apache.tuscany.sca.context.RequestContextFactory{
+ public abstract org.oasisopen.sca.RequestContext createRequestContext(org.apache.tuscany.sca.runtime.RuntimeComponent);
+}
+
+Compiled from "ThreadMessageContext.java"
+public final class org.apache.tuscany.sca.context.ThreadMessageContext extends java.lang.Object{
+ public static org.apache.tuscany.sca.invocation.Message setMessageContext(org.apache.tuscany.sca.invocation.Message);
+ public static org.apache.tuscany.sca.invocation.Message getMessageContext();
+ public static void removeMessageContext();
+ static {};
+}
+
+Compiled from "DataExchangeSemantics.java"
+public interface org.apache.tuscany.sca.invocation.DataExchangeSemantics{
+ public abstract boolean allowsPassByReference();
+}
+
+Compiled from "Interceptor.java"
+public interface org.apache.tuscany.sca.invocation.Interceptor extends org.apache.tuscany.sca.invocation.Invoker{
+ public abstract void setNext(org.apache.tuscany.sca.invocation.Invoker);
+ public abstract org.apache.tuscany.sca.invocation.Invoker getNext();
+}
+
+Compiled from "InterceptorAsync.java"
+public interface org.apache.tuscany.sca.invocation.InterceptorAsync extends org.apache.tuscany.sca.invocation.Interceptor,org.apache.tuscany.sca.invocation.InvokerAsyncRequest,org.apache.tuscany.sca.invocation.InvokerAsyncResponse{
+ public abstract void setPrevious(org.apache.tuscany.sca.invocation.InvokerAsyncResponse);
+ public abstract org.apache.tuscany.sca.invocation.InvokerAsyncResponse getPrevious();
+ public abstract org.apache.tuscany.sca.invocation.Message processRequest(org.apache.tuscany.sca.invocation.Message);
+ public abstract org.apache.tuscany.sca.invocation.Message postProcessRequest(org.apache.tuscany.sca.invocation.Message);
+ public abstract org.apache.tuscany.sca.invocation.Message postProcessRequest(org.apache.tuscany.sca.invocation.Message, java.lang.Throwable) throws java.lang.Throwable;
+ public abstract org.apache.tuscany.sca.invocation.Message processResponse(org.apache.tuscany.sca.invocation.Message);
+}
+
+Compiled from "InvocationChain.java"
+public interface org.apache.tuscany.sca.invocation.InvocationChain{
+ public abstract org.apache.tuscany.sca.interfacedef.Operation getTargetOperation();
+ public abstract void setTargetOperation(org.apache.tuscany.sca.interfacedef.Operation);
+ public abstract org.apache.tuscany.sca.interfacedef.Operation getSourceOperation();
+ public abstract void setSourceOperation(org.apache.tuscany.sca.interfacedef.Operation);
+ public abstract void addInterceptor(org.apache.tuscany.sca.invocation.Interceptor);
+ public abstract void addInterceptor(java.lang.String, org.apache.tuscany.sca.invocation.Interceptor);
+ public abstract void addHeadInterceptor(org.apache.tuscany.sca.invocation.Interceptor);
+ public abstract void addHeadInterceptor(java.lang.String, org.apache.tuscany.sca.invocation.Interceptor);
+ public abstract void addInvoker(org.apache.tuscany.sca.invocation.Invoker);
+ public abstract org.apache.tuscany.sca.invocation.Invoker getHeadInvoker();
+ public abstract org.apache.tuscany.sca.invocation.Invoker getTailInvoker();
+ public abstract org.apache.tuscany.sca.invocation.Invoker getHeadInvoker(java.lang.String);
+ public abstract boolean allowsPassByReference();
+ public abstract void setAllowsPassByReference(boolean);
+ public abstract boolean isAsyncInvocation();
+}
+
+Compiled from "Invoker.java"
+public interface org.apache.tuscany.sca.invocation.Invoker{
+ public abstract org.apache.tuscany.sca.invocation.Message invoke(org.apache.tuscany.sca.invocation.Message);
+}
+
+Compiled from "InvokerAsyncRequest.java"
+public interface org.apache.tuscany.sca.invocation.InvokerAsyncRequest{
+ public abstract void invokeAsyncRequest(org.apache.tuscany.sca.invocation.Message) throws java.lang.Throwable;
+}
+
+Compiled from "InvokerAsyncResponse.java"
+public interface org.apache.tuscany.sca.invocation.InvokerAsyncResponse{
+ public abstract void invokeAsyncResponse(org.apache.tuscany.sca.invocation.Message);
+}
+
+Compiled from "Message.java"
+public interface org.apache.tuscany.sca.invocation.Message{
+ public abstract java.lang.Object getBody();
+ public abstract void setBody(java.lang.Object);
+ public abstract org.apache.tuscany.sca.assembly.EndpointReference getFrom();
+ public abstract void setFrom(org.apache.tuscany.sca.assembly.EndpointReference);
+ public abstract org.apache.tuscany.sca.assembly.Endpoint getTo();
+ public abstract void setTo(org.apache.tuscany.sca.assembly.Endpoint);
+ public abstract java.lang.Object getMessageID();
+ public abstract void setMessageID(java.lang.Object);
+ public abstract boolean isFault();
+ public abstract void setFaultBody(java.lang.Object);
+ public abstract org.apache.tuscany.sca.interfacedef.Operation getOperation();
+ public abstract void setOperation(org.apache.tuscany.sca.interfacedef.Operation);
+ public abstract java.util.Map getHeaders();
+ public abstract java.lang.Object getBindingContext();
+ public abstract void setBindingContext(java.lang.Object);
+}
+
+Compiled from "MessageFactory.java"
+public interface org.apache.tuscany.sca.invocation.MessageFactory{
+ public abstract org.apache.tuscany.sca.invocation.Message createMessage();
+}
+
+Compiled from "Phase.java"
+public interface org.apache.tuscany.sca.invocation.Phase{
+ public static final java.lang.String REFERENCE;
+ public static final java.lang.String REFERENCE_INTERFACE;
+ public static final java.lang.String REFERENCE_POLICY;
+ public static final java.lang.String REFERENCE_BINDING;
+ public static final java.lang.String REFERENCE_BINDING_WIREFORMAT;
+ public static final java.lang.String REFERENCE_BINDING_POLICY;
+ public static final java.lang.String REFERENCE_BINDING_TRANSPORT;
+ public static final java.lang.String SERVICE_BINDING_TRANSPORT;
+ public static final java.lang.String SERVICE_BINDING_OPERATION_SELECTOR;
+ public static final java.lang.String SERVICE_BINDING_WIREFORMAT;
+ public static final java.lang.String SERVICE_BINDING_POLICY;
+ public static final java.lang.String SERVICE_BINDING;
+ public static final java.lang.String SERVICE_INTERFACE;
+ public static final java.lang.String SERVICE_POLICY;
+ public static final java.lang.String SERVICE;
+ public static final java.lang.String IMPLEMENTATION_POLICY;
+ public static final java.lang.String IMPLEMENTATION;
+}
+
+Compiled from "PhasedInterceptor.java"
+public interface org.apache.tuscany.sca.invocation.PhasedInterceptor extends org.apache.tuscany.sca.invocation.Interceptor{
+ public abstract java.lang.String getPhase();
+}
+
+Compiled from "BaseBindingImpl.java"
+public abstract class org.apache.tuscany.sca.provider.BaseBindingImpl extends java.lang.Object implements org.apache.tuscany.sca.assembly.Binding{
+ public org.apache.tuscany.sca.provider.BaseBindingImpl();
+ public java.lang.String getName();
+ public java.lang.String getURI();
+ public void setURI(java.lang.String);
+ public void setName(java.lang.String);
+ public java.lang.Object clone() throws java.lang.CloneNotSupportedException;
+ public boolean isUnresolved();
+ public void setUnresolved(boolean);
+ public abstract javax.xml.namespace.QName getType();
+ public org.apache.tuscany.sca.assembly.WireFormat getRequestWireFormat();
+ public void setRequestWireFormat(org.apache.tuscany.sca.assembly.WireFormat);
+ public org.apache.tuscany.sca.assembly.WireFormat getResponseWireFormat();
+ public void setResponseWireFormat(org.apache.tuscany.sca.assembly.WireFormat);
+ public org.apache.tuscany.sca.assembly.OperationSelector getOperationSelector();
+ public void setOperationSelector(org.apache.tuscany.sca.assembly.OperationSelector);
+}
+
+Compiled from "BasePolicyProvider.java"
+public abstract class org.apache.tuscany.sca.provider.BasePolicyProvider extends java.lang.Object implements org.apache.tuscany.sca.provider.PolicyProvider{
+ protected java.lang.Class policyType;
+ protected org.apache.tuscany.sca.policy.PolicySubject subject;
+ protected org.apache.tuscany.sca.provider.BasePolicyProvider(java.lang.Class, org.apache.tuscany.sca.policy.PolicySubject);
+ protected java.util.List findPolicies();
+ protected java.util.List findPolicySets();
+ protected org.apache.tuscany.sca.policy.PolicySet findPolicySet();
+ protected java.lang.String getContext();
+ public void start();
+ public void stop();
+ public org.apache.tuscany.sca.invocation.PhasedInterceptor createInterceptor(org.apache.tuscany.sca.interfacedef.Operation);
+ public org.apache.tuscany.sca.invocation.PhasedInterceptor createBindingInterceptor();
+ public void configureBinding(java.lang.Object);
+ protected org.apache.tuscany.sca.invocation.InvocationChain getInvocationChain();
+ protected void configure(org.apache.tuscany.sca.invocation.InvocationChain, org.apache.tuscany.sca.interfacedef.Operation);
+}
+
+Compiled from "BindingPolicyProvider.java"
+public interface org.apache.tuscany.sca.provider.BindingPolicyProvider extends org.apache.tuscany.sca.provider.PolicyProvider{
+ public abstract org.apache.tuscany.sca.invocation.PhasedInterceptor createBindingInterceptor();
+}
+
+Compiled from "BindingProviderFactory.java"
+public interface org.apache.tuscany.sca.provider.BindingProviderFactory extends org.apache.tuscany.sca.provider.ProviderFactory{
+ public abstract org.apache.tuscany.sca.provider.ReferenceBindingProvider createReferenceBindingProvider(org.apache.tuscany.sca.runtime.RuntimeEndpointReference);
+ public abstract org.apache.tuscany.sca.provider.ServiceBindingProvider createServiceBindingProvider(org.apache.tuscany.sca.runtime.RuntimeEndpoint);
+}
+
+Compiled from "DefaultProviderFactoryExtensionPoint.java"
+public class org.apache.tuscany.sca.provider.DefaultProviderFactoryExtensionPoint extends java.lang.Object implements org.apache.tuscany.sca.provider.ProviderFactoryExtensionPoint{
+ public org.apache.tuscany.sca.provider.DefaultProviderFactoryExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public void addProviderFactory(org.apache.tuscany.sca.provider.ProviderFactory);
+ public void removeProviderFactory(org.apache.tuscany.sca.provider.ProviderFactory);
+ public org.apache.tuscany.sca.provider.ProviderFactory getProviderFactory(java.lang.Class);
+ public java.util.List getPolicyProviderFactories();
+ public java.util.Collection getProviderFactories(java.lang.Class);
+}
+
+Compiled from "EndpointAsyncProvider.java"
+public interface org.apache.tuscany.sca.provider.EndpointAsyncProvider extends org.apache.tuscany.sca.provider.EndpointProvider{
+ public abstract boolean supportsNativeAsync();
+ public abstract org.apache.tuscany.sca.invocation.InvokerAsyncResponse createAsyncResponseInvoker();
+}
+
+Compiled from "EndpointProvider.java"
+public interface org.apache.tuscany.sca.provider.EndpointProvider extends org.apache.tuscany.sca.provider.ServiceBindingProvider{
+ public abstract void configure();
+}
+
+Compiled from "EndpointReferenceAsyncProvider.java"
+public interface org.apache.tuscany.sca.provider.EndpointReferenceAsyncProvider extends org.apache.tuscany.sca.provider.EndpointReferenceProvider{
+ public abstract boolean supportsNativeAsync();
+}
+
+Compiled from "EndpointReferenceProvider.java"
+public interface org.apache.tuscany.sca.provider.EndpointReferenceProvider extends org.apache.tuscany.sca.provider.ReferenceBindingProvider{
+ public abstract void configure();
+}
+
+Compiled from "ImplementationAsyncProvider.java"
+public interface org.apache.tuscany.sca.provider.ImplementationAsyncProvider extends org.apache.tuscany.sca.provider.ImplementationProvider{
+ public abstract org.apache.tuscany.sca.invocation.InvokerAsyncRequest createAsyncInvoker(org.apache.tuscany.sca.runtime.RuntimeComponentService, org.apache.tuscany.sca.interfacedef.Operation);
+ public abstract org.apache.tuscany.sca.invocation.InvokerAsyncResponse createAsyncResponseInvoker(org.apache.tuscany.sca.interfacedef.Operation);
+}
+
+Compiled from "ImplementationProvider.java"
+public interface org.apache.tuscany.sca.provider.ImplementationProvider extends org.apache.tuscany.sca.provider.RuntimeProvider{
+ public abstract org.apache.tuscany.sca.invocation.Invoker createInvoker(org.apache.tuscany.sca.runtime.RuntimeComponentService, org.apache.tuscany.sca.interfacedef.Operation);
+ public abstract boolean supportsOneWayInvocation();
+}
+
+Compiled from "ImplementationProviderFactory.java"
+public interface org.apache.tuscany.sca.provider.ImplementationProviderFactory extends org.apache.tuscany.sca.provider.ProviderFactory{
+ public abstract org.apache.tuscany.sca.provider.ImplementationProvider createImplementationProvider(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.assembly.Implementation);
+}
+
+Compiled from "OperationSelectorProvider.java"
+public interface org.apache.tuscany.sca.provider.OperationSelectorProvider{
+ public abstract org.apache.tuscany.sca.invocation.Interceptor createInterceptor();
+ public abstract java.lang.String getPhase();
+}
+
+Compiled from "OperationSelectorProviderFactory.java"
+public interface org.apache.tuscany.sca.provider.OperationSelectorProviderFactory extends org.apache.tuscany.sca.provider.ProviderFactory{
+ public abstract org.apache.tuscany.sca.provider.OperationSelectorProvider createReferenceOperationSelectorProvider(org.apache.tuscany.sca.runtime.RuntimeEndpointReference);
+ public abstract org.apache.tuscany.sca.provider.OperationSelectorProvider createServiceOperationSelectorProvider(org.apache.tuscany.sca.runtime.RuntimeEndpoint);
+}
+
+Compiled from "OptimisingBindingProvider.java"
+public interface org.apache.tuscany.sca.provider.OptimisingBindingProvider{
+ public abstract void optimiseBinding(org.apache.tuscany.sca.runtime.RuntimeEndpoint);
+}
+
+Compiled from "PolicyImplementor.java"
+public interface org.apache.tuscany.sca.provider.PolicyImplementor{
+ public abstract java.util.List getImplementedPolicies();
+}
+
+Compiled from "PolicyProvider.java"
+public interface org.apache.tuscany.sca.provider.PolicyProvider extends org.apache.tuscany.sca.provider.RuntimeProvider{
+ public abstract org.apache.tuscany.sca.invocation.PhasedInterceptor createInterceptor(org.apache.tuscany.sca.interfacedef.Operation);
+ public abstract org.apache.tuscany.sca.invocation.PhasedInterceptor createBindingInterceptor();
+ public abstract void configureBinding(java.lang.Object);
+}
+
+Compiled from "PolicyProviderFactory.java"
+public interface org.apache.tuscany.sca.provider.PolicyProviderFactory extends org.apache.tuscany.sca.provider.ProviderFactory{
+ public abstract org.apache.tuscany.sca.provider.PolicyProvider createReferencePolicyProvider(org.apache.tuscany.sca.assembly.EndpointReference);
+ public abstract org.apache.tuscany.sca.provider.PolicyProvider createServicePolicyProvider(org.apache.tuscany.sca.assembly.Endpoint);
+ public abstract org.apache.tuscany.sca.provider.PolicyProvider createImplementationPolicyProvider(org.apache.tuscany.sca.runtime.RuntimeComponent);
+}
+
+Compiled from "ProviderFactory.java"
+public interface org.apache.tuscany.sca.provider.ProviderFactory{
+ public abstract java.lang.Class getModelType();
+}
+
+Compiled from "ProviderFactoryExtensionPoint.java"
+public interface org.apache.tuscany.sca.provider.ProviderFactoryExtensionPoint{
+ public abstract void addProviderFactory(org.apache.tuscany.sca.provider.ProviderFactory);
+ public abstract void removeProviderFactory(org.apache.tuscany.sca.provider.ProviderFactory);
+ public abstract org.apache.tuscany.sca.provider.ProviderFactory getProviderFactory(java.lang.Class);
+ public abstract java.util.List getPolicyProviderFactories();
+ public abstract java.util.Collection getProviderFactories(java.lang.Class);
+}
+
+Compiled from "ReferenceBindingProvider.java"
+public interface org.apache.tuscany.sca.provider.ReferenceBindingProvider extends org.apache.tuscany.sca.provider.RuntimeProvider{
+ public abstract org.apache.tuscany.sca.invocation.Invoker createInvoker(org.apache.tuscany.sca.interfacedef.Operation);
+ public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract getBindingInterfaceContract();
+ public abstract boolean supportsOneWayInvocation();
+}
+
+Compiled from "RuntimeProvider.java"
+public interface org.apache.tuscany.sca.provider.RuntimeProvider{
+ public abstract void start();
+ public abstract void stop();
+}
+
+Compiled from "SCABindingMapper.java"
+public interface org.apache.tuscany.sca.provider.SCABindingMapper{
+ public abstract org.apache.tuscany.sca.runtime.RuntimeEndpoint map(org.apache.tuscany.sca.runtime.RuntimeEndpoint);
+ public abstract org.apache.tuscany.sca.runtime.RuntimeEndpointReference map(org.apache.tuscany.sca.runtime.RuntimeEndpointReference);
+ public abstract boolean isRemotable(org.apache.tuscany.sca.runtime.RuntimeEndpoint);
+ public abstract boolean isRemotable(org.apache.tuscany.sca.runtime.RuntimeEndpointReference);
+}
+
+Compiled from "ServiceBindingProvider.java"
+public interface org.apache.tuscany.sca.provider.ServiceBindingProvider extends org.apache.tuscany.sca.provider.RuntimeProvider{
+ public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract getBindingInterfaceContract();
+ public abstract boolean supportsOneWayInvocation();
+}
+
+Compiled from "WireFormatProvider.java"
+public interface org.apache.tuscany.sca.provider.WireFormatProvider{
+ public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract configureWireFormatInterfaceContract(org.apache.tuscany.sca.interfacedef.InterfaceContract);
+ public abstract org.apache.tuscany.sca.invocation.Interceptor createInterceptor();
+ public abstract java.lang.String getPhase();
+}
+
+Compiled from "WireFormatProviderFactory.java"
+public interface org.apache.tuscany.sca.provider.WireFormatProviderFactory extends org.apache.tuscany.sca.provider.ProviderFactory{
+ public abstract org.apache.tuscany.sca.provider.WireFormatProvider createReferenceWireFormatProvider(org.apache.tuscany.sca.runtime.RuntimeEndpointReference);
+ public abstract org.apache.tuscany.sca.provider.WireFormatProvider createServiceWireFormatProvider(org.apache.tuscany.sca.runtime.RuntimeEndpoint);
+}
+
+Compiled from "ActivationException.java"
+public class org.apache.tuscany.sca.runtime.ActivationException extends java.lang.Exception{
+ public org.apache.tuscany.sca.runtime.ActivationException(java.lang.String);
+ public org.apache.tuscany.sca.runtime.ActivationException(java.lang.Throwable);
+}
+
+Compiled from "BaseDomainRegistryFactory.java"
+public abstract class org.apache.tuscany.sca.runtime.BaseDomainRegistryFactory extends java.lang.Object implements org.apache.tuscany.sca.runtime.DomainRegistryFactory,org.apache.tuscany.sca.core.LifeCycleListener{
+ protected org.apache.tuscany.sca.core.ExtensionPointRegistry registry;
+ protected java.util.Map endpointRegistries;
+ protected java.util.List listeners;
+ public org.apache.tuscany.sca.runtime.BaseDomainRegistryFactory(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public void start();
+ public synchronized org.apache.tuscany.sca.runtime.EndpointRegistry getEndpointRegistry(java.lang.String, java.lang.String);
+ protected java.lang.Object getKey(java.lang.String, java.lang.String);
+ protected abstract org.apache.tuscany.sca.runtime.EndpointRegistry createEndpointRegistry(java.lang.String, java.lang.String);
+ public void stop();
+ public synchronized java.util.Collection getEndpointRegistries();
+ public synchronized void addListener(org.apache.tuscany.sca.runtime.EndpointListener);
+ public synchronized java.util.List getListeners();
+ public synchronized void removeListener(org.apache.tuscany.sca.runtime.EndpointListener);
+}
+
+Compiled from "BaseEndpointRegistry.java"
+public abstract class org.apache.tuscany.sca.runtime.BaseEndpointRegistry extends java.lang.Object implements org.apache.tuscany.sca.runtime.EndpointRegistry,org.apache.tuscany.sca.core.LifeCycleListener{
+ protected static final java.util.logging.Logger logger;
+ protected java.lang.String domainRegistryURI;
+ protected java.lang.String domainURI;
+ protected java.util.List endpointreferences;
+ protected java.util.List listeners;
+ protected org.apache.tuscany.sca.core.ExtensionPointRegistry registry;
+ protected java.util.Map attributes;
+ public org.apache.tuscany.sca.runtime.BaseEndpointRegistry(org.apache.tuscany.sca.core.ExtensionPointRegistry, java.util.Map, java.lang.String, java.lang.String);
+ public abstract void addEndpoint(org.apache.tuscany.sca.assembly.Endpoint);
+ public void addEndpointReference(org.apache.tuscany.sca.assembly.EndpointReference);
+ public void addListener(org.apache.tuscany.sca.runtime.EndpointListener);
+ protected void endpointAdded(org.apache.tuscany.sca.assembly.Endpoint);
+ protected void endpointRemoved(org.apache.tuscany.sca.assembly.Endpoint);
+ protected void endpointUpdated(org.apache.tuscany.sca.assembly.Endpoint, org.apache.tuscany.sca.assembly.Endpoint);
+ public java.util.List findEndpoint(org.apache.tuscany.sca.assembly.EndpointReference);
+ public abstract java.util.List findEndpoint(java.lang.String);
+ public java.util.List findEndpointReference(org.apache.tuscany.sca.assembly.Endpoint);
+ public java.util.List findEndpointReferences(java.lang.String);
+ public abstract org.apache.tuscany.sca.assembly.Endpoint getEndpoint(java.lang.String);
+ public java.util.List getEndpointReferences();
+ public abstract java.util.Collection getEndpoints();
+ public java.util.List getListeners();
+ public abstract void removeEndpoint(org.apache.tuscany.sca.assembly.Endpoint);
+ public void removeEndpointReference(org.apache.tuscany.sca.assembly.EndpointReference);
+ public void removeListener(org.apache.tuscany.sca.runtime.EndpointListener);
+ public java.lang.String getDomainURI();
+ static {};
+}
+
+Compiled from "CompositeActivator.java"
+public interface org.apache.tuscany.sca.runtime.CompositeActivator{
+ public abstract void activate(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.assembly.Composite) throws org.apache.tuscany.sca.runtime.ActivationException;
+ public abstract void activate(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentReference);
+ public abstract void activate(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentService);
+ public abstract void deactivate(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentReference);
+ public abstract void deactivate(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentService);
+ public abstract void deactivate(org.apache.tuscany.sca.assembly.Composite) throws org.apache.tuscany.sca.runtime.ActivationException;
+ public abstract void start(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentReference);
+ public abstract void start(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.assembly.Component) throws org.apache.tuscany.sca.runtime.ActivationException;
+ public abstract void stop(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.assembly.Component) throws org.apache.tuscany.sca.runtime.ActivationException;
+ public abstract void start(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.assembly.Composite) throws org.apache.tuscany.sca.runtime.ActivationException;
+ public abstract void stop(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.assembly.Composite) throws org.apache.tuscany.sca.runtime.ActivationException;
+ public abstract void activate(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeEndpoint);
+ public abstract void activate(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeEndpointReference);
+ public abstract void deactivate(org.apache.tuscany.sca.runtime.RuntimeEndpoint);
+ public abstract void deactivate(org.apache.tuscany.sca.runtime.RuntimeEndpointReference);
+ public abstract void start(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeEndpoint);
+ public abstract void start(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeEndpointReference);
+ public abstract void stop(org.apache.tuscany.sca.runtime.RuntimeEndpoint);
+ public abstract void stop(org.apache.tuscany.sca.runtime.RuntimeEndpointReference);
+}
+
+Compiled from "DefaultDomainRegistryFactoryExtensionPoint.java"
+public class org.apache.tuscany.sca.runtime.DefaultDomainRegistryFactoryExtensionPoint extends java.lang.Object implements org.apache.tuscany.sca.runtime.DomainRegistryFactoryExtensionPoint,org.apache.tuscany.sca.core.LifeCycleListener{
+ public org.apache.tuscany.sca.runtime.DefaultDomainRegistryFactoryExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry, java.util.Map);
+ public void addDomainRegistryFactory(org.apache.tuscany.sca.runtime.DomainRegistryFactory);
+ public java.util.List getDomainRegistryFactories();
+ public void removeDomainRegistryFactory(org.apache.tuscany.sca.runtime.DomainRegistryFactory);
+ public void start();
+ public void stop();
+ public java.util.Map getDomainRegistryMapping();
+}
+
+Compiled from "DefaultWireProcessorExtensionPoint.java"
+public class org.apache.tuscany.sca.runtime.DefaultWireProcessorExtensionPoint extends java.lang.Object implements org.apache.tuscany.sca.runtime.RuntimeWireProcessorExtensionPoint,org.apache.tuscany.sca.core.LifeCycleListener{
+ public org.apache.tuscany.sca.runtime.DefaultWireProcessorExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public void addWireProcessor(org.apache.tuscany.sca.runtime.RuntimeWireProcessor);
+ public void removeWireProcessor(org.apache.tuscany.sca.runtime.RuntimeWireProcessor);
+ public java.util.List getWireProcessors();
+ public void start();
+ public void stop();
+}
+
+Compiled from "DomainRegistryFactory.java"
+public interface org.apache.tuscany.sca.runtime.DomainRegistryFactory{
+ public abstract org.apache.tuscany.sca.runtime.EndpointRegistry getEndpointRegistry(java.lang.String, java.lang.String);
+ public abstract java.util.Collection getEndpointRegistries();
+ public abstract void addListener(org.apache.tuscany.sca.runtime.EndpointListener);
+ public abstract void removeListener(org.apache.tuscany.sca.runtime.EndpointListener);
+ public abstract java.lang.String[] getSupportedSchemes();
+}
+
+Compiled from "DomainRegistryFactoryExtensionPoint.java"
+public interface org.apache.tuscany.sca.runtime.DomainRegistryFactoryExtensionPoint{
+ public abstract java.util.Map getDomainRegistryMapping();
+ public abstract void addDomainRegistryFactory(org.apache.tuscany.sca.runtime.DomainRegistryFactory);
+ public abstract void removeDomainRegistryFactory(org.apache.tuscany.sca.runtime.DomainRegistryFactory);
+ public abstract java.util.List getDomainRegistryFactories();
+}
+
+Compiled from "DomainRegistryURI.java"
+public class org.apache.tuscany.sca.runtime.DomainRegistryURI extends java.lang.Object{
+ public org.apache.tuscany.sca.runtime.DomainRegistryURI(java.lang.String);
+ public java.lang.String getDomainName();
+ public java.lang.String getBindAddress();
+ public int getListenPort();
+ public java.lang.String getPassword();
+ public boolean isMulticastDisabled();
+ public java.lang.String getMulticastAddress();
+ public int getMulticastPort();
+ public java.util.List getRemotes();
+ public java.lang.String toString();
+}
+
+Compiled from "EndpointListener.java"
+public interface org.apache.tuscany.sca.runtime.EndpointListener extends java.util.EventListener{
+ public abstract void endpointAdded(org.apache.tuscany.sca.assembly.Endpoint);
+ public abstract void endpointRemoved(org.apache.tuscany.sca.assembly.Endpoint);
+ public abstract void endpointUpdated(org.apache.tuscany.sca.assembly.Endpoint, org.apache.tuscany.sca.assembly.Endpoint);
+}
+
+Compiled from "EndpointReferenceBinder.java"
+public interface org.apache.tuscany.sca.runtime.EndpointReferenceBinder{
+ public abstract void bindBuildTime(org.apache.tuscany.sca.runtime.EndpointRegistry, org.apache.tuscany.sca.assembly.EndpointReference, org.apache.tuscany.sca.assembly.builder.BuilderContext);
+ public abstract void bindRunTime(org.apache.tuscany.sca.runtime.EndpointRegistry, org.apache.tuscany.sca.assembly.EndpointReference);
+ public abstract boolean isOutOfDate(org.apache.tuscany.sca.runtime.EndpointRegistry, org.apache.tuscany.sca.assembly.EndpointReference);
+}
+
+Compiled from "EndpointRegistry.java"
+public interface org.apache.tuscany.sca.runtime.EndpointRegistry{
+ public abstract void addEndpoint(org.apache.tuscany.sca.assembly.Endpoint);
+ public abstract void removeEndpoint(org.apache.tuscany.sca.assembly.Endpoint);
+ public abstract org.apache.tuscany.sca.assembly.Endpoint getEndpoint(java.lang.String);
+ public abstract java.util.Collection getEndpoints();
+ public abstract java.util.List findEndpoint(java.lang.String);
+ public abstract java.util.List findEndpoint(org.apache.tuscany.sca.assembly.EndpointReference);
+ public abstract void addEndpointReference(org.apache.tuscany.sca.assembly.EndpointReference);
+ public abstract void removeEndpointReference(org.apache.tuscany.sca.assembly.EndpointReference);
+ public abstract java.util.List getEndpointReferences();
+ public abstract java.util.List findEndpointReferences(java.lang.String);
+ public abstract void addListener(org.apache.tuscany.sca.runtime.EndpointListener);
+ public abstract void removeListener(org.apache.tuscany.sca.runtime.EndpointListener);
+ public abstract java.lang.String getDomainURI();
+}
+
+Compiled from "EndpointSerializer.java"
+public interface org.apache.tuscany.sca.runtime.EndpointSerializer{
+ public abstract org.apache.tuscany.sca.assembly.EndpointReference readEndpointReference(java.lang.String);
+ public abstract java.lang.String write(org.apache.tuscany.sca.assembly.EndpointReference);
+ public abstract org.apache.tuscany.sca.assembly.Endpoint readEndpoint(java.lang.String);
+ public abstract java.lang.String write(org.apache.tuscany.sca.assembly.Endpoint);
+}
+
+Compiled from "ExtensibleDomainRegistryFactory.java"
+public class org.apache.tuscany.sca.runtime.ExtensibleDomainRegistryFactory extends java.lang.Object implements org.apache.tuscany.sca.runtime.DomainRegistryFactory{
+ public org.apache.tuscany.sca.runtime.ExtensibleDomainRegistryFactory(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public org.apache.tuscany.sca.runtime.ExtensibleDomainRegistryFactory(org.apache.tuscany.sca.runtime.DomainRegistryFactoryExtensionPoint);
+ public static org.apache.tuscany.sca.runtime.ExtensibleDomainRegistryFactory getInstance(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public void addListener(org.apache.tuscany.sca.runtime.EndpointListener);
+ public java.util.Collection getEndpointRegistries();
+ public org.apache.tuscany.sca.runtime.EndpointRegistry getEndpointRegistry(java.lang.String, java.lang.String);
+ public void removeListener(org.apache.tuscany.sca.runtime.EndpointListener);
+ public synchronized java.lang.String[] getSupportedSchemes();
+}
+
+Compiled from "Invocable.java"
+public interface org.apache.tuscany.sca.runtime.Invocable{
+ public abstract void bind(org.apache.tuscany.sca.context.CompositeContext);
+ public abstract void bind(org.apache.tuscany.sca.core.ExtensionPointRegistry, org.apache.tuscany.sca.runtime.EndpointRegistry);
+ public abstract org.apache.tuscany.sca.context.CompositeContext getCompositeContext();
+ public abstract void unbind();
+ public abstract org.apache.tuscany.sca.assembly.Component getComponent();
+ public abstract org.apache.tuscany.sca.assembly.Contract getContract();
+ public abstract org.apache.tuscany.sca.assembly.Binding getBinding();
+ public abstract java.util.List getInvocationChains();
+ public abstract org.apache.tuscany.sca.invocation.InvocationChain getInvocationChain(org.apache.tuscany.sca.interfacedef.Operation);
+ public abstract org.apache.tuscany.sca.invocation.InvocationChain getBindingInvocationChain();
+ public abstract org.apache.tuscany.sca.invocation.Message invoke(org.apache.tuscany.sca.invocation.Message);
+ public abstract java.lang.Object invoke(org.apache.tuscany.sca.interfacedef.Operation, java.lang.Object[]) throws java.lang.reflect.InvocationTargetException;
+ public abstract org.apache.tuscany.sca.invocation.Message invoke(org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.invocation.Message);
+ public abstract void invokeAsync(org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.invocation.Message);
+ public abstract void invokeAsync(org.apache.tuscany.sca.invocation.Message);
+ public abstract void invokeAsyncResponse(org.apache.tuscany.sca.invocation.Message);
+ public abstract java.util.List getPolicyProviders();
+}
+
+Compiled from "ReferenceParameters.java"
+public interface org.apache.tuscany.sca.runtime.ReferenceParameters extends java.lang.Cloneable{
+ public abstract java.lang.Object getCallbackID();
+ public abstract void setCallbackID(java.lang.Object);
+ public abstract java.lang.Object getCallbackObjectID();
+ public abstract void setCallbackObjectID(java.lang.Object);
+ public abstract org.apache.tuscany.sca.assembly.EndpointReference getCallbackReference();
+ public abstract void setCallbackReference(org.apache.tuscany.sca.assembly.EndpointReference);
+ public abstract java.lang.Object clone() throws java.lang.CloneNotSupportedException;
+}
+
+Compiled from "RuntimeComponent.java"
+public interface org.apache.tuscany.sca.runtime.RuntimeComponent extends org.apache.tuscany.sca.assembly.Component{
+ public abstract void setImplementationProvider(org.apache.tuscany.sca.provider.ImplementationProvider);
+ public abstract org.apache.tuscany.sca.provider.ImplementationProvider getImplementationProvider();
+ public abstract org.apache.tuscany.sca.runtime.RuntimeComponentContext getComponentContext();
+ public abstract void setComponentContext(org.apache.tuscany.sca.runtime.RuntimeComponentContext);
+ public abstract boolean isStarted();
+ public abstract void setStarted(boolean);
+ public abstract void addPolicyProvider(org.apache.tuscany.sca.provider.PolicyProvider);
+ public abstract java.util.List getPolicyProviders();
+ public abstract org.oasisopen.sca.ServiceReference getServiceReference(java.lang.Class, java.lang.String);
+}
+
+Compiled from "RuntimeComponentContext.java"
+public interface org.apache.tuscany.sca.runtime.RuntimeComponentContext extends org.oasisopen.sca.ComponentContext{
+ public abstract org.oasisopen.sca.ServiceReference getServiceReference(java.lang.Class, org.apache.tuscany.sca.runtime.RuntimeEndpointReference);
+ public abstract org.oasisopen.sca.ServiceReference getServiceReference(java.lang.Class, org.apache.tuscany.sca.runtime.RuntimeEndpoint);
+ public abstract org.oasisopen.sca.ServiceReference createSelfReference(java.lang.Class, org.apache.tuscany.sca.assembly.ComponentService);
+ public abstract org.apache.tuscany.sca.core.ExtensionPointRegistry getExtensionPointRegistry();
+ public abstract org.apache.tuscany.sca.context.CompositeContext getCompositeContext();
+}
+
+Compiled from "RuntimeComponentReference.java"
+public interface org.apache.tuscany.sca.runtime.RuntimeComponentReference extends org.apache.tuscany.sca.assembly.ComponentReference{
+ public abstract void setComponent(org.apache.tuscany.sca.runtime.RuntimeComponent);
+ public abstract org.apache.tuscany.sca.runtime.RuntimeComponent getComponent();
+}
+
+Compiled from "RuntimeComponentService.java"
+public interface org.apache.tuscany.sca.runtime.RuntimeComponentService extends org.apache.tuscany.sca.assembly.ComponentService{
+}
+
+Compiled from "RuntimeEndpoint.java"
+public interface org.apache.tuscany.sca.runtime.RuntimeEndpoint extends org.apache.tuscany.sca.assembly.Endpoint,org.apache.tuscany.sca.runtime.Invocable,java.io.Serializable{
+ public abstract void setBindingProvider(org.apache.tuscany.sca.provider.ServiceBindingProvider);
+ public abstract org.apache.tuscany.sca.provider.ServiceBindingProvider getBindingProvider();
+ public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract getBindingInterfaceContract();
+ public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract getComponentTypeServiceInterfaceContract();
+ public abstract void validateServiceInterfaceCompatibility();
+ public abstract org.apache.tuscany.sca.context.CompositeContext getCompositeContext();
+ public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract getGeneratedWSDLContract(org.apache.tuscany.sca.interfacedef.InterfaceContract);
+ public abstract void createAsyncServerCallback();
+ public abstract org.apache.tuscany.sca.runtime.RuntimeEndpointReference getAsyncServerCallback();
+}
+
+Compiled from "RuntimeEndpointReference.java"
+public interface org.apache.tuscany.sca.runtime.RuntimeEndpointReference extends org.apache.tuscany.sca.assembly.EndpointReference,org.apache.tuscany.sca.runtime.Invocable,java.io.Serializable{
+ public abstract void setBindingProvider(org.apache.tuscany.sca.provider.ReferenceBindingProvider);
+ public abstract org.apache.tuscany.sca.provider.ReferenceBindingProvider getBindingProvider();
+ public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract getBindingInterfaceContract();
+ public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract getComponentTypeReferenceInterfaceContract();
+ public abstract void validateReferenceInterfaceCompatibility();
+ public abstract boolean isOutOfDate();
+ public abstract void rebuild();
+ public abstract boolean isStarted();
+ public abstract org.apache.tuscany.sca.interfacedef.InterfaceContract getGeneratedWSDLContract(org.apache.tuscany.sca.interfacedef.InterfaceContract);
+ public abstract void createAsyncCallbackEndpoint();
+}
+
+Compiled from "RuntimeProperties.java"
+public interface org.apache.tuscany.sca.runtime.RuntimeProperties{
+ public static final java.lang.String QUIET_LOGGING;
+ public abstract java.util.Properties getProperties();
+ public abstract void setProperties(java.util.Properties);
+}
+
+Compiled from "RuntimeWireProcessor.java"
+public interface org.apache.tuscany.sca.runtime.RuntimeWireProcessor{
+ public abstract void process(org.apache.tuscany.sca.runtime.RuntimeEndpoint);
+ public abstract void process(org.apache.tuscany.sca.runtime.RuntimeEndpointReference);
+}
+
+Compiled from "RuntimeWireProcessorExtensionPoint.java"
+public interface org.apache.tuscany.sca.runtime.RuntimeWireProcessorExtensionPoint{
+ public abstract void addWireProcessor(org.apache.tuscany.sca.runtime.RuntimeWireProcessor);
+ public abstract void removeWireProcessor(org.apache.tuscany.sca.runtime.RuntimeWireProcessor);
+ public abstract java.util.List getWireProcessors();
+}
+
+Compiled from "UnknownEndpointHandler.java"
+public interface org.apache.tuscany.sca.runtime.UnknownEndpointHandler{
+ public abstract org.apache.tuscany.sca.assembly.Binding handleUnknownEndpoint(org.apache.tuscany.sca.assembly.EndpointReference);
+}
+
+Compiled from "Version.java"
+public class org.apache.tuscany.sca.runtime.Version extends java.lang.Object{
+ public static final java.lang.String VERSION;
+ public static final java.lang.String REVISION;
+ public static final java.lang.String BUILDTIME;
+ public org.apache.tuscany.sca.runtime.Version();
+ public static java.lang.String getVersion();
+ public static java.lang.String getRevsion();
+ public static java.lang.String getBuildTime();
+ static {};
+}
+
+Compiled from "NotificationListener.java"
+public interface org.apache.tuscany.sca.work.NotificationListener{
+ public abstract void workAccepted(java.lang.Runnable);
+ public abstract void workCompleted(java.lang.Runnable);
+ public abstract void workStarted(java.lang.Runnable);
+ public abstract void workRejected(java.lang.Runnable);
+ public abstract void workFailed(java.lang.Runnable, java.lang.Throwable);
+}
+
+Compiled from "WorkScheduler.java"
+public interface org.apache.tuscany.sca.work.WorkScheduler{
+ public abstract void scheduleWork(java.lang.Runnable, org.apache.tuscany.sca.work.NotificationListener);
+ public abstract void scheduleWork(java.lang.Runnable);
+ public abstract java.util.concurrent.ExecutorService getExecutorService();
+}
+
+Compiled from "WorkSchedulerException.java"
+public class org.apache.tuscany.sca.work.WorkSchedulerException extends java.lang.RuntimeException{
+ public org.apache.tuscany.sca.work.WorkSchedulerException();
+ public org.apache.tuscany.sca.work.WorkSchedulerException(java.lang.String, java.lang.Throwable);
+ public org.apache.tuscany.sca.work.WorkSchedulerException(java.lang.String);
+ public org.apache.tuscany.sca.work.WorkSchedulerException(java.lang.Throwable);
+}
+
+Compiled from "RuntimeAssemblyFactory.java"
+public class org.apache.tuscany.sca.core.assembly.RuntimeAssemblyFactory extends org.apache.tuscany.sca.assembly.DefaultAssemblyFactory implements org.apache.tuscany.sca.assembly.AssemblyFactory{
+ public org.apache.tuscany.sca.core.assembly.RuntimeAssemblyFactory(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public org.apache.tuscany.sca.assembly.Component createComponent();
+ public org.apache.tuscany.sca.assembly.ComponentReference createComponentReference();
+ public org.apache.tuscany.sca.assembly.ComponentService createComponentService();
+ public org.apache.tuscany.sca.assembly.Endpoint createEndpoint();
+ public org.apache.tuscany.sca.assembly.EndpointReference createEndpointReference();
+}
+
+Compiled from "CompositeActivatorImpl.java"
+public class org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl extends java.lang.Object implements org.apache.tuscany.sca.runtime.CompositeActivator{
+ final java.util.logging.Logger logger;
+ public org.apache.tuscany.sca.core.assembly.impl.CompositeActivatorImpl(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public void activate(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.assembly.Composite) throws org.apache.tuscany.sca.runtime.ActivationException;
+ public void deactivate(org.apache.tuscany.sca.assembly.Composite) throws org.apache.tuscany.sca.runtime.ActivationException;
+ public void activateComponent(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.assembly.Component) throws org.apache.tuscany.sca.runtime.ActivationException;
+ public void deactivateComponent(org.apache.tuscany.sca.assembly.Component) throws org.apache.tuscany.sca.runtime.ActivationException;
+ public void activate(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentService);
+ public void activate(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeEndpoint);
+ public void deactivate(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentService);
+ public void deactivate(org.apache.tuscany.sca.runtime.RuntimeEndpoint);
+ public void activate(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentReference);
+ public void deactivate(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentReference);
+ public void activate(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeEndpointReference);
+ public void deactivate(org.apache.tuscany.sca.runtime.RuntimeEndpointReference);
+ public void start(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.assembly.Composite);
+ public void stop(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.assembly.Composite);
+ public void start(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.assembly.Component);
+ public void stop(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.assembly.Component);
+ public void start(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.core.scope.ScopedRuntimeComponent);
+ public void start(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeEndpoint);
+ public void stop(org.apache.tuscany.sca.runtime.RuntimeEndpoint);
+ public void start(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentReference);
+ public void stop(org.apache.tuscany.sca.assembly.Component, org.apache.tuscany.sca.assembly.ComponentReference);
+ public void start(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeEndpointReference);
+ public void stop(org.apache.tuscany.sca.runtime.RuntimeEndpointReference);
+}
+
+Compiled from "EndpointRegistryImpl.java"
+public class org.apache.tuscany.sca.core.assembly.impl.EndpointRegistryImpl extends org.apache.tuscany.sca.runtime.BaseEndpointRegistry implements org.apache.tuscany.sca.runtime.EndpointRegistry,org.apache.tuscany.sca.core.LifeCycleListener{
+ protected boolean quietLogging;
+ public org.apache.tuscany.sca.core.assembly.impl.EndpointRegistryImpl(org.apache.tuscany.sca.core.ExtensionPointRegistry, java.lang.String, java.lang.String);
+ public synchronized void addEndpoint(org.apache.tuscany.sca.assembly.Endpoint);
+ public java.util.List findEndpoint(java.lang.String);
+ public synchronized void removeEndpoint(org.apache.tuscany.sca.assembly.Endpoint);
+ public synchronized java.util.List getEndpoints();
+ public synchronized org.apache.tuscany.sca.assembly.Endpoint getEndpoint(java.lang.String);
+ public synchronized void updateEndpoint(java.lang.String, org.apache.tuscany.sca.assembly.Endpoint);
+ public synchronized void start();
+ public synchronized void stop();
+ public java.util.Collection getEndpoints();
+}
+
+Compiled from "EndpointSerializerImpl.java"
+public class org.apache.tuscany.sca.core.assembly.impl.EndpointSerializerImpl extends java.lang.Object implements org.apache.tuscany.sca.runtime.EndpointSerializer{
+ public org.apache.tuscany.sca.core.assembly.impl.EndpointSerializerImpl(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public org.apache.tuscany.sca.assembly.Endpoint readEndpoint(java.lang.String);
+ public java.lang.String write(org.apache.tuscany.sca.assembly.Endpoint);
+ public org.apache.tuscany.sca.assembly.EndpointReference readEndpointReference(java.lang.String);
+ public java.lang.String write(org.apache.tuscany.sca.assembly.EndpointReference);
+}
+
+Compiled from "LocalDomainRegistryFactory.java"
+public class org.apache.tuscany.sca.core.assembly.impl.LocalDomainRegistryFactory extends org.apache.tuscany.sca.runtime.BaseDomainRegistryFactory{
+ public org.apache.tuscany.sca.core.assembly.impl.LocalDomainRegistryFactory(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ protected org.apache.tuscany.sca.runtime.EndpointRegistry createEndpointRegistry(java.lang.String, java.lang.String);
+ public java.lang.String[] getSupportedSchemes();
+ static {};
+}
+
+Compiled from "ReferenceParameterProcessor.java"
+public class org.apache.tuscany.sca.core.assembly.impl.ReferenceParameterProcessor extends java.lang.Object implements org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor{
+ public org.apache.tuscany.sca.core.assembly.impl.ReferenceParameterProcessor(org.apache.tuscany.sca.core.FactoryExtensionPoint);
+ public javax.xml.namespace.QName getArtifactType();
+ public org.apache.tuscany.sca.runtime.ReferenceParameters read(javax.xml.stream.XMLStreamReader, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException, javax.xml.stream.XMLStreamException;
+ public void write(org.apache.tuscany.sca.runtime.ReferenceParameters, javax.xml.stream.XMLStreamWriter, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionWriteException, javax.xml.stream.XMLStreamException;
+ public java.lang.Class getModelType();
+ public void resolve(org.apache.tuscany.sca.runtime.ReferenceParameters, org.apache.tuscany.sca.contribution.resolver.ModelResolver, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionResolveException;
+ public void write(java.lang.Object, javax.xml.stream.XMLStreamWriter, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionWriteException, javax.xml.stream.XMLStreamException;
+ public java.lang.Object read(javax.xml.stream.XMLStreamReader, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException, javax.xml.stream.XMLStreamException;
+ public void resolve(java.lang.Object, org.apache.tuscany.sca.contribution.resolver.ModelResolver, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionResolveException;
+ static {};
+}
+
+Compiled from "ReferenceParametersImpl.java"
+public class org.apache.tuscany.sca.core.assembly.impl.ReferenceParametersImpl extends java.lang.Object implements org.apache.tuscany.sca.runtime.ReferenceParameters{
+ public org.apache.tuscany.sca.core.assembly.impl.ReferenceParametersImpl();
+ public java.lang.Object getCallbackID();
+ public void setCallbackID(java.lang.Object);
+ public org.apache.tuscany.sca.assembly.EndpointReference getCallbackReference();
+ public void setCallbackReference(org.apache.tuscany.sca.assembly.EndpointReference);
+ public java.lang.Object clone() throws java.lang.CloneNotSupportedException;
+ public java.lang.Object getCallbackObjectID();
+ public void setCallbackObjectID(java.lang.Object);
+ public int hashCode();
+ public boolean equals(java.lang.Object);
+}
+
+Compiled from "RuntimeComponentImpl.java"
+public class org.apache.tuscany.sca.core.assembly.impl.RuntimeComponentImpl extends org.apache.tuscany.sca.assembly.impl.ComponentImpl implements org.apache.tuscany.sca.runtime.RuntimeComponent,org.apache.tuscany.sca.core.scope.ScopedRuntimeComponent,org.apache.tuscany.sca.contribution.resolver.ResolverExtension{
+ protected org.apache.tuscany.sca.runtime.RuntimeComponentContext componentContext;
+ protected org.apache.tuscany.sca.provider.ImplementationProvider implementationProvider;
+ protected java.util.List policyProviders;
+ protected org.apache.tuscany.sca.core.scope.ScopeContainer scopeContainer;
+ protected boolean started;
+ protected org.apache.tuscany.sca.contribution.resolver.ModelResolver modelResolver;
+ public org.apache.tuscany.sca.core.assembly.impl.RuntimeComponentImpl();
+ public org.apache.tuscany.sca.provider.ImplementationProvider getImplementationProvider();
+ public void setImplementationProvider(org.apache.tuscany.sca.provider.ImplementationProvider);
+ public org.apache.tuscany.sca.core.scope.ScopeContainer getScopeContainer();
+ public void setScopeContainer(org.apache.tuscany.sca.core.scope.ScopeContainer);
+ public boolean isStarted();
+ public void setStarted(boolean);
+ public org.apache.tuscany.sca.runtime.RuntimeComponentContext getComponentContext();
+ public void setComponentContext(org.apache.tuscany.sca.runtime.RuntimeComponentContext);
+ public void addPolicyProvider(org.apache.tuscany.sca.provider.PolicyProvider);
+ public java.util.List getPolicyProviders();
+ public org.apache.tuscany.sca.contribution.resolver.ModelResolver getModelResolver();
+ public void setModelResolver(org.apache.tuscany.sca.contribution.resolver.ModelResolver);
+ public java.lang.String toString();
+ public org.oasisopen.sca.ServiceReference getServiceReference(java.lang.Class, java.lang.String);
+}
+
+Compiled from "RuntimeComponentReferenceImpl.java"
+public class org.apache.tuscany.sca.core.assembly.impl.RuntimeComponentReferenceImpl extends org.apache.tuscany.sca.assembly.impl.ComponentReferenceImpl implements org.apache.tuscany.sca.runtime.RuntimeComponentReference{
+ public org.apache.tuscany.sca.core.assembly.impl.RuntimeComponentReferenceImpl();
+ public org.apache.tuscany.sca.runtime.RuntimeComponent getComponent();
+ public void setComponent(org.apache.tuscany.sca.runtime.RuntimeComponent);
+ public java.lang.Object clone() throws java.lang.CloneNotSupportedException;
+ public java.lang.String toString();
+}
+
+Compiled from "RuntimeComponentServiceImpl.java"
+public class org.apache.tuscany.sca.core.assembly.impl.RuntimeComponentServiceImpl extends org.apache.tuscany.sca.assembly.impl.ComponentServiceImpl implements org.apache.tuscany.sca.runtime.RuntimeComponentService{
+ public org.apache.tuscany.sca.core.assembly.impl.RuntimeComponentServiceImpl();
+ public java.lang.String toString();
+}
+
+Compiled from "RuntimeEndpointImpl.java"
+public class org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointImpl extends org.apache.tuscany.sca.assembly.impl.EndpointImpl implements org.apache.tuscany.sca.runtime.RuntimeEndpoint,java.io.Externalizable{
+ protected org.apache.tuscany.sca.interfacedef.InterfaceContract bindingInterfaceContract;
+ protected org.apache.tuscany.sca.interfacedef.InterfaceContract serviceInterfaceContract;
+ public org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointImpl();
+ public org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointImpl(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ protected void copyFrom(org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointImpl);
+ public void bind(org.apache.tuscany.sca.context.CompositeContext);
+ public void bind(org.apache.tuscany.sca.core.ExtensionPointRegistry, org.apache.tuscany.sca.runtime.EndpointRegistry);
+ public void unbind();
+ public synchronized java.util.List getInvocationChains();
+ public synchronized org.apache.tuscany.sca.invocation.InvocationChain getBindingInvocationChain();
+ public org.apache.tuscany.sca.invocation.InvocationChain getInvocationChain(org.apache.tuscany.sca.interfacedef.Operation);
+ public org.apache.tuscany.sca.invocation.Message invoke(org.apache.tuscany.sca.invocation.Message);
+ public java.lang.Object invoke(org.apache.tuscany.sca.interfacedef.Operation, java.lang.Object[]) throws java.lang.reflect.InvocationTargetException;
+ public org.apache.tuscany.sca.invocation.Message invoke(org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.invocation.Message);
+ public void invokeAsync(org.apache.tuscany.sca.invocation.Message);
+ public void invokeAsync(org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.invocation.Message);
+ public void invokeAsyncResponse(org.apache.tuscany.sca.invocation.Message);
+ public void createAsyncServerCallback();
+ public org.apache.tuscany.sca.runtime.RuntimeEndpointReference getAsyncServerCallback();
+ public void validateServiceInterfaceCompatibility();
+ public java.lang.Object clone() throws java.lang.CloneNotSupportedException;
+ public synchronized org.apache.tuscany.sca.provider.ServiceBindingProvider getBindingProvider();
+ public synchronized java.util.List getPolicyProviders();
+ public void setBindingProvider(org.apache.tuscany.sca.provider.ServiceBindingProvider);
+ public org.apache.tuscany.sca.assembly.Contract getContract();
+ public org.apache.tuscany.sca.context.CompositeContext getCompositeContext();
+ protected void reset();
+ protected synchronized void resolve();
+ public org.apache.tuscany.sca.interfacedef.InterfaceContract getBindingInterfaceContract();
+ public org.apache.tuscany.sca.interfacedef.InterfaceContract getComponentTypeServiceInterfaceContract();
+ public void readExternal(java.io.ObjectInput) throws java.io.IOException, java.lang.ClassNotFoundException;
+ public void writeExternal(java.io.ObjectOutput) throws java.io.IOException;
+ public org.apache.tuscany.sca.interfacedef.InterfaceContract getGeneratedWSDLContract(org.apache.tuscany.sca.interfacedef.InterfaceContract);
+ static {};
+}
+
+Compiled from "RuntimeEndpointReferenceImpl.java"
+public class org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointReferenceImpl extends org.apache.tuscany.sca.assembly.impl.EndpointReferenceImpl implements org.apache.tuscany.sca.runtime.RuntimeEndpointReference,java.io.Externalizable{
+ protected org.apache.tuscany.sca.interfacedef.InterfaceContract bindingInterfaceContract;
+ protected org.apache.tuscany.sca.interfacedef.InterfaceContract referenceInterfaceContract;
+ public org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointReferenceImpl();
+ public org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointReferenceImpl(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ protected void copyFrom(org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointReferenceImpl);
+ public void bind(org.apache.tuscany.sca.context.CompositeContext);
+ public void bind(org.apache.tuscany.sca.core.ExtensionPointRegistry, org.apache.tuscany.sca.runtime.EndpointRegistry);
+ public synchronized java.util.List getInvocationChains();
+ public synchronized org.apache.tuscany.sca.invocation.InvocationChain getBindingInvocationChain();
+ public org.apache.tuscany.sca.invocation.InvocationChain getInvocationChain(org.apache.tuscany.sca.interfacedef.Operation);
+ public org.apache.tuscany.sca.invocation.Message invoke(org.apache.tuscany.sca.invocation.Message);
+ public java.lang.Object invoke(org.apache.tuscany.sca.interfacedef.Operation, java.lang.Object[]) throws java.lang.reflect.InvocationTargetException;
+ public org.apache.tuscany.sca.invocation.Message invoke(org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.invocation.Message);
+ public void invokeAsync(org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.invocation.Message);
+ public void invokeAsync(org.apache.tuscany.sca.invocation.Message);
+ public void invokeAsyncResponse(org.apache.tuscany.sca.invocation.Message);
+ public void validateReferenceInterfaceCompatibility();
+ public void rebuild();
+ public java.lang.Object clone() throws java.lang.CloneNotSupportedException;
+ public boolean isOutOfDate();
+ public synchronized org.apache.tuscany.sca.provider.ReferenceBindingProvider getBindingProvider();
+ public void setBindingProvider(org.apache.tuscany.sca.provider.ReferenceBindingProvider);
+ public synchronized java.util.List getPolicyProviders();
+ public void unbind();
+ public org.apache.tuscany.sca.assembly.Contract getContract();
+ public org.apache.tuscany.sca.context.CompositeContext getCompositeContext();
+ public org.apache.tuscany.sca.interfacedef.InterfaceContract getBindingInterfaceContract();
+ public org.apache.tuscany.sca.interfacedef.InterfaceContract getComponentTypeReferenceInterfaceContract();
+ protected synchronized void resolve();
+ public void readExternal(java.io.ObjectInput) throws java.io.IOException, java.lang.ClassNotFoundException;
+ public void writeExternal(java.io.ObjectOutput) throws java.io.IOException;
+ public boolean isStarted();
+ public org.apache.tuscany.sca.interfacedef.InterfaceContract getGeneratedWSDLContract(org.apache.tuscany.sca.interfacedef.InterfaceContract);
+ public void createAsyncCallbackEndpoint();
+}
+
+Compiled from "DefaultComponentContextFactory.java"
+public class org.apache.tuscany.sca.core.context.DefaultComponentContextFactory extends java.lang.Object implements org.apache.tuscany.sca.context.ComponentContextFactory{
+ public org.apache.tuscany.sca.core.context.DefaultComponentContextFactory(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public org.oasisopen.sca.ComponentContext createComponentContext(org.apache.tuscany.sca.context.CompositeContext, org.apache.tuscany.sca.runtime.RuntimeComponent);
+}
+
+Compiled from "DefaultRequestContextFactory.java"
+public class org.apache.tuscany.sca.core.context.DefaultRequestContextFactory extends java.lang.Object implements org.apache.tuscany.sca.context.RequestContextFactory{
+ public org.apache.tuscany.sca.core.context.DefaultRequestContextFactory(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public org.oasisopen.sca.RequestContext createRequestContext(org.apache.tuscany.sca.runtime.RuntimeComponent);
+}
+
+Compiled from "ServiceReferenceExt.java"
+public interface org.apache.tuscany.sca.core.context.ServiceReferenceExt extends org.oasisopen.sca.ServiceReference,java.io.Externalizable{
+ public abstract org.apache.tuscany.sca.runtime.RuntimeEndpointReference getEndpointReference();
+ public abstract java.lang.Object getProxy();
+ public abstract void setProxy(java.lang.Object);
+}
+
+Compiled from "InstanceWrapper.java"
+public interface org.apache.tuscany.sca.core.factory.InstanceWrapper{
+ public abstract java.lang.Object getInstance();
+ public abstract void start() throws org.apache.tuscany.sca.core.scope.TargetInitializationException;
+ public abstract void stop() throws org.apache.tuscany.sca.core.scope.TargetDestructionException;
+}
+
+Compiled from "ObjectCreationException.java"
+public class org.apache.tuscany.sca.core.factory.ObjectCreationException extends java.lang.RuntimeException{
+ public org.apache.tuscany.sca.core.factory.ObjectCreationException();
+ public org.apache.tuscany.sca.core.factory.ObjectCreationException(java.lang.String, java.lang.Throwable);
+ public org.apache.tuscany.sca.core.factory.ObjectCreationException(java.lang.String);
+ public org.apache.tuscany.sca.core.factory.ObjectCreationException(java.lang.Throwable);
+}
+
+Compiled from "ObjectFactory.java"
+public interface org.apache.tuscany.sca.core.factory.ObjectFactory{
+ public abstract java.lang.Object getInstance() throws org.apache.tuscany.sca.core.factory.ObjectCreationException;
+}
+
+Compiled from "AsyncFaultWrapper.java"
+public class org.apache.tuscany.sca.core.invocation.AsyncFaultWrapper extends java.lang.Object{
+ public org.apache.tuscany.sca.core.invocation.AsyncFaultWrapper();
+ public org.apache.tuscany.sca.core.invocation.AsyncFaultWrapper(java.lang.Throwable);
+ public void storeFault(java.lang.Throwable);
+ public java.lang.Throwable retrieveFault();
+ public void setFaultClassName(java.lang.String);
+ public java.lang.String getFaultClassName();
+ public java.lang.String getFaultMessage();
+ public void setFaultMessage(java.lang.String);
+ public org.apache.tuscany.sca.core.invocation.AsyncFaultWrapper getContainedFault();
+ public void setContainedFault(org.apache.tuscany.sca.core.invocation.AsyncFaultWrapper);
+}
+
+Compiled from "AsyncResponseException.java"
+public class org.apache.tuscany.sca.core.invocation.AsyncResponseException extends java.lang.RuntimeException{
+ public org.apache.tuscany.sca.core.invocation.AsyncResponseException();
+ public org.apache.tuscany.sca.core.invocation.AsyncResponseException(java.lang.String, java.lang.Throwable);
+ public org.apache.tuscany.sca.core.invocation.AsyncResponseException(java.lang.String);
+ public org.apache.tuscany.sca.core.invocation.AsyncResponseException(java.lang.Throwable);
+}
+
+Compiled from "AsyncResponseHandler.java"
+public interface org.apache.tuscany.sca.core.invocation.AsyncResponseHandler extends org.apache.tuscany.sca.core.invocation.AsyncResponseService{
+ public abstract void setWrappedFault(org.apache.tuscany.sca.core.invocation.AsyncFaultWrapper);
+ public abstract void setFault(java.lang.Throwable);
+ public abstract void setResponse(java.lang.Object);
+}
+
+Compiled from "AsyncResponseInvoker.java"
+public class org.apache.tuscany.sca.core.invocation.AsyncResponseInvoker extends java.lang.Object implements org.apache.tuscany.sca.invocation.InvokerAsyncResponse,java.io.Serializable{
+ public org.apache.tuscany.sca.core.invocation.AsyncResponseInvoker(org.apache.tuscany.sca.runtime.RuntimeEndpoint, org.apache.tuscany.sca.runtime.RuntimeEndpointReference, java.lang.Object, java.lang.String, java.lang.String, org.apache.tuscany.sca.invocation.MessageFactory);
+ public void invokeAsyncResponse(org.apache.tuscany.sca.invocation.Message);
+ public java.lang.Object getResponseTargetAddress();
+ public void setResponseTargetAddress(java.lang.Object);
+ public java.lang.String getRelatesToMsgID();
+ public void setRelatesToMsgID(java.lang.String);
+ public void invokeAsyncResponse(java.lang.Object, java.util.Map);
+ public void setBindingType(java.lang.String);
+ public java.lang.String getBindingType();
+ public org.apache.tuscany.sca.runtime.RuntimeEndpoint getRequestEndpoint();
+ public org.apache.tuscany.sca.runtime.RuntimeEndpointReference getResponseEndpointReference();
+ public void setResponseEndpointReference(org.apache.tuscany.sca.runtime.RuntimeEndpointReference);
+}
+
+Compiled from "AsyncResponseService.java"
+public interface org.apache.tuscany.sca.core.invocation.AsyncResponseService{
+ public abstract void setWrappedFault(org.apache.tuscany.sca.core.invocation.AsyncFaultWrapper);
+ public abstract void setResponse(java.lang.Object);
+}
+
+Compiled from "CallableReferenceObjectFactory.java"
+public class org.apache.tuscany.sca.core.invocation.CallableReferenceObjectFactory extends java.lang.Object implements org.apache.tuscany.sca.core.factory.ObjectFactory{
+ public org.apache.tuscany.sca.core.invocation.CallableReferenceObjectFactory(java.lang.Class, org.apache.tuscany.sca.runtime.RuntimeEndpointReference);
+ public org.oasisopen.sca.ServiceReference getInstance() throws org.apache.tuscany.sca.core.factory.ObjectCreationException;
+ public java.lang.Object getInstance() throws org.apache.tuscany.sca.core.factory.ObjectCreationException;
+}
+
+Compiled from "CallbackInterfaceInterceptor.java"
+public class org.apache.tuscany.sca.core.invocation.CallbackInterfaceInterceptor extends java.lang.Object implements org.apache.tuscany.sca.invocation.Interceptor{
+ public org.apache.tuscany.sca.core.invocation.CallbackInterfaceInterceptor();
+ public org.apache.tuscany.sca.invocation.Message invoke(org.apache.tuscany.sca.invocation.Message);
+ public void setNext(org.apache.tuscany.sca.invocation.Invoker);
+ public org.apache.tuscany.sca.invocation.Invoker getNext();
+}
+
+Compiled from "CallbackReferenceObjectFactory.java"
+public class org.apache.tuscany.sca.core.invocation.CallbackReferenceObjectFactory extends java.lang.Object implements org.apache.tuscany.sca.core.factory.ObjectFactory{
+ public org.apache.tuscany.sca.core.invocation.CallbackReferenceObjectFactory(java.lang.Class, org.apache.tuscany.sca.core.invocation.ProxyFactory, java.util.List);
+ public org.oasisopen.sca.ServiceReference getInstance() throws org.apache.tuscany.sca.core.factory.ObjectCreationException;
+ public java.lang.Object getInstance() throws org.apache.tuscany.sca.core.factory.ObjectCreationException;
+}
+
+Compiled from "CallbackWireObjectFactory.java"
+public class org.apache.tuscany.sca.core.invocation.CallbackWireObjectFactory extends java.lang.Object implements org.apache.tuscany.sca.core.factory.ObjectFactory{
+ public org.apache.tuscany.sca.core.invocation.CallbackWireObjectFactory(java.lang.Class, org.apache.tuscany.sca.core.invocation.ProxyFactory, java.util.List);
+ public java.lang.Object getInstance() throws org.apache.tuscany.sca.core.factory.ObjectCreationException;
+}
+
+Compiled from "CglibProxyFactory.java"
+public class org.apache.tuscany.sca.core.invocation.CglibProxyFactory extends java.lang.Object implements org.apache.tuscany.sca.core.invocation.ProxyFactory{
+ public org.apache.tuscany.sca.core.invocation.CglibProxyFactory(org.apache.tuscany.sca.invocation.MessageFactory, org.apache.tuscany.sca.interfacedef.InterfaceContractMapper);
+ public java.lang.Object createProxy(java.lang.Class, org.apache.tuscany.sca.runtime.Invocable) throws org.apache.tuscany.sca.core.invocation.ProxyCreationException;
+ public java.lang.Object createProxy(org.oasisopen.sca.ServiceReference) throws org.apache.tuscany.sca.core.invocation.ProxyCreationException;
+ public java.lang.Object createCallbackProxy(java.lang.Class, java.util.List) throws org.apache.tuscany.sca.core.invocation.ProxyCreationException;
+ public java.lang.Object createCallbackProxy(org.oasisopen.sca.ServiceReference) throws org.apache.tuscany.sca.core.invocation.ProxyCreationException;
+ public org.oasisopen.sca.ServiceReference cast(java.lang.Object) throws java.lang.IllegalArgumentException;
+ public boolean isProxyClass(java.lang.Class);
+ static org.apache.tuscany.sca.invocation.MessageFactory access$100(org.apache.tuscany.sca.core.invocation.CglibProxyFactory);
+}
+
+Compiled from "Constants.java"
+public interface org.apache.tuscany.sca.core.invocation.Constants{
+ public static final java.lang.String MESSAGE_ID;
+ public static final java.lang.String RELATES_TO;
+ public static final java.lang.String ASYNC_RESPONSE_INVOKER;
+ public static final java.lang.String ASYNC_CALLBACK;
+}
+
+Compiled from "DefaultProxyFactoryExtensionPoint.java"
+public class org.apache.tuscany.sca.core.invocation.DefaultProxyFactoryExtensionPoint extends java.lang.Object implements org.apache.tuscany.sca.core.invocation.ProxyFactoryExtensionPoint,org.apache.tuscany.sca.core.LifeCycleListener{
+ public org.apache.tuscany.sca.core.invocation.DefaultProxyFactoryExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public org.apache.tuscany.sca.core.invocation.ProxyFactory getClassProxyFactory();
+ public org.apache.tuscany.sca.core.invocation.ProxyFactory getInterfaceProxyFactory();
+ public void setClassProxyFactory(org.apache.tuscany.sca.core.invocation.ProxyFactory);
+ public void setInterfaceProxyFactory(org.apache.tuscany.sca.core.invocation.ProxyFactory);
+ public void start();
+ public void stop();
+}
+
+Compiled from "ExtensibleProxyFactory.java"
+public class org.apache.tuscany.sca.core.invocation.ExtensibleProxyFactory extends java.lang.Object implements org.apache.tuscany.sca.core.invocation.ProxyFactory{
+ public org.apache.tuscany.sca.core.invocation.ExtensibleProxyFactory(org.apache.tuscany.sca.core.invocation.ProxyFactoryExtensionPoint);
+ public org.apache.tuscany.sca.core.invocation.ExtensibleProxyFactory(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public static org.apache.tuscany.sca.core.invocation.ExtensibleProxyFactory getInstance(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public org.oasisopen.sca.ServiceReference cast(java.lang.Object) throws java.lang.IllegalArgumentException;
+ public java.lang.Object createCallbackProxy(java.lang.Class, java.util.List) throws org.apache.tuscany.sca.core.invocation.ProxyCreationException;
+ public java.lang.Object createProxy(org.oasisopen.sca.ServiceReference) throws org.apache.tuscany.sca.core.invocation.ProxyCreationException;
+ public java.lang.Object createCallbackProxy(org.oasisopen.sca.ServiceReference) throws org.apache.tuscany.sca.core.invocation.ProxyCreationException;
+ public java.lang.Object createProxy(java.lang.Class, org.apache.tuscany.sca.runtime.Invocable) throws org.apache.tuscany.sca.core.invocation.ProxyCreationException;
+ public boolean isProxyClass(java.lang.Class);
+}
+
+Compiled from "ExtensibleWireProcessor.java"
+public class org.apache.tuscany.sca.core.invocation.ExtensibleWireProcessor extends java.lang.Object implements org.apache.tuscany.sca.runtime.RuntimeWireProcessor{
+ public org.apache.tuscany.sca.core.invocation.ExtensibleWireProcessor(org.apache.tuscany.sca.runtime.RuntimeWireProcessorExtensionPoint);
+ public void process(org.apache.tuscany.sca.runtime.RuntimeEndpoint);
+ public void process(org.apache.tuscany.sca.runtime.RuntimeEndpointReference);
+}
+
+Compiled from "InterceptorAsyncImpl.java"
+public abstract class org.apache.tuscany.sca.core.invocation.InterceptorAsyncImpl extends java.lang.Object implements org.apache.tuscany.sca.invocation.InterceptorAsync{
+ protected org.apache.tuscany.sca.invocation.Invoker next;
+ protected org.apache.tuscany.sca.invocation.InvokerAsyncResponse previous;
+ public org.apache.tuscany.sca.core.invocation.InterceptorAsyncImpl();
+ public org.apache.tuscany.sca.invocation.Invoker getNext();
+ public void setNext(org.apache.tuscany.sca.invocation.Invoker);
+ public org.apache.tuscany.sca.invocation.InvokerAsyncResponse getPrevious();
+ public void setPrevious(org.apache.tuscany.sca.invocation.InvokerAsyncResponse);
+ public org.apache.tuscany.sca.invocation.Message invoke(org.apache.tuscany.sca.invocation.Message);
+ public void invokeAsyncRequest(org.apache.tuscany.sca.invocation.Message) throws java.lang.Throwable;
+ public void invokeAsyncResponse(org.apache.tuscany.sca.invocation.Message);
+ public org.apache.tuscany.sca.invocation.Message postProcessRequest(org.apache.tuscany.sca.invocation.Message);
+ public org.apache.tuscany.sca.invocation.Message postProcessRequest(org.apache.tuscany.sca.invocation.Message, java.lang.Throwable) throws java.lang.Throwable;
+ public boolean isLocalSCABIndingInvoker();
+}
+
+Compiled from "JDKAsyncResponseInvoker.java"
+public interface org.apache.tuscany.sca.core.invocation.JDKAsyncResponseInvoker extends org.apache.tuscany.sca.invocation.InvokerAsyncResponse{
+ public abstract void registerAsyncResponse(java.lang.String, java.lang.Object);
+}
+
+Compiled from "NonBlockingInterceptor.java"
+public class org.apache.tuscany.sca.core.invocation.NonBlockingInterceptor extends org.apache.tuscany.sca.core.invocation.InterceptorAsyncImpl{
+ public org.apache.tuscany.sca.core.invocation.NonBlockingInterceptor(org.apache.tuscany.sca.work.WorkScheduler);
+ public org.apache.tuscany.sca.core.invocation.NonBlockingInterceptor(org.apache.tuscany.sca.work.WorkScheduler, org.apache.tuscany.sca.invocation.Interceptor);
+ public void setWorkScheduler(org.apache.tuscany.sca.work.WorkScheduler);
+ public org.apache.tuscany.sca.invocation.Message invoke(org.apache.tuscany.sca.invocation.Message);
+ public org.apache.tuscany.sca.invocation.Message processRequest(org.apache.tuscany.sca.invocation.Message);
+ public org.apache.tuscany.sca.invocation.Message processResponse(org.apache.tuscany.sca.invocation.Message);
+ static java.util.logging.Logger access$100();
+ static {};
+}
+
+Compiled from "ProxyCreationException.java"
+public class org.apache.tuscany.sca.core.invocation.ProxyCreationException extends org.apache.tuscany.sca.core.factory.ObjectCreationException{
+ public org.apache.tuscany.sca.core.invocation.ProxyCreationException();
+ public org.apache.tuscany.sca.core.invocation.ProxyCreationException(java.lang.String, java.lang.Throwable);
+ public org.apache.tuscany.sca.core.invocation.ProxyCreationException(java.lang.String);
+ public org.apache.tuscany.sca.core.invocation.ProxyCreationException(java.lang.Throwable);
+}
+
+Compiled from "ProxyFactory.java"
+public interface org.apache.tuscany.sca.core.invocation.ProxyFactory{
+ public abstract java.lang.Object createProxy(java.lang.Class, org.apache.tuscany.sca.runtime.Invocable) throws org.apache.tuscany.sca.core.invocation.ProxyCreationException;
+ public abstract java.lang.Object createProxy(org.oasisopen.sca.ServiceReference) throws org.apache.tuscany.sca.core.invocation.ProxyCreationException;
+ public abstract java.lang.Object createCallbackProxy(java.lang.Class, java.util.List) throws org.apache.tuscany.sca.core.invocation.ProxyCreationException;
+ public abstract java.lang.Object createCallbackProxy(org.oasisopen.sca.ServiceReference) throws org.apache.tuscany.sca.core.invocation.ProxyCreationException;
+ public abstract org.oasisopen.sca.ServiceReference cast(java.lang.Object) throws java.lang.IllegalArgumentException;
+ public abstract boolean isProxyClass(java.lang.Class);
+}
+
+Compiled from "ProxyFactoryExtensionPoint.java"
+public interface org.apache.tuscany.sca.core.invocation.ProxyFactoryExtensionPoint{
+ public abstract org.apache.tuscany.sca.core.invocation.ProxyFactory getInterfaceProxyFactory();
+ public abstract org.apache.tuscany.sca.core.invocation.ProxyFactory getClassProxyFactory();
+ public abstract void setInterfaceProxyFactory(org.apache.tuscany.sca.core.invocation.ProxyFactory);
+ public abstract void setClassProxyFactory(org.apache.tuscany.sca.core.invocation.ProxyFactory);
+}
+
+Compiled from "RuntimeInvoker.java"
+public class org.apache.tuscany.sca.core.invocation.RuntimeInvoker extends java.lang.Object implements org.apache.tuscany.sca.invocation.Invoker,org.apache.tuscany.sca.invocation.InvokerAsyncRequest{
+ protected org.apache.tuscany.sca.core.ExtensionPointRegistry registry;
+ protected org.apache.tuscany.sca.invocation.MessageFactory messageFactory;
+ protected org.apache.tuscany.sca.runtime.Invocable invocable;
+ public org.apache.tuscany.sca.core.invocation.RuntimeInvoker(org.apache.tuscany.sca.core.ExtensionPointRegistry, org.apache.tuscany.sca.runtime.Invocable);
+ public org.apache.tuscany.sca.invocation.Message invokeBinding(org.apache.tuscany.sca.invocation.Message);
+ public void invokeBindingAsync(org.apache.tuscany.sca.invocation.Message);
+ public org.apache.tuscany.sca.invocation.Message invoke(org.apache.tuscany.sca.invocation.Message);
+ public java.lang.Object invoke(org.apache.tuscany.sca.interfacedef.Operation, java.lang.Object[]) throws java.lang.reflect.InvocationTargetException;
+ public org.apache.tuscany.sca.invocation.Message invoke(org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.invocation.Message);
+ public org.apache.tuscany.sca.invocation.Message invoke(org.apache.tuscany.sca.invocation.InvocationChain, org.apache.tuscany.sca.invocation.Message);
+ public void invokeAsync(org.apache.tuscany.sca.invocation.Message);
+ public void invokeAsyncResponse(org.apache.tuscany.sca.invocation.Message);
+ public void invokeAsyncRequest(org.apache.tuscany.sca.invocation.Message) throws java.lang.Throwable;
+}
+
+Compiled from "WireObjectFactory.java"
+public class org.apache.tuscany.sca.core.invocation.WireObjectFactory extends java.lang.Object implements org.apache.tuscany.sca.core.factory.ObjectFactory{
+ public org.apache.tuscany.sca.core.invocation.WireObjectFactory(java.lang.Class, org.apache.tuscany.sca.runtime.Invocable, org.apache.tuscany.sca.core.invocation.ProxyFactory);
+ public java.lang.Object getInstance() throws org.apache.tuscany.sca.core.factory.ObjectCreationException;
+}
+
+Compiled from "AbstractScopeContainer.java"
+public abstract class org.apache.tuscany.sca.core.scope.AbstractScopeContainer extends java.lang.Object implements org.apache.tuscany.sca.core.scope.ScopeContainer{
+ protected java.util.Map wrappers;
+ protected final org.apache.tuscany.sca.core.scope.Scope scope;
+ protected org.apache.tuscany.sca.runtime.RuntimeComponent component;
+ protected volatile int lifecycleState;
+ public org.apache.tuscany.sca.core.scope.AbstractScopeContainer(org.apache.tuscany.sca.core.scope.Scope, org.apache.tuscany.sca.runtime.RuntimeComponent);
+ protected void checkInit();
+ protected org.apache.tuscany.sca.core.factory.InstanceWrapper createInstanceWrapper() throws org.apache.tuscany.sca.core.scope.TargetResolutionException;
+ public org.apache.tuscany.sca.core.factory.InstanceWrapper getAssociatedWrapper(java.lang.Object) throws org.apache.tuscany.sca.core.scope.TargetResolutionException;
+ public org.apache.tuscany.sca.core.scope.Scope getScope();
+ public org.apache.tuscany.sca.core.factory.InstanceWrapper getWrapper(java.lang.Object) throws org.apache.tuscany.sca.core.scope.TargetResolutionException;
+ public void addWrapperReference(java.lang.Object, java.lang.Object) throws org.apache.tuscany.sca.core.scope.TargetResolutionException;
+ public void registerWrapper(org.apache.tuscany.sca.core.factory.InstanceWrapper, java.lang.Object) throws org.apache.tuscany.sca.core.scope.TargetResolutionException;
+ protected boolean isEagerInit();
+ public void returnWrapper(org.apache.tuscany.sca.core.factory.InstanceWrapper, java.lang.Object) throws org.apache.tuscany.sca.core.scope.TargetDestructionException;
+ public void remove(java.lang.Object) throws org.apache.tuscany.sca.core.scope.TargetDestructionException;
+ public synchronized void start();
+ public void startContext(java.lang.Object);
+ public synchronized void stop();
+ public void stopContext(java.lang.Object);
+ public java.lang.String toString();
+ public org.apache.tuscany.sca.runtime.RuntimeComponent getComponent();
+ public void setComponent(org.apache.tuscany.sca.runtime.RuntimeComponent);
+ public int getLifecycleState();
+ protected void setLifecycleState(int);
+}
+
+Compiled from "DefaultScopeRegistry.java"
+public class org.apache.tuscany.sca.core.scope.DefaultScopeRegistry extends org.apache.tuscany.sca.core.scope.impl.ScopeRegistryImpl implements org.apache.tuscany.sca.core.scope.ScopeRegistry{
+ public org.apache.tuscany.sca.core.scope.DefaultScopeRegistry();
+}
+
+Compiled from "Scope.java"
+public class org.apache.tuscany.sca.core.scope.Scope extends java.lang.Object{
+ public static final org.apache.tuscany.sca.core.scope.Scope STATELESS;
+ public static final org.apache.tuscany.sca.core.scope.Scope COMPOSITE;
+ public static final org.apache.tuscany.sca.core.scope.Scope INVALID;
+ public org.apache.tuscany.sca.core.scope.Scope(java.lang.String);
+ public java.lang.String getScope();
+ public boolean equals(java.lang.Object);
+ public int hashCode();
+ public java.lang.String toString();
+ static {};
+}
+
+Compiled from "ScopeContainer.java"
+public interface org.apache.tuscany.sca.core.scope.ScopeContainer{
+ public static final int CONFIG_ERROR;
+ public static final int UNINITIALIZED;
+ public static final int INITIALIZING;
+ public static final int INITIALIZED;
+ public static final int RUNNING;
+ public static final int STOPPING;
+ public static final int STOPPED;
+ public static final int ERROR;
+ public abstract org.apache.tuscany.sca.core.scope.Scope getScope();
+ public abstract void startContext(java.lang.Object);
+ public abstract void stopContext(java.lang.Object);
+ public abstract org.apache.tuscany.sca.core.factory.InstanceWrapper getWrapper(java.lang.Object) throws org.apache.tuscany.sca.core.scope.TargetResolutionException;
+ public abstract void addWrapperReference(java.lang.Object, java.lang.Object) throws org.apache.tuscany.sca.core.scope.TargetResolutionException;
+ public abstract void registerWrapper(org.apache.tuscany.sca.core.factory.InstanceWrapper, java.lang.Object) throws org.apache.tuscany.sca.core.scope.TargetResolutionException;
+ public abstract org.apache.tuscany.sca.core.factory.InstanceWrapper getAssociatedWrapper(java.lang.Object) throws org.apache.tuscany.sca.core.scope.TargetResolutionException;
+ public abstract void returnWrapper(org.apache.tuscany.sca.core.factory.InstanceWrapper, java.lang.Object) throws org.apache.tuscany.sca.core.scope.TargetDestructionException;
+ public abstract void remove(java.lang.Object) throws org.apache.tuscany.sca.core.scope.TargetDestructionException;
+ public abstract int getLifecycleState();
+ public abstract void start();
+ public abstract void stop();
+}
+
+Compiled from "ScopeContainerFactory.java"
+public interface org.apache.tuscany.sca.core.scope.ScopeContainerFactory{
+ public abstract org.apache.tuscany.sca.core.scope.ScopeContainer createScopeContainer(org.apache.tuscany.sca.runtime.RuntimeComponent);
+ public abstract org.apache.tuscany.sca.core.scope.Scope getScope();
+}
+
+Compiled from "ScopeRegistry.java"
+public interface org.apache.tuscany.sca.core.scope.ScopeRegistry{
+ public abstract org.apache.tuscany.sca.core.scope.ScopeContainer getScopeContainer(org.apache.tuscany.sca.runtime.RuntimeComponent);
+ public abstract void register(org.apache.tuscany.sca.core.scope.ScopeContainerFactory);
+}
+
+Compiled from "ScopedImplementationProvider.java"
+public interface org.apache.tuscany.sca.core.scope.ScopedImplementationProvider extends org.apache.tuscany.sca.provider.ImplementationProvider{
+ public abstract org.apache.tuscany.sca.core.scope.Scope getScope();
+ public abstract boolean isEagerInit();
+ public abstract org.apache.tuscany.sca.core.factory.InstanceWrapper createInstanceWrapper();
+}
+
+Compiled from "ScopedRuntimeComponent.java"
+public interface org.apache.tuscany.sca.core.scope.ScopedRuntimeComponent extends org.apache.tuscany.sca.runtime.RuntimeComponent{
+ public abstract void setScopeContainer(org.apache.tuscany.sca.core.scope.ScopeContainer);
+ public abstract org.apache.tuscany.sca.core.scope.ScopeContainer getScopeContainer();
+}
+
+Compiled from "TargetDestructionException.java"
+public class org.apache.tuscany.sca.core.scope.TargetDestructionException extends org.apache.tuscany.sca.core.scope.TargetResolutionException{
+ public org.apache.tuscany.sca.core.scope.TargetDestructionException();
+ public org.apache.tuscany.sca.core.scope.TargetDestructionException(java.lang.String, java.lang.Throwable);
+ public org.apache.tuscany.sca.core.scope.TargetDestructionException(java.lang.String);
+ public org.apache.tuscany.sca.core.scope.TargetDestructionException(java.lang.Throwable);
+}
+
+Compiled from "TargetInitializationException.java"
+public class org.apache.tuscany.sca.core.scope.TargetInitializationException extends org.apache.tuscany.sca.core.scope.TargetResolutionException{
+ public org.apache.tuscany.sca.core.scope.TargetInitializationException();
+ public org.apache.tuscany.sca.core.scope.TargetInitializationException(java.lang.String, java.lang.Throwable);
+ public org.apache.tuscany.sca.core.scope.TargetInitializationException(java.lang.String);
+ public org.apache.tuscany.sca.core.scope.TargetInitializationException(java.lang.Throwable);
+}
+
+Compiled from "TargetNotFoundException.java"
+public class org.apache.tuscany.sca.core.scope.TargetNotFoundException extends org.apache.tuscany.sca.core.scope.TargetResolutionException{
+ public org.apache.tuscany.sca.core.scope.TargetNotFoundException();
+ public org.apache.tuscany.sca.core.scope.TargetNotFoundException(java.lang.String, java.lang.Throwable);
+ public org.apache.tuscany.sca.core.scope.TargetNotFoundException(java.lang.String);
+ public org.apache.tuscany.sca.core.scope.TargetNotFoundException(java.lang.Throwable);
+}
+
+Compiled from "TargetResolutionException.java"
+public class org.apache.tuscany.sca.core.scope.TargetResolutionException extends java.lang.Exception{
+ public org.apache.tuscany.sca.core.scope.TargetResolutionException();
+ public org.apache.tuscany.sca.core.scope.TargetResolutionException(java.lang.String, java.lang.Throwable);
+ public org.apache.tuscany.sca.core.scope.TargetResolutionException(java.lang.String);
+ public org.apache.tuscany.sca.core.scope.TargetResolutionException(java.lang.Throwable);
+}
+
+Compiled from "BaseDataBinding.java"
+public abstract class org.apache.tuscany.sca.databinding.BaseDataBinding extends java.lang.Object implements org.apache.tuscany.sca.databinding.DataBinding{
+ static final boolean $assertionsDisabled;
+ protected org.apache.tuscany.sca.databinding.BaseDataBinding(java.lang.Class);
+ protected org.apache.tuscany.sca.databinding.BaseDataBinding(java.lang.String, java.lang.Class);
+ public boolean introspect(org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.Operation);
+ public org.apache.tuscany.sca.interfacedef.DataType introspect(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation);
+ public final java.lang.String getName();
+ public org.apache.tuscany.sca.databinding.WrapperHandler getWrapperHandler();
+ public java.lang.Object copy(java.lang.Object, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation);
+ public org.apache.tuscany.sca.databinding.XMLTypeHelper getXMLTypeHelper();
+ static {};
+}
+
+Compiled from "BaseTransformer.java"
+public abstract class org.apache.tuscany.sca.databinding.BaseTransformer extends java.lang.Object implements org.apache.tuscany.sca.databinding.Transformer{
+ protected org.apache.tuscany.sca.databinding.BaseTransformer();
+ protected abstract java.lang.Class getSourceType();
+ protected abstract java.lang.Class getTargetType();
+ public java.lang.String getSourceDataBinding();
+ public java.lang.String getTargetDataBinding();
+ public int getWeight();
+}
+
+Compiled from "DataBinding.java"
+public interface org.apache.tuscany.sca.databinding.DataBinding{
+ public abstract java.lang.String getName();
+ public abstract boolean introspect(org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.Operation);
+ public abstract org.apache.tuscany.sca.interfacedef.DataType introspect(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation);
+ public abstract org.apache.tuscany.sca.databinding.WrapperHandler getWrapperHandler();
+ public abstract java.lang.Object copy(java.lang.Object, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation);
+ public abstract org.apache.tuscany.sca.databinding.XMLTypeHelper getXMLTypeHelper();
+}
+
+Compiled from "DataBindingContext.java"
+public class org.apache.tuscany.sca.databinding.DataBindingContext extends java.lang.Object{
+ public org.apache.tuscany.sca.databinding.DataBindingContext(java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[], org.apache.tuscany.sca.interfacedef.Operation, java.lang.String);
+ public org.apache.tuscany.sca.databinding.DataBindingContext(java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[]);
+ public org.apache.tuscany.sca.databinding.DataBindingContext(java.lang.Class);
+ public java.lang.Class getType();
+ public java.lang.reflect.Type getGenericType();
+ public java.lang.annotation.Annotation[] getAnnotations();
+ public org.apache.tuscany.sca.interfacedef.Operation getOperation();
+ public java.lang.annotation.Annotation getAnnotation(java.lang.Class);
+ public java.lang.String getContentType();
+}
+
+Compiled from "DataBindingExtensionPoint.java"
+public interface org.apache.tuscany.sca.databinding.DataBindingExtensionPoint{
+ public abstract void addDataBinding(org.apache.tuscany.sca.databinding.DataBinding);
+ public abstract org.apache.tuscany.sca.databinding.DataBinding getDataBinding(java.lang.String);
+ public abstract org.apache.tuscany.sca.databinding.DataBinding removeDataBinding(java.lang.String);
+ public abstract boolean introspectType(org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.Operation);
+ public abstract org.apache.tuscany.sca.interfacedef.DataType introspectType(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation);
+}
+
+Compiled from "DataPipe.java"
+public interface org.apache.tuscany.sca.databinding.DataPipe{
+ public abstract java.lang.Object getSink();
+ public abstract java.lang.Object getResult();
+}
+
+Compiled from "DataPipeTransformer.java"
+public interface org.apache.tuscany.sca.databinding.DataPipeTransformer extends org.apache.tuscany.sca.databinding.Transformer{
+ public abstract org.apache.tuscany.sca.databinding.DataPipe newInstance();
+}
+
+Compiled from "DefaultDataBindingExtensionPoint.java"
+public class org.apache.tuscany.sca.databinding.DefaultDataBindingExtensionPoint extends java.lang.Object implements org.apache.tuscany.sca.databinding.DataBindingExtensionPoint{
+ public org.apache.tuscany.sca.databinding.DefaultDataBindingExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public org.apache.tuscany.sca.databinding.DataBinding getDataBinding(java.lang.String);
+ public void addDataBinding(org.apache.tuscany.sca.databinding.DataBinding);
+ public org.apache.tuscany.sca.databinding.DataBinding removeDataBinding(java.lang.String);
+ public boolean introspectType(org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.Operation);
+ public org.apache.tuscany.sca.interfacedef.DataType introspectType(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation);
+ static org.apache.tuscany.sca.core.ExtensionPointRegistry access$200(org.apache.tuscany.sca.databinding.DefaultDataBindingExtensionPoint);
+ static {};
+}
+
+Compiled from "DefaultTransformerExtensionPoint.java"
+public class org.apache.tuscany.sca.databinding.DefaultTransformerExtensionPoint extends java.lang.Object implements org.apache.tuscany.sca.databinding.TransformerExtensionPoint{
+ public org.apache.tuscany.sca.databinding.DefaultTransformerExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public void addTransformer(java.lang.String, java.lang.String, int, org.apache.tuscany.sca.databinding.Transformer, boolean);
+ public void addTransformer(org.apache.tuscany.sca.databinding.Transformer, boolean);
+ public boolean removeTransformer(java.lang.String, java.lang.String);
+ public org.apache.tuscany.sca.databinding.Transformer getTransformer(java.lang.String, java.lang.String);
+ public java.util.List getTransformerChain(java.lang.String, java.lang.String);
+ public java.lang.String toString();
+ static org.apache.tuscany.sca.core.ExtensionPointRegistry access$200(org.apache.tuscany.sca.databinding.DefaultTransformerExtensionPoint);
+ static {};
+}
+
+Compiled from "Mediator.java"
+public interface org.apache.tuscany.sca.databinding.Mediator{
+ public static final java.lang.String SOURCE_OPERATION;
+ public static final java.lang.String TARGET_OPERATION;
+ public static final java.lang.String BODY_TYPE;
+ public static final java.lang.String BODY_TYPE_INPUT;
+ public static final java.lang.String BODY_TYPE_OUTPUT;
+ public static final java.lang.String BODY_TYPE_FAULT;
+ public abstract java.lang.Object mediate(java.lang.Object, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType, java.util.Map);
+ public abstract void mediate(java.lang.Object, java.lang.Object, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType, java.util.Map);
+ public abstract java.lang.Object mediateInput(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation, java.util.Map);
+ public abstract java.lang.Object mediateOutput(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation, java.util.Map);
+ public abstract java.lang.Object mediateFault(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation, java.util.Map);
+ public abstract java.lang.Object copy(java.lang.Object, org.apache.tuscany.sca.interfacedef.DataType);
+ public abstract java.lang.Object copy(java.lang.Object, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType);
+ public abstract java.lang.Object copy(java.lang.Object, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation);
+ public abstract java.lang.Object copyInput(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation);
+ public abstract java.lang.Object copyInput(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation);
+ public abstract java.lang.Object copyOutput(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation);
+ public abstract java.lang.Object copyOutput(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation);
+ public abstract java.lang.Object copyFault(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation);
+ public abstract java.lang.Object copyFault(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation);
+ public abstract org.apache.tuscany.sca.databinding.DataBindingExtensionPoint getDataBindings();
+ public abstract org.apache.tuscany.sca.databinding.TransformerExtensionPoint getTransformers();
+ public abstract org.apache.tuscany.sca.databinding.TransformationContext createTransformationContext();
+ public abstract org.apache.tuscany.sca.databinding.TransformationContext createTransformationContext(org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType, java.util.Map);
+}
+
+Compiled from "PullTransformer.java"
+public interface org.apache.tuscany.sca.databinding.PullTransformer extends org.apache.tuscany.sca.databinding.Transformer{
+ public abstract java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext);
+}
+
+Compiled from "PushTransformer.java"
+public interface org.apache.tuscany.sca.databinding.PushTransformer extends org.apache.tuscany.sca.databinding.Transformer{
+ public abstract void transform(java.lang.Object, java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext);
+}
+
+Compiled from "SimpleTypeMapper.java"
+public interface org.apache.tuscany.sca.databinding.SimpleTypeMapper{
+ public abstract java.lang.Object toJavaObject(javax.xml.namespace.QName, java.lang.String, org.apache.tuscany.sca.databinding.TransformationContext);
+ public abstract java.lang.String toXMLLiteral(javax.xml.namespace.QName, java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext);
+ public abstract java.lang.Class getJavaType(javax.xml.namespace.QName);
+ public abstract org.apache.tuscany.sca.interfacedef.util.TypeInfo getXMLType(java.lang.Class);
+ public abstract boolean isSimpleXSDType(javax.xml.namespace.QName);
+}
+
+Compiled from "TransformationContext.java"
+public interface org.apache.tuscany.sca.databinding.TransformationContext{
+ public abstract org.apache.tuscany.sca.interfacedef.Operation getSourceOperation();
+ public abstract void setSourceOperation(org.apache.tuscany.sca.interfacedef.Operation);
+ public abstract org.apache.tuscany.sca.interfacedef.Operation getTargetOperation();
+ public abstract void setTargetOperation(org.apache.tuscany.sca.interfacedef.Operation);
+ public abstract org.apache.tuscany.sca.interfacedef.DataType getSourceDataType();
+ public abstract org.apache.tuscany.sca.interfacedef.DataType getTargetDataType();
+ public abstract void setSourceDataType(org.apache.tuscany.sca.interfacedef.DataType);
+ public abstract void setTargetDataType(org.apache.tuscany.sca.interfacedef.DataType);
+ public abstract java.util.Map getMetadata();
+}
+
+Compiled from "TransformationException.java"
+public class org.apache.tuscany.sca.databinding.TransformationException extends java.lang.RuntimeException{
+ public org.apache.tuscany.sca.databinding.TransformationException();
+ public org.apache.tuscany.sca.databinding.TransformationException(java.lang.String, java.lang.Throwable);
+ public org.apache.tuscany.sca.databinding.TransformationException(java.lang.String);
+ public org.apache.tuscany.sca.databinding.TransformationException(java.lang.Throwable);
+ public java.lang.String getSourceDataBinding();
+ public void setSourceDataBinding(java.lang.String);
+ public java.lang.String getTargetDataBinding();
+ public void setTargetDataBinding(java.lang.String);
+}
+
+Compiled from "Transformer.java"
+public interface org.apache.tuscany.sca.databinding.Transformer{
+ public abstract java.lang.String getSourceDataBinding();
+ public abstract java.lang.String getTargetDataBinding();
+ public abstract int getWeight();
+}
+
+Compiled from "TransformerExtensionPoint.java"
+public interface org.apache.tuscany.sca.databinding.TransformerExtensionPoint{
+ public abstract void addTransformer(java.lang.String, java.lang.String, int, org.apache.tuscany.sca.databinding.Transformer, boolean);
+ public abstract void addTransformer(org.apache.tuscany.sca.databinding.Transformer, boolean);
+ public abstract boolean removeTransformer(java.lang.String, java.lang.String);
+ public abstract org.apache.tuscany.sca.databinding.Transformer getTransformer(java.lang.String, java.lang.String);
+ public abstract java.util.List getTransformerChain(java.lang.String, java.lang.String);
+}
+
+Compiled from "WrapperHandler.java"
+public interface org.apache.tuscany.sca.databinding.WrapperHandler{
+ public abstract java.lang.Object create(org.apache.tuscany.sca.interfacedef.Operation, boolean);
+ public abstract org.apache.tuscany.sca.interfacedef.DataType getWrapperType(org.apache.tuscany.sca.interfacedef.Operation, boolean);
+ public abstract boolean isInstance(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, boolean);
+ public abstract void setChildren(java.lang.Object, java.lang.Object[], org.apache.tuscany.sca.interfacedef.Operation, boolean);
+ public abstract java.util.List getChildren(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, boolean);
+}
+
+Compiled from "XMLTypeHelper.java"
+public interface org.apache.tuscany.sca.databinding.XMLTypeHelper{
+ public abstract org.apache.tuscany.sca.interfacedef.util.TypeInfo getTypeInfo(java.lang.Class, java.lang.Object);
+ public abstract java.util.List getSchemaDefinitions(org.apache.tuscany.sca.xsd.XSDFactory, org.apache.tuscany.sca.contribution.resolver.ModelResolver, java.util.List);
+ public abstract java.util.List getSchemaDefinitions(org.apache.tuscany.sca.xsd.XSDFactory, org.apache.tuscany.sca.contribution.resolver.ModelResolver, org.apache.tuscany.sca.interfacedef.Interface);
+}
+
+Compiled from "DataBinding.java"
+public interface org.apache.tuscany.sca.databinding.annotation.DataBinding extends java.lang.annotation.Annotation{
+ public abstract java.lang.String value();
+ public abstract boolean wrapped();
+}
+
+Compiled from "DataType.java"
+public interface org.apache.tuscany.sca.databinding.annotation.DataType extends java.lang.annotation.Annotation{
+ public abstract java.lang.String value();
+}
+
+Compiled from "DirectedGraph.java"
+public class org.apache.tuscany.sca.databinding.impl.DirectedGraph extends java.lang.Object implements java.lang.Cloneable{
+ public org.apache.tuscany.sca.databinding.impl.DirectedGraph();
+ public void addEdge(java.lang.Object, java.lang.Object, java.lang.Object, int, boolean);
+ public void addEdge(java.lang.Object, java.lang.Object);
+ public org.apache.tuscany.sca.databinding.impl.DirectedGraph$Vertex getVertex(java.lang.Object);
+ public boolean removeEdge(java.lang.Object, java.lang.Object);
+ public void removeEdge(org.apache.tuscany.sca.databinding.impl.DirectedGraph$Edge);
+ public void removeVertex(org.apache.tuscany.sca.databinding.impl.DirectedGraph$Vertex);
+ public org.apache.tuscany.sca.databinding.impl.DirectedGraph$Edge getEdge(org.apache.tuscany.sca.databinding.impl.DirectedGraph$Vertex, org.apache.tuscany.sca.databinding.impl.DirectedGraph$Vertex);
+ public org.apache.tuscany.sca.databinding.impl.DirectedGraph$Edge getEdge(java.lang.Object, java.lang.Object);
+ public org.apache.tuscany.sca.databinding.impl.DirectedGraph$Path getShortestPath(java.lang.Object, java.lang.Object);
+ public java.lang.String toString();
+ public java.util.Map getVertices();
+ public void addGraph(org.apache.tuscany.sca.databinding.impl.DirectedGraph);
+ public java.util.List topologicalSort(boolean);
+ public java.lang.Object clone();
+ static {};
+}
+
+Compiled from "Group2GroupTransformer.java"
+public class org.apache.tuscany.sca.databinding.impl.Group2GroupTransformer extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{
+ protected org.apache.tuscany.sca.databinding.Mediator mediator;
+ public org.apache.tuscany.sca.databinding.impl.Group2GroupTransformer(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public java.lang.String getSourceDataBinding();
+ public java.lang.String getTargetDataBinding();
+ protected java.lang.Class getSourceType();
+ protected java.lang.Class getTargetType();
+ public int getWeight();
+ public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext);
+}
+
+Compiled from "GroupDataBinding.java"
+public abstract class org.apache.tuscany.sca.databinding.impl.GroupDataBinding extends org.apache.tuscany.sca.databinding.BaseDataBinding{
+ public static final java.lang.String NAME;
+ protected java.lang.Class[] markerTypes;
+ public org.apache.tuscany.sca.databinding.impl.GroupDataBinding(java.lang.Class[]);
+ public boolean introspect(org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.Operation);
+ protected boolean isTypeOf(java.lang.Class, java.lang.Class);
+ protected java.lang.String getDataBinding(java.lang.Class);
+ protected abstract java.lang.Object getLogical(java.lang.Class, org.apache.tuscany.sca.interfacedef.Operation);
+}
+
+Compiled from "Java2SimpleTypeTransformer.java"
+public abstract class org.apache.tuscany.sca.databinding.impl.Java2SimpleTypeTransformer extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{
+ protected org.apache.tuscany.sca.databinding.SimpleTypeMapper mapper;
+ public org.apache.tuscany.sca.databinding.impl.Java2SimpleTypeTransformer();
+ public org.apache.tuscany.sca.databinding.impl.Java2SimpleTypeTransformer(org.apache.tuscany.sca.databinding.SimpleTypeMapper);
+ public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext);
+ public java.lang.Class getSourceType();
+ public int getWeight();
+ protected abstract java.lang.Object createElement(javax.xml.namespace.QName, java.lang.String, org.apache.tuscany.sca.databinding.TransformationContext);
+ public java.lang.String getSourceDataBinding();
+}
+
+Compiled from "MediatorImpl.java"
+public class org.apache.tuscany.sca.databinding.impl.MediatorImpl extends java.lang.Object implements org.apache.tuscany.sca.databinding.Mediator{
+ org.apache.tuscany.sca.databinding.impl.MediatorImpl(org.apache.tuscany.sca.databinding.DataBindingExtensionPoint, org.apache.tuscany.sca.databinding.TransformerExtensionPoint);
+ public org.apache.tuscany.sca.databinding.impl.MediatorImpl(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public java.lang.Object mediate(java.lang.Object, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType, java.util.Map);
+ public void mediate(java.lang.Object, java.lang.Object, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType, java.util.Map);
+ public org.apache.tuscany.sca.databinding.DataBindingExtensionPoint getDataBindings();
+ public org.apache.tuscany.sca.databinding.TransformerExtensionPoint getTransformers();
+ public java.lang.Object mediateFault(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation, java.util.Map);
+ public java.lang.Object mediateOutput(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation, java.util.Map);
+ public java.lang.Object mediateInput(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation, java.util.Map);
+ public org.apache.tuscany.sca.databinding.TransformationContext createTransformationContext();
+ public org.apache.tuscany.sca.databinding.TransformationContext createTransformationContext(org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType, java.util.Map);
+ public java.lang.Object copy(java.lang.Object, org.apache.tuscany.sca.interfacedef.DataType);
+ public java.lang.Object copy(java.lang.Object, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType);
+ public java.lang.Object copy(java.lang.Object, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation);
+ public java.lang.Object copyInput(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation);
+ public java.lang.Object copyInput(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation);
+ public java.lang.Object copyOutput(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation);
+ public java.lang.Object copyOutput(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation);
+ public java.lang.Object copyFault(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation);
+ public java.lang.Object copyFault(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation);
+}
+
+Compiled from "PipedTransformer.java"
+public class org.apache.tuscany.sca.databinding.impl.PipedTransformer extends java.lang.Object implements org.apache.tuscany.sca.databinding.PullTransformer{
+ public org.apache.tuscany.sca.databinding.impl.PipedTransformer(org.apache.tuscany.sca.databinding.PushTransformer, org.apache.tuscany.sca.databinding.DataPipeTransformer);
+ public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext);
+ public java.lang.String getSourceDataBinding();
+ public java.lang.String getTargetDataBinding();
+ public int getWeight();
+}
+
+Compiled from "SimpleType2JavaTransformer.java"
+public abstract class org.apache.tuscany.sca.databinding.impl.SimpleType2JavaTransformer extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{
+ protected org.apache.tuscany.sca.databinding.SimpleTypeMapper mapper;
+ public org.apache.tuscany.sca.databinding.impl.SimpleType2JavaTransformer();
+ public org.apache.tuscany.sca.databinding.impl.SimpleType2JavaTransformer(org.apache.tuscany.sca.databinding.SimpleTypeMapper);
+ public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext);
+ protected java.lang.Class getTargetType();
+ public int getWeight();
+ protected abstract java.lang.String getText(java.lang.Object);
+ protected void close(java.lang.Object);
+ public java.lang.String getTargetDataBinding();
+}
+
+Compiled from "SimpleTypeMapperImpl.java"
+public class org.apache.tuscany.sca.databinding.impl.SimpleTypeMapperImpl extends org.apache.tuscany.sca.databinding.impl.XSDDataTypeConverter implements org.apache.tuscany.sca.databinding.SimpleTypeMapper{
+ public static final java.util.Map JAVA2XML;
+ public static final java.lang.String URI_2001_SCHEMA_XSD;
+ public static final java.util.Map XML2JAVA;
+ public static final javax.xml.namespace.QName XSD_ANY;
+ public static final javax.xml.namespace.QName XSD_ANYSIMPLETYPE;
+ public static final javax.xml.namespace.QName XSD_ANYTYPE;
+ public static final javax.xml.namespace.QName XSD_ANYURI;
+ public static final javax.xml.namespace.QName XSD_BASE64;
+ public static final javax.xml.namespace.QName XSD_BOOLEAN;
+ public static final javax.xml.namespace.QName XSD_BYTE;
+ public static final javax.xml.namespace.QName XSD_DATE;
+ public static final javax.xml.namespace.QName XSD_DATETIME;
+ public static final javax.xml.namespace.QName XSD_DAY;
+ public static final javax.xml.namespace.QName XSD_DECIMAL;
+ public static final javax.xml.namespace.QName XSD_DOUBLE;
+ public static final javax.xml.namespace.QName XSD_DURATION;
+ public static final javax.xml.namespace.QName XSD_ENTITIES;
+ public static final javax.xml.namespace.QName XSD_ENTITY;
+ public static final javax.xml.namespace.QName XSD_FLOAT;
+ public static final javax.xml.namespace.QName XSD_HEXBIN;
+ public static final javax.xml.namespace.QName XSD_IDREF;
+ public static final javax.xml.namespace.QName XSD_IDREFS;
+ public static final javax.xml.namespace.QName XSD_INT;
+ public static final javax.xml.namespace.QName XSD_INTEGER;
+ public static final javax.xml.namespace.QName XSD_LONG;
+ public static final javax.xml.namespace.QName XSD_MONTH;
+ public static final javax.xml.namespace.QName XSD_MONTHDAY;
+ public static final javax.xml.namespace.QName XSD_NAME;
+ public static final javax.xml.namespace.QName XSD_NCNAME;
+ public static final javax.xml.namespace.QName XSD_NEGATIVEINTEGER;
+ public static final javax.xml.namespace.QName XSD_NMTOKEN;
+ public static final javax.xml.namespace.QName XSD_NMTOKENS;
+ public static final javax.xml.namespace.QName XSD_NONNEGATIVEINTEGER;
+ public static final javax.xml.namespace.QName XSD_NONPOSITIVEINTEGER;
+ public static final javax.xml.namespace.QName XSD_NORMALIZEDSTRING;
+ public static final javax.xml.namespace.QName XSD_NOTATION;
+ public static final javax.xml.namespace.QName XSD_POSITIVEINTEGER;
+ public static final javax.xml.namespace.QName XSD_QNAME;
+ public static final javax.xml.namespace.QName XSD_SHORT;
+ public static final java.util.Map XSD_SIMPLE_TYPES;
+ public static final javax.xml.namespace.QName XSD_STRING;
+ public static final javax.xml.namespace.QName XSD_TIME;
+ public static final javax.xml.namespace.QName XSD_TOKEN;
+ public static final javax.xml.namespace.QName XSD_UNSIGNEDBYTE;
+ public static final javax.xml.namespace.QName XSD_UNSIGNEDINT;
+ public static final javax.xml.namespace.QName XSD_UNSIGNEDLONG;
+ public static final javax.xml.namespace.QName XSD_UNSIGNEDSHORT;
+ public static final javax.xml.namespace.QName XSD_YEAR;
+ public static final javax.xml.namespace.QName XSD_YEARMONTH;
+ public org.apache.tuscany.sca.databinding.impl.SimpleTypeMapperImpl();
+ public java.lang.Class getJavaType(javax.xml.namespace.QName);
+ public org.apache.tuscany.sca.interfacedef.util.TypeInfo getXMLType(java.lang.Class);
+ public java.lang.Object toJavaObject(javax.xml.namespace.QName, java.lang.String, org.apache.tuscany.sca.databinding.TransformationContext);
+ public java.lang.String toXMLLiteral(javax.xml.namespace.QName, java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext);
+ public boolean isSimpleXSDType(javax.xml.namespace.QName);
+ static {};
+}
+
+Compiled from "TransformationContextImpl.java"
+public class org.apache.tuscany.sca.databinding.impl.TransformationContextImpl extends java.lang.Object implements org.apache.tuscany.sca.databinding.TransformationContext{
+ public org.apache.tuscany.sca.databinding.impl.TransformationContextImpl();
+ public org.apache.tuscany.sca.databinding.impl.TransformationContextImpl(org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType, java.util.Map);
+ public org.apache.tuscany.sca.interfacedef.DataType getSourceDataType();
+ public org.apache.tuscany.sca.interfacedef.DataType getTargetDataType();
+ public void setSourceDataType(org.apache.tuscany.sca.interfacedef.DataType);
+ public void setTargetDataType(org.apache.tuscany.sca.interfacedef.DataType);
+ public java.util.Map getMetadata();
+ public org.apache.tuscany.sca.interfacedef.Operation getSourceOperation();
+ public void setSourceOperation(org.apache.tuscany.sca.interfacedef.Operation);
+ public org.apache.tuscany.sca.interfacedef.Operation getTargetOperation();
+ public void setTargetOperation(org.apache.tuscany.sca.interfacedef.Operation);
+}
+
+Compiled from "XSDDataTypeConverter.java"
+public class org.apache.tuscany.sca.databinding.impl.XSDDataTypeConverter extends java.lang.Object{
+ public org.apache.tuscany.sca.databinding.impl.XSDDataTypeConverter();
+ public java.lang.String parseAnySimpleType(java.lang.String);
+ public byte[] parseBase64Binary(java.lang.String);
+ public boolean parseBoolean(java.lang.String);
+ public byte parseByte(java.lang.String);
+ public java.util.Calendar parseDate(java.lang.String);
+ public java.util.Calendar parseDateTime(java.lang.String);
+ public java.math.BigDecimal parseDecimal(java.lang.String);
+ public double parseDouble(java.lang.String);
+ public javax.xml.datatype.Duration parseDuration(java.lang.String);
+ public float parseFloat(java.lang.String);
+ public byte[] parseHexBinary(java.lang.String);
+ public int parseInt(java.lang.String);
+ public java.math.BigInteger parseInteger(java.lang.String);
+ public long parseLong(java.lang.String);
+ public javax.xml.namespace.QName parseQName(java.lang.String, javax.xml.namespace.NamespaceContext);
+ public short parseShort(java.lang.String);
+ public java.lang.String parseString(java.lang.String);
+ public java.util.Calendar parseTime(java.lang.String);
+ public long parseUnsignedInt(java.lang.String);
+ public int parseUnsignedShort(java.lang.String);
+ public java.lang.String printAnySimpleType(java.lang.String);
+ public java.lang.String printBase64Binary(byte[]);
+ public java.lang.String printBoolean(boolean);
+ public java.lang.String printByte(byte);
+ public java.lang.String printDate(java.util.Calendar);
+ public java.lang.String printDateTime(java.util.Calendar);
+ public java.lang.String printDecimal(java.math.BigDecimal);
+ public java.lang.String printDouble(double);
+ public java.lang.String printDuration(javax.xml.datatype.Duration);
+ public java.lang.String printFloat(float);
+ public java.lang.String printHexBinary(byte[]);
+ public java.lang.String printInt(int);
+ public java.lang.String printInteger(java.math.BigInteger);
+ public java.lang.String printLong(long);
+ public java.lang.String printQName(javax.xml.namespace.QName, javax.xml.namespace.NamespaceContext);
+ public java.lang.String printShort(short);
+ public java.lang.String printString(java.lang.String);
+ public java.lang.String printTime(java.util.Calendar);
+ public java.lang.String printUnsignedInt(long);
+ public java.lang.String printUnsignedShort(int);
+}
+
+Compiled from "BeanXMLStreamReaderImpl.java"
+public class org.apache.tuscany.sca.databinding.xml.BeanXMLStreamReaderImpl extends org.apache.tuscany.sca.common.xml.stax.reader.XmlTreeStreamReaderImpl{
+ public org.apache.tuscany.sca.databinding.xml.BeanXMLStreamReaderImpl(javax.xml.namespace.QName, java.lang.Object);
+ static java.util.Map access$000(java.lang.Object) throws java.lang.Exception;
+ static java.util.Comparator access$100();
+ static {};
+}
+
+Compiled from "DOMDataBinding.java"
+public class org.apache.tuscany.sca.databinding.xml.DOMDataBinding extends org.apache.tuscany.sca.databinding.BaseDataBinding{
+ public static final java.lang.String NAME;
+ public static final java.lang.String ROOT_NAMESPACE;
+ public static final javax.xml.namespace.QName ROOT_ELEMENT;
+ public org.apache.tuscany.sca.databinding.xml.DOMDataBinding(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public org.apache.tuscany.sca.databinding.WrapperHandler getWrapperHandler();
+ public java.lang.Object copy(java.lang.Object, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.Operation, org.apache.tuscany.sca.interfacedef.Operation);
+ public boolean introspect(org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.Operation);
+ public static org.w3c.dom.Element adjustElementName(org.apache.tuscany.sca.databinding.TransformationContext, org.w3c.dom.Element);
+ static {};
+}
+
+Compiled from "DOMWrapperHandler.java"
+public class org.apache.tuscany.sca.databinding.xml.DOMWrapperHandler extends java.lang.Object implements org.apache.tuscany.sca.databinding.WrapperHandler{
+ static final boolean $assertionsDisabled;
+ public org.apache.tuscany.sca.databinding.xml.DOMWrapperHandler(org.apache.tuscany.sca.common.xml.dom.DOMHelper);
+ public org.w3c.dom.Node create(org.apache.tuscany.sca.interfacedef.Operation, boolean);
+ public void setChildren(org.w3c.dom.Node, java.lang.Object[], org.apache.tuscany.sca.interfacedef.Operation, boolean);
+ public void setChild(org.w3c.dom.Node, int, org.apache.tuscany.sca.interfacedef.util.ElementInfo, java.lang.Object);
+ public java.util.List getChildren(org.w3c.dom.Node, org.apache.tuscany.sca.interfacedef.Operation, boolean);
+ public org.apache.tuscany.sca.interfacedef.DataType getWrapperType(org.apache.tuscany.sca.interfacedef.Operation, boolean);
+ public boolean isInstance(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, boolean);
+ public java.util.List getChildren(java.lang.Object, org.apache.tuscany.sca.interfacedef.Operation, boolean);
+ public void setChildren(java.lang.Object, java.lang.Object[], org.apache.tuscany.sca.interfacedef.Operation, boolean);
+ public java.lang.Object create(org.apache.tuscany.sca.interfacedef.Operation, boolean);
+ static {};
+}
+
+Compiled from "InputSource2Node.java"
+public class org.apache.tuscany.sca.databinding.xml.InputSource2Node extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{
+ public org.apache.tuscany.sca.databinding.xml.InputSource2Node(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public org.w3c.dom.Node transform(org.xml.sax.InputSource, org.apache.tuscany.sca.databinding.TransformationContext);
+ public java.lang.Class getSourceType();
+ public java.lang.Class getTargetType();
+ public int getWeight();
+ public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext);
+}
+
+Compiled from "InputSource2SAX.java"
+public class org.apache.tuscany.sca.databinding.xml.InputSource2SAX extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PushTransformer{
+ public org.apache.tuscany.sca.databinding.xml.InputSource2SAX();
+ public void transform(org.xml.sax.InputSource, org.xml.sax.ContentHandler, org.apache.tuscany.sca.databinding.TransformationContext);
+ public java.lang.Class getSourceType();
+ public java.lang.Class getTargetType();
+ public int getWeight();
+ public void transform(java.lang.Object, java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext);
+}
+
+Compiled from "InputStream2Node.java"
+public class org.apache.tuscany.sca.databinding.xml.InputStream2Node extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{
+ public org.apache.tuscany.sca.databinding.xml.InputStream2Node(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public org.w3c.dom.Node transform(java.io.InputStream, org.apache.tuscany.sca.databinding.TransformationContext);
+ public java.lang.Class getSourceType();
+ public java.lang.Class getTargetType();
+ public int getWeight();
+ public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext);
+}
+
+Compiled from "InputStream2SAX.java"
+public class org.apache.tuscany.sca.databinding.xml.InputStream2SAX extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PushTransformer{
+ public org.apache.tuscany.sca.databinding.xml.InputStream2SAX();
+ public void transform(java.io.InputStream, org.xml.sax.ContentHandler, org.apache.tuscany.sca.databinding.TransformationContext);
+ public java.lang.Class getSourceType();
+ public java.lang.Class getTargetType();
+ public int getWeight();
+ public void transform(java.lang.Object, java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext);
+}
+
+Compiled from "Node2OutputStream.java"
+public class org.apache.tuscany.sca.databinding.xml.Node2OutputStream extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PushTransformer{
+ public org.apache.tuscany.sca.databinding.xml.Node2OutputStream(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public void transform(org.w3c.dom.Node, java.io.OutputStream, org.apache.tuscany.sca.databinding.TransformationContext);
+ protected java.lang.Class getSourceType();
+ protected java.lang.Class getTargetType();
+ public int getWeight();
+ public void transform(java.lang.Object, java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext);
+}
+
+Compiled from "Node2SimpleJavaType.java"
+public class org.apache.tuscany.sca.databinding.xml.Node2SimpleJavaType extends org.apache.tuscany.sca.databinding.impl.SimpleType2JavaTransformer{
+ public org.apache.tuscany.sca.databinding.xml.Node2SimpleJavaType();
+ protected java.lang.String getText(org.w3c.dom.Node);
+ public java.lang.Class getSourceType();
+ protected java.lang.String getText(java.lang.Object);
+}
+
+Compiled from "Node2SourceTransformer.java"
+public class org.apache.tuscany.sca.databinding.xml.Node2SourceTransformer extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{
+ public org.apache.tuscany.sca.databinding.xml.Node2SourceTransformer();
+ public javax.xml.transform.Source transform(org.w3c.dom.Node, org.apache.tuscany.sca.databinding.TransformationContext);
+ protected java.lang.Class getSourceType();
+ protected java.lang.Class getTargetType();
+ public int getWeight();
+ public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext);
+}
+
+Compiled from "Node2String.java"
+public class org.apache.tuscany.sca.databinding.xml.Node2String extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{
+ public org.apache.tuscany.sca.databinding.xml.Node2String(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public java.lang.String transform(org.w3c.dom.Node, org.apache.tuscany.sca.databinding.TransformationContext);
+ public java.lang.Class getSourceType();
+ public java.lang.Class getTargetType();
+ public int getWeight();
+ public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext);
+}
+
+Compiled from "Node2Writer.java"
+public class org.apache.tuscany.sca.databinding.xml.Node2Writer extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PushTransformer{
+ public org.apache.tuscany.sca.databinding.xml.Node2Writer(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public void transform(org.w3c.dom.Node, java.io.Writer, org.apache.tuscany.sca.databinding.TransformationContext);
+ protected java.lang.Class getSourceType();
+ protected java.lang.Class getTargetType();
+ public int getWeight();
+ public void transform(java.lang.Object, java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext);
+}
+
+Compiled from "Node2XMLStreamReader.java"
+public class org.apache.tuscany.sca.databinding.xml.Node2XMLStreamReader extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{
+ public org.apache.tuscany.sca.databinding.xml.Node2XMLStreamReader();
+ public javax.xml.stream.XMLStreamReader transform(org.w3c.dom.Node, org.apache.tuscany.sca.databinding.TransformationContext);
+ protected java.lang.Class getSourceType();
+ protected java.lang.Class getTargetType();
+ public int getWeight();
+ public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext);
+}
+
+Compiled from "Reader2Node.java"
+public class org.apache.tuscany.sca.databinding.xml.Reader2Node extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{
+ public org.apache.tuscany.sca.databinding.xml.Reader2Node(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public org.w3c.dom.Node transform(java.io.Reader, org.apache.tuscany.sca.databinding.TransformationContext);
+ protected java.lang.Class getSourceType();
+ protected java.lang.Class getTargetType();
+ public int getWeight();
+ public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext);
+}
+
+Compiled from "Reader2SAX.java"
+public class org.apache.tuscany.sca.databinding.xml.Reader2SAX extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PushTransformer{
+ public org.apache.tuscany.sca.databinding.xml.Reader2SAX();
+ public void transform(java.io.Reader, org.xml.sax.ContentHandler, org.apache.tuscany.sca.databinding.TransformationContext);
+ protected java.lang.Class getSourceType();
+ protected java.lang.Class getTargetType();
+ public int getWeight();
+ public void transform(java.lang.Object, java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext);
+}
+
+Compiled from "SAX2DOMPipe.java"
+public class org.apache.tuscany.sca.databinding.xml.SAX2DOMPipe extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.DataPipeTransformer{
+ public org.apache.tuscany.sca.databinding.xml.SAX2DOMPipe(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public org.apache.tuscany.sca.databinding.DataPipe newInstance();
+ protected java.lang.Class getTargetType();
+ protected java.lang.Class getSourceType();
+ public int getWeight();
+ static org.apache.tuscany.sca.common.xml.dom.DOMHelper access$000(org.apache.tuscany.sca.databinding.xml.SAX2DOMPipe);
+}
+
+Compiled from "SimpleJavaType2Node.java"
+public class org.apache.tuscany.sca.databinding.xml.SimpleJavaType2Node extends org.apache.tuscany.sca.databinding.impl.Java2SimpleTypeTransformer{
+ public org.apache.tuscany.sca.databinding.xml.SimpleJavaType2Node(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ protected org.w3c.dom.Node createElement(javax.xml.namespace.QName, java.lang.String, org.apache.tuscany.sca.databinding.TransformationContext);
+ public java.lang.Class getTargetType();
+ protected java.lang.Object createElement(javax.xml.namespace.QName, java.lang.String, org.apache.tuscany.sca.databinding.TransformationContext);
+}
+
+Compiled from "Source2NodeTransformer.java"
+public class org.apache.tuscany.sca.databinding.xml.Source2NodeTransformer extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{
+ public org.apache.tuscany.sca.databinding.xml.Source2NodeTransformer(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public org.w3c.dom.Node transform(javax.xml.transform.Source, org.apache.tuscany.sca.databinding.TransformationContext);
+ protected java.lang.Class getSourceType();
+ protected java.lang.Class getTargetType();
+ public int getWeight();
+ public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext);
+}
+
+Compiled from "Source2ResultTransformer.java"
+public class org.apache.tuscany.sca.databinding.xml.Source2ResultTransformer extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PushTransformer{
+ public org.apache.tuscany.sca.databinding.xml.Source2ResultTransformer(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public void transform(javax.xml.transform.Source, javax.xml.transform.Result, org.apache.tuscany.sca.databinding.TransformationContext);
+ protected java.lang.Class getSourceType();
+ protected java.lang.Class getTargetType();
+ public int getWeight();
+ public void transform(java.lang.Object, java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext);
+}
+
+Compiled from "Source2StringTransformer.java"
+public class org.apache.tuscany.sca.databinding.xml.Source2StringTransformer extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{
+ public org.apache.tuscany.sca.databinding.xml.Source2StringTransformer(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public java.lang.String transform(javax.xml.transform.Source, org.apache.tuscany.sca.databinding.TransformationContext);
+ protected java.lang.Class getSourceType();
+ protected java.lang.Class getTargetType();
+ public int getWeight();
+ public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext);
+}
+
+Compiled from "StAXDataBinding.java"
+public class org.apache.tuscany.sca.databinding.xml.StAXDataBinding extends org.apache.tuscany.sca.databinding.BaseDataBinding{
+ public static final java.lang.String NAME;
+ public org.apache.tuscany.sca.databinding.xml.StAXDataBinding();
+ public boolean introspect(org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.Operation);
+ static {};
+}
+
+Compiled from "StreamDataPipe.java"
+public class org.apache.tuscany.sca.databinding.xml.StreamDataPipe extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.DataPipeTransformer{
+ public org.apache.tuscany.sca.databinding.xml.StreamDataPipe();
+ public org.apache.tuscany.sca.databinding.DataPipe newInstance();
+ protected java.lang.Class getTargetType();
+ public int getWeight();
+ protected java.lang.Class getSourceType();
+}
+
+Compiled from "String2Node.java"
+public class org.apache.tuscany.sca.databinding.xml.String2Node extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{
+ public org.apache.tuscany.sca.databinding.xml.String2Node(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public org.w3c.dom.Node transform(java.lang.String, org.apache.tuscany.sca.databinding.TransformationContext);
+ protected java.lang.Class getSourceType();
+ protected java.lang.Class getTargetType();
+ public int getWeight();
+ public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext);
+}
+
+Compiled from "String2SAX.java"
+public class org.apache.tuscany.sca.databinding.xml.String2SAX extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PushTransformer{
+ public org.apache.tuscany.sca.databinding.xml.String2SAX();
+ public void transform(java.lang.String, org.xml.sax.ContentHandler, org.apache.tuscany.sca.databinding.TransformationContext);
+ protected java.lang.Class getSourceType();
+ protected java.lang.Class getTargetType();
+ public int getWeight();
+ public void transform(java.lang.Object, java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext);
+}
+
+Compiled from "String2SourceTransformer.java"
+public class org.apache.tuscany.sca.databinding.xml.String2SourceTransformer extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{
+ public org.apache.tuscany.sca.databinding.xml.String2SourceTransformer();
+ public javax.xml.transform.Source transform(java.lang.String, org.apache.tuscany.sca.databinding.TransformationContext);
+ protected java.lang.Class getSourceType();
+ protected java.lang.Class getTargetType();
+ public int getWeight();
+ public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext);
+}
+
+Compiled from "String2XMLStreamReader.java"
+public class org.apache.tuscany.sca.databinding.xml.String2XMLStreamReader extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{
+ public org.apache.tuscany.sca.databinding.xml.String2XMLStreamReader(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public javax.xml.stream.XMLStreamReader transform(java.lang.String, org.apache.tuscany.sca.databinding.TransformationContext);
+ protected java.lang.Class getSourceType();
+ protected java.lang.Class getTargetType();
+ public int getWeight();
+ public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext);
+}
+
+Compiled from "Writer2ReaderDataPipe.java"
+public class org.apache.tuscany.sca.databinding.xml.Writer2ReaderDataPipe extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.DataPipeTransformer{
+ public org.apache.tuscany.sca.databinding.xml.Writer2ReaderDataPipe();
+ public org.apache.tuscany.sca.databinding.DataPipe newInstance();
+ protected java.lang.Class getTargetType();
+ public int getWeight();
+ protected java.lang.Class getSourceType();
+}
+
+Compiled from "XMLGroupDataBinding.java"
+public class org.apache.tuscany.sca.databinding.xml.XMLGroupDataBinding extends org.apache.tuscany.sca.databinding.impl.GroupDataBinding{
+ public org.apache.tuscany.sca.databinding.xml.XMLGroupDataBinding();
+ protected java.lang.Object getLogical(java.lang.Class, org.apache.tuscany.sca.interfacedef.Operation);
+}
+
+Compiled from "XMLStreamReader2Node.java"
+public class org.apache.tuscany.sca.databinding.xml.XMLStreamReader2Node extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{
+ public org.apache.tuscany.sca.databinding.xml.XMLStreamReader2Node(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public org.w3c.dom.Node transform(javax.xml.stream.XMLStreamReader, org.apache.tuscany.sca.databinding.TransformationContext);
+ protected java.lang.Class getSourceType();
+ protected java.lang.Class getTargetType();
+ public int getWeight();
+ public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext);
+}
+
+Compiled from "XMLStreamReader2SAX.java"
+public class org.apache.tuscany.sca.databinding.xml.XMLStreamReader2SAX extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PushTransformer{
+ public org.apache.tuscany.sca.databinding.xml.XMLStreamReader2SAX(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ protected java.lang.Class getTargetType();
+ protected java.lang.Class getSourceType();
+ public int getWeight();
+ public void transform(javax.xml.stream.XMLStreamReader, org.xml.sax.ContentHandler, org.apache.tuscany.sca.databinding.TransformationContext);
+ public void transform(java.lang.Object, java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext);
+}
+
+Compiled from "XMLStreamReader2String.java"
+public class org.apache.tuscany.sca.databinding.xml.XMLStreamReader2String extends org.apache.tuscany.sca.databinding.BaseTransformer implements org.apache.tuscany.sca.databinding.PullTransformer{
+ public org.apache.tuscany.sca.databinding.xml.XMLStreamReader2String(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public java.lang.String transform(javax.xml.stream.XMLStreamReader, org.apache.tuscany.sca.databinding.TransformationContext);
+ protected java.lang.Class getSourceType();
+ protected java.lang.Class getTargetType();
+ public int getWeight();
+ public java.lang.Object transform(java.lang.Object, org.apache.tuscany.sca.databinding.TransformationContext);
+}
+
+Compiled from "XMLStringDataBinding.java"
+public class org.apache.tuscany.sca.databinding.xml.XMLStringDataBinding extends org.apache.tuscany.sca.databinding.BaseDataBinding{
+ public static final java.lang.String NAME;
+ public org.apache.tuscany.sca.databinding.xml.XMLStringDataBinding();
+ public boolean introspect(org.apache.tuscany.sca.interfacedef.DataType, org.apache.tuscany.sca.interfacedef.Operation);
+ static {};
+}
+
+Compiled from "DefaultDeployer.java"
+public class org.apache.tuscany.sca.deployment.DefaultDeployer extends org.apache.tuscany.sca.deployment.impl.DeployerImpl{
+ public org.apache.tuscany.sca.deployment.DefaultDeployer();
+ public org.apache.tuscany.sca.deployment.DefaultDeployer(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+}
+
+Compiled from "Deployer.java"
+public interface org.apache.tuscany.sca.deployment.Deployer extends org.apache.tuscany.sca.core.LifeCycleListener{
+ public abstract boolean isSchemaValidationEnabled();
+ public abstract void setSchemaValidationEnabled(boolean);
+ public abstract java.lang.String attachDeploymentComposite(org.apache.tuscany.sca.contribution.Contribution, org.apache.tuscany.sca.assembly.Composite, boolean);
+ public abstract org.apache.tuscany.sca.assembly.Composite build(java.util.List, java.util.List, java.util.Map, org.apache.tuscany.sca.monitor.Monitor) throws org.apache.tuscany.sca.contribution.processor.ContributionResolveException, org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
+ public abstract org.apache.tuscany.sca.assembly.Composite build(java.util.List, java.util.List, org.apache.tuscany.sca.contribution.Contribution, java.util.Map, org.apache.tuscany.sca.monitor.Monitor) throws org.apache.tuscany.sca.contribution.processor.ContributionResolveException, org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
+ public abstract org.apache.tuscany.sca.contribution.Artifact loadArtifact(java.net.URI, java.net.URL, org.apache.tuscany.sca.monitor.Monitor) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException;
+ public abstract org.apache.tuscany.sca.contribution.Contribution loadContribution(java.net.URI, java.net.URL, org.apache.tuscany.sca.monitor.Monitor) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException;
+ public abstract java.lang.Object loadDocument(java.net.URI, java.net.URL, org.apache.tuscany.sca.monitor.Monitor) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException;
+ public abstract java.lang.Object loadXMLDocument(java.io.Reader, org.apache.tuscany.sca.monitor.Monitor) throws javax.xml.stream.XMLStreamException, org.apache.tuscany.sca.contribution.processor.ContributionReadException;
+ public abstract java.lang.Object loadXMLDocument(java.net.URL, org.apache.tuscany.sca.monitor.Monitor) throws javax.xml.stream.XMLStreamException, org.apache.tuscany.sca.contribution.processor.ContributionReadException;
+ public abstract java.lang.Object loadXMLElement(javax.xml.stream.XMLStreamReader, org.apache.tuscany.sca.monitor.Monitor) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException, javax.xml.stream.XMLStreamException;
+ public abstract void saveXMLDocument(java.lang.Object, java.io.Writer, org.apache.tuscany.sca.monitor.Monitor) throws javax.xml.stream.XMLStreamException, org.apache.tuscany.sca.contribution.processor.ContributionWriteException;
+ public abstract void saveXMLElement(java.lang.Object, javax.xml.stream.XMLStreamWriter, org.apache.tuscany.sca.monitor.Monitor) throws javax.xml.stream.XMLStreamException, org.apache.tuscany.sca.contribution.processor.ContributionWriteException;
+ public abstract org.apache.tuscany.sca.monitor.Monitor createMonitor();
+ public abstract org.apache.tuscany.sca.assembly.builder.BuilderContext createBuilderContext();
+ public abstract org.apache.tuscany.sca.contribution.processor.ProcessorContext createProcessorContext();
+ public abstract org.apache.tuscany.sca.core.ExtensionPointRegistry getExtensionPointRegistry();
+ public abstract org.apache.tuscany.sca.definitions.Definitions getSystemDefinitions();
+ public abstract void resolve(org.apache.tuscany.sca.contribution.Contribution, java.util.List, org.apache.tuscany.sca.monitor.Monitor) throws org.apache.tuscany.sca.contribution.processor.ContributionResolveException, org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
+ public abstract org.apache.tuscany.sca.contribution.Contribution cloneSystemContribution(org.apache.tuscany.sca.monitor.Monitor);
+}
+
+Compiled from "DefaultExtensionPointRegistry.java"
+public class org.apache.tuscany.sca.core.DefaultExtensionPointRegistry extends java.lang.Object implements org.apache.tuscany.sca.core.ExtensionPointRegistry{
+ protected java.util.Map extensionPoints;
+ public org.apache.tuscany.sca.core.DefaultExtensionPointRegistry();
+ public org.apache.tuscany.sca.core.DefaultExtensionPointRegistry(org.apache.tuscany.sca.extensibility.ServiceDiscovery);
+ public synchronized void addExtensionPoint(java.lang.Object);
+ public synchronized void addExtensionPoint(java.lang.Object, org.apache.tuscany.sca.extensibility.ServiceDeclaration);
+ protected void registerExtensionPoint(java.lang.Class, java.lang.Object, org.apache.tuscany.sca.extensibility.ServiceDeclaration);
+ public synchronized java.lang.Object getExtensionPoint(java.lang.Class);
+ protected java.lang.Object findExtensionPoint(java.lang.Class);
+ public synchronized void removeExtensionPoint(java.lang.Object);
+ protected void unregisterExtensionPoint(java.lang.Class);
+ public synchronized void start();
+ public synchronized void stop();
+ public org.apache.tuscany.sca.extensibility.ServiceDiscovery getServiceDiscovery();
+}
+
+Compiled from "DefaultFactoryExtensionPoint.java"
+public class org.apache.tuscany.sca.core.DefaultFactoryExtensionPoint extends java.lang.Object implements org.apache.tuscany.sca.core.FactoryExtensionPoint{
+ public org.apache.tuscany.sca.core.DefaultFactoryExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public void addFactory(java.lang.Object);
+ public void removeFactory(java.lang.Object);
+ public java.lang.Object getFactory(java.lang.Class);
+}
+
+Compiled from "DefaultModuleActivatorExtensionPoint.java"
+public class org.apache.tuscany.sca.core.DefaultModuleActivatorExtensionPoint extends java.lang.Object implements org.apache.tuscany.sca.core.ModuleActivatorExtensionPoint{
+ public org.apache.tuscany.sca.core.DefaultModuleActivatorExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public void addModuleActivator(org.apache.tuscany.sca.core.ModuleActivator);
+ public java.util.List getModuleActivators();
+ public void removeModuleActivator(org.apache.tuscany.sca.core.ModuleActivator);
+ public void start();
+ public void stop();
+ static {};
+}
+
+Compiled from "DefaultUtilityExtensionPoint.java"
+public class org.apache.tuscany.sca.core.DefaultUtilityExtensionPoint extends java.lang.Object implements org.apache.tuscany.sca.core.UtilityExtensionPoint{
+ public org.apache.tuscany.sca.core.DefaultUtilityExtensionPoint(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public void addUtility(java.lang.Object);
+ public void addUtility(java.lang.Object, java.lang.Object);
+ public java.lang.Object getUtility(java.lang.Class);
+ public void removeUtility(java.lang.Object);
+ public java.lang.Object getUtility(java.lang.Class, java.lang.Object);
+ public void start();
+ public synchronized void stop();
+}
+
+Compiled from "ExtensionPointRegistry.java"
+public interface org.apache.tuscany.sca.core.ExtensionPointRegistry extends org.apache.tuscany.sca.core.LifeCycleListener{
+ public abstract void addExtensionPoint(java.lang.Object);
+ public abstract java.lang.Object getExtensionPoint(java.lang.Class);
+ public abstract void removeExtensionPoint(java.lang.Object);
+ public abstract org.apache.tuscany.sca.extensibility.ServiceDiscovery getServiceDiscovery();
+}
+
+Compiled from "ExtensionPointRegistryLocator.java"
+public class org.apache.tuscany.sca.core.ExtensionPointRegistryLocator extends java.lang.Object{
+ public org.apache.tuscany.sca.core.ExtensionPointRegistryLocator();
+ public static org.apache.tuscany.sca.core.ExtensionPointRegistry getExtensionPointRegistry();
+ public static java.util.List getExtensionPointRegistries();
+ public static void addExtensionPointRegistry(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public static void removeExtensionPointRegistry(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ static {};
+}
+
+Compiled from "FactoryExtensionPoint.java"
+public interface org.apache.tuscany.sca.core.FactoryExtensionPoint{
+ public abstract void addFactory(java.lang.Object);
+ public abstract void removeFactory(java.lang.Object);
+ public abstract java.lang.Object getFactory(java.lang.Class);
+}
+
+Compiled from "LifeCycleListener.java"
+public interface org.apache.tuscany.sca.core.LifeCycleListener{
+ public abstract void start();
+ public abstract void stop();
+}
+
+Compiled from "ModuleActivator.java"
+public interface org.apache.tuscany.sca.core.ModuleActivator extends org.apache.tuscany.sca.core.LifeCycleListener{
+ public abstract void start();
+ public abstract void stop();
+}
+
+Compiled from "ModuleActivatorExtensionPoint.java"
+public interface org.apache.tuscany.sca.core.ModuleActivatorExtensionPoint extends org.apache.tuscany.sca.core.LifeCycleListener{
+ public abstract void addModuleActivator(org.apache.tuscany.sca.core.ModuleActivator);
+ public abstract java.util.List getModuleActivators();
+ public abstract void removeModuleActivator(org.apache.tuscany.sca.core.ModuleActivator);
+}
+
+Compiled from "UtilityExtensionPoint.java"
+public interface org.apache.tuscany.sca.core.UtilityExtensionPoint extends org.apache.tuscany.sca.core.LifeCycleListener{
+ public abstract void addUtility(java.lang.Object);
+ public abstract void addUtility(java.lang.Object, java.lang.Object);
+ public abstract java.lang.Object getUtility(java.lang.Class);
+ public abstract java.lang.Object getUtility(java.lang.Class, java.lang.Object);
+ public abstract void removeUtility(java.lang.Object);
+}
+
+Compiled from "ClassLoaderContext.java"
+public class org.apache.tuscany.sca.extensibility.ClassLoaderContext extends java.lang.Object{
+ public org.apache.tuscany.sca.extensibility.ClassLoaderContext(java.lang.ClassLoader, org.apache.tuscany.sca.extensibility.ServiceDiscovery, java.lang.Class[]);
+ public org.apache.tuscany.sca.extensibility.ClassLoaderContext(java.lang.ClassLoader, java.lang.ClassLoader[]);
+ public org.apache.tuscany.sca.extensibility.ClassLoaderContext(java.lang.ClassLoader, org.apache.tuscany.sca.extensibility.ServiceDiscovery, java.lang.String[]);
+ public java.lang.Object doPrivileged(java.security.PrivilegedAction);
+ public java.lang.Object doPrivileged(java.security.PrivilegedExceptionAction) throws java.security.PrivilegedActionException;
+ public static java.lang.ClassLoader setContextClassLoader(java.lang.ClassLoader, java.lang.ClassLoader[]);
+ public static java.lang.ClassLoader setContextClassLoader(java.lang.ClassLoader, org.apache.tuscany.sca.extensibility.ServiceDiscovery, java.lang.String[]);
+ public static java.lang.ClassLoader setContextClassLoader(java.lang.ClassLoader, org.apache.tuscany.sca.extensibility.ServiceDiscovery, java.lang.Class[]);
+ public java.lang.ClassLoader setContextClassLoader();
+ public java.lang.ClassLoader getClassLoader();
+}
+
+Compiled from "ContextClassLoaderServiceDiscoverer.java"
+public class org.apache.tuscany.sca.extensibility.ContextClassLoaderServiceDiscoverer extends java.lang.Object implements org.apache.tuscany.sca.extensibility.ServiceDiscoverer{
+ public org.apache.tuscany.sca.extensibility.ContextClassLoaderServiceDiscoverer();
+ public org.apache.tuscany.sca.extensibility.ContextClassLoaderServiceDiscoverer(java.lang.ClassLoader);
+ public java.lang.ClassLoader getContextClassLoader();
+ public org.apache.tuscany.sca.extensibility.ServiceDeclaration getServiceDeclaration(java.lang.String) throws java.io.IOException;
+ public java.util.Collection getServiceDeclarations(java.lang.String);
+ static java.lang.ref.WeakReference access$000(org.apache.tuscany.sca.extensibility.ContextClassLoaderServiceDiscoverer);
+ static java.util.Collection access$100(org.apache.tuscany.sca.extensibility.ContextClassLoaderServiceDiscoverer, java.lang.String) throws java.io.IOException;
+ static {};
+}
+
+Compiled from "ServiceDeclaration.java"
+public interface org.apache.tuscany.sca.extensibility.ServiceDeclaration{
+ public abstract java.lang.Class loadClass(java.lang.String) throws java.lang.ClassNotFoundException;
+ public abstract java.lang.Class loadClass() throws java.lang.ClassNotFoundException;
+ public abstract java.util.Map getAttributes();
+ public abstract boolean isAssignableTo(java.lang.Class);
+ public abstract java.net.URL getLocation();
+ public abstract java.lang.String getClassName();
+ public abstract java.net.URL getResource(java.lang.String);
+ public abstract java.util.Enumeration getResources(java.lang.String) throws java.io.IOException;
+ public abstract boolean equals(java.lang.Object);
+ public abstract int hashCode();
+}
+
+Compiled from "ServiceDeclarationParser.java"
+public class org.apache.tuscany.sca.extensibility.ServiceDeclarationParser extends java.lang.Object{
+ public org.apache.tuscany.sca.extensibility.ServiceDeclarationParser();
+ public static java.util.List parse(java.lang.String);
+ public static java.util.Map parseDeclaration(java.lang.String);
+ public static javax.xml.namespace.QName getQName(java.lang.String);
+ public static java.util.Collection load(java.net.URL, boolean) throws java.io.IOException;
+}
+
+Compiled from "ServiceDiscoverer.java"
+public interface org.apache.tuscany.sca.extensibility.ServiceDiscoverer{
+ public abstract java.util.Collection getServiceDeclarations(java.lang.String) throws java.io.IOException;
+ public abstract org.apache.tuscany.sca.extensibility.ServiceDeclaration getServiceDeclaration(java.lang.String) throws java.io.IOException;
+ public abstract java.lang.ClassLoader getContextClassLoader();
+}
+
+Compiled from "ServiceDiscovery.java"
+public final class org.apache.tuscany.sca.extensibility.ServiceDiscovery extends java.lang.Object implements org.apache.tuscany.sca.extensibility.ServiceDiscoverer{
+ public static org.apache.tuscany.sca.extensibility.ServiceDiscovery getInstance();
+ public static org.apache.tuscany.sca.extensibility.ServiceDiscovery getInstance(org.apache.tuscany.sca.extensibility.ServiceDiscoverer);
+ public org.apache.tuscany.sca.extensibility.ServiceDiscoverer getServiceDiscoverer();
+ public void setServiceDiscoverer(org.apache.tuscany.sca.extensibility.ServiceDiscoverer);
+ public java.util.Collection getServiceDeclarations(java.lang.String) throws java.io.IOException;
+ public java.util.Collection getServiceDeclarations(java.lang.String, boolean) throws java.io.IOException;
+ public org.apache.tuscany.sca.extensibility.ServiceDeclaration getServiceDeclaration(java.lang.String) throws java.io.IOException;
+ public java.util.Collection getServiceDeclarations(java.lang.Class, boolean) throws java.io.IOException;
+ public java.util.Collection getServiceDeclarations(java.lang.Class) throws java.io.IOException;
+ public java.util.Collection getServiceDeclarations(java.lang.Class, java.lang.String) throws java.io.IOException;
+ public java.util.Collection getServiceDeclarations(java.lang.String, java.lang.String) throws java.io.IOException;
+ public org.apache.tuscany.sca.extensibility.ServiceDeclaration getServiceDeclaration(java.lang.Class) throws java.io.IOException;
+ public java.lang.ClassLoader getContextClassLoader();
+ public void setAttribute(java.lang.String, java.util.Map);
+ public void setAttribute(java.lang.String, java.lang.String, java.lang.String);
+ public java.util.Map getAttributes(java.lang.String);
+ public static java.util.Collection removeDuplicateDeclarations(java.util.Collection);
+ static {};
+}
+
+Compiled from "ServiceHelper.java"
+public class org.apache.tuscany.sca.extensibility.ServiceHelper extends java.lang.Object{
+ public static boolean start(java.lang.Object);
+ public static boolean stop(java.lang.Object);
+ public static void stop(java.util.Collection);
+ public static java.lang.Object newInstance(java.lang.Class, java.lang.Class, java.lang.Object) throws java.lang.Exception;
+ public static java.lang.Object newInstance(java.lang.Class, java.lang.Class[], java.lang.Object[]) throws java.lang.Exception;
+ public static java.lang.Object newInstance(java.lang.Class) throws java.lang.Exception;
+ public static java.lang.Object newInstance(org.apache.tuscany.sca.core.ExtensionPointRegistry, org.apache.tuscany.sca.extensibility.ServiceDeclaration) throws java.lang.Exception;
+ public static java.lang.Object newLazyInstance(org.apache.tuscany.sca.core.ExtensionPointRegistry, org.apache.tuscany.sca.extensibility.ServiceDeclaration, java.lang.Class);
+ static {};
+}
+
+Compiled from "DefaultJavaInterfaceFactory.java"
+public class org.apache.tuscany.sca.interfacedef.java.DefaultJavaInterfaceFactory extends org.apache.tuscany.sca.interfacedef.java.impl.JavaInterfaceFactoryImpl implements org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory{
+ public org.apache.tuscany.sca.interfacedef.java.DefaultJavaInterfaceFactory(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+ public java.util.List getInterfaceVisitors();
+ static {};
+}
+
+Compiled from "JavaInterface.java"
+public interface org.apache.tuscany.sca.interfacedef.java.JavaInterface extends org.apache.tuscany.sca.interfacedef.Interface,org.apache.tuscany.sca.assembly.Base{
+ public abstract java.lang.String getName();
+ public abstract void setName(java.lang.String);
+ public abstract javax.xml.namespace.QName getQName();
+ public abstract void setQName(javax.xml.namespace.QName);
+ public abstract java.lang.Class getJavaClass();
+ public abstract void setJavaClass(java.lang.Class);
+ public abstract java.lang.Class getCallbackClass();
+ public abstract void setCallbackClass(java.lang.Class);
+ public abstract java.lang.String getJAXWSWSDLLocation();
+ public abstract void setJAXWSWSDLLocation(java.lang.String);
+ public abstract java.lang.String getJAXWSJavaInterfaceName();
+ public abstract void setJAXWSJavaInterfaceName(java.lang.String);
+ public abstract org.apache.tuscany.sca.contribution.Contribution getContributionContainingClass();
+ public abstract void setContributionContainingClass(org.apache.tuscany.sca.contribution.Contribution);
+}
+
+Compiled from "JavaInterfaceContract.java"
+public interface org.apache.tuscany.sca.interfacedef.java.JavaInterfaceContract extends org.apache.tuscany.sca.interfacedef.InterfaceContract{
+}
+
+Compiled from "JavaInterfaceFactory.java"
+public interface org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory{
+ public abstract org.apache.tuscany.sca.interfacedef.java.JavaInterface createJavaInterface();
+ public abstract org.apache.tuscany.sca.interfacedef.java.JavaInterface createJavaInterface(java.lang.Class) throws org.apache.tuscany.sca.interfacedef.InvalidInterfaceException;
+ public abstract void createJavaInterface(org.apache.tuscany.sca.interfacedef.java.JavaInterface, java.lang.Class) throws org.apache.tuscany.sca.interfacedef.InvalidInterfaceException;
+ public abstract org.apache.tuscany.sca.interfacedef.java.JavaOperation createJavaOperation(java.lang.reflect.Method);
+ public abstract org.apache.tuscany.sca.interfacedef.java.JavaInterfaceContract createJavaInterfaceContract();
+ public abstract void addInterfaceVisitor(org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceVisitor);
+ public abstract void removeInterfaceVisitor(org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceVisitor);
+ public abstract java.util.List getInterfaceVisitors();
+}
+
+Compiled from "JavaOperation.java"
+public interface org.apache.tuscany.sca.interfacedef.java.JavaOperation extends org.apache.tuscany.sca.interfacedef.Operation{
+ public abstract java.lang.reflect.Method getJavaMethod();
+ public abstract void setJavaMethod(java.lang.reflect.Method);
+ public abstract java.lang.String getAction();
+ public abstract void setAction(java.lang.String);
+ public abstract void setAsyncServer(boolean);
+ public abstract boolean isAsyncServer();
+ public abstract boolean hasReturnTypeVoid();
+ public abstract void setReturnTypeVoid(boolean);
+}
+
+Compiled from "BPELPartnerLinkTypeExt.java"
+public class org.apache.tuscany.sca.interfacedef.wsdl.BPELPartnerLinkTypeExt extends java.lang.Object implements javax.wsdl.extensions.ExtensibilityElement{
+ public org.apache.tuscany.sca.interfacedef.wsdl.BPELPartnerLinkTypeExt();
+ public javax.xml.namespace.QName getElementType();
+ public java.lang.Boolean getRequired();
+ public void setElementType(javax.xml.namespace.QName);
+ public void setRequired(java.lang.Boolean);
+ public void setName(java.lang.String);
+ public java.lang.String getName();
+ public void setRole(int, java.lang.String, javax.xml.namespace.QName);
+ public java.lang.String getRoleName(int);
+ public javax.xml.namespace.QName getRolePortType(int);
+}
+
+Compiled from "DefaultWSDLFactory.java"
+public class org.apache.tuscany.sca.interfacedef.wsdl.DefaultWSDLFactory extends org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLFactoryImpl implements org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory{
+ public org.apache.tuscany.sca.interfacedef.wsdl.DefaultWSDLFactory(org.apache.tuscany.sca.core.ExtensionPointRegistry);
+}
+
+Compiled from "WSDLDefinition.java"
+public interface org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition extends org.apache.tuscany.sca.assembly.Base{
+ public abstract javax.wsdl.Definition getDefinition();
+ public abstract void setDefinition(javax.wsdl.Definition);
+ public abstract java.lang.String getNamespace();
+ public abstract void setNamespace(java.lang.String);
+ public abstract java.util.List getXmlSchemas();
+ public abstract java.net.URI getLocation();
+ public abstract void setLocation(java.net.URI);
+ public abstract java.net.URI getURI();
+ public abstract void setURI(java.net.URI);
+ public abstract java.util.List getImportedDefinitions();
+ public abstract org.apache.ws.commons.schema.XmlSchemaElement getXmlSchemaElement(javax.xml.namespace.QName);
+ public abstract org.apache.ws.commons.schema.XmlSchemaType getXmlSchemaType(javax.xml.namespace.QName);
+ public abstract org.apache.tuscany.sca.interfacedef.wsdl.WSDLObject getWSDLObject(java.lang.Class, javax.xml.namespace.QName);
+ public abstract javax.wsdl.Binding getBinding();
+ public abstract void setBinding(javax.wsdl.Binding);
+ public abstract javax.xml.namespace.QName getNameOfPortTypeToResolve();
+ public abstract void setNameOfPortTypeToResolve(javax.xml.namespace.QName);
+ public abstract javax.xml.namespace.QName getNameOfBindingToResolve();
+ public abstract void setNameOfBindingToResolve(javax.xml.namespace.QName);
+ public abstract javax.xml.namespace.QName getNameOfServiceToResolve();
+ public abstract void setNameOfServiceToResolve(javax.xml.namespace.QName);
+ public abstract java.util.Map getWsdliLocations();
+}
+
+Compiled from "WSDLFactory.java"
+public interface org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory{
+ public abstract org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface createWSDLInterface();
+ public abstract org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface createWSDLInterface(javax.wsdl.PortType, org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition, org.apache.tuscany.sca.contribution.resolver.ModelResolver, org.apache.tuscany.sca.monitor.Monitor) throws org.apache.tuscany.sca.interfacedef.InvalidInterfaceException;
+ public abstract void createWSDLInterface(org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface, javax.wsdl.PortType, org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition, org.apache.tuscany.sca.contribution.resolver.ModelResolver, org.apache.tuscany.sca.monitor.Monitor) throws org.apache.tuscany.sca.interfacedef.InvalidInterfaceException;
+ public abstract org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition createWSDLDefinition();
+ public abstract org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterfaceContract createWSDLInterfaceContract();
+}
+
+Compiled from "WSDLInterface.java"
+public interface org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface extends org.apache.tuscany.sca.interfacedef.Interface,org.apache.tuscany.sca.assembly.Base{
+ public abstract javax.xml.namespace.QName getName();
+ public abstract void setName(javax.xml.namespace.QName);
+ public abstract javax.wsdl.PortType getPortType();
+ public abstract void setPortType(javax.wsdl.PortType);
+ public abstract org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface getCallbackInterface();
+ public abstract void setCallbackInterface(org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface);
+ public abstract org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition getWsdlDefinition();
+ public abstract void setWsdlDefinition(org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition);
+}
+
+Compiled from "WSDLInterfaceContract.java"
+public interface org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterfaceContract extends org.apache.tuscany.sca.interfacedef.InterfaceContract{
+ public abstract void setLocation(java.lang.String);
+ public abstract java.lang.String getLocation();
+}
+
+Compiled from "WSDLObject.java"
+public interface org.apache.tuscany.sca.interfacedef.wsdl.WSDLObject{
+ public abstract javax.wsdl.Definition getDefinition();
+ public abstract void setDefinition(javax.wsdl.Definition);
+ public abstract java.io.Serializable getElement();
+ public abstract void setElement(java.io.Serializable);
+}
+
+Compiled from "WSDLOperation.java"
+public interface org.apache.tuscany.sca.interfacedef.wsdl.WSDLOperation extends org.apache.tuscany.sca.interfacedef.Operation{
+ public abstract javax.wsdl.Operation getWsdlOperation();
+ public abstract void setWsdlOperation(javax.wsdl.Operation);
+}
+
+Compiled from "DefaultMonitorFactory.java"
+public class org.apache.tuscany.sca.monitor.DefaultMonitorFactory extends java.lang.Object implements org.apache.tuscany.sca.monitor.MonitorFactory{
+ public org.apache.tuscany.sca.monitor.DefaultMonitorFactory();
+ public org.apache.tuscany.sca.monitor.Monitor createMonitor();
+ public org.apache.tuscany.sca.monitor.Monitor getContextMonitor();
+ public org.apache.tuscany.sca.monitor.Monitor getContextMonitor(boolean);
+ public org.apache.tuscany.sca.monitor.Monitor removeContextMonitor();
+ public org.apache.tuscany.sca.monitor.Monitor setContextMonitor(org.apache.tuscany.sca.monitor.Monitor);
+}
+
+Compiled from "Monitor.java"
+public abstract class org.apache.tuscany.sca.monitor.Monitor extends java.lang.Object{
+ public org.apache.tuscany.sca.monitor.Monitor();
+ public static void error(org.apache.tuscany.sca.monitor.Monitor, java.lang.Object, java.lang.String, java.lang.String, java.lang.Object[]);
+ public static void error(org.apache.tuscany.sca.monitor.Monitor, java.lang.Object, java.lang.String, java.lang.String, java.lang.Throwable);
+ public static void error(org.apache.tuscany.sca.monitor.Monitor, java.lang.Object, java.lang.String, java.lang.String, java.lang.Throwable, java.lang.Object[]);
+ public static void warning(org.apache.tuscany.sca.monitor.Monitor, java.lang.Object, java.lang.String, java.lang.String, java.lang.Object[]);
+ public static void warning(org.apache.tuscany.sca.monitor.Monitor, java.lang.Object, java.lang.String, java.lang.String, java.lang.Throwable);
+ public static void warning(org.apache.tuscany.sca.monitor.Monitor, java.lang.Object, java.lang.String, java.lang.String, java.lang.Throwable, java.lang.Object[]);
+ public abstract org.apache.tuscany.sca.monitor.Problem createProblem(java.lang.String, java.lang.String, org.apache.tuscany.sca.monitor.Problem$Severity, java.lang.Object, java.lang.String, java.lang.Object[]);
+ public abstract org.apache.tuscany.sca.monitor.Problem createProblem(java.lang.String, java.lang.String, org.apache.tuscany.sca.monitor.Problem$Severity, java.lang.Object, java.lang.String, java.lang.Throwable);
+ public abstract java.lang.String getArtifactName();
+ public abstract org.apache.tuscany.sca.monitor.Problem getLastProblem();
+ public abstract java.util.List getProblems();
+ public abstract java.lang.Object popContext();
+ public abstract void problem(org.apache.tuscany.sca.monitor.Problem);
+ public abstract void pushContext(java.lang.Object);
+ public abstract void reset();
+ public abstract void setArtifactName(java.lang.String);
+ public void analyzeProblems() throws org.apache.tuscany.sca.monitor.ValidationException;
+ static {};
+}
+
+Compiled from "MonitorFactory.java"
+public interface org.apache.tuscany.sca.monitor.MonitorFactory{
+ public abstract org.apache.tuscany.sca.monitor.Monitor createMonitor();
+ public abstract org.apache.tuscany.sca.monitor.Monitor getContextMonitor();
+ public abstract org.apache.tuscany.sca.monitor.Monitor getContextMonitor(boolean);
+ public abstract org.apache.tuscany.sca.monitor.Monitor removeContextMonitor();
+ public abstract org.apache.tuscany.sca.monitor.Monitor setContextMonitor(org.apache.tuscany.sca.monitor.Monitor);
+}
+
+Compiled from "Problem.java"
+public interface org.apache.tuscany.sca.monitor.Problem{
+ public abstract java.lang.String getSourceClassName();
+ public abstract java.lang.String getResourceBundleName();
+ public abstract org.apache.tuscany.sca.monitor.Problem$Severity getSeverity();
+ public abstract java.lang.String getContext();
+ public abstract java.lang.Object getProblemObject();
+ public abstract java.lang.String getMessageId();
+ public abstract java.lang.Throwable getCause();
+ public abstract java.lang.Object[] getMessageParams();
+}
+
+Compiled from "ValidationException.java"
+public class org.apache.tuscany.sca.monitor.ValidationException extends java.lang.Exception{
+ public org.apache.tuscany.sca.monitor.ValidationException();
+ public org.apache.tuscany.sca.monitor.ValidationException(java.lang.String, java.lang.Throwable);
+ public org.apache.tuscany.sca.monitor.ValidationException(java.lang.String);
+ public org.apache.tuscany.sca.monitor.ValidationException(java.lang.Throwable);
+}
+
+Compiled from "Contribution.java"
+public final class org.apache.tuscany.sca.node.Contribution extends java.lang.Object{
+ public org.apache.tuscany.sca.node.Contribution(java.lang.String, java.lang.String);
+ public java.lang.String getURI();
+ public java.lang.String getLocation();
+}
+
+Compiled from "ContributionLocationHelper.java"
+public class org.apache.tuscany.sca.node.ContributionLocationHelper extends java.lang.Object{
+ public org.apache.tuscany.sca.node.ContributionLocationHelper();
+ public static java.lang.String getContributionLocation(java.lang.Class);
+ public static java.lang.String getContributionLocation(java.lang.String);
+ public static java.util.List getContributionLocations(java.lang.String);
+ public static java.lang.String getContributionLocation(java.lang.ClassLoader, java.lang.String);
+ public static java.util.List getContributionLocations(java.lang.ClassLoader, java.lang.String);
+}
+
+Compiled from "Node.java"
+public interface org.apache.tuscany.sca.node.Node{
+ public static final java.lang.String DEFAULT_DOMAIN_URI;
+ public static final java.lang.String DEFAULT_NODE_URI;
+ public abstract org.apache.tuscany.sca.node.Node start();
+ public abstract void stop();
+ public abstract org.oasisopen.sca.ServiceReference cast(java.lang.Object) throws java.lang.IllegalArgumentException;
+ public abstract java.lang.Object getService(java.lang.Class, java.lang.String);
+ public abstract org.oasisopen.sca.ServiceReference getServiceReference(java.lang.Class, java.lang.String);
+}
+
+Compiled from "NodeFactory.java"
+public abstract class org.apache.tuscany.sca.node.NodeFactory extends org.apache.tuscany.sca.node.configuration.DefaultNodeConfigurationFactory{
+ protected static org.apache.tuscany.sca.node.NodeFactory instance;
+ protected static java.lang.Class factoryImplClass;
+ protected static java.util.List factories;
+ protected java.util.Properties properties;
+ protected static void setNodeFactory(org.apache.tuscany.sca.node.NodeFactory);
+ public static synchronized org.apache.tuscany.sca.node.NodeFactory getInstance();
+ public static org.apache.tuscany.sca.node.NodeFactory newInstance();
+ public static org.apache.tuscany.sca.node.NodeFactory newInstance(java.util.Map);
+ protected org.apache.tuscany.sca.node.NodeFactory();
+ public static org.apache.tuscany.sca.node.NodeFactory newInstance(java.util.Properties);
+ public static org.apache.tuscany.sca.node.NodeFactory newInstance(java.lang.String);
+ public void configure(java.util.Map);
+ public org.apache.tuscany.sca.node.Node createNode(java.net.URL);
+ public org.apache.tuscany.sca.node.Node createNode(java.io.InputStream);
+ public org.apache.tuscany.sca.node.Node createNode(java.lang.String, org.apache.tuscany.sca.node.Contribution[]);
+ public final org.apache.tuscany.sca.node.Node createNode(java.net.URI, java.lang.String[]);
+ public final org.apache.tuscany.sca.node.Node createNode(java.net.URI, java.lang.String, java.lang.String[]);
+ public static java.lang.String getDomainURI(java.net.URI);
+ public final org.apache.tuscany.sca.node.Node createNode(java.lang.String, java.lang.String[], java.lang.String[]);
+ public final org.apache.tuscany.sca.node.Node createNode(java.lang.String, java.lang.String[]);
+ public final org.apache.tuscany.sca.node.Node createNode(java.io.Reader, java.lang.String[], java.lang.String[]);
+ public final org.apache.tuscany.sca.node.Node createNode(java.lang.String, java.lang.ClassLoader);
+ public org.apache.tuscany.sca.node.Node createNode(org.apache.tuscany.sca.node.Contribution[]);
+ public org.apache.tuscany.sca.node.Node createNode(java.io.InputStream, org.apache.tuscany.sca.node.Contribution[]);
+ public org.apache.tuscany.sca.node.Node createNode(java.io.Reader, org.apache.tuscany.sca.node.Contribution[]);
+ public org.apache.tuscany.sca.node.Node createNode();
+ protected synchronized java.lang.String generateNodeURI();
+ public void destroy();
+ public static java.util.List getNodeFactories();
+ public abstract org.apache.tuscany.sca.node.Node createNode(org.apache.tuscany.sca.node.configuration.NodeConfiguration);
+ public abstract org.apache.tuscany.sca.node.Node createNode(java.util.List);
+ public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration loadConfiguration(java.io.InputStream, java.net.URL);
+ public abstract java.lang.Object getExtensionPointRegistry();
+ public abstract void init();
+ public void setAutoDestroy(boolean);
+ static {};
+}
+
+Compiled from "NodeMain2.java"
+public class org.apache.tuscany.sca.node.NodeMain2 extends java.lang.Object{
+ public org.apache.tuscany.sca.node.NodeMain2();
+ public static void main(java.lang.String[]) throws java.lang.Exception;
+}
+
+Compiled from "BindingConfiguration.java"
+public interface org.apache.tuscany.sca.node.configuration.BindingConfiguration{
+ public abstract javax.xml.namespace.QName getBindingType();
+ public abstract org.apache.tuscany.sca.node.configuration.BindingConfiguration setBindingType(javax.xml.namespace.QName);
+ public abstract java.util.List getBaseURIs();
+ public abstract org.apache.tuscany.sca.node.configuration.BindingConfiguration addBaseURI(java.lang.String);
+}
+
+Compiled from "ContributionConfiguration.java"
+public interface org.apache.tuscany.sca.node.configuration.ContributionConfiguration{
+ public abstract java.lang.String getURI();
+ public abstract org.apache.tuscany.sca.node.configuration.ContributionConfiguration setURI(java.lang.String);
+ public abstract java.lang.String getLocation();
+ public abstract org.apache.tuscany.sca.node.configuration.ContributionConfiguration setLocation(java.lang.String);
+ public abstract java.util.List getDeploymentComposites();
+ public abstract org.apache.tuscany.sca.node.configuration.ContributionConfiguration addDeploymentComposite(org.apache.tuscany.sca.node.configuration.DeploymentComposite);
+ public abstract org.apache.tuscany.sca.node.configuration.ContributionConfiguration addDeploymentComposite(java.net.URI);
+ public abstract org.apache.tuscany.sca.node.configuration.ContributionConfiguration addDeploymentComposite(java.net.URL);
+ public abstract org.apache.tuscany.sca.node.configuration.ContributionConfiguration addDeploymentComposite(java.lang.String);
+ public abstract org.apache.tuscany.sca.node.configuration.ContributionConfiguration addDeploymentComposite(java.io.Reader);
+ public abstract org.apache.tuscany.sca.node.configuration.ContributionConfiguration addDeploymentComposite(java.io.InputStream);
+ public abstract void setStartDeployables(boolean);
+ public abstract boolean isStartDeployables();
+ public abstract java.util.List getDependentContributionURIs();
+ public abstract void setDependentContributionURIs(java.util.List);
+ public abstract java.lang.String getMetaDataURL();
+ public abstract void setMetaDataURL(java.lang.String);
+}
+
+Compiled from "DefaultNodeConfigurationFactory.java"
+public class org.apache.tuscany.sca.node.configuration.DefaultNodeConfigurationFactory extends java.lang.Object implements org.apache.tuscany.sca.node.configuration.NodeConfigurationFactory{
+ public org.apache.tuscany.sca.node.configuration.DefaultNodeConfigurationFactory();
+ public org.apache.tuscany.sca.node.configuration.BindingConfiguration createBindingConfiguration();
+ public org.apache.tuscany.sca.node.configuration.ContributionConfiguration createContributionConfiguration();
+ public org.apache.tuscany.sca.node.configuration.DeploymentComposite createDeploymentComposite();
+ public org.apache.tuscany.sca.node.configuration.NodeConfiguration createNodeConfiguration();
+}
+
+Compiled from "DeploymentComposite.java"
+public interface org.apache.tuscany.sca.node.configuration.DeploymentComposite{
+ public abstract java.lang.String getLocation();
+ public abstract org.apache.tuscany.sca.node.configuration.DeploymentComposite setLocation(java.lang.String);
+ public abstract java.lang.String getContent();
+ public abstract org.apache.tuscany.sca.node.configuration.DeploymentComposite setContent(java.lang.String);
+ public abstract java.lang.String getContributionURI();
+ public abstract org.apache.tuscany.sca.node.configuration.DeploymentComposite setContributionURI(java.lang.String);
+}
+
+Compiled from "NodeConfiguration.java"
+public interface org.apache.tuscany.sca.node.configuration.NodeConfiguration{
+ public static final java.lang.String DEFAULT_DOMAIN_URI;
+ public static final java.lang.String DEFAULT_NODE_URI;
+ public static final java.lang.String DEFAULT_DOMAIN_REGISTRY_URI;
+ public abstract java.lang.String getDomainURI();
+ public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration setDomainURI(java.lang.String);
+ public abstract java.lang.String getDomainRegistryURI();
+ public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration setDomainRegistryURI(java.lang.String);
+ public abstract java.lang.String getURI();
+ public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration setURI(java.lang.String);
+ public abstract java.util.List getContributions();
+ public abstract java.util.List getBindings();
+ public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration addContribution(org.apache.tuscany.sca.node.configuration.ContributionConfiguration);
+ public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration addContribution(java.lang.String, java.lang.String);
+ public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration addContribution(java.lang.String, java.net.URL);
+ public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration addContribution(java.net.URI, java.net.URL);
+ public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration addContribution(java.net.URL[]);
+ public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration addDeploymentComposite(java.lang.String, java.lang.String);
+ public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration addDeploymentComposite(java.lang.String, java.io.Reader);
+ public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration addDeploymentComposite(java.lang.String, java.io.InputStream);
+ public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration addBinding(org.apache.tuscany.sca.node.configuration.BindingConfiguration);
+ public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration addBinding(javax.xml.namespace.QName, java.lang.String[]);
+ public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration addBinding(javax.xml.namespace.QName, java.net.URI[]);
+ public abstract java.util.List getExtensions();
+}
+
+Compiled from "NodeConfigurationFactory.java"
+public interface org.apache.tuscany.sca.node.configuration.NodeConfigurationFactory{
+ public abstract org.apache.tuscany.sca.node.configuration.NodeConfiguration createNodeConfiguration();
+ public abstract org.apache.tuscany.sca.node.configuration.ContributionConfiguration createContributionConfiguration();
+ public abstract org.apache.tuscany.sca.node.configuration.BindingConfiguration createBindingConfiguration();
+ public abstract org.apache.tuscany.sca.node.configuration.DeploymentComposite createDeploymentComposite();
+}
+
+Compiled from "ComponentContext.java"
+public interface org.oasisopen.sca.ComponentContext{
+ public abstract java.lang.String getURI();
+ public abstract java.lang.Object getService(java.lang.Class, java.lang.String) throws java.lang.IllegalArgumentException;
+ public abstract org.oasisopen.sca.ServiceReference getServiceReference(java.lang.Class, java.lang.String) throws java.lang.IllegalArgumentException;
+ public abstract java.util.Collection getServices(java.lang.Class, java.lang.String) throws java.lang.IllegalArgumentException;
+ public abstract java.util.Collection getServiceReferences(java.lang.Class, java.lang.String) throws java.lang.IllegalArgumentException;
+ public abstract org.oasisopen.sca.ServiceReference createSelfReference(java.lang.Class) throws java.lang.IllegalArgumentException;
+ public abstract org.oasisopen.sca.ServiceReference createSelfReference(java.lang.Class, java.lang.String) throws java.lang.IllegalArgumentException;
+ public abstract java.lang.Object getProperty(java.lang.Class, java.lang.String) throws java.lang.IllegalArgumentException;
+ public abstract org.oasisopen.sca.ServiceReference cast(java.lang.Object) throws java.lang.IllegalArgumentException;
+ public abstract org.oasisopen.sca.RequestContext getRequestContext();
+}
+
+Compiled from "Constants.java"
+public interface org.oasisopen.sca.Constants{
+ public static final java.lang.String SCA_NS;
+ public static final java.lang.String SCA_PREFIX;
+ public static final java.lang.String SERVERAUTHENTICATION;
+ public static final java.lang.String CLIENTAUTHENTICATION;
+ public static final java.lang.String ATLEASTONCE;
+ public static final java.lang.String ATMOSTONCE;
+ public static final java.lang.String EXACTLYONCE;
+ public static final java.lang.String ORDERED;
+ public static final java.lang.String TRANSACTEDONEWAY;
+ public static final java.lang.String IMMEDIATEONEWAY;
+ public static final java.lang.String PROPAGATESTRANSACTION;
+ public static final java.lang.String SUSPENDSTRANSACTION;
+ public static final java.lang.String ASYNCINVOCATION;
+ public static final java.lang.String SOAP;
+ public static final java.lang.String JMS;
+ public static final java.lang.String NOLISTENER;
+ public static final java.lang.String EJB;
+}
+
+Compiled from "InvalidServiceException.java"
+public class org.oasisopen.sca.InvalidServiceException extends org.oasisopen.sca.ServiceRuntimeException{
+ public org.oasisopen.sca.InvalidServiceException();
+ public org.oasisopen.sca.InvalidServiceException(java.lang.String);
+ public org.oasisopen.sca.InvalidServiceException(java.lang.String, java.lang.Throwable);
+ public org.oasisopen.sca.InvalidServiceException(java.lang.Throwable);
+}
+
+Compiled from "NoSuchDomainException.java"
+public class org.oasisopen.sca.NoSuchDomainException extends java.lang.Exception{
+ public org.oasisopen.sca.NoSuchDomainException();
+ public org.oasisopen.sca.NoSuchDomainException(java.lang.String);
+ public org.oasisopen.sca.NoSuchDomainException(java.lang.String, java.lang.Throwable);
+ public org.oasisopen.sca.NoSuchDomainException(java.lang.Throwable);
+}
+
+Compiled from "NoSuchServiceException.java"
+public class org.oasisopen.sca.NoSuchServiceException extends java.lang.Exception{
+ public org.oasisopen.sca.NoSuchServiceException();
+ public org.oasisopen.sca.NoSuchServiceException(java.lang.String);
+ public org.oasisopen.sca.NoSuchServiceException(java.lang.String, java.lang.Throwable);
+ public org.oasisopen.sca.NoSuchServiceException(java.lang.Throwable);
+}
+
+Compiled from "RequestContext.java"
+public interface org.oasisopen.sca.RequestContext{
+ public abstract javax.security.auth.Subject getSecuritySubject();
+ public abstract java.lang.String getServiceName();
+ public abstract org.oasisopen.sca.ServiceReference getCallbackReference();
+ public abstract java.lang.Object getCallback();
+ public abstract org.oasisopen.sca.ServiceReference getServiceReference();
+}
+
+Compiled from "ResponseDispatch.java"
+public interface org.oasisopen.sca.ResponseDispatch{
+ public abstract void sendResponse(java.lang.Object);
+ public abstract void sendFault(java.lang.Throwable);
+ public abstract java.util.Map getContext();
+}
+
+Compiled from "ServiceReference.java"
+public interface org.oasisopen.sca.ServiceReference extends java.io.Serializable{
+ public abstract java.lang.Object getService();
+ public abstract java.lang.Class getBusinessInterface();
+}
+
+Compiled from "ServiceRuntimeException.java"
+public class org.oasisopen.sca.ServiceRuntimeException extends java.lang.RuntimeException{
+ public org.oasisopen.sca.ServiceRuntimeException();
+ public org.oasisopen.sca.ServiceRuntimeException(java.lang.String);
+ public org.oasisopen.sca.ServiceRuntimeException(java.lang.String, java.lang.Throwable);
+ public org.oasisopen.sca.ServiceRuntimeException(java.lang.Throwable);
+}
+
+Compiled from "ServiceUnavailableException.java"
+public class org.oasisopen.sca.ServiceUnavailableException extends org.oasisopen.sca.ServiceRuntimeException{
+ public org.oasisopen.sca.ServiceUnavailableException();
+ public org.oasisopen.sca.ServiceUnavailableException(java.lang.String);
+ public org.oasisopen.sca.ServiceUnavailableException(java.lang.String, java.lang.Throwable);
+ public org.oasisopen.sca.ServiceUnavailableException(java.lang.Throwable);
+}
+
+Compiled from "AllowsPassByReference.java"
+public interface org.oasisopen.sca.annotation.AllowsPassByReference extends java.lang.annotation.Annotation{
+ public abstract boolean value();
+}
+
+Compiled from "AsyncFault.java"
+public interface org.oasisopen.sca.annotation.AsyncFault extends java.lang.annotation.Annotation{
+ public abstract java.lang.Class[] value();
+}
+
+Compiled from "AsyncInvocation.java"
+public interface org.oasisopen.sca.annotation.AsyncInvocation extends java.lang.annotation.Annotation{
+ public static final java.lang.String ASYNCINVOCATION;
+ public abstract boolean value();
+}
+
+Compiled from "Authentication.java"
+public interface org.oasisopen.sca.annotation.Authentication extends java.lang.annotation.Annotation{
+ public static final java.lang.String AUTHENTICATION;
+ public static final java.lang.String AUTHENTICATION_MESSAGE;
+ public static final java.lang.String AUTHENTICATION_TRANSPORT;
+ public abstract java.lang.String[] value();
+}
+
+Compiled from "Authorization.java"
+public interface org.oasisopen.sca.annotation.Authorization extends java.lang.annotation.Annotation{
+ public static final java.lang.String AUTHORIZATION;
+}
+
+Compiled from "Callback.java"
+public interface org.oasisopen.sca.annotation.Callback extends java.lang.annotation.Annotation{
+ public abstract java.lang.Class value();
+}
+
+Compiled from "ComponentName.java"
+public interface org.oasisopen.sca.annotation.ComponentName extends java.lang.annotation.Annotation{
+}
+
+Compiled from "Confidentiality.java"
+public interface org.oasisopen.sca.annotation.Confidentiality extends java.lang.annotation.Annotation{
+ public static final java.lang.String CONFIDENTIALITY;
+ public static final java.lang.String CONFIDENTIALITY_MESSAGE;
+ public static final java.lang.String CONFIDENTIALITY_TRANSPORT;
+ public abstract java.lang.String[] value();
+}
+
+Compiled from "Constructor.java"
+public interface org.oasisopen.sca.annotation.Constructor extends java.lang.annotation.Annotation{
+ public abstract java.lang.String[] value();
+}
+
+Compiled from "Context.java"
+public interface org.oasisopen.sca.annotation.Context extends java.lang.annotation.Annotation{
+}
+
+Compiled from "Destroy.java"
+public interface org.oasisopen.sca.annotation.Destroy extends java.lang.annotation.Annotation{
+}
+
+Compiled from "EagerInit.java"
+public interface org.oasisopen.sca.annotation.EagerInit extends java.lang.annotation.Annotation{
+}
+
+Compiled from "Init.java"
+public interface org.oasisopen.sca.annotation.Init extends java.lang.annotation.Annotation{
+}
+
+Compiled from "Integrity.java"
+public interface org.oasisopen.sca.annotation.Integrity extends java.lang.annotation.Annotation{
+ public static final java.lang.String INTEGRITY;
+ public static final java.lang.String INTEGRITY_MESSAGE;
+ public static final java.lang.String INTEGRITY_TRANSPORT;
+ public abstract java.lang.String[] value();
+}
+
+Compiled from "Intent.java"
+public interface org.oasisopen.sca.annotation.Intent extends java.lang.annotation.Annotation{
+ public abstract java.lang.String value();
+ public abstract java.lang.String targetNamespace();
+ public abstract java.lang.String localPart();
+}
+
+Compiled from "ManagedSharedTransaction.java"
+public interface org.oasisopen.sca.annotation.ManagedSharedTransaction extends java.lang.annotation.Annotation{
+ public static final java.lang.String MANAGEDSHAREDTRANSACTION;
+}
+
+Compiled from "ManagedTransaction.java"
+public interface org.oasisopen.sca.annotation.ManagedTransaction extends java.lang.annotation.Annotation{
+ public static final java.lang.String MANAGEDTRANSACTION;
+ public static final java.lang.String MANAGEDTRANSACTION_MESSAGE;
+ public static final java.lang.String MANAGEDTRANSACTION_TRANSPORT;
+ public abstract java.lang.String[] value();
+}
+
+Compiled from "MutualAuthentication.java"
+public interface org.oasisopen.sca.annotation.MutualAuthentication extends java.lang.annotation.Annotation{
+ public static final java.lang.String MUTUALAUTHENTICATION;
+}
+
+Compiled from "NoManagedTransaction.java"
+public interface org.oasisopen.sca.annotation.NoManagedTransaction extends java.lang.annotation.Annotation{
+ public static final java.lang.String NOMANAGEDTRANSACTION;
+}
+
+Compiled from "OneWay.java"
+public interface org.oasisopen.sca.annotation.OneWay extends java.lang.annotation.Annotation{
+}
+
+Compiled from "PolicySets.java"
+public interface org.oasisopen.sca.annotation.PolicySets extends java.lang.annotation.Annotation{
+ public abstract java.lang.String[] value();
+}
+
+Compiled from "Property.java"
+public interface org.oasisopen.sca.annotation.Property extends java.lang.annotation.Annotation{
+ public abstract java.lang.String name();
+ public abstract boolean required();
+}
+
+Compiled from "Qualifier.java"
+public interface org.oasisopen.sca.annotation.Qualifier extends java.lang.annotation.Annotation{
+}
+
+Compiled from "Reference.java"
+public interface org.oasisopen.sca.annotation.Reference extends java.lang.annotation.Annotation{
+ public abstract java.lang.String name();
+ public abstract boolean required();
+}
+
+Compiled from "Remotable.java"
+public interface org.oasisopen.sca.annotation.Remotable extends java.lang.annotation.Annotation{
+}
+
+Compiled from "Requires.java"
+public interface org.oasisopen.sca.annotation.Requires extends java.lang.annotation.Annotation{
+ public abstract java.lang.String[] value();
+}
+
+Compiled from "Scope.java"
+public interface org.oasisopen.sca.annotation.Scope extends java.lang.annotation.Annotation{
+ public abstract java.lang.String value();
+}
+
+Compiled from "Service.java"
+public interface org.oasisopen.sca.annotation.Service extends java.lang.annotation.Annotation{
+ public abstract java.lang.Class[] value();
+ public abstract java.lang.String[] names();
+}
+
+Compiled from "DefaultXSDFactory.java"
+public class org.apache.tuscany.sca.xsd.DefaultXSDFactory extends org.apache.tuscany.sca.xsd.impl.XSDFactoryImpl implements org.apache.tuscany.sca.xsd.XSDFactory{
+ public org.apache.tuscany.sca.xsd.DefaultXSDFactory();
+}
+
+Compiled from "XSDFactory.java"
+public interface org.apache.tuscany.sca.xsd.XSDFactory{
+ public abstract org.apache.tuscany.sca.xsd.XSDefinition createXSDefinition();
+}
+
+Compiled from "XSDefinition.java"
+public interface org.apache.tuscany.sca.xsd.XSDefinition extends org.apache.tuscany.sca.assembly.Base{
+ public abstract org.apache.ws.commons.schema.XmlSchemaCollection getSchemaCollection();
+ public abstract void setSchemaCollection(org.apache.ws.commons.schema.XmlSchemaCollection);
+ public abstract org.apache.ws.commons.schema.XmlSchema getSchema();
+ public abstract void setSchema(org.apache.ws.commons.schema.XmlSchema);
+ public abstract java.lang.String getNamespace();
+ public abstract void setNamespace(java.lang.String);
+ public abstract java.net.URI getLocation();
+ public abstract void setLocation(java.net.URI);
+ public abstract org.w3c.dom.Document getDocument();
+ public abstract void setDocument(org.w3c.dom.Document);
+ public abstract org.apache.ws.commons.schema.XmlSchemaElement getXmlSchemaElement(javax.xml.namespace.QName);
+ public abstract org.apache.ws.commons.schema.XmlSchemaType getXmlSchemaType(javax.xml.namespace.QName);
+ public abstract java.util.List getAggregatedDefinitions();
+ public abstract void setAggregatedDefinitions(java.util.List);
+}
+
+Compiled from "XSDDocumentProcessor.java"
+public class org.apache.tuscany.sca.xsd.xml.XSDDocumentProcessor extends java.lang.Object implements org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor{
+ public static final javax.xml.namespace.QName XSD;
+ public org.apache.tuscany.sca.xsd.xml.XSDDocumentProcessor(org.apache.tuscany.sca.core.ExtensionPointRegistry, org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor);
+ public org.apache.tuscany.sca.xsd.XSDefinition read(java.net.URL, java.net.URI, java.net.URL, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException;
+ public void resolve(org.apache.tuscany.sca.xsd.XSDefinition, org.apache.tuscany.sca.contribution.resolver.ModelResolver, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionResolveException;
+ public java.lang.String getArtifactType();
+ public java.lang.Class getModelType();
+ protected org.apache.tuscany.sca.xsd.XSDefinition indexRead(java.net.URL) throws java.lang.Exception;
+ public java.lang.Object read(java.net.URL, java.net.URI, java.net.URL, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionReadException;
+ public void resolve(java.lang.Object, org.apache.tuscany.sca.contribution.resolver.ModelResolver, org.apache.tuscany.sca.contribution.processor.ProcessorContext) throws org.apache.tuscany.sca.contribution.processor.ContributionResolveException;
+ static {};
+}
+
+Compiled from "XSDModelResolver.java"
+public class org.apache.tuscany.sca.xsd.xml.XSDModelResolver extends java.lang.Object implements org.apache.tuscany.sca.contribution.resolver.ModelResolver{
+ public org.apache.tuscany.sca.xsd.xml.XSDModelResolver(org.apache.tuscany.sca.contribution.Contribution, org.apache.tuscany.sca.core.FactoryExtensionPoint);
+ public void addModel(java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext);
+ public java.lang.Object removeModel(java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext);
+ public java.lang.Object resolveModel(java.lang.Class, java.lang.Object, org.apache.tuscany.sca.contribution.processor.ProcessorContext);
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/spi/src/test/java/org/apache/tuscany/sca/itest/spi/SPITestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/spi/src/test/java/org/apache/tuscany/sca/itest/spi/SPITestCase.java
new file mode 100644
index 0000000000..2d2dc9dac5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/spi/src/test/java/org/apache/tuscany/sca/itest/spi/SPITestCase.java
@@ -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.
+ */
+
+package org.apache.tuscany.sca.itest.spi;
+
+import java.io.DataInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.math.BigInteger;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.logging.Handler;
+import java.util.logging.Level;
+import java.util.logging.LogRecord;
+import java.util.logging.Logger;
+
+import junit.framework.Assert;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+
+public class SPITestCase {
+
+
+ @Before
+ public void setUp() throws Exception {
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ @Test
+ public void diffSPIClasses(){
+ File spiSafeFile = new File("spi-safe.txt");
+ File spiFile = new File("spi.txt");
+
+ String spiSafeMD5 = null;
+ String spiMD5 = null;
+
+ try {
+ spiSafeMD5 = getMD5Digest(spiSafeFile);
+ spiMD5 = getMD5Digest(spiFile);
+ } catch(Exception ex) {
+ ex.printStackTrace();
+ Assert.fail(ex.toString());
+ }
+
+ System.out.println("SPI Safe MD5 = " + spiSafeMD5);
+ System.out.println("SPI MD5 = " + spiMD5);
+
+ Assert.assertEquals(spiSafeMD5, spiMD5);
+ }
+
+ private String getMD5Digest(File file)
+ throws NoSuchAlgorithmException,
+ FileNotFoundException,
+ IOException {
+ MessageDigest messageDigest = MessageDigest.getInstance("MD5");
+
+ FileInputStream fileInputStream = new FileInputStream(file);
+ DataInputStream dataInputStream = new DataInputStream(fileInputStream);
+ byte[] fileBytes = new byte[(int)file.length()];
+ dataInputStream.readFully(fileBytes);
+ messageDigest.update(fileBytes);
+ byte[] md5Digest = messageDigest.digest();
+ BigInteger m5DigestInteger = new BigInteger(1,md5Digest);
+ return m5DigestInteger.toString(16);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/wires/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/wires/pom.xml
new file mode 100644
index 0000000000..60a43a045c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/wires/pom.xml
@@ -0,0 +1,39 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-wires</artifactId>
+ <name>Apache Tuscany SCA iTest Wires Basic</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireClient.java
new file mode 100644
index 0000000000..f5a4337254
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireClient.java
@@ -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.itest;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * This is the client interface for the wires tests
+ */
+@Remotable
+public interface WireClient {
+
+ /**
+ * This tests the wires.
+ */
+ void runTests();
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireClientImpl.java
new file mode 100644
index 0000000000..82f0e26d58
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireClientImpl.java
@@ -0,0 +1,51 @@
+/*
+ * 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.itest;
+
+import org.junit.Assert;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This is the client implementation for the wires tests
+ */
+@Service(WireClient.class)
+public class WireClientImpl implements WireClient {
+ /**
+ * This is our injected reference to the WireService
+ */
+ @Reference
+ protected WireService aWireService;
+
+ /**
+ * This tests the wire reference
+ */
+ public void runTests() {
+ // Make sure the wire has injected a reference
+ Assert.assertNotNull(aWireService);
+
+ // Test the injected reference
+ String msg = aWireService.sayHello("MCC");
+
+ // Validate the response
+ Assert.assertNotNull(msg);
+ Assert.assertEquals("Hello MCC", msg);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireService.java
new file mode 100644
index 0000000000..67df1e3a52
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireService.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.itest;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * Sample Wire Service
+ */
+@Remotable
+public interface WireService {
+ /**
+ * Returns "Hello " + aName
+ *
+ * @param aName The name to say hello
+ * @return "Hello " + aName
+ */
+ String sayHello(String aName);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireServiceImpl.java
new file mode 100644
index 0000000000..f0308252ba
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/wires/src/main/java/org/apache/tuscany/sca/itest/WireServiceImpl.java
@@ -0,0 +1,39 @@
+/*
+ * 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.itest;
+
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * Sample WireService Implementation
+ */
+@Service(WireService.class)
+public class WireServiceImpl implements WireService {
+
+ /**
+ * Returns "Hello " + aName
+ *
+ * @param aName The name to say hello
+ * @return "Hello " + aName
+ */
+ public String sayHello(String aName) {
+ return "Hello " + aName;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/wires/src/main/resources/WireTest.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/wires/src/main/resources/WireTest.composite
new file mode 100644
index 0000000000..e697726a73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/wires/src/main/resources/WireTest.composite
@@ -0,0 +1,39 @@
+<?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" targetNamespace="http://wires" name="WireTest">
+
+ <component name="WireClient">
+ <implementation.java class="org.apache.tuscany.sca.itest.WireClientImpl"/>
+<!-- We are not using a reference - we are using a wire - see below -->
+<!-- The equivalent reference for the wire would be as follows -->
+<!-- <reference name="aWireService" target="WireService"/>-->
+ </component>
+
+ <component name="AnotherWireClient">
+ <implementation.java class="org.apache.tuscany.sca.itest.WireClientImpl"/>
+ </component>
+
+ <component name="WireServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.WireServiceImpl"/>
+ </component>
+
+ <wire source="WireClient/aWireService" target="WireServiceComponent"/>
+ <wire source="AnotherWireClient/aWireService" target="WireServiceComponent/WireService"/>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/wires/src/test/java/org/apache/tuscany/sca/itest/WireTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/wires/src/test/java/org/apache/tuscany/sca/itest/WireTestCase.java
new file mode 100644
index 0000000000..2a0095cabc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/wires/src/test/java/org/apache/tuscany/sca/itest/WireTestCase.java
@@ -0,0 +1,78 @@
+/*
+ * 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.itest;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * This test case will attempt to use a wire
+ */
+public class WireTestCase {
+
+ /**
+ * The Node we are using
+ */
+ private Node node;
+
+ /**
+ * The client the tests should use
+ */
+ private WireClient aWireClient;
+
+ /**
+ * Run the wire tests
+ */
+ @Test
+ public void testWire() {
+ aWireClient.runTests();
+ }
+
+ /**
+ * Load the Wire composite and look up the client.
+ */
+
+ @Before
+ public void setUp() throws Exception {
+ String location = ContributionLocationHelper.getContributionLocation("WireTest.composite");
+ node = NodeFactory.newInstance().createNode("WireTest.composite", new Contribution("c1", location));
+ node.start();
+ aWireClient = node.getService(WireClient.class, "WireClient");
+ Assert.assertNotNull(aWireClient);
+
+ aWireClient = node.getService(WireClient.class, "AnotherWireClient");
+ Assert.assertNotNull(aWireClient);
+ }
+
+ /**
+ * Shutdown the SCA node
+ */
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/README b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/README
new file mode 100644
index 0000000000..cf635e78d0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/README
@@ -0,0 +1,83 @@
+
+Scenarios
+=========
+
+General Patterns
+----------------
+
+For simple synchronous tests:
+
+Jaxws client -> (b.ws service) SCA Component (b.ws reference) -> Jaxws Service
+
+For callback or asynchronous tests
+
+JUnit client -> SCA Component (b.ws reference) -> (b.ws service) SCA component
+
+Java First
+----------
+scratch java component impl
+interface jaave (simple + JAXB + SDO )
+?wsdl - gens wsdl
+
+Java First with JAX-WS annotations
+----------------------------------
+WSDL -> wsimport -> Java component impl
+interface java
+?wsdl - re-gens wsdl
+
+WSDL first
+----------
+Java component impl -> wsgen -> wsdl
+interface wsdl
+?wsld - provided wsdl
+
+Policy
+------
+ws-policy (aac)
+
+Java First
+ WSpolicy from Policy set in definitions.xml
+ ?wsdl - gens wsdl + policy
+WSDL first
+ WSpolicy from WSDL
+ ?wsld - uses wsdl + policy
+ Policy signing
+
+alternative bindings
+--------------------
+SOAP/HTTP
+SOAP/HTTPS
+SOAP/JMS
+ How to retrieve WSDL for non-http bindings (a SHOULD in the spec)
+
+asynchInvocation Intent
+-----------------------
+ Service
+ Client
+
+noListener Intent
+-----------------
+ ws-makeconnetion?
+
+
+SOAP1.1 intent
+--------------
+
+
+SOAP1.2 intent
+--------------
+
+MTOM intent
+--------------
+
+callback
+--------
+new OASIS protocol
+WSCallback ws policy
+
+JAXWS Asynch APIs
+-----------------
+
+Streaming
+---------
+Do we need to support?
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/pom.xml
new file mode 100644
index 0000000000..18915a722c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/pom.xml
@@ -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-jaxws</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-ws-jaxws-contribution-java-first</artifactId>
+ <name>Apache Tuscany SCA iTest WS JAXWS Contribution Java First </name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</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.jaxws.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.jaxws</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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/Bar.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/Bar.java
new file mode 100644
index 0000000000..e712ec8b53
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/Bar.java
@@ -0,0 +1,58 @@
+/*
+ * 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.jaxws;
+
+import java.io.Serializable;
+
+public class Bar implements Serializable {
+ private static final long serialVersionUID = 1249963611910502668L;
+
+ private String s;
+ private int x;
+ private Integer y;
+
+ private Boolean b;
+
+ public Boolean getB() {
+ return b;
+ }
+ public void setB(Boolean b) {
+ this.b = b;
+ }
+ public String getS() {
+ return s;
+ }
+ public void setS(String s) {
+ this.s = s;
+ }
+ public int getX() {
+ return x;
+ }
+ public void setX(int x) {
+ this.x = x;
+ }
+ public Integer getY() {
+ return y;
+ }
+ public void setY(Integer y) {
+ this.y = y;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/Foo.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/Foo.java
new file mode 100644
index 0000000000..d09b2af230
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/Foo.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.jaxws;
+
+import java.io.Serializable;
+
+public class Foo implements Serializable {
+ private static final long serialVersionUID = 4879476066850018458L;
+
+ private Bar[] bars;
+
+ public Bar[] getBars() {
+ return bars;
+ }
+
+ public void setBars(Bar[] bars) {
+ this.bars = bars;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/HelloWorld.java
new file mode 100644
index 0000000000..652f7b53c4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/HelloWorld.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.jaxws;
+
+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);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/HelloWorldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/HelloWorldImpl.java
new file mode 100644
index 0000000000..85e55888c6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/HelloWorldImpl.java
@@ -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.jaxws;
+
+import javax.jws.WebService;
+
+import org.apache.tuscany.sca.binding.ws.jaxws.external.service.jaxws.HelloWorldService;
+import org.oasisopen.sca.ServiceRuntimeException;
+import org.oasisopen.sca.annotation.Reference;
+
+@WebService
+public class HelloWorldImpl implements HelloWorld {
+
+ @Reference
+ public HelloWorldService helloWorldExternal;
+
+ public String getGreetings(String s) {
+ System.out.println("Entering SCA HelloWorld.getGreetings: " + s);
+ String response = helloWorldExternal.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 = helloWorldExternal.getGreetings(s);
+ System.out.println("Leaving SCA HelloWorld.getGreetings: " + response);
+ throw new ServiceRuntimeException(response);
+ }
+
+ public Foo getGreetingsComplex(Foo foo){
+ Foo response = null;//helloWorldExternal.getGreetingsComplex(foo);
+ System.out.println("At client: " + response.getBars()[0].getS());
+ return response;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/resources/HelloWorldServiceService_schema1.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/resources/HelloWorldServiceService_schema1.xsd
new file mode 100644
index 0000000000..51f6dd4d51
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/resources/HelloWorldServiceService_schema1.xsd
@@ -0,0 +1,38 @@
+<?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="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:schema>
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..7e71dd465f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/resources/META-INF/sca-contribution.xml
@@ -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
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/resources/helloworld-external-service.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/resources/helloworld-external-service.wsdl
new file mode 100644
index 0000000000..67236a5f98
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/resources/helloworld-external-service.wsdl
@@ -0,0 +1,57 @@
+<?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>
+ <portType name="HelloWorldService">
+ <operation name="getGreetings">
+ <input message="tns:getGreetings"/>
+ <output message="tns:getGreetingsResponse"/>
+ </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>
+ </binding>
+ <service name="HelloWorldServiceService">
+ <port name="HelloWorldServicePort" binding="tns:HelloWorldServicePortBinding">
+ <soap:address location="http://localhost:8086/External/HelloWorld"/>
+ </port>
+ </service>
+</definitions>
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/resources/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/resources/helloworld.composite
new file mode 100644
index 0000000000..0188dc0d41
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-java-first/src/main/resources/helloworld.composite
@@ -0,0 +1,35 @@
+<?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.jaxws.HelloWorldImpl"/>
+ <service name="HelloWorld">
+ <binding.ws uri="http://localhost:8085/HelloWorldService/HelloWorld"/>
+ </service>
+ <reference name="helloWorldExternal">
+ <binding.ws uri="http://localhost:8086/External/HelloWorld"/>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-wsdl-first/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-wsdl-first/pom.xml
new file mode 100644
index 0000000000..bf95f918f9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-wsdl-first/pom.xml
@@ -0,0 +1,129 @@
+<?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-jaxws</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-ws-jaxws-contribution-wsdl-first</artifactId>
+ <name>Apache Tuscany SCA iTest WS JAXWS Contribution WSDL First</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</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>wsimport1</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>wsimport</goal>
+ </goals>
+ <configuration>
+ <packageName>org.apache.tuscany.sca.binding.ws.jaxws</packageName>
+ <wsdlDirectory>${basedir}/target/classes</wsdlDirectory>
+ <wsdlFiles>
+ <wsdlFile>helloworld-sca.wsdl</wsdlFile>
+ </wsdlFiles>
+ <staleFile>${project.build.directory}/jaxws/stale/.wsimport1StaleFlag</staleFile>
+ </configuration>
+ </execution>
+ <execution>
+ <id>wsimport2</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>wsimport</goal>
+ </goals>
+ <configuration>
+ <packageName>org.apache.tuscany.sca.binding.ws.jaxws.external.service</packageName>
+ <wsdlDirectory>${basedir}/target/classes</wsdlDirectory>
+ <wsdlFiles>
+ <wsdlFile>helloworld-external.wsdl</wsdlFile>
+ </wsdlFiles>
+ <staleFile>${project.build.directory}/jaxws/stale/.wsimport2StaleFlag</staleFile>
+ </configuration>
+ </execution>
+ </executions>
+ <configuration>
+ <target>2.1</target>
+ <sourceDestDir>${project.build.directory}/jaxws-source</sourceDestDir>
+ <verbose>true</verbose>
+ <xnocompile>true</xnocompile>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-wsdl-first/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/impl/HelloWorldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-wsdl-first/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/impl/HelloWorldImpl.java
new file mode 100644
index 0000000000..7c63fd5ba9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-wsdl-first/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/impl/HelloWorldImpl.java
@@ -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.binding.ws.jaxws.impl;
+
+import org.apache.tuscany.sca.binding.ws.jaxws.HelloWorld;
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldImpl implements HelloWorld {
+
+ @Reference
+ public org.apache.tuscany.sca.binding.ws.jaxws.external.service.HelloWorld helloWorldExternal;
+
+ public String getGreetings(String s) {
+ System.out.println("Entering SCA HelloWorld.getGreetings: " + s);
+ String response = helloWorldExternal.getGreetings(s);
+ System.out.println("Leaving SCA HelloWorld.getGreetings: " + response);
+ return response;
+ }
+/*
+ public Foo getGreetingsComplex(Foo foo){
+ Foo response = null;//helloWorldExternal.getGreetingsComplex(foo);
+ System.out.println("At client: " + response.getBars()[0].getS());
+ return response;
+ }
+*/
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-wsdl-first/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-wsdl-first/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..7e71dd465f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-wsdl-first/src/main/resources/META-INF/sca-contribution.xml
@@ -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
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-wsdl-first/src/main/resources/helloworld-external.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-wsdl-first/src/main/resources/helloworld-external.wsdl
new file mode 100644
index 0000000000..78d8077bcd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-wsdl-first/src/main/resources/helloworld-external.wsdl
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld/external"
+ xmlns:tns="http://helloworld/external"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld/external" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ </wsdl:binding>
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
+ <wsdlsoap:address location="http://localhost:8086/External/HelloWorld"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-wsdl-first/src/main/resources/helloworld-sca.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-wsdl-first/src/main/resources/helloworld-sca.wsdl
new file mode 100644
index 0000000000..0e6a10cc62
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-wsdl-first/src/main/resources/helloworld-sca.wsdl
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld"
+ xmlns:tns="http://helloworld"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ </wsdl:binding>
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
+ <wsdlsoap:address location="http://localhost:8085/HelloWorldService/HelloWorld"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-wsdl-first/src/main/resources/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-wsdl-first/src/main/resources/helloworld.composite
new file mode 100644
index 0000000000..0cd2b4419d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/contribution-wsdl-first/src/main/resources/helloworld.composite
@@ -0,0 +1,35 @@
+<?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.jaxws.impl.HelloWorldImpl"/>
+ <service name="HelloWorld">
+ <binding.ws wsdlElement="http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort)"/>
+ </service>
+ <reference name="helloWorldExternal">
+ <binding.ws wsdlElement="http://helloworld/external#wsdl.port(HelloWorldService/HelloWorldSoapPort)"/>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/external-client/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/external-client/pom.xml
new file mode 100644
index 0000000000..8e30e81694
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/external-client/pom.xml
@@ -0,0 +1,117 @@
+<?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-jaxws</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-ws-jaxws-external-client</artifactId>
+ <name>Apache Tuscany SCA iTest WS JAXWS External Client</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</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>wsimport1</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>wsimport</goal>
+ </goals>
+ <configuration>
+ <packageName>org.apache.tuscany.sca.binding.ws.jaxws.sca</packageName>
+ <wsdlDirectory>${basedir}/target/classes</wsdlDirectory>
+ <wsdlFiles>
+ <wsdlFile>HelloWorldImplService.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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/external-client/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/client/HelloWorldClientLauncher.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/external-client/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/client/HelloWorldClientLauncher.java
new file mode 100644
index 0000000000..da40a7f442
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/external-client/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/client/HelloWorldClientLauncher.java
@@ -0,0 +1,73 @@
+/*
+ * 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.jaxws.external.client;
+
+import java.io.File;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import org.apache.tuscany.sca.binding.ws.jaxws.sca.Exception_Exception;
+import org.apache.tuscany.sca.binding.ws.jaxws.sca.HelloWorldImpl;
+
+public class HelloWorldClientLauncher {
+
+ public HelloWorldImpl wsProxy;
+
+ public HelloWorldClientLauncher(){
+ }
+
+ public void createClient() throws Exception{
+ System.out.println(">>> Starting external JAXWS client ");
+
+ // default JVM JAXWS support
+ QName serviceName = new QName("http://jaxws.ws.binding.sca.tuscany.apache.org/", "HelloWorldImplService");
+ QName portName = new QName("http://jaxws.ws.binding.sca.tuscany.apache.org/", "HelloWorldImplPort");
+ //URL wsdlLocation = new File("../external-client/target/classes/helloworld-sca.wsdl").toURL();
+ URL wsdlLocation = new File("../external-client/target/classes/HelloWorldImplService.wsdl").toURL();
+ javax.xml.ws.Service webService = Service.create(wsdlLocation, serviceName);
+ wsProxy = (HelloWorldImpl) webService.getPort(portName, HelloWorldImpl.class);
+ }
+
+ public void destroyClient(){
+ System.out.println(">>> Stopping external JAXWS client: ");
+ // TODO
+ }
+
+ public String getGreetings(String name){
+ System.out.println("Entering External Client HelloWorld.getGreetings: " + name);
+ String response = wsProxy.getGreetings(name);
+ System.out.println("Leaving External Client HelloWorld.getGreetings: " + response);
+ return response;
+ }
+
+ public String getGreetingsException(String name) throws Exception_Exception {
+ return wsProxy.getGreetingsException(name);
+ }
+
+ public static void main(String[] args) throws Exception {
+ HelloWorldClientLauncher launcher = new HelloWorldClientLauncher();
+ launcher.createClient();
+ launcher.getGreetings("Fred");
+ launcher.destroyClient();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/external-client/src/main/resources/HelloWorldImplService.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/external-client/src/main/resources/HelloWorldImplService.wsdl
new file mode 100644
index 0000000000..11ed0a3353
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/external-client/src/main/resources/HelloWorldImplService.wsdl
@@ -0,0 +1,104 @@
+<?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://jaxws.ws.binding.sca.tuscany.apache.org/" name="HelloWorldImplService" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://jaxws.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://jaxws.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>
+ <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>
+
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/external-client/src/main/resources/HelloWorldImplService_schema1.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/external-client/src/main/resources/HelloWorldImplService_schema1.xsd
new file mode 100644
index 0000000000..3c347570a0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/external-client/src/main/resources/HelloWorldImplService_schema1.xsd
@@ -0,0 +1,93 @@
+<?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://jaxws.ws.binding.sca.tuscany.apache.org/" xmlns:tns="http://jaxws.ws.binding.sca.tuscany.apache.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <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: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="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>
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/external-service/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/external-service/pom.xml
new file mode 100644
index 0000000000..544ee699b6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/external-service/pom.xml
@@ -0,0 +1,96 @@
+<?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-jaxws</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-ws-jaxws-external-service</artifactId>
+ <name>Apache Tuscany SCA iTest WS JAXWS External Service</name>
+
+ <dependencies>
+
+
+ </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.jaxws.external.service.HelloWorldService</sei>
+ <genWsdl>true</genWsdl>
+ <staleFile>${project.build.directory}/jaxws/stale/.wsgen1StaleFlag</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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldService.java
new file mode 100644
index 0000000000..796ef82792
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldService.java
@@ -0,0 +1,57 @@
+/*
+ * 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.jaxws.external.service;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+@WebService(name = "HelloWorldService", targetNamespace = "http://helloworld/external")
+public class HelloWorldService {
+
+ @WebMethod
+ @WebResult(name = "getGreetingsReturn", targetNamespace = "http://helloworld/external")
+ @RequestWrapper(localName = "getGreetings", targetNamespace = "http://helloworld/external", className = "org.apache.tuscany.sca.binding.ws.jaxws.external.service.GetGreetings")
+ @ResponseWrapper(localName = "getGreetingsResponse", targetNamespace = "http://helloworld/external", className = "org.apache.tuscany.sca.binding.ws.jaxws.external.service.GetGreetingsResponse")
+ public String getGreetings( @WebParam(name = "name", targetNamespace = "http://helloworld/external")
+ String name) {
+ System.out.println("Entering External Service HelloWorld.getGreetings: " + name);
+ String response = "Hello " + name;
+ System.out.println("Leaving External Service HelloWorld.getGreetings: " + response);
+ return response;
+ }
+
+/*
+ public Foo getGreetingsComplex(Foo foo){
+ Foo response = foo;
+ Bar b3 = new Bar();
+ b3.setS("simon");
+ b3.setX(4);
+ b3.setY(new Integer(5));
+ b3.setB(Boolean.TRUE);
+ response.getBars()[1] = b3;
+ System.out.println("At sevice: " + response.getBars()[0].getS());
+ return response;
+ }
+*/
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldServiceLauncher.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldServiceLauncher.java
new file mode 100644
index 0000000000..ba7e033f63
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldServiceLauncher.java
@@ -0,0 +1,49 @@
+/*
+ * 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.jaxws.external.service;
+
+import javax.xml.ws.Endpoint;
+
+public class HelloWorldServiceLauncher {
+
+ public Endpoint endpoint;
+
+ public HelloWorldServiceLauncher(){
+
+ }
+
+ public void createService(){
+ System.out.println(">>> Starting external JAXWS service at http://localhost:8086/External/HelloWorld");
+
+ // default JVM JAXWS support.
+ endpoint= Endpoint.publish("http://localhost:8086/External/HelloWorld",
+ new HelloWorldService());
+ }
+
+ public void destoryService(){
+ System.out.println(">>> Stopping external JAXWS service at http://localhost:8086/External/HelloWorld");
+ endpoint.stop();
+ }
+
+ public static void main(String[] args) throws Exception {
+ HelloWorldServiceLauncher launcher = new HelloWorldServiceLauncher();
+ launcher.createService();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/launcher-ri/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/launcher-ri/pom.xml
new file mode 100644
index 0000000000..b85cd50271
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/launcher-ri/pom.xml
@@ -0,0 +1,60 @@
+<?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-jaxws</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-ws-jaxws-launcher-ri</artifactId>
+ <name>Apache Tuscany SCA iTest WS JAXWS Launcher RI</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <!-- Test resources -->
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-ws-jaxws-external-client</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-ws-jaxws-external-service</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+
+ </build>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/launcher-ri/src/test/java/org/apache/tuscany/sca/binding/ws/jaxws/launcher/JavaFirstTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/launcher-ri/src/test/java/org/apache/tuscany/sca/binding/ws/jaxws/launcher/JavaFirstTestCase.java
new file mode 100644
index 0000000000..3c14218118
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/launcher-ri/src/test/java/org/apache/tuscany/sca/binding/ws/jaxws/launcher/JavaFirstTestCase.java
@@ -0,0 +1,119 @@
+/*
+ * 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.jaxws.launcher;
+
+import static org.junit.Assert.assertEquals;
+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.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;
+
+public class JavaFirstTestCase {
+
+ 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("java-first", "../contribution-java-first/target/classes"));
+ node.start();
+
+ // start the external client
+ try {
+ externalClient = new HelloWorldClientLauncher();
+ externalClient.createClient();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ throw ex;
+ }
+ }
+
+/*
+ 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 testGetGreetingsException() throws Exception {
+ try {
+ externalClient.getGreetingsException("Fred");
+ } catch (Exception ex) {
+ return;
+ }
+
+ fail("expecting exception");
+ }
+
+ 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.setBars(new Bar[] { b1, b2} );
+
+ Foo f2 = helloWorld.getGreetingsComplex(f);
+
+ assertEquals("petra", f2.getBars()[0].getS());
+ assertEquals(1, f2.getBars()[0].getX());
+ assertEquals(2, f2.getBars()[0].getY().intValue());
+ assertTrue(f2.getBars()[0].getB().booleanValue());
+ assertEquals("simon", f2.getBars()[1].getS());
+ assertEquals(4, f2.getBars()[1].getX());
+ assertEquals(5, f2.getBars()[1].getY().intValue());
+ assertTrue(f2.getBars()[1].getB().booleanValue());
+*/
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ externalClient.destroyClient();
+ externalService.destoryService();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/launcher-ri/src/test/java/org/apache/tuscany/sca/binding/ws/jaxws/launcher/WSDLFirstTestCaseOFF.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/launcher-ri/src/test/java/org/apache/tuscany/sca/binding/ws/jaxws/launcher/WSDLFirstTestCaseOFF.java
new file mode 100644
index 0000000000..a69fe483bf
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/launcher-ri/src/test/java/org/apache/tuscany/sca/binding/ws/jaxws/launcher/WSDLFirstTestCaseOFF.java
@@ -0,0 +1,143 @@
+/*
+ * 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.jaxws.launcher;
+
+import junit.framework.TestCase;
+
+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.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+public class WSDLFirstTestCaseOFF extends TestCase {
+
+ private Node node;
+
+ @Override
+ protected void setUp() throws Exception {
+ // Start the external service
+ HelloWorldServiceLauncher.main(null);
+
+ // Start the SCA contribution
+ node = NodeFactory.newInstance().createNode(new Contribution("common", "../common-contribution/target/classes"),
+ new Contribution("wsdl-first", "../wsdl-first-contribution/target/classes"));
+ node.start();
+ }
+
+ public void testCalculator() throws Exception {
+ HelloWorldClientLauncher.main(null);
+ }
+
+/*
+ public void testWait1() throws Exception {
+ System.out.println("Press a key");
+ System.in.read();
+ }
+
+ public void testCalculator1() throws Exception {
+ HelloWorldClientLauncher.main(null);
+ }
+
+ public void testCalculator2() throws Exception {
+ HelloWorldClientLauncher.main(null);
+ }
+
+ public void testCalculator3() throws Exception {
+ HelloWorldClientLauncher.main(null);
+ }
+
+ public void testCalculator4() throws Exception {
+ HelloWorldClientLauncher.main(null);
+ }
+
+ public void testCalculator5() throws Exception {
+ HelloWorldClientLauncher.main(null);
+ }
+
+ public void testCalculator6() throws Exception {
+ HelloWorldClientLauncher.main(null);
+ }
+
+ public void testCalculator7() throws Exception {
+ HelloWorldClientLauncher.main(null);
+ }
+
+ public void testCalculator8() throws Exception {
+ HelloWorldClientLauncher.main(null);
+ }
+
+ public void testCalculator9() throws Exception {
+ HelloWorldClientLauncher.main(null);
+ }
+
+ public void testCalculator10() throws Exception {
+ HelloWorldClientLauncher.main(null);
+ }
+
+ public void testCalculator11() throws Exception {
+ HelloWorldClientLauncher.main(null);
+ }
+
+ public void testCalculator12() throws Exception {
+ HelloWorldClientLauncher.main(null);
+ }
+
+ public void testCalculator13() throws Exception {
+ HelloWorldClientLauncher.main(null);
+ }
+
+ public void testCalculator14() throws Exception {
+ HelloWorldClientLauncher.main(null);
+ }
+
+ public void testCalculator15() throws Exception {
+ HelloWorldClientLauncher.main(null);
+ }
+
+ public void testCalculator16() throws Exception {
+ HelloWorldClientLauncher.main(null);
+ }
+
+ public void testCalculator17() throws Exception {
+ HelloWorldClientLauncher.main(null);
+ }
+
+ public void testCalculator18() throws Exception {
+ HelloWorldClientLauncher.main(null);
+ }
+
+ public void testCalculator19() throws Exception {
+ HelloWorldClientLauncher.main(null);
+ }
+
+ public void testCalculator20() throws Exception {
+ HelloWorldClientLauncher.main(null);
+ }
+*/
+
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ node = null;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/pom.xml
new file mode 100644
index 0000000000..4dea16ee4d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws-jaxws/pom.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <packaging>pom</packaging>
+ <artifactId>itest-ws-jaxws</artifactId>
+ <name>Apache Tuscany SCA iTest WS JAXWS</name>
+
+ <modules>
+ <module>contribution-java-first</module>
+ <module>contribution-wsdl-first</module>
+ <module>external-client</module>
+ <module>external-service</module>
+ <module>launcher-ri</module>
+ <!--module>launcher-axis2</module-->
+ </modules>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/README b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/README
new file mode 100644
index 0000000000..0efac242c2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/README
@@ -0,0 +1,135 @@
+
+Features/Tests
+==============
+
+General Patterns
+----------------
+For simple synchronous tests:
+
+Jaxws client -> (b.ws service) SCA Component (b.ws reference) -> Jaxws Service
+ /\ /\ |
+ | use | use | gen
+ | | \/
+Java Interface<------------------Java Interface<---------gen----------WSDL
+
+
+For message format the external service don't get involved in the varying message formats,
+They are still doing doc/lit/wrapped:
+
+TODO - we could extend testing to include JAXWS edpoints thatunderstand the different formats
+
+JUnit client -> SCA Component (b.ws reference) -> (b.ws service) SCA component -> Jaxws Service
+ /\ /\ /\ /\ |
+ | | config | config | |
+ | use | | | use | gen
+ | -----------WSDL------- | |
+ | | \/
+Java Interface<-------------------------------------------------Java Interface<----gen---WSDL
+
+For SCA callback or asynchronous tests the external services don't get involved in the
+callback or aysnc request:
+
+JUnit client -> SCA Component (b.ws reference) -> (b.ws service) SCA component -> Jaxws Service
+
+
+Java First
+----------
+implemenation.java
+interface.java
+ simple
+ JAXB
+ SDO - TODO
+?wsdl - gens wsdl
+
+Java First with JAX-WS annotations
+----------------------------------
+WSDL -> wsimport -> implemenation.java
+interface.java
+?wsdl - re-gens wsdl
+
+WSDL first
+----------
+implemenation.java -> wsgen -> wsdl
+interface.wsdl
+?wsld - provided wsdl
+
+Callback
+--------
+Various combinations of specified callback and default configuration
+WSCallback ws policy - TODO
+
+WSDL Styles
+-----------
+
+rpc-lit - supported
+ WSDL configuration where
+ message parts use types - <part name="s" type="xsd:string"/>
+ binding style set to rpc - <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
+ body uses literal - <soap:body use="literal" namespace="http://ws.binding.sca.tuscany.apache.org/rpclit/getGreetingsNamespace" />
+ Note the use of a namespace on the body element to set the namespace of the wrapper child of the body element
+doc-lit(or bare) - supported (however see note below)
+ WS-I BP1.1 4.7.6 states that an operation signature is a
+ "fully qualified name of the child element of SOAP body of the SOAP input message"
+ to make this true for doc-lit encoding you have to design the WSDL to wrap the parameters
+ in an appropriate type. Hence doc-literal-wrapped is supported which encompasses this wrapping style.
+ For bare style interfaces you have to mark the Java service interface as follows
+ SOAP binding is set to - @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+ WSDL configuration where
+ message parts use elements - <part name="parameters" element="tns:getGreetings"/>
+ the elements are directly implemented by the operation parameter type
+ binding style set to document - <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ body uses literal - <soap:body use="literal"/>
+doc-lit-wrapped - supported
+ WSDL configuration where
+ message parts use elements - <part name="parameters" element="tns:getGreetings"/>
+ the elements are implemented by wrapper types following the name of the operation
+ binding style set to document - <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ body uses literal - <soap:body use="literal"/>
+rpc-encoded - not supported
+ not WS-I compliant
+doc-encoded - not supported
+ not WS-I compliant
+
+================================== TODO below =========================
+
+Policy
+------
+ws-policy (aac)
+
+Java First
+ WSpolicy from Policy set in definitions.xml
+ ?wsdl - gens wsdl + policy
+WSDL first
+ WSpolicy from WSDL
+ ?wsld - uses wsdl + policy
+ Policy signing
+
+alternative bindings
+--------------------
+SOAP/HTTP
+SOAP/HTTPS
+SOAP/JMS
+ How to retrieve WSDL for non-http bindings (a SHOULD in the spec)
+
+asynchInvocation Intent
+-----------------------
+ Service
+ Client
+
+noListener Intent
+-----------------
+ ws-makeconnetion?
+
+
+SOAP1.1 intent
+--------------
+
+SOAP1.2 intent
+--------------
+
+MTOM intent
+--------------
+
+Streaming
+---------
+Do we need to support?
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/pom.xml
new file mode 100644
index 0000000000..4602d62108
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/pom.xml
@@ -0,0 +1,63 @@
+<?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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-ws-authentication-basic</artifactId>
+ <name>Apache Tuscany SCA iTest WS with Authentication Basic</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.19</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>wstx-asl</artifactId>
+ <version>3.2.9</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorld.java
new file mode 100644
index 0000000000..98eb6e361b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorld.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorld {
+
+ String getGreetings(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldClient.java
new file mode 100644
index 0000000000..2c6c4fc92c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldClient.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClient implements HelloWorld {
+
+ @Reference
+ public HelloWorld helloWorldWS;
+
+ public String getGreetings(String s) {
+ String response = helloWorldWS.getGreetings(s);
+ System.out.println("At client: " + response);
+ return response;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..885844260a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldService.java
@@ -0,0 +1,45 @@
+/*
+ * 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.axis2.helloworld;
+
+import javax.security.auth.Subject;
+
+import org.oasisopen.sca.RequestContext;
+import org.oasisopen.sca.annotation.Context;
+
+public class HelloWorldService implements HelloWorld {
+
+ @Context
+ protected RequestContext requestContext;
+
+ public String getGreetings(String name) {
+ Subject subject = requestContext.getSecuritySubject();
+ String response = "Hello " + name + " ";
+
+ if (subject == null){
+ response += "null subject";
+ } else {
+ response += subject.getPrincipals().iterator().next().getName();
+ }
+
+ System.out.println("At service: " + response);
+ return response;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..7e71dd465f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/resources/META-INF/sca-contribution.xml
@@ -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
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions
new file mode 100644
index 0000000000..04fe620be4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions
@@ -0,0 +1,17 @@
+# 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.
+org/apache/tuscany/sca/binding/ws/axis2/helloworld/definitions.xml \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/definitions.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/definitions.xml
new file mode 100644
index 0000000000..d4e651b271
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/definitions.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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 xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://www.tuscany.apache.org/itests/binding/ws/axis2"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:itest="http://www.tuscany.apache.org/itests/binding/ws/axis2" >
+
+
+ <sca:policySet name="BasicAuthenticationPolicySet"
+ attachTo="//sca:binding.ws"
+ provides="clientAuthentication.transport"
+ appliesTo="//sca:binding.ws">
+ <tuscany:basicAuthentication>
+ <tuscany:userName>myname</tuscany:userName>
+ <tuscany:password>mypassword</tuscany:password>
+ </tuscany:basicAuthentication>
+ </sca:policySet>
+
+ <sca:policySet name="ImplementationIdentityPolicySet"
+ attachTo="//sca:implementation.java"
+ provides="tuscany:identity"
+ appliesTo="//sca:implementation.java">
+ <tuscany:securityIdentity>
+ <tuscany:useCallerIdentity/>
+ </tuscany:securityIdentity>
+ </sca:policySet>
+
+</definitions> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.composite
new file mode 100644
index 0000000000..166565baa0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.composite
@@ -0,0 +1,45 @@
+<?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="HelloWorldClient">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorldClient"/>
+ <reference name="helloWorldWS" requires="authentication">
+ <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort1)"/>
+ </reference>
+ </component>
+
+ <component name="HelloWorldService" requires="authentication">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorldService"/>
+ <service name="HelloWorld">
+ <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld#wsdl.binding(HelloWorldSoapBinding)">
+ <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
+ <wsa:Address>http://localhost:8085/services/HelloWorldWebService1</wsa:Address>
+ </wsa:EndpointReference>
+ </binding.ws>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.wsdl
new file mode 100644
index 0000000000..a352696b8e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.wsdl
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld"
+ xmlns:tns="http://helloworld"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ </wsdl:binding>
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort1">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService1"/>
+ </wsdl:port>
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort2">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService2"/>
+ </wsdl:port>
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort3">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService3"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/HelloworldTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/HelloworldTestCase.java
new file mode 100644
index 0000000000..380fc5b0f5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/authentication-basic/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/HelloworldTestCase.java
@@ -0,0 +1,52 @@
+/*
+ * 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.axis2;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorld;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.Ignore;
+
+//@Ignore("TUSCANY-3631")
+public class HelloworldTestCase extends TestCase {
+
+ private Node node;
+ private HelloWorld helloWorld;
+
+ public void testCalculator() throws Exception {
+ assertEquals("Hello fred myname", helloWorld.getGreetings("fred"));
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ node = NodeFactory.newInstance().createNode(new Contribution("test", "target/classes"));
+ node.start();
+ helloWorld = node.getService(HelloWorld.class, "HelloWorldClient");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/pom.xml
new file mode 100644
index 0000000000..5f7b926389
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/pom.xml
@@ -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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-ws-contribution-callback-forwardspec</artifactId>
+ <name>Apache Tuscany SCA iTest WS Contribution Callback Forward Bindings Specified</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java
new file mode 100644
index 0000000000..6bc67db5fc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java
@@ -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);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallback.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallback.java
new file mode 100644
index 0000000000..ba117c8cfd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallback.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.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);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackService.java
new file mode 100644
index 0000000000..3521fa5624
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackService.java
@@ -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);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackServiceImpl.java
new file mode 100644
index 0000000000..057b884bc9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackServiceImpl.java
@@ -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;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java
new file mode 100644
index 0000000000..1ff58a29b0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java
@@ -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;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/resources/HelloWorldServiceService_schema1.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/resources/HelloWorldServiceService_schema1.xsd
new file mode 100644
index 0000000000..acdfcaaaa5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/resources/HelloWorldServiceService_schema1.xsd
@@ -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>
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..350ad6be96
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/resources/META-INF/sca-contribution.xml
@@ -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
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/resources/helloworld-external-service.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/resources/helloworld-external-service.wsdl
new file mode 100644
index 0000000000..837bcb059e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/resources/helloworld-external-service.wsdl
@@ -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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/resources/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/resources/helloworld.composite
new file mode 100644
index 0000000000..2be7fd7315
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-forwardspec/src/main/resources/helloworld.composite
@@ -0,0 +1,45 @@
+<?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 uri="http://localhost:8085/HelloWorldService/HelloWorld"/>
+ </service>
+ <reference name="helloWorldExternal">
+ <binding.ws uri="http://localhost:8086/External/HelloWorld"/>
+ </reference>
+ <reference name="helloWorldCallbackService">
+ <binding.ws uri="http://localhost:8085/HelloWorldCallbackService"/>
+ </reference>
+ </component>
+
+ <component name="HelloWorldCallbackService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.HelloWorldCallbackServiceImpl"/>
+ <service name="HelloWorldCallbackService">
+ <binding.ws uri="http://localhost:8085/HelloWorldCallbackService"/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/pom.xml
new file mode 100644
index 0000000000..066df2e47c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/pom.xml
@@ -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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-ws-contribution-callback-fullspec</artifactId>
+ <name>Apache Tuscany SCA iTest WS Contribution Callback Fully Specified</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java
new file mode 100644
index 0000000000..6bc67db5fc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java
@@ -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);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallback.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallback.java
new file mode 100644
index 0000000000..ba117c8cfd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallback.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.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);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackService.java
new file mode 100644
index 0000000000..3521fa5624
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackService.java
@@ -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);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackServiceImpl.java
new file mode 100644
index 0000000000..0cbc421f23
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackServiceImpl.java
@@ -0,0 +1,61 @@
+/*
+ * 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 = null;
+ for (int i = 0; i < 5 ; i++){
+ System.out.println("In SCA HelloWorldCallbackService.getGreetings: calling helloWorldCallback.getGreetingsCallback(s) interation " + i);
+ 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 = null;
+ for (int i = 0; i < 5 ; i++){
+ System.out.println("In SCA HelloWorldCallbackService.getGreetingsComplex: calling helloWorldCallback.getGreetingsComplexCallback(s) interation " + i);
+ response = helloWorldCallback.getGreetingsComplexCallback(foo);
+ }
+ System.out.println("Leaving SCA HelloWorldCallbackService.getGreetingsComplex: " + foo.getBars().get(0).getS());
+ return response;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java
new file mode 100644
index 0000000000..39ef3c2032
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java
@@ -0,0 +1,104 @@
+/*
+ * 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 javax.security.auth.Subject;
+
+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.RequestContext;
+import org.oasisopen.sca.ServiceRuntimeException;
+import org.oasisopen.sca.annotation.Context;
+import org.oasisopen.sca.annotation.Reference;
+
+@WebService
+public class HelloWorldImpl implements HelloWorld, HelloWorldCallback {
+
+ @Reference
+ public HelloWorldService helloWorldExternal;
+
+ @Reference
+ public HelloWorldCallbackService helloWorldCallbackService;
+
+ @Context
+ protected RequestContext requestContext;
+
+ // HelloWorld operations
+
+ public String getGreetings(String s) {
+ System.out.println("Entering SCA HelloWorld.getGreetings: " + s);
+ String response = null;
+ for (int i = 0; i < 5 ; i++){
+ System.out.println("In SCA HelloWorld.getGreetings: calling helloWorldCallbackService.getGreetings(s) interation " + i);
+ 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 = null;
+ for (int i = 0; i < 5 ; i++){
+ System.out.println("In SCA HelloWorld.getGreetingsComplex: calling helloWorldCallbackService.getGreetingsComplex(foo) interation " + i);
+ 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);
+
+ Subject subject = requestContext.getSecuritySubject();
+ if (subject == null){
+ response = "No Security Subject";
+ }
+
+ 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;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/resources/HelloWorldServiceService_schema1.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/resources/HelloWorldServiceService_schema1.xsd
new file mode 100644
index 0000000000..acdfcaaaa5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/resources/HelloWorldServiceService_schema1.xsd
@@ -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>
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/resources/META-INF/definitions.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/resources/META-INF/definitions.xml
new file mode 100644
index 0000000000..cce5bbe403
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/resources/META-INF/definitions.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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 xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" >
+
+
+ <sca:policySet name="BasicAuthenticationPolicySet"
+ provides="clientAuthentication.transport"
+ appliesTo="//sca:binding.ws">
+ <tuscany:basicAuthentication>
+ <tuscany:userName>myname</tuscany:userName>
+ <tuscany:password>mypassword</tuscany:password>
+ </tuscany:basicAuthentication>
+ </sca:policySet>
+
+
+</definitions> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..350ad6be96
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/resources/META-INF/sca-contribution.xml
@@ -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
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/resources/helloworld-external-service.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/resources/helloworld-external-service.wsdl
new file mode 100644
index 0000000000..837bcb059e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/resources/helloworld-external-service.wsdl
@@ -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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/resources/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/resources/helloworld.composite
new file mode 100644
index 0000000000..fc64de7b8a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-fullspec/src/main/resources/helloworld.composite
@@ -0,0 +1,52 @@
+<?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"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ 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 uri="http://localhost:8085/HelloWorldService/HelloWorld"/>
+ </service>
+ <reference name="helloWorldExternal">
+ <binding.ws uri="http://localhost:8086/External/HelloWorld"/>
+ </reference>
+ <reference name="helloWorldCallbackService">
+ <binding.ws uri="http://localhost:8084/HelloWorldCallbackService"/>
+ <callback>
+ <binding.ws uri="http://localhost:8085/HelloWorldService/HelloWorldCallback" policySets="tuscany:BasicAuthenticationPolicySet"/>
+ </callback>
+ </reference>
+ </component>
+
+ <component name="HelloWorldCallbackService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.HelloWorldCallbackServiceImpl"/>
+ <service name="HelloWorldCallbackService">
+ <binding.ws uri="http://localhost:8084/HelloWorldCallbackService"/>
+ <callback>
+ <binding.ws policySets="tuscany:BasicAuthenticationPolicySet"/>
+ </callback>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/pom.xml
new file mode 100644
index 0000000000..dd94500635
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/pom.xml
@@ -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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-ws-contribution-callback-promotion</artifactId>
+ <name>Apache Tuscany SCA iTest WS Contribution Callback Promotion</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java
new file mode 100644
index 0000000000..6bc67db5fc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java
@@ -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);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallback.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallback.java
new file mode 100644
index 0000000000..ba117c8cfd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallback.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.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);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackService.java
new file mode 100644
index 0000000000..3521fa5624
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackService.java
@@ -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);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackServiceImpl.java
new file mode 100644
index 0000000000..057b884bc9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackServiceImpl.java
@@ -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;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java
new file mode 100644
index 0000000000..1ff58a29b0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java
@@ -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;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/resources/HelloWorldServiceService_schema1.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/resources/HelloWorldServiceService_schema1.xsd
new file mode 100644
index 0000000000..acdfcaaaa5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/resources/HelloWorldServiceService_schema1.xsd
@@ -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>
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..350ad6be96
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/resources/META-INF/sca-contribution.xml
@@ -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
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/resources/helloworld-external-service.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/resources/helloworld-external-service.wsdl
new file mode 100644
index 0000000000..837bcb059e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/resources/helloworld-external-service.wsdl
@@ -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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/resources/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/resources/helloworld.composite
new file mode 100644
index 0000000000..0d66bb105f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/resources/helloworld.composite
@@ -0,0 +1,43 @@
+<?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"
+ xmlns:tns="http://www.tuscany.apache.org/itests/binding/ws/axis2"
+ name="HelloWorld">
+
+ <component name="HelloWorldService">
+ <implementation.composite name="tns:HelloWorldService"/>
+ <service name="HelloWorld">
+ <binding.ws uri="http://localhost:8085/HelloWorldService/HelloWorld"/>
+ </service>
+ <reference name="HelloWorldCallbackService">
+ <binding.ws uri="http://localhost:8085/HelloWorldService/HelloWorldCallbackService"/>
+ </reference>
+ </component>
+
+ <component name="HelloWorldCallbackService">
+ <implementation.composite name="tns:HelloWorldCallbackService"/>
+ <service name="HelloWorldCallbackService">
+ <binding.ws uri="http://localhost:8085/HelloWorldService/HelloWorldCallbackService"/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/resources/helloworldcallbackservice-bottom.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/resources/helloworldcallbackservice-bottom.composite
new file mode 100644
index 0000000000..e522c6c151
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/resources/helloworldcallbackservice-bottom.composite
@@ -0,0 +1,34 @@
+<?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="HelloWorldCallbackService">
+
+ <service name="HelloWorldCallbackService" promote="HelloWorldCallbackService/HelloWorldCallbackService"/>
+
+ <component name="HelloWorldCallbackService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.HelloWorldCallbackServiceImpl"/>
+ <service name="HelloWorldCallbackService">
+ <!-- configured at the top level -->
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/resources/helloworldservice-bottom.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/resources/helloworldservice-bottom.composite
new file mode 100644
index 0000000000..aea84ad56e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-promotion/src/main/resources/helloworldservice-bottom.composite
@@ -0,0 +1,40 @@
+<?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="HelloWorldService">
+
+ <service name="HelloWorld" promote="HelloWorldService/HelloWorld"/>
+ <reference name="HelloWorldCallbackService" multiplicity="1..1" promote="HelloWorldService/helloWorldCallbackService"/>
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.HelloWorldImpl"/>
+ <service name="HelloWorld">
+ <!-- configured at the top level -->
+ </service>
+ <reference name="helloWorldExternal">
+ <binding.ws uri="http://localhost:8086/External/HelloWorld"/>
+ </reference>
+ <reference name="helloWorldCallbackService">
+ <!-- configured at the top level -->
+ </reference>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/pom.xml
new file mode 100644
index 0000000000..06378f1ab5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/pom.xml
@@ -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.1</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.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java
new file mode 100644
index 0000000000..6bc67db5fc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java
@@ -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);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallback.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallback.java
new file mode 100644
index 0000000000..ba117c8cfd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallback.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.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);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackService.java
new file mode 100644
index 0000000000..3521fa5624
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackService.java
@@ -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);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackServiceImpl.java
new file mode 100644
index 0000000000..057b884bc9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackServiceImpl.java
@@ -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;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java
new file mode 100644
index 0000000000..1ff58a29b0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java
@@ -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;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplCallbackService.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplCallbackService.wsdl
new file mode 100644
index 0000000000..6cab010afa
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplCallbackService.wsdl
@@ -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>
+
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplCallbackService_schema1.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplCallbackService_schema1.xsd
new file mode 100644
index 0000000000..53945b50a3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplCallbackService_schema1.xsd
@@ -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>
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplService.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplService.wsdl
new file mode 100644
index 0000000000..813c23276d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplService.wsdl
@@ -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>
+
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplService_schema1.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplService_schema1.xsd
new file mode 100644
index 0000000000..2d8adf3d73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplService_schema1.xsd
@@ -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>
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplService_schema2.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplService_schema2.xsd
new file mode 100644
index 0000000000..d955cc2af4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldImplService_schema2.xsd
@@ -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>
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldServiceService_schema1.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldServiceService_schema1.xsd
new file mode 100644
index 0000000000..acdfcaaaa5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/HelloWorldServiceService_schema1.xsd
@@ -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>
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..350ad6be96
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/META-INF/sca-contribution.xml
@@ -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
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/helloworld-external-service.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/helloworld-external-service.wsdl
new file mode 100644
index 0000000000..837bcb059e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/helloworld-external-service.wsdl
@@ -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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/helloworld.composite
new file mode 100644
index 0000000000..dd2d4d6330
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback-wsdl-iface/src/main/resources/helloworld.composite
@@ -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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/pom.xml
new file mode 100644
index 0000000000..390e7178ba
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/pom.xml
@@ -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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-ws-contribution-callback</artifactId>
+ <name>Apache Tuscany SCA iTest WS Contribution Callback </name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java
new file mode 100644
index 0000000000..6bc67db5fc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java
@@ -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);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallback.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallback.java
new file mode 100644
index 0000000000..ba117c8cfd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallback.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.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);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackService.java
new file mode 100644
index 0000000000..3521fa5624
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackService.java
@@ -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);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackServiceImpl.java
new file mode 100644
index 0000000000..057b884bc9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldCallbackServiceImpl.java
@@ -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;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java
new file mode 100644
index 0000000000..1ff58a29b0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java
@@ -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;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/resources/HelloWorldServiceService_schema1.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/resources/HelloWorldServiceService_schema1.xsd
new file mode 100644
index 0000000000..acdfcaaaa5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/resources/HelloWorldServiceService_schema1.xsd
@@ -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>
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..350ad6be96
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/resources/META-INF/sca-contribution.xml
@@ -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
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/resources/helloworld-external-service.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/resources/helloworld-external-service.wsdl
new file mode 100644
index 0000000000..837bcb059e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/resources/helloworld-external-service.wsdl
@@ -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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/resources/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/resources/helloworld.composite
new file mode 100644
index 0000000000..cb257d22dd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-callback/src/main/resources/helloworld.composite
@@ -0,0 +1,43 @@
+<?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 uri="http://localhost:8085/HelloWorldService/HelloWorld"/>
+ </service>
+ <reference name="helloWorldExternal">
+ <binding.ws uri="http://localhost:8086/External/HelloWorld"/>
+ </reference>
+ <reference name="helloWorldCallbackService" target="HelloWorldCallbackService"/>
+ </component>
+
+ <component name="HelloWorldCallbackService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.HelloWorldCallbackServiceImpl"/>
+ <service name="HelloWorldCallbackService">
+ <binding.ws uri="http://localhost:8085/HelloWorldService/HelloWorldCallbackService"/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/pom.xml
new file mode 100644
index 0000000000..c9c3aa130e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/pom.xml
@@ -0,0 +1,129 @@
+<?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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-ws-contribution-doc-lit-wrapped-dom</artifactId>
+ <name>Apache Tuscany SCA iTest WS Contribution Doc Lit Wrapped DOM</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</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.HelloWorld1Impl</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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java
new file mode 100644
index 0000000000..f96dbff352
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws;
+
+import org.apache.tuscany.sca.binding.ws.jaxws.external.service.iface.Foo;
+import org.oasisopen.sca.ServiceRuntimeException;
+import org.oasisopen.sca.annotation.Remotable;
+import org.w3c.dom.Node;
+
+@Remotable
+public interface HelloWorld {
+
+ // TUSCANY-3910
+ Node getGreetings(Node s);
+ String getGreetingsException(String s) throws ServiceRuntimeException;
+ Foo getGreetingsComplex(Foo foo);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld1Impl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld1Impl.java
new file mode 100644
index 0000000000..aeeecb1cfe
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld1Impl.java
@@ -0,0 +1,67 @@
+/*
+ * 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.oasisopen.sca.ServiceRuntimeException;
+import org.oasisopen.sca.annotation.Reference;
+import org.w3c.dom.Node;
+
+@WebService
+public class HelloWorld1Impl implements HelloWorld {
+
+ @Reference
+ public HelloWorld helloWorld2;
+
+/*
+ public String getGreetings(String s) {
+
+ System.out.println("Entering SCA HelloWorld1.getGreetings: " + s);
+ String response = helloWorld2.getGreetings(s);
+ System.out.println("Leaving SCA HelloWorld1.getGreetings: " + response);
+ return response;
+ }
+*/
+
+ public Node getGreetings(Node node){
+ System.out.println("Entering SCA HelloWorld1.getGreetings: " + node.getTextContent());
+ Node response = helloWorld2.getGreetings(node);
+ System.out.println("Leaving SCA HelloWorld1.getGreetings: " + response.getTextContent());
+ return response;
+ }
+
+ public String getGreetingsException(String s) throws ServiceRuntimeException {
+ System.out.println("Entering SCA HelloWorld1.getGreetingsException: " + s);
+ String response = helloWorld2.getGreetingsException(s);
+ System.out.println("Leaving SCA HelloWorld1.getGreetings: " + response);
+ throw new ServiceRuntimeException(response);
+ }
+
+ public Foo getGreetingsComplex(Foo foo){
+ System.out.println("Entering SCA HelloWorld1.getGreetingsComplex: " + foo.getBars().get(0).getS());
+ Foo response = helloWorld2.getGreetingsComplex(foo);
+ System.out.println("Leaving SCA HelloWorld1.getGreetingsComplex: " + foo.getBars().get(0).getS());
+ return response;
+ }
+
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld2Impl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld2Impl.java
new file mode 100644
index 0000000000..9c0276ad7c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld2Impl.java
@@ -0,0 +1,67 @@
+/*
+ * 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;
+import org.w3c.dom.Node;
+
+@WebService
+public class HelloWorld2Impl implements HelloWorld {
+
+ @Reference
+ public HelloWorldService helloWorldExternal;
+
+/*
+ public String getGreetings(String s) {
+ System.out.println("Entering SCA HelloWorld2.getGreetings: " + s);
+ String response = helloWorldExternal.getGreetings(s);
+ System.out.println("Leaving SCA HelloWorld2.getGreetings: " + response);
+ return response;
+ }
+*/
+
+ public Node getGreetings(Node node){
+ System.out.println("Entering SCA HelloWorld2.getGreetings: " + node.getTextContent());
+ node.setTextContent("Hello " + node.getTextContent());
+ System.out.println("Leaving SCA HelloWorld2.getGreetings: " + node.getTextContent());
+ return node;
+ }
+
+ public String getGreetingsException(String s) throws ServiceRuntimeException {
+ System.out.println("Entering SCA HelloWorld2.getGreetingsException: " + s);
+ String response = helloWorldExternal.getGreetings(s);
+ System.out.println("Leaving SCA HelloWorld2.getGreetingsException: " + response);
+ throw new ServiceRuntimeException(response);
+ }
+
+ public Foo getGreetingsComplex(Foo foo){
+ System.out.println("Entering SCA HelloWorld2.getGreetingsComplex: " + foo.getBars().get(0).getS());
+ Foo response = helloWorldExternal.getGreetingsComplex(foo);
+ System.out.println("Leaving SCA HelloWorld2.getGreetingsComplex: " + foo.getBars().get(0).getS());
+ return response;
+ }
+
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/HelloWorldImplService-doclit.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/HelloWorldImplService-doclit.wsdl
new file mode 100644
index 0000000000..f5a25b39f8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/HelloWorldImplService-doclit.wsdl
@@ -0,0 +1,109 @@
+<?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/doclit"
+ name="HelloWorldImplService"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://ws.binding.sca.tuscany.apache.org/doclit"
+ 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/doclit"
+ schemaLocation="HelloWorldImplService_doclit1.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>
+ <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-doclit"/>
+ </port>
+ </service>
+</definitions>
+
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/HelloWorldImplService-doclit1.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/HelloWorldImplService-doclit1.xsd
new file mode 100644
index 0000000000..545820a07d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/HelloWorldImplService-doclit1.xsd
@@ -0,0 +1,83 @@
+<?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/doclit"
+ xmlns:tns="http://ws.binding.sca.tuscany.apache.org/doclit"
+ xmlns:tns2="http://helloworld/external"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:import namespace="http://helloworld/external" schemaLocation="./HelloWorldImplService-doclit2.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: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:schema>
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/HelloWorldImplService-doclit2.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/HelloWorldImplService-doclit2.xsd
new file mode 100644
index 0000000000..d955cc2af4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/HelloWorldImplService-doclit2.xsd
@@ -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>
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/HelloWorldImplService.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/HelloWorldImplService.wsdl
new file mode 100644
index 0000000000..e52d778747
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/HelloWorldImplService.wsdl
@@ -0,0 +1,64 @@
+<?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>
+ <portType name="HelloWorldImpl">
+ <operation name="getGreetings">
+ <input message="tns:getGreetings"/>
+ <output message="tns:getGreetingsResponse"/>
+ </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>
+ </binding>
+ <service name="HelloWorldImplService">
+ <port name="HelloWorldImplPort" binding="tns:HelloWorldImplPortBinding">
+ <soap:address location="http://localhost:8085/HelloWorldService/HelloWorld"/>
+ </port>
+ </service>
+</definitions>
+
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/HelloWorldImplService_schema1.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/HelloWorldImplService_schema1.xsd
new file mode 100644
index 0000000000..c9c0acb038
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/HelloWorldImplService_schema1.xsd
@@ -0,0 +1,111 @@
+<?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:xs="http://www.w3.org/2001/XMLSchema">
+
+ <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="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: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>
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/HelloWorldServiceService_schema1.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/HelloWorldServiceService_schema1.xsd
new file mode 100644
index 0000000000..acdfcaaaa5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/HelloWorldServiceService_schema1.xsd
@@ -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>
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..350ad6be96
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/META-INF/sca-contribution.xml
@@ -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
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/helloworld-external-service.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/helloworld-external-service.wsdl
new file mode 100644
index 0000000000..837bcb059e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/helloworld-external-service.wsdl
@@ -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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/helloworld.composite
new file mode 100644
index 0000000000..98dad93e09
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped-dom/src/main/resources/helloworld.composite
@@ -0,0 +1,45 @@
+<?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="HelloWorldService1">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.HelloWorld1Impl"/>
+ <service name="HelloWorld">
+ <interface.wsdl interface="http://ws.binding.sca.tuscany.apache.org/#wsdl.porttype(HelloWorldImpl)"/>
+ <binding.ws uri="http://localhost:8085/HelloWorldService/HelloWorld"/>
+ </service>
+ <reference name="helloWorld2">
+ <binding.ws uri="http://localhost:8085/HelloWorldService/HelloWorld-doclit" wsdlElement="http://ws.binding.sca.tuscany.apache.org/doclit#wsdl.binding(HelloWorldImplPortBinding)"/>
+ </reference>
+ </component>
+
+ <component name="HelloWorldService2">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.HelloWorld2Impl"/>
+ <service name="HelloWorld">
+ <binding.ws wsdlElement="http://ws.binding.sca.tuscany.apache.org/doclit#wsdl.port(HelloWorldImplService/HelloWorldImplPort)"/>
+ </service>
+ <reference name="helloWorldExternal">
+ <binding.ws uri="http://localhost:8086/External/HelloWorld"/>
+ </reference>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/pom.xml
new file mode 100644
index 0000000000..13e0b4465b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/pom.xml
@@ -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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-ws-contribution-doc-lit-wrapped</artifactId>
+ <name>Apache Tuscany SCA iTest WS Contribution Doc Lit Wrapped </name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</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.HelloWorld1Impl</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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java
new file mode 100644
index 0000000000..6bc67db5fc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java
@@ -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);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld1Impl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld1Impl.java
new file mode 100644
index 0000000000..27471f87c6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld1Impl.java
@@ -0,0 +1,54 @@
+/*
+ * 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.oasisopen.sca.ServiceRuntimeException;
+import org.oasisopen.sca.annotation.Reference;
+
+@WebService
+public class HelloWorld1Impl implements HelloWorld {
+
+ @Reference
+ public HelloWorld helloWorld2;
+
+ public String getGreetings(String s) {
+ System.out.println("Entering SCA HelloWorld1.getGreetings: " + s);
+ String response = helloWorld2.getGreetings(s);
+ System.out.println("Leaving SCA HelloWorld1.getGreetings: " + response);
+ return response;
+ }
+
+ public String getGreetingsException(String s) throws ServiceRuntimeException {
+ System.out.println("Entering SCA HelloWorld1.getGreetingsException: " + s);
+ String response = helloWorld2.getGreetings(s);
+ System.out.println("Leaving SCA HelloWorld1.getGreetings: " + response);
+ throw new ServiceRuntimeException(response);
+ }
+
+ public Foo getGreetingsComplex(Foo foo){
+ System.out.println("Entering SCA HelloWorld1.getGreetingsComplex: " + foo.getBars().get(0).getS());
+ Foo response = helloWorld2.getGreetingsComplex(foo);
+ System.out.println("Leaving SCA HelloWorld1.getGreetingsComplex: " + foo.getBars().get(0).getS());
+ return response;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld2Impl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld2Impl.java
new file mode 100644
index 0000000000..6f3b430d6d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld2Impl.java
@@ -0,0 +1,55 @@
+/*
+ * 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 HelloWorld2Impl implements HelloWorld {
+
+ @Reference
+ public HelloWorldService helloWorldExternal;
+
+ public String getGreetings(String s) {
+ System.out.println("Entering SCA HelloWorld2.getGreetings: " + s);
+ String response = helloWorldExternal.getGreetings(s);
+ System.out.println("Leaving SCA HelloWorld2.getGreetings: " + response);
+ return response;
+ }
+
+ public String getGreetingsException(String s) throws ServiceRuntimeException {
+ System.out.println("Entering SCA HelloWorld2.getGreetingsException: " + s);
+ String response = helloWorldExternal.getGreetings(s);
+ System.out.println("Leaving SCA HelloWorld2.getGreetings: " + response);
+ throw new ServiceRuntimeException(response);
+ }
+
+ public Foo getGreetingsComplex(Foo foo){
+ System.out.println("Entering SCA HelloWorld2.getGreetingsComplex: " + foo.getBars().get(0).getS());
+ Foo response = helloWorldExternal.getGreetingsComplex(foo);
+ System.out.println("Leaving SCA HelloWorld2.getGreetingsComplex: " + foo.getBars().get(0).getS());
+ return response;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/resources/HelloWorldImplService-doclit.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/resources/HelloWorldImplService-doclit.wsdl
new file mode 100644
index 0000000000..f5a25b39f8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/resources/HelloWorldImplService-doclit.wsdl
@@ -0,0 +1,109 @@
+<?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/doclit"
+ name="HelloWorldImplService"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://ws.binding.sca.tuscany.apache.org/doclit"
+ 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/doclit"
+ schemaLocation="HelloWorldImplService_doclit1.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>
+ <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-doclit"/>
+ </port>
+ </service>
+</definitions>
+
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/resources/HelloWorldImplService-doclit1.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/resources/HelloWorldImplService-doclit1.xsd
new file mode 100644
index 0000000000..545820a07d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/resources/HelloWorldImplService-doclit1.xsd
@@ -0,0 +1,83 @@
+<?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/doclit"
+ xmlns:tns="http://ws.binding.sca.tuscany.apache.org/doclit"
+ xmlns:tns2="http://helloworld/external"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:import namespace="http://helloworld/external" schemaLocation="./HelloWorldImplService-doclit2.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: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:schema>
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/resources/HelloWorldImplService-doclit2.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/resources/HelloWorldImplService-doclit2.xsd
new file mode 100644
index 0000000000..d955cc2af4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/resources/HelloWorldImplService-doclit2.xsd
@@ -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>
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/resources/HelloWorldServiceService_schema1.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/resources/HelloWorldServiceService_schema1.xsd
new file mode 100644
index 0000000000..acdfcaaaa5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/resources/HelloWorldServiceService_schema1.xsd
@@ -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>
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..350ad6be96
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/resources/META-INF/sca-contribution.xml
@@ -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
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/resources/helloworld-external-service.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/resources/helloworld-external-service.wsdl
new file mode 100644
index 0000000000..837bcb059e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/resources/helloworld-external-service.wsdl
@@ -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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/resources/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/resources/helloworld.composite
new file mode 100644
index 0000000000..e00e130c32
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit-wrapped/src/main/resources/helloworld.composite
@@ -0,0 +1,44 @@
+<?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="HelloWorldService1">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.HelloWorld1Impl"/>
+ <service name="HelloWorld">
+ <binding.ws uri="http://localhost:8085/HelloWorldService/HelloWorld"/>
+ </service>
+ <reference name="helloWorld2">
+ <binding.ws uri="http://localhost:8085/HelloWorldService/HelloWorld-doclit" wsdlElement="http://ws.binding.sca.tuscany.apache.org/doclit#wsdl.binding(HelloWorldImplPortBinding)"/>
+ </reference>
+ </component>
+
+ <component name="HelloWorldService2">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.HelloWorld2Impl"/>
+ <service name="HelloWorld">
+ <binding.ws wsdlElement="http://ws.binding.sca.tuscany.apache.org/doclit#wsdl.port(HelloWorldImplService/HelloWorldImplPort)"/>
+ </service>
+ <reference name="helloWorldExternal">
+ <binding.ws uri="http://localhost:8086/External/HelloWorld"/>
+ </reference>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/pom.xml
new file mode 100644
index 0000000000..205517b9bf
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/pom.xml
@@ -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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-ws-contribution-doc-lit</artifactId>
+ <name>Apache Tuscany SCA iTest WS Contribution Doc Lit(sometimes called Bare) </name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</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.HelloWorld1Impl</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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java
new file mode 100644
index 0000000000..9196530db7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws;
+
+import javax.jws.soap.SOAPBinding;
+
+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;
+/* TUSCANY-3621
+ Foo getGreetingsComplex(Foo foo);
+*/
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld1Impl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld1Impl.java
new file mode 100644
index 0000000000..c8bad91339
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld1Impl.java
@@ -0,0 +1,55 @@
+/*
+ * 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.oasisopen.sca.ServiceRuntimeException;
+import org.oasisopen.sca.annotation.Reference;
+
+@WebService
+public class HelloWorld1Impl implements HelloWorld {
+
+ @Reference
+ public HelloWorldBare helloWorld2;
+
+ public String getGreetings(String s) {
+ System.out.println("Entering SCA HelloWorld1.getGreetings: " + s);
+ String response = helloWorld2.getGreetings(s);
+ System.out.println("Leaving SCA HelloWorld1.getGreetings: " + response);
+ return response;
+ }
+
+ public String getGreetingsException(String s) throws ServiceRuntimeException {
+ System.out.println("Entering SCA HelloWorld1.getGreetingsException: " + s);
+ String response = helloWorld2.getGreetings(s);
+ System.out.println("Leaving SCA HelloWorld1.getGreetings: " + response);
+ throw new ServiceRuntimeException(response);
+ }
+/* TUSCANY-3621
+ public Foo getGreetingsComplex(Foo foo){
+ System.out.println("Entering SCA HelloWorld1.getGreetingsComplex: " + foo.getBars().get(0).getS());
+ Foo response = helloWorld2.getGreetingsComplex(foo);
+ System.out.println("Leaving SCA HelloWorld1.getGreetingsComplex: " + foo.getBars().get(0).getS());
+ return response;
+ }
+*/
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld2Impl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld2Impl.java
new file mode 100644
index 0000000000..deb4dfc09d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld2Impl.java
@@ -0,0 +1,56 @@
+/*
+ * 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 HelloWorld2Impl implements HelloWorldBare {
+
+ @Reference
+ public HelloWorldService helloWorldExternal;
+
+ public String getGreetings(String s) {
+ System.out.println("Entering SCA HelloWorld2.getGreetings: " + s);
+ String response = helloWorldExternal.getGreetings(s);
+ System.out.println("Leaving SCA HelloWorld2.getGreetings: " + response);
+ return response;
+ }
+
+ public String getGreetingsException(String s) throws ServiceRuntimeException {
+ System.out.println("Entering SCA HelloWorld2.getGreetingsException: " + s);
+ String response = helloWorldExternal.getGreetings(s);
+ System.out.println("Leaving SCA HelloWorld2.getGreetings: " + response);
+ throw new ServiceRuntimeException(response);
+ }
+/* TUSCANY-3621
+ public Foo getGreetingsComplex(Foo foo){
+ System.out.println("Entering SCA HelloWorld2.getGreetingsComplex: " + foo.getBars().get(0).getS());
+ Foo response = helloWorldExternal.getGreetingsComplex(foo);
+ System.out.println("Leaving SCA HelloWorld2.getGreetingsComplex: " + foo.getBars().get(0).getS());
+ return response;
+ }
+*/
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldBare.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldBare.java
new file mode 100644
index 0000000000..e37ff1aef3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldBare.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws;
+
+import javax.jws.soap.SOAPBinding;
+
+import org.apache.tuscany.sca.binding.ws.jaxws.external.service.iface.Foo;
+import org.oasisopen.sca.ServiceRuntimeException;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public interface HelloWorldBare {
+
+ String getGreetings(String s);
+ String getGreetingsException(String s) throws ServiceRuntimeException;
+/* TUSCANY-3621
+ Foo getGreetingsComplex(Foo foo);
+*/
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/resources/HelloWorldImplService-doclit.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/resources/HelloWorldImplService-doclit.wsdl
new file mode 100644
index 0000000000..03e0a8c93c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/resources/HelloWorldImplService-doclit.wsdl
@@ -0,0 +1,113 @@
+<?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/doclit"
+ name="HelloWorldImplService"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://ws.binding.sca.tuscany.apache.org/doclit"
+ 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/doclit"
+ schemaLocation="HelloWorldImplService_doclit1.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>
+ <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>
+<!-- TUSCANY-3621
+ <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>
+<!-- TUSCANY-3621
+ <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-doclit"/>
+ </port>
+ </service>
+</definitions>
+
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/resources/HelloWorldImplService-doclit1.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/resources/HelloWorldImplService-doclit1.xsd
new file mode 100644
index 0000000000..6238bf2f45
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/resources/HelloWorldImplService-doclit1.xsd
@@ -0,0 +1,49 @@
+<?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/doclit"
+ xmlns:tns="http://ws.binding.sca.tuscany.apache.org/doclit"
+ xmlns:tns2="http://helloworld/external"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:import namespace="http://helloworld/external" schemaLocation="./HelloWorldImplService-doclit2.xsd"/>
+
+ <xs:element name="Exception" type="tns:Exception"/>
+
+ <xs:element name="getGreetings" type="xs:string"/>
+
+ <xs:element name="getGreetingsResponse" type="xs:string"/>
+
+ <xs:element name="getGreetingsComplex" type="tns2:foo"/>
+
+ <xs:element name="getGreetingsComplexResponse" type="tns2:foo"/>
+
+ <xs:element name="getGreetingsException" type="xs:string"/>
+
+ <xs:element name="getGreetingsExceptionResponse" type="xs:string"/>
+
+ <xs:complexType name="Exception">
+ <xs:sequence>
+ <xs:element name="message" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+</xs:schema>
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/resources/HelloWorldImplService-doclit2.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/resources/HelloWorldImplService-doclit2.xsd
new file mode 100644
index 0000000000..d955cc2af4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/resources/HelloWorldImplService-doclit2.xsd
@@ -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>
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/resources/HelloWorldServiceService_schema1.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/resources/HelloWorldServiceService_schema1.xsd
new file mode 100644
index 0000000000..acdfcaaaa5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/resources/HelloWorldServiceService_schema1.xsd
@@ -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>
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..350ad6be96
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/resources/META-INF/sca-contribution.xml
@@ -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
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/resources/helloworld-external-service.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/resources/helloworld-external-service.wsdl
new file mode 100644
index 0000000000..837bcb059e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/resources/helloworld-external-service.wsdl
@@ -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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/resources/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/resources/helloworld.composite
new file mode 100644
index 0000000000..5ae9e78823
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-doc-lit/src/main/resources/helloworld.composite
@@ -0,0 +1,44 @@
+<?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="HelloWorldService1">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.HelloWorld1Impl"/>
+ <service name="HelloWorld">
+ <binding.ws uri="http://localhost:8085/HelloWorldService/HelloWorld"/>
+ </service>
+ <reference name="helloWorld2">
+ <binding.ws uri="http://localhost:8085/HelloWorldService/HelloWorld-doclit" wsdlElement="http://ws.binding.sca.tuscany.apache.org/doclit#wsdl.binding(HelloWorldImplPortBinding)"/>
+ </reference>
+ </component>
+
+ <component name="HelloWorldService2">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.HelloWorld2Impl"/>
+ <service name="HelloWorldBare">
+ <binding.ws wsdlElement="http://ws.binding.sca.tuscany.apache.org/doclit#wsdl.port(HelloWorldImplService/HelloWorldImplPort)"/>
+ </service>
+ <reference name="helloWorldExternal">
+ <binding.ws uri="http://localhost:8086/External/HelloWorld"/>
+ </reference>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-java-first/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-java-first/pom.xml
new file mode 100644
index 0000000000..59679c978a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-java-first/pom.xml
@@ -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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-ws-contribution-java-first</artifactId>
+ <name>Apache Tuscany SCA iTest WS Contribution Java First </name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java
new file mode 100644
index 0000000000..6bc67db5fc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java
@@ -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);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java
new file mode 100644
index 0000000000..8f57680d47
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java
@@ -0,0 +1,55 @@
+/*
+ * 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 {
+
+ @Reference
+ public HelloWorldService helloWorldExternal;
+
+ public String getGreetings(String s) {
+ System.out.println("Entering SCA HelloWorld.getGreetings: " + s);
+ String response = helloWorldExternal.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 = helloWorldExternal.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 = helloWorldExternal.getGreetingsComplex(foo);
+ System.out.println("Leaving SCA HelloWorld.getGreetingsComplex: " + foo.getBars().get(0).getS());
+ return response;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-java-first/src/main/resources/HelloWorldServiceService_schema1.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-java-first/src/main/resources/HelloWorldServiceService_schema1.xsd
new file mode 100644
index 0000000000..acdfcaaaa5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-java-first/src/main/resources/HelloWorldServiceService_schema1.xsd
@@ -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>
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-java-first/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-java-first/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..350ad6be96
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-java-first/src/main/resources/META-INF/sca-contribution.xml
@@ -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
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-java-first/src/main/resources/helloworld-external-service.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-java-first/src/main/resources/helloworld-external-service.wsdl
new file mode 100644
index 0000000000..837bcb059e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-java-first/src/main/resources/helloworld-external-service.wsdl
@@ -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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-java-first/src/main/resources/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-java-first/src/main/resources/helloworld.composite
new file mode 100644
index 0000000000..e6cdb94dfb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-java-first/src/main/resources/helloworld.composite
@@ -0,0 +1,35 @@
+<?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 uri="http://localhost:8085/HelloWorldService/HelloWorld"/>
+ </service>
+ <reference name="helloWorldExternal">
+ <binding.ws uri="http://localhost:8086/External/HelloWorld"/>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/pom.xml
new file mode 100644
index 0000000000..e320f600be
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/pom.xml
@@ -0,0 +1,129 @@
+<?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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-ws-contribution-reference-target</artifactId>
+ <name>Apache Tuscany SCA iTest WS Contribution Reference Target</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</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>wsimport1</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>wsimport</goal>
+ </goals>
+ <configuration>
+ <packageName>org.apache.tuscany.sca.binding.ws.sca</packageName>
+ <wsdlDirectory>${basedir}/target/classes</wsdlDirectory>
+ <wsdlFiles>
+ <wsdlFile>HelloWorldImplService.wsdl</wsdlFile>
+ </wsdlFiles>
+ <staleFile>${project.build.directory}/jaxws/stale/.wsimport1StaleFlag</staleFile>
+ </configuration>
+ </execution-->
+ <execution>
+ <id>wsimport2</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/.wsimport2StaleFlag</staleFile>
+ </configuration>
+ </execution>
+ </executions>
+ <configuration>
+ <target>2.1</target>
+ <sourceDestDir>${project.build.directory}/jaxws-source</sourceDestDir>
+ <verbose>true</verbose>
+ <xnocompile>true</xnocompile>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java
new file mode 100644
index 0000000000..c9c1038ea3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws;
+
+import javax.jws.WebMethod;
+
+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);
+
+ @WebMethod(operationName = "GetGreetingsCaps")
+ String getGreetingsCaps(String s);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java
new file mode 100644
index 0000000000..d5aeee0b59
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java
@@ -0,0 +1,59 @@
+/*
+ * 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.Reference;
+
+public class HelloWorldImpl implements HelloWorld {
+
+ @Reference
+ public HelloWorld helloWorldInternal;
+
+ public String getGreetings(String s) {
+ System.out.println("Entering SCA HelloWorld.getGreetings: " + s);
+ String response = helloWorldInternal.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 = helloWorldInternal.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 = helloWorldInternal.getGreetingsComplex(foo);
+ System.out.println("Leaving SCA HelloWorld.getGreetingsComplex: " + foo.getBars().get(0).getS());
+ return response;
+ }
+
+ public String getGreetingsCaps(String s) {
+ System.out.println("Entering SCA HelloWorld.getGreetingsCaps: " + s);
+ String response = helloWorldInternal.getGreetingsCaps(s);
+ System.out.println("Leaving SCA HelloWorld.getGreetingsCaps: " + response);
+ return response;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldInternalImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldInternalImpl.java
new file mode 100644
index 0000000000..c2d5f96afb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldInternalImpl.java
@@ -0,0 +1,60 @@
+/*
+ * 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.apache.tuscany.sca.binding.ws.jaxws.external.service.iface.HelloWorldService;
+import org.oasisopen.sca.ServiceRuntimeException;
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldInternalImpl implements HelloWorld {
+
+ @Reference
+ public HelloWorldService helloWorldExternal;
+
+ public String getGreetings(String s) {
+ System.out.println("Entering SCA HelloWorldInternal.getGreetings: " + s);
+ String response = helloWorldExternal.getGreetings(s);
+ System.out.println("Leaving SCA HelloWorldInternal.getGreetings: " + response);
+ return response;
+ }
+
+ public String getGreetingsException(String s) throws ServiceRuntimeException {
+ System.out.println("Entering SCA HelloWorldInternal.getGreetingsException: " + s);
+ String response = helloWorldExternal.getGreetings(s);
+ System.out.println("Leaving SCA HelloWorldInternal.getGreetings: " + response);
+ throw new ServiceRuntimeException(response);
+ }
+
+ public Foo getGreetingsComplex(Foo foo){
+ System.out.println("Entering SCA HelloWorldInternal.getGreetingsComplex: " + foo.getBars().get(0).getS());
+ Foo response = helloWorldExternal.getGreetingsComplex(foo);
+ System.out.println("Leaving SCA HelloWorldInternal.getGreetingsComplex: " + foo.getBars().get(0).getS());
+ return response;
+ }
+
+ public String getGreetingsCaps(String s) {
+ System.out.println("Entering SCA HelloWorldInternal.getGreetingsCaps: " + s);
+ String response = helloWorldExternal.getGreetingsCaps(s);
+ System.out.println("Leaving SCA HelloWorldInternal.getGreetingsCaps: " + response);
+ return response;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/resources/HelloWorldImplService.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/resources/HelloWorldImplService.wsdl
new file mode 100644
index 0000000000..95c9386133
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/resources/HelloWorldImplService.wsdl
@@ -0,0 +1,131 @@
+<?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>
+ <operation name="GetGreetingsCaps">
+ <input message="tns:GetGreetingsCaps"/>
+ <output message="tns:GetGreetingsCapsResponse"/>
+ </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>
+ <operation name="GetGreetingsCaps">
+ <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>
+ <port name="HelloWorldInternalImplPort" binding="tns:HelloWorldImplPortBinding">
+ <soap:address location="http://localhost:8087/HelloWorldService/HelloWorldInternal"/>
+ </port>
+ </service>
+</definitions>
+
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/resources/HelloWorldImplService_schema1.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/resources/HelloWorldImplService_schema1.xsd
new file mode 100644
index 0000000000..2d8adf3d73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/resources/HelloWorldImplService_schema1.xsd
@@ -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>
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/resources/HelloWorldImplService_schema2.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/resources/HelloWorldImplService_schema2.xsd
new file mode 100644
index 0000000000..d955cc2af4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/resources/HelloWorldImplService_schema2.xsd
@@ -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>
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/resources/HelloWorldServiceService_schema1.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/resources/HelloWorldServiceService_schema1.xsd
new file mode 100644
index 0000000000..467eeb90c5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/resources/HelloWorldServiceService_schema1.xsd
@@ -0,0 +1,86 @@
+<?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="getGreetingsResponse" type="tns:getGreetingsResponse"/>
+
+ <xs:element name="getGreetingsComplex" type="tns:getGreetingsComplex"/>
+
+ <xs:element name="getGreetingsComplexResponse" type="tns:getGreetingsComplexResponse"/>
+
+ <xs:element name="GetGreetingsCaps" type="tns:GetGreetingsCaps"/>
+
+ <xs:element name="GetGreetingsCapsResponse" type="tns:GetGreetingsCapsResponse"/>
+
+ <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: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>
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..350ad6be96
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/resources/META-INF/sca-contribution.xml
@@ -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
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/resources/helloworld-external-service.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/resources/helloworld-external-service.wsdl
new file mode 100644
index 0000000000..c38f629e4f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/resources/helloworld-external-service.wsdl
@@ -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.
+-->
+<!-- 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>
+ <message name="GetGreetingsCaps">
+ <part name="parameters" element="tns:GetGreetingsCaps"/>
+ </message>
+ <message name="GetGreetingsCapsResponse">
+ <part name="parameters" element="tns:GetGreetingsCapsResponse"/>
+ </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>
+ <operation name="GetGreetingsCaps">
+ <input message="tns:GetGreetingsCaps"/>
+ <output message="tns:GetGreetingsCapsResponse"/>
+ </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>
+ <operation name="GetGreetingsCaps">
+ <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="http://localhost:8086/External/HelloWorld"/>
+ </port>
+ </service>
+ <service name="HelloWorldImplService">
+ <port name="HelloWorldImplPort" binding="tns:HelloWorldServicePortBinding">
+ <soap:address location="http://localhost:8085/HelloWorldService/HelloWorld"/>
+ </port>
+ </service>
+</definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/resources/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/resources/helloworld.composite
new file mode 100644
index 0000000000..f432d4fc25
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-reference-target/src/main/resources/helloworld.composite
@@ -0,0 +1,43 @@
+<?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="helloWorldInternal" target="HelloWorldInternalService"/>
+ </component>
+
+ <component name="HelloWorldInternalService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.HelloWorldInternalImpl"/>
+ <service name="HelloWorld">
+ <binding.ws wsdlElement="http://ws.binding.sca.tuscany.apache.org/#wsdl.port(HelloWorldImplService/HelloWorldInternalImplPort)"/>
+ </service>
+ <reference name="helloWorldExternal">
+ <binding.ws wsdlElement="http://helloworld/external#wsdl.port(HelloWorldServiceService/HelloWorldServicePort)"/>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/README b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/README
new file mode 100644
index 0000000000..fe73646e78
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/README
@@ -0,0 +1,254 @@
+RPC Literal WSDL Style
+======================
+
+Interface
+---------
+
+@Remotable
+public interface HelloWorld {
+ String getGreetings(String s);
+ String getGreetingsException(String s) throws ServiceRuntimeException;
+ Foo getGreetingsComplex(Foo foo);
+}
+
+WSDL
+----
+
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://ws.binding.sca.tuscany.apache.org/rpclit"
+ schemaLocation="HelloWorldImplService-rpclit.xsd"/>
+ </xsd:schema>
+ </types>
+ <message name="getGreetings">
+ <part name="s" type="xsd:string"/>
+ </message>
+ <message name="getGreetingsResponse">
+ <part name="s" type="xsd:string"/>
+ </message>
+ <message name="getGreetingsException">
+ <part name="s" type="xsd:string"/>
+ </message>
+ <message name="getGreetingsExceptionResponse">
+ <part name="s" type="xsd:string"/>
+ </message>
+ <message name="Exception">
+ <part name="fault" element="tns:Exception"/>
+ </message>
+ <message name="getGreetingsComplex">
+ <part name="foo" type="tns:foo"/>
+ </message>
+ <message name="getGreetingsComplexResponse">
+ <part name="foo" type="tns:foo"/>
+ </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="rpc"/>
+ <operation name="getGreetings">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal" namespace="http://ws.binding.sca.tuscany.apache.org/rpclit/getGreetingsNamespace"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://ws.binding.sca.tuscany.apache.org/rpclit/getGreetingsNamespace"/>
+ </output>
+ </operation>
+ <operation name="getGreetingsException">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal" namespace="http://ws.binding.sca.tuscany.apache.org/rpclit/getGreetingsExceptionNamespace"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://ws.binding.sca.tuscany.apache.org/rpclit/getGreetingsExceptionNamespace"/>
+ </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>
+
+getGreetings SOAP Request/Response
+----------------------------------
+
+POST /HelloWorldService/HelloWorld-rpclit-porttype HTTP/1.1
+Content-Type: text/xml; charset=UTF-8
+SOAPAction: ""
+User-Agent: Axis2
+Host: localhost:8088
+Content-Length: 480
+
+<?xml version='1.0' encoding='UTF-8'?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soape nv:Body>
+ <axis2ns1:getGreetings
+ xmlns:axis2ns1="http://ws.binding.sca.tuscany.apache.org/rpclit/getGreetingsNamespace">
+ <s xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ns2="http://ws.binding.sca.tuscany.apache.org/"
+ xsi:type="xs:string">Fred
+ </s>
+ </axis2ns1:getGreetings>
+ </soapenv:Body>
+</soapenv:Envelope>
+
+HTTP/1.1 200 OK
+Content-Type: text/xml; charset=utf-8
+Transfer-Encoding: chunked
+
+1FE
+<?xml version='1.0' encoding='UTF-8'?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soape nv:Body>
+ <axis2ns4:getGreetingsResponse
+ xmlns:axis2ns4="http://ws.binding.sca.tuscany.apache.org/rpclit/getGreetingsResponseNamespace">
+ <s xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ns2="http://ws.binding.sca.tuscany.apache.org/"
+ xsi:type="xs:string">Hello Fred</s>
+ </axis2ns4:getGreetingsResponse>
+ </soapenv:Body>
+</soapenv:Envelope>
+
+
+getGreetingsException SOAP Request/Response
+-------------------------------------------
+
+POST /HelloWorldService/HelloWorld-rpclit-porttype HTTP/1.1
+Content-Type: text/xml; charset=UTF-8
+SOAPAction: ""
+User-Agent: Axis2
+Host: localhost:8088
+Content-Length: 507
+
+<?xml version='1.0' encoding='UTF-8'?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soape nv:Body>
+ <axis2ns5:getGreetingsException
+ xmlns:axis2ns5="http://ws.binding.sca.tuscany.apache.org/rpclit/getGreetingsExceptionNamespace">
+ <s xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ns2="http://ws.binding.sca.tuscany.apache.org/"
+ xsi:type="xs:string">Fred
+ </s>
+ </axis2ns5:getGreetingsException>
+ </soapenv:Body>
+</soapenv:Envelope>
+
+HTTP/1.1 500 Internal Server Error
+Content-Type: text/xml; charset=utf-8
+Transfer-Encoding: chunked
+
+133C
+<?xml version='1.0' encoding='UTF-8'?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soape nv:Body>
+ <soapenv:Fault>
+ <faultcode>soapenv:Server</faultcode>
+ <faultstring>org.apache.tuscany.sca.interfacedef.util.FaultE
+ xception cannot be cast to org.apache.axiom.om.OMElement</faultstring>
+ <detail>
+ ...
+ </Exception>
+ </detail>
+ </soapenv:Fault>
+ </soapenv:Body>
+</soapenv:Envelope>
+
+TODO - exception is wrong
+
+getGreetingsComplex SOAP Request/Response
+-----------------------------------------
+
+POST /HelloWorldService/HelloWorld-rpclit-porttype HTTP/1.1
+Content-Type: text/xml; charset=UTF-8
+SOAPAction: ""
+User-Agent: Axis2
+Host: localhost:8088
+Content-Length: 570
+
+<?xml version='1.0' encoding='UTF-8'?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soape nv:Body>
+ <axis2ns7:getGreetingsComplex
+ xmlns:axis2ns7="http://ws.binding.sca.tuscany.apache.org/rpclit">
+ <foo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ns3="http://ws.binding.sca.tuscany.apache.org/"
+ xmlns:ns2="http://helloworld/external"
+ xsi:type="ns2:foo">
+ <bars>
+ <b>true</b>
+ <s>petra</s>
+ <x>1</x>
+ <y>2</y>
+ </bars>
+ <bars>
+ <b>false</b>
+ <s>beate</s>
+ <x>3</x>
+ <y>4</y>
+ </bars>
+ </foo>
+ </axis2ns7:getGreetingsComplex>
+ </soapenv:Body>
+</soapenv:Envelope>
+
+HTTP/1.1 200 OK
+Content-Type: text/xml; charset=utf-8
+Transfer-Encoding: chunked
+
+281
+<?xml version='1.0' encoding='UTF-8'?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soape nv:Body>
+ <axis2ns10:getGreetingsComplexResponse
+ xmlns:axis2ns10="http://ws.binding.sca.tuscany.apache.org/rpclit">
+ <foo xm lns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ns3="http://ws.binding.sca.tuscany.apache.org/"
+ xmlns:ns2="http://helloworld/external"
+ xsi:type="ns2:foo">
+ <bars>
+ <b>true</b>
+ <s>petra</s>
+ <x>1</x>
+ <y>2</y>
+ </bars>
+ <bars>
+ <b>false</b>
+ <s>bea
+ te</s>
+ <x>3</x>
+ <y>4</y>
+ </bars>
+ <bars>
+ <b>true</b>
+ <s>simon</s>
+ <x>7</x>
+ <y>8</y>
+ </bars>
+ </foo>
+ </axis2ns10:getGreetingsComplexResponse>
+ </soapenv:Body>
+</soapenv:Envelope> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/pom.xml
new file mode 100644
index 0000000000..6f88ef3079
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/pom.xml
@@ -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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-ws-contribution-rpc-lit</artifactId>
+ <name>Apache Tuscany SCA iTest WS Contribution RPC Lit</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</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.HelloWorld1Impl</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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java
new file mode 100644
index 0000000000..6bc67db5fc
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java
@@ -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);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld1Impl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld1Impl.java
new file mode 100644
index 0000000000..9ee8373468
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld1Impl.java
@@ -0,0 +1,54 @@
+/*
+ * 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.oasisopen.sca.ServiceRuntimeException;
+import org.oasisopen.sca.annotation.Reference;
+
+@WebService
+public class HelloWorld1Impl implements HelloWorld {
+
+ @Reference
+ public HelloWorld helloWorld2;
+
+ public String getGreetings(String s) {
+ System.out.println("Entering SCA HelloWorld1.getGreetings: " + s);
+ String response = helloWorld2.getGreetings(s);
+ System.out.println("Leaving SCA HelloWorld1.getGreetings: " + response);
+ return response;
+ }
+
+ public String getGreetingsException(String s) throws ServiceRuntimeException {
+ System.out.println("Entering SCA HelloWorld1.getGreetingsException: " + s);
+ String response = helloWorld2.getGreetingsException(s);
+ System.out.println("Leaving SCA HelloWorld1.getGreetings: " + response);
+ throw new ServiceRuntimeException(response);
+ }
+
+ public Foo getGreetingsComplex(Foo foo){
+ System.out.println("Entering SCA HelloWorld1.getGreetingsComplex: " + foo.getBars().get(0).getS());
+ Foo response = helloWorld2.getGreetingsComplex(foo);
+ System.out.println("Leaving SCA HelloWorld1.getGreetingsComplex: " + foo.getBars().get(0).getS());
+ return response;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld2Impl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld2Impl.java
new file mode 100644
index 0000000000..6f3b430d6d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld2Impl.java
@@ -0,0 +1,55 @@
+/*
+ * 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 HelloWorld2Impl implements HelloWorld {
+
+ @Reference
+ public HelloWorldService helloWorldExternal;
+
+ public String getGreetings(String s) {
+ System.out.println("Entering SCA HelloWorld2.getGreetings: " + s);
+ String response = helloWorldExternal.getGreetings(s);
+ System.out.println("Leaving SCA HelloWorld2.getGreetings: " + response);
+ return response;
+ }
+
+ public String getGreetingsException(String s) throws ServiceRuntimeException {
+ System.out.println("Entering SCA HelloWorld2.getGreetingsException: " + s);
+ String response = helloWorldExternal.getGreetings(s);
+ System.out.println("Leaving SCA HelloWorld2.getGreetings: " + response);
+ throw new ServiceRuntimeException(response);
+ }
+
+ public Foo getGreetingsComplex(Foo foo){
+ System.out.println("Entering SCA HelloWorld2.getGreetingsComplex: " + foo.getBars().get(0).getS());
+ Foo response = helloWorldExternal.getGreetingsComplex(foo);
+ System.out.println("Leaving SCA HelloWorld2.getGreetingsComplex: " + foo.getBars().get(0).getS());
+ return response;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/resources/HelloWorldImplService-rpclit.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/resources/HelloWorldImplService-rpclit.wsdl
new file mode 100644
index 0000000000..0c11e6a8f4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/resources/HelloWorldImplService-rpclit.wsdl
@@ -0,0 +1,110 @@
+<?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/rpclit"
+ name="HelloWorldImplService"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://ws.binding.sca.tuscany.apache.org/rpclit"
+ xmlns:tns2="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://ws.binding.sca.tuscany.apache.org/rpclit"
+ schemaLocation="HelloWorldImplService-rpclit1.xsd"/>
+ </xsd:schema>
+ </types>
+ <message name="getGreetings">
+ <part name="s" type="xsd:string"/>
+ </message>
+ <message name="getGreetingsResponse">
+ <part name="s" type="xsd:string"/>
+ </message>
+ <message name="getGreetingsException">
+ <part name="s" type="xsd:string"/>
+ </message>
+ <message name="getGreetingsExceptionResponse">
+ <part name="s" type="xsd:string"/>
+ </message>
+ <message name="Exception">
+ <part name="fault" element="tns:Exception"/>
+ </message>
+ <message name="getGreetingsComplex">
+ <part name="foo" type="tns2:foo"/>
+ </message>
+ <message name="getGreetingsComplexResponse">
+ <part name="foo" type="tns2:foo"/>
+ </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="rpc"/>
+ <operation name="getGreetings">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal" namespace="http://ws.binding.sca.tuscany.apache.org/rpclit/getGreetingsNamespace" />
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://ws.binding.sca.tuscany.apache.org/rpclit/getGreetingsResponseNamespace"/>
+ </output>
+ </operation>
+ <operation name="getGreetingsException">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal" namespace="http://ws.binding.sca.tuscany.apache.org/rpclit/getGreetingsExceptionNamespace"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://ws.binding.sca.tuscany.apache.org/rpclit/getGreetingsExceptionResponseNamespace"/>
+ </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:8087/HelloWorldService/HelloWorld-rpclit"/>
+ </port>
+ </service>
+</definitions>
+
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/resources/HelloWorldImplService-rpclit1.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/resources/HelloWorldImplService-rpclit1.xsd
new file mode 100644
index 0000000000..8841f0dcf2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/resources/HelloWorldImplService-rpclit1.xsd
@@ -0,0 +1,83 @@
+<?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/rpclit"
+ xmlns:tns="http://ws.binding.sca.tuscany.apache.org/rpclit"
+ xmlns:tns2="http://helloworld/external"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:import namespace="http://helloworld/external" schemaLocation="./HelloWorldImplService-rpclit2.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: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:schema>
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/resources/HelloWorldImplService-rpclit2.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/resources/HelloWorldImplService-rpclit2.xsd
new file mode 100644
index 0000000000..d955cc2af4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/resources/HelloWorldImplService-rpclit2.xsd
@@ -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>
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/resources/HelloWorldServiceService_schema1.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/resources/HelloWorldServiceService_schema1.xsd
new file mode 100644
index 0000000000..acdfcaaaa5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/resources/HelloWorldServiceService_schema1.xsd
@@ -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>
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..350ad6be96
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/resources/META-INF/sca-contribution.xml
@@ -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
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/resources/helloworld-external-service.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/resources/helloworld-external-service.wsdl
new file mode 100644
index 0000000000..837bcb059e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/resources/helloworld-external-service.wsdl
@@ -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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/resources/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/resources/helloworld.composite
new file mode 100644
index 0000000000..28dedef44c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-rpc-lit/src/main/resources/helloworld.composite
@@ -0,0 +1,64 @@
+<?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="HelloWorldService1">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.HelloWorld1Impl"/>
+ <service name="HelloWorld">
+ <binding.ws uri="http://localhost:8085/HelloWorldService/HelloWorld"/>
+ </service>
+ <reference name="helloWorld2">
+ <interface.wsdl interface="http://ws.binding.sca.tuscany.apache.org/rpclit#wsdl.porttype(HelloWorldImpl)"/>
+ <binding.ws uri="http://localhost:8087/HelloWorldService/HelloWorld-rpclit-porttype"
+ wsdlElement="http://ws.binding.sca.tuscany.apache.org/rpclit#wsdl.binding(HelloWorldImplPortBinding)"/>
+ <!--
+ note that it's not necessary to have interface.wsdl here but I left it in after
+ I added the wsdlElement on the binding in order to configure the binding with the
+ wrapper element namespace that appears in the binding configuration
+ -->
+ </reference>
+ </component>
+
+ <component name="HelloWorldService1a">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.HelloWorld1Impl"/>
+ <service name="HelloWorld">
+ <binding.ws uri="http://localhost:8087/HelloWorldService/HelloWorld-rpclit-porttype"
+ wsdlElement="http://ws.binding.sca.tuscany.apache.org/rpclit#wsdl.binding(HelloWorldImplPortBinding)"/>
+ </service>
+ <reference name="helloWorld2">
+ <binding.ws uri="http://localhost:8087/HelloWorldService/HelloWorld-rpclit"
+ wsdlElement="http://ws.binding.sca.tuscany.apache.org/rpclit#wsdl.binding(HelloWorldImplPortBinding)"/>
+ </reference>
+ </component>
+
+ <component name="HelloWorldService2">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.HelloWorld2Impl"/>
+ <service name="HelloWorld">
+ <binding.ws wsdlElement="http://ws.binding.sca.tuscany.apache.org/rpclit#wsdl.port(HelloWorldImplService/HelloWorldImplPort)"/>
+ </service>
+ <reference name="helloWorldExternal">
+ <binding.ws uri="http://localhost:8086/External/HelloWorld"/>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/pom.xml
new file mode 100644
index 0000000000..bac4ffb86b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/pom.xml
@@ -0,0 +1,129 @@
+<?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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-ws-contribution-wsdl-first</artifactId>
+ <name>Apache Tuscany SCA iTest WS Contribution WSDL First</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</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>wsimport1</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>wsimport</goal>
+ </goals>
+ <configuration>
+ <packageName>org.apache.tuscany.sca.binding.ws.sca</packageName>
+ <wsdlDirectory>${basedir}/target/classes</wsdlDirectory>
+ <wsdlFiles>
+ <wsdlFile>HelloWorldImplService.wsdl</wsdlFile>
+ </wsdlFiles>
+ <staleFile>${project.build.directory}/jaxws/stale/.wsimport1StaleFlag</staleFile>
+ </configuration>
+ </execution-->
+ <execution>
+ <id>wsimport2</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/.wsimport2StaleFlag</staleFile>
+ </configuration>
+ </execution>
+ </executions>
+ <configuration>
+ <target>2.1</target>
+ <sourceDestDir>${project.build.directory}/jaxws-source</sourceDestDir>
+ <verbose>true</verbose>
+ <xnocompile>true</xnocompile>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java
new file mode 100644
index 0000000000..c9c1038ea3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorld.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws;
+
+import javax.jws.WebMethod;
+
+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);
+
+ @WebMethod(operationName = "GetGreetingsCaps")
+ String getGreetingsCaps(String s);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java
new file mode 100644
index 0000000000..d88a765682
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/java/org/apache/tuscany/sca/binding/ws/HelloWorldImpl.java
@@ -0,0 +1,60 @@
+/*
+ * 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.apache.tuscany.sca.binding.ws.jaxws.external.service.iface.HelloWorldService;
+import org.oasisopen.sca.ServiceRuntimeException;
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldImpl implements HelloWorld {
+
+ @Reference
+ public HelloWorldService helloWorldExternal;
+
+ public String getGreetings(String s) {
+ System.out.println("Entering SCA HelloWorld.getGreetings: " + s);
+ String response = helloWorldExternal.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 = helloWorldExternal.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 = helloWorldExternal.getGreetingsComplex(foo);
+ System.out.println("Leaving SCA HelloWorld.getGreetingsComplex: " + foo.getBars().get(0).getS());
+ return response;
+ }
+
+ public String getGreetingsCaps(String s) {
+ System.out.println("Entering SCA HelloWorld.getGreetingsCaps: " + s);
+ String response = helloWorldExternal.getGreetingsCaps(s);
+ System.out.println("Leaving SCA HelloWorld.getGreetingsCaps: " + response);
+ return response;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/resources/HelloWorldImplService.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/resources/HelloWorldImplService.wsdl
new file mode 100644
index 0000000000..59fce9d849
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/resources/HelloWorldImplService.wsdl
@@ -0,0 +1,128 @@
+<?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>
+ <operation name="GetGreetingsCaps">
+ <input message="tns:GetGreetingsCaps"/>
+ <output message="tns:GetGreetingsCapsResponse"/>
+ </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>
+ <operation name="GetGreetingsCaps">
+ <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>
+
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/resources/HelloWorldImplService_schema1.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/resources/HelloWorldImplService_schema1.xsd
new file mode 100644
index 0000000000..2d8adf3d73
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/resources/HelloWorldImplService_schema1.xsd
@@ -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>
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/resources/HelloWorldImplService_schema2.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/resources/HelloWorldImplService_schema2.xsd
new file mode 100644
index 0000000000..d955cc2af4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/resources/HelloWorldImplService_schema2.xsd
@@ -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>
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/resources/HelloWorldServiceService_schema1.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/resources/HelloWorldServiceService_schema1.xsd
new file mode 100644
index 0000000000..467eeb90c5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/resources/HelloWorldServiceService_schema1.xsd
@@ -0,0 +1,86 @@
+<?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="getGreetingsResponse" type="tns:getGreetingsResponse"/>
+
+ <xs:element name="getGreetingsComplex" type="tns:getGreetingsComplex"/>
+
+ <xs:element name="getGreetingsComplexResponse" type="tns:getGreetingsComplexResponse"/>
+
+ <xs:element name="GetGreetingsCaps" type="tns:GetGreetingsCaps"/>
+
+ <xs:element name="GetGreetingsCapsResponse" type="tns:GetGreetingsCapsResponse"/>
+
+ <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: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>
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..350ad6be96
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/resources/META-INF/sca-contribution.xml
@@ -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
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/resources/helloworld-external-service.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/resources/helloworld-external-service.wsdl
new file mode 100644
index 0000000000..c38f629e4f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/resources/helloworld-external-service.wsdl
@@ -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.
+-->
+<!-- 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>
+ <message name="GetGreetingsCaps">
+ <part name="parameters" element="tns:GetGreetingsCaps"/>
+ </message>
+ <message name="GetGreetingsCapsResponse">
+ <part name="parameters" element="tns:GetGreetingsCapsResponse"/>
+ </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>
+ <operation name="GetGreetingsCaps">
+ <input message="tns:GetGreetingsCaps"/>
+ <output message="tns:GetGreetingsCapsResponse"/>
+ </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>
+ <operation name="GetGreetingsCaps">
+ <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="http://localhost:8086/External/HelloWorld"/>
+ </port>
+ </service>
+ <service name="HelloWorldImplService">
+ <port name="HelloWorldImplPort" binding="tns:HelloWorldServicePortBinding">
+ <soap:address location="http://localhost:8085/HelloWorldService/HelloWorld"/>
+ </port>
+ </service>
+</definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/resources/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/resources/helloworld.composite
new file mode 100644
index 0000000000..8d0c7bf9ff
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/contribution-wsdl-first/src/main/resources/helloworld.composite
@@ -0,0 +1,35 @@
+<?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 wsdlElement="http://helloworld/external#wsdl.port(HelloWorldServiceService/HelloWorldServicePort)"/>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/pom.xml
new file mode 100644
index 0000000000..de3dc98aa9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/pom.xml
@@ -0,0 +1,58 @@
+<?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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-ws-defaults</artifactId>
+ <name>Apache Tuscany SCA iTest WS with Defaults</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.19</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Bar.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Bar.java
new file mode 100644
index 0000000000..a1233f6d25
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Bar.java
@@ -0,0 +1,58 @@
+/*
+ * 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.axis2;
+
+import java.io.Serializable;
+
+public class Bar implements Serializable {
+ private static final long serialVersionUID = 1249963611910502668L;
+
+ private String s;
+ private int x;
+ private Integer y;
+
+ private Boolean b;
+
+ public Boolean getB() {
+ return b;
+ }
+ public void setB(Boolean b) {
+ this.b = b;
+ }
+ public String getS() {
+ return s;
+ }
+ public void setS(String s) {
+ this.s = s;
+ }
+ public int getX() {
+ return x;
+ }
+ public void setX(int x) {
+ this.x = x;
+ }
+ public Integer getY() {
+ return y;
+ }
+ public void setY(Integer y) {
+ this.y = y;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Foo.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Foo.java
new file mode 100644
index 0000000000..0695ace7f4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Foo.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2;
+
+import java.io.Serializable;
+
+public class Foo implements Serializable {
+ private static final long serialVersionUID = 4879476066850018458L;
+
+ private Bar[] bars;
+
+ public Bar[] getBars() {
+ return bars;
+ }
+
+ public void setBars(Bar[] bars) {
+ this.bars = bars;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorld.java
new file mode 100644
index 0000000000..f39566ccbf
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorld.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorld {
+
+ String getGreetings(String s);
+ Foo getGreetingsComplex(Foo foo);
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldClient.java
new file mode 100644
index 0000000000..332f825a51
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldClient.java
@@ -0,0 +1,40 @@
+/*
+ * 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.axis2;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClient implements HelloWorld {
+
+ @Reference
+ public HelloWorld helloWorldWS;
+
+ public String getGreetings(String s) {
+ String response = helloWorldWS.getGreetings(s);
+ System.out.println("At client: " + response);
+ return response;
+ }
+
+ public Foo getGreetingsComplex(Foo foo){
+ Foo response = helloWorldWS.getGreetingsComplex(foo);
+ System.out.println("At client: " + response.getBars()[0].getS());
+ return response;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldService.java
new file mode 100644
index 0000000000..3bbf50a728
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldService.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2;
+
+public class HelloWorldService implements HelloWorld {
+
+ public String getGreetings(String s) {
+ String response = "Hello " + s;
+ System.out.println("At service: " + response);
+ return response;
+ }
+
+ public Foo getGreetingsComplex(Foo foo){
+ Foo response = foo;
+ Bar b3 = new Bar();
+ b3.setS("simon");
+ b3.setX(4);
+ b3.setY(new Integer(5));
+ b3.setB(Boolean.TRUE);
+ response.getBars()[1] = b3;
+ System.out.println("At sevice: " + response.getBars()[0].getS());
+ return response;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..7e71dd465f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/resources/META-INF/sca-contribution.xml
@@ -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
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld.composite
new file mode 100644
index 0000000000..cae74697f1
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld.composite
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://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">
+
+ <!--
+ Test the ws binding with default settings for simple and complex parameters
+ -->
+
+ <component name="HelloWorldClient">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.HelloWorldClient"/>
+ <reference name="helloWorldWS" target="HelloWorldService"/>
+ </component>
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.HelloWorldService"/>
+ <service name="HelloWorld">
+ <binding.ws/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld.wsdl
new file mode 100644
index 0000000000..a352696b8e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld.wsdl
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld"
+ xmlns:tns="http://helloworld"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ </wsdl:binding>
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort1">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService1"/>
+ </wsdl:port>
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort2">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService2"/>
+ </wsdl:port>
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort3">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService3"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/DefaultsTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/DefaultsTestCase.java
new file mode 100644
index 0000000000..1e4c1fcbff
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/defaults/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/DefaultsTestCase.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.binding.ws.axis2.HelloWorld;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+public class DefaultsTestCase extends TestCase {
+
+ private Node node;
+ private HelloWorld helloWorld;
+
+ @Override
+ protected void setUp() throws Exception {
+ node = NodeFactory.newInstance().createNode(new Contribution("test", "target/classes"));
+ node.start();
+ helloWorld = node.getService(HelloWorld.class, "HelloWorldClient");
+ }
+
+ public void testCalculator() throws Exception {
+ assertEquals("Hello petra", helloWorld.getGreetings("petra"));
+
+ 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.setBars(new Bar[] { b1, b2} );
+
+ Foo f2 = helloWorld.getGreetingsComplex(f);
+
+ assertEquals("petra", f2.getBars()[0].getS());
+ assertEquals(1, f2.getBars()[0].getX());
+ assertEquals(2, f2.getBars()[0].getY().intValue());
+ assertTrue(f2.getBars()[0].getB().booleanValue());
+ assertEquals("simon", f2.getBars()[1].getS());
+ assertEquals(4, f2.getBars()[1].getX());
+ assertEquals(5, f2.getBars()[1].getY().intValue());
+ assertTrue(f2.getBars()[1].getB().booleanValue());
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoint-references/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoint-references/pom.xml
new file mode 100644
index 0000000000..d478d9a559
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoint-references/pom.xml
@@ -0,0 +1,64 @@
+<?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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-ws-endpoint-references</artifactId>
+ <name>Apache Tuscany SCA iTest WS Endpoint References</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.19</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>wstx-asl</artifactId>
+ <version>3.2.9</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoint-references/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoint-references/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorld.java
new file mode 100644
index 0000000000..d6db1c2d0b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoint-references/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorld.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorld {
+
+ String getGreetings(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoint-references/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoint-references/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldComponent.java
new file mode 100644
index 0000000000..4ba7e67de2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoint-references/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldComponent.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldComponent implements HelloWorld {
+
+ @Reference
+ public HelloWorld helloWorldWS;
+
+ public String getGreetings(String s) {
+ return helloWorldWS.getGreetings(s);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoint-references/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoint-references/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldService.java
new file mode 100644
index 0000000000..052b49ff55
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoint-references/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldService.java
@@ -0,0 +1,28 @@
+/*
+ * 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.axis2;
+
+public class HelloWorldService implements HelloWorld {
+
+ public String getGreetings(String s) {
+ return "Hello " + s;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoint-references/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/HelloWorld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoint-references/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/HelloWorld.composite
new file mode 100644
index 0000000000..1b0af55874
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoint-references/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/HelloWorld.composite
@@ -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/tests/binding/ws/axis2"
+ name="HelloWorld2">
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.HelloWorldService"/>
+ <service name="HelloWorld">
+ <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" />
+ <binding.ws>
+ <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
+ <wsa:Address>http://localhost:8085/myService</wsa:Address>
+ </wsa:EndpointReference>
+ </binding.ws>
+ </service>
+ </component>
+
+ <component name="HelloWorldComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.HelloWorldComponent"/>
+ <reference name="helloWorldWS">
+ <binding.ws>
+ <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
+ <wsa:Address>http://localhost:8085/myService</wsa:Address>
+ </wsa:EndpointReference>
+ </binding.ws>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoint-references/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoint-references/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld.wsdl
new file mode 100644
index 0000000000..1a2272d7ee
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoint-references/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld.wsdl
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld" xmlns:tns="http://helloworld" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ </wsdl:binding>
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService"/>
+ </wsdl:port>
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort2">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService2"/>
+ </wsdl:port>
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort3">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService3"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoint-references/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoint-references/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldTestCase.java
new file mode 100644
index 0000000000..f1cfe30475
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoint-references/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldTestCase.java
@@ -0,0 +1,52 @@
+/*
+ * 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.axis2;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.binding.ws.axis2.HelloWorld;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+public class HelloWorldTestCase extends TestCase {
+
+ private Node node;
+ private HelloWorld helloWorld;
+
+ public void testCalculator() throws Exception {
+ assertEquals("Hello petra", helloWorld.getGreetings("petra"));
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ String contribution = "target/classes";
+ node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/HelloWorld.composite", new Contribution("test", contribution));
+ node.start();
+ helloWorld = node.getService(HelloWorld.class, "HelloWorldComponent");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/pom.xml
new file mode 100644
index 0000000000..2482753477
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/pom.xml
@@ -0,0 +1,58 @@
+<?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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-ws-endpoints</artifactId>
+ <name>Apache Tuscany SCA iTest WS Endpoints</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.19</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldMultiService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldMultiService.java
new file mode 100644
index 0000000000..8f77c63213
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldMultiService.java
@@ -0,0 +1,51 @@
+/*
+ * 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.axis2;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+
+public class HelloWorldMultiService implements HelloWorldOM, HelloWorldOM2 {
+
+ public OMElement getGreetings(OMElement requestOM) {
+ String name = requestOM.getFirstElement().getText();
+
+ OMFactory omFactory = OMAbstractFactory.getOMFactory();
+ OMElement responseOM = omFactory.createOMElement("getGreetingsResponse", "http://helloworld-om", "helloworld");
+ OMElement param = omFactory.createOMElement("getGreetingsReturn", "http://helloworld-om", "helloworld");
+ responseOM.addChild(param);
+ param.addChild(omFactory.createOMText("Hello " + name));
+
+ return responseOM;
+ }
+
+ public OMElement getGreetings2(OMElement requestOM) {
+ String name = requestOM.getFirstElement().getText();
+
+ OMFactory omFactory = OMAbstractFactory.getOMFactory();
+ OMElement responseOM = omFactory.createOMElement("getGreetingsResponse", "http://helloworld-om", "helloworld");
+ OMElement param = omFactory.createOMElement("getGreetingsReturn", "http://helloworld-om", "helloworld");
+ responseOM.addChild(param);
+ param.addChild(omFactory.createOMText("Hello2 " + name));
+
+ return responseOM;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOM.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOM.java
new file mode 100644
index 0000000000..e248815805
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOM.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2;
+
+import org.apache.axiom.om.OMElement;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorldOM {
+
+ OMElement getGreetings(OMElement parmE);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOM2.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOM2.java
new file mode 100644
index 0000000000..9d0a4ce5b4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOM2.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2;
+
+import org.apache.axiom.om.OMElement;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorldOM2 {
+
+ OMElement getGreetings2(OMElement parmE);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOMComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOMComponent.java
new file mode 100644
index 0000000000..8439696fa8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOMComponent.java
@@ -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.axis2;
+
+import org.apache.axiom.om.OMElement;
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldOMComponent implements HelloWorldOM {
+
+ @Reference
+ public HelloWorldOM helloWorldWS;
+
+ public OMElement getGreetings(OMElement om) {
+ return helloWorldWS.getGreetings(om);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOMService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOMService.java
new file mode 100644
index 0000000000..5b8578c816
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOMService.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+
+public class HelloWorldOMService implements HelloWorldOM {
+
+ public OMElement getGreetings(OMElement requestOM) {
+ System.out.println(" **** getGreetings **** ");
+ String name = requestOM.getFirstElement().getText();
+
+ OMFactory omFactory = OMAbstractFactory.getOMFactory();
+ OMElement responseOM = omFactory.createOMElement("getGreetingsResponse", "http://helloworld-om", "helloworld");
+ OMElement param = omFactory.createOMElement("getGreetingsReturn", "http://helloworld-om", "helloworld");
+ responseOM.addChild(param);
+ param.addChild(omFactory.createOMText("Hello " + name));
+
+ return responseOM;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/DefaultMultiService.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/DefaultMultiService.composite
new file mode 100644
index 0000000000..c7863a5ff8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/DefaultMultiService.composite
@@ -0,0 +1,53 @@
+<?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/tests/binding/ws/axis2"
+ name="DefaultMultiService">
+
+ <!--
+ exposing a component which has multiple services with a WS binding,
+ endpoint should be <componentURI>/<serviceName> so for this composite:
+ http://localhost:8085/HelloWorldService/service1
+ -->
+
+
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.HelloWorldMultiService"/>
+ <service name="HelloWorldOM">
+ <interface.wsdl interface="http://helloworld-om#wsdl.interface(HelloWorld)" />
+ <binding.ws uri="http://localhost:8085/HelloWorldService/helloWorld"
+ wsdlElement="http://helloworld-om#wsdl.binding(HelloWorldSoapBinding)"/>
+ </service>
+ </component>
+
+ <component name="HelloWorldComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.HelloWorldOMComponent"/>
+ <reference name="helloWorldWS">
+ <interface.wsdl interface="http://helloworld-om#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-om#wsdl.binding(HelloWorldSoapBinding)"
+ uri="http://localhost:8085/HelloWorldService/helloWorld"/>
+ </reference>
+ </component>
+
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/DefaultSingleService.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/DefaultSingleService.composite
new file mode 100644
index 0000000000..63c6a89cfb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/DefaultSingleService.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.
+-->
+<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/tests/binding/ws/axis2"
+ name="DefaultSingleService">
+
+ <!--
+ exposing a component with a WS binding, endpoint should be <componentURI>/<serviceName>
+ unless the component has just a single service in which case its just <componentURI>
+ so for this composite: http://localhost:8085/HelloWorldService
+ -->
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.HelloWorldOMService"/>
+ <service name="HelloWorldOM">
+ <interface.wsdl interface="http://helloworld-om#wsdl.interface(HelloWorld)" />
+ <binding.ws uri="http://localhost:8085/HelloWorldService/helloWorld"
+ wsdlElement="http://helloworld-om#wsdl.binding(HelloWorldSoapBinding)"/>
+ </service>
+ </component>
+
+ <component name="HelloWorldComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.HelloWorldOMComponent"/>
+ <reference name="helloWorldWS">
+ <interface.wsdl interface="http://helloworld-om#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-om#wsdl.binding(HelloWorldSoapBinding)"
+ uri="http://localhost:8085/HelloWorldService/helloWorld"/>
+ </reference>
+ </component>
+
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/RelativeURI.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/RelativeURI.composite
new file mode 100644
index 0000000000..898d2b0699
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/RelativeURI.composite
@@ -0,0 +1,83 @@
+<?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/tests/binding/ws/axis2"
+ name="RelativeURI">
+
+ <!--
+ tests that the relative URI of the binding is appended to the default component/service URL
+ -->
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.HelloWorldOMService"/>
+ <service name="HelloWorldOM">
+ <interface.wsdl interface="http://helloworld-om#wsdl.interface(HelloWorld)" />
+ <binding.ws uri="helloWorld"
+ wsdlElement="http://helloworld-om#wsdl.binding(HelloWorldSoapBinding)"/>
+ </service>
+ </component>
+
+ <component name="HelloWorldComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.HelloWorldOMComponent"/>
+ <reference name="helloWorldWS">
+ <interface.wsdl interface="http://helloworld-om#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-om#wsdl.binding(HelloWorldSoapBinding)"
+ uri="http://localhost:8085/HelloWorldService/HelloWorldOM/helloWorld"/>
+ </reference>
+ </component>
+
+ <component name="HelloWorldService1">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.HelloWorldOMService"/>
+ <service name="HelloWorldOM">
+ <interface.wsdl interface="http://helloworld-om#wsdl.interface(HelloWorld)" />
+ <binding.ws uri="../helloWorld"
+ wsdlElement="http://helloworld-om#wsdl.binding(HelloWorldSoapBinding)"/>
+ </service>
+ </component>
+
+ <component name="HelloWorldComponent1">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.HelloWorldOMComponent"/>
+ <reference name="helloWorldWS">
+ <interface.wsdl interface="http://helloworld-om#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-om#wsdl.binding(HelloWorldSoapBinding)"
+ uri="http://localhost:8085/HelloWorldService1/helloWorld"/>
+ </reference>
+ </component>
+
+ <component name="HelloWorldService2">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.HelloWorldOMService"/>
+ <service name="HelloWorldOM">
+ <interface.wsdl interface="http://helloworld-om#wsdl.interface(HelloWorld)" />
+ <binding.ws uri="../../helloWorld"
+ wsdlElement="http://helloworld-om#wsdl.binding(HelloWorldSoapBinding)"/>
+ </service>
+ </component>
+
+ <component name="HelloWorldComponent2">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.HelloWorldOMComponent"/>
+ <reference name="helloWorldWS">
+ <interface.wsdl interface="http://helloworld-om#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-om#wsdl.binding(HelloWorldSoapBinding)"
+ uri="http://localhost:8085/helloWorld"/>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/WSDLExplicitURI.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/WSDLExplicitURI.composite
new file mode 100644
index 0000000000..9991a415f9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/WSDLExplicitURI.composite
@@ -0,0 +1,50 @@
+<?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/tests/binding/ws/axis2"
+ name="endpoint3">
+
+ <!--
+ exposing a component with a WS binding using a WSDL port with an explicit URL
+ so for this composite the service is: http://localhost:8085/myExplicitURI
+ -->
+
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.HelloWorldOMService"/>
+ <service name="HelloWorldOM">
+ <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.port(HelloWorldService/HelloWorldSoapPort)" />
+ </service>
+ </component>
+
+ <component name="HelloWorldComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.HelloWorldOMComponent"/>
+ <reference name="helloWorldWS">
+ <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.binding(HelloWorldSoapBinding)"
+ uri="http://localhost:8085/myExplicitURI"/>
+ </reference>
+ </component>
+
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/WSDLRelativeURI.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/WSDLRelativeURI.composite
new file mode 100644
index 0000000000..80ae124c23
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/WSDLRelativeURI.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.
+-->
+<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/tests/binding/ws/axis2"
+ name="endpoint4">
+
+ <!--
+ exposing a component with a WS binding using a WSDL port with a relative URL
+ so for this composite the service is: http://localhost:8085/HelloWorldService/myRelativeURI
+ -->
+
+
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.HelloWorldOMService"/>
+ <service name="HelloWorldOM">
+ <interface.wsdl interface="http://helloworld-om-relative-uri#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-om-relative-uri#wsdl.port(HelloWorldService/HelloWorldSoapPort)" />
+ </service>
+ </component>
+
+ <component name="HelloWorldComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.HelloWorldOMComponent"/>
+ <reference name="helloWorldWS">
+ <interface.wsdl interface="http://helloworld-om-relative-uri#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-om-relative-uri#wsdl.binding(HelloWorldSoapBinding)"
+ uri="http://localhost:8085/HelloWorldService/HelloWorldOM/myRelativeURI"/>
+ </reference>
+ </component>
+
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld-om-relative-uri.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld-om-relative-uri.wsdl
new file mode 100644
index 0000000000..cd63064b59
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld-om-relative-uri.wsdl
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld-om-relative-uri" xmlns:tns="http://helloworld-om-relative-uri" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld-om">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld-om-relative-uri" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
+ <wsdlsoap:address location="myRelativeURI"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld-om-uri.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld-om-uri.wsdl
new file mode 100644
index 0000000000..baa223f41c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld-om-uri.wsdl
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld-om-uri" xmlns:tns="http://helloworld-om-uri" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld-om">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld-om-uri" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
+ <wsdlsoap:address location="http://localhost:8085/myExplicitURI"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld-om.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld-om.wsdl
new file mode 100644
index 0000000000..73ca02246d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld-om.wsdl
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld-om" xmlns:tns="http://helloworld-om" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld-om">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld-om" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
+ <wsdlsoap:address location="http://endpoint.not.used"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/AbstractHelloWorldOMTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/AbstractHelloWorldOMTestCase.java
new file mode 100644
index 0000000000..1f8e4b3622
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/AbstractHelloWorldOMTestCase.java
@@ -0,0 +1,72 @@
+/*
+ * 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.axis2;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMText;
+import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
+import org.apache.tuscany.sca.binding.ws.axis2.HelloWorldOM;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+
+public abstract class AbstractHelloWorldOMTestCase extends TestCase {
+
+ protected Node node;
+ protected HelloWorldOM helloWorld;
+
+ @Override
+ protected void setUp() throws Exception {
+ String contribution = "target/classes";
+ node = NodeFactory.newInstance().createNode(getCompositeName(), new Contribution("test", contribution));
+ // force ws binding on node to use a default of 8085 if an absolute port is not specified
+ ((NodeImpl)node).getConfiguration().addBinding(WebServiceBinding.TYPE, "http://localhost:8085/");
+ node.start();
+ helloWorld = node.getService(HelloWorldOM.class, "HelloWorldComponent");
+ }
+
+ public void testCalculator() throws Exception {
+ OMFactory fac = OMAbstractFactory.getOMFactory();
+ OMElement requestOM = fac.createOMElement("getGreetings", "http://helloworld-om", "helloworld");
+ OMElement parmE = fac.createOMElement("name", "http://helloworld-om", "helloworld");
+ requestOM.addChild(parmE);
+ parmE.addChild(fac.createOMText("petra"));
+ OMElement responseOM = helloWorld.getGreetings(requestOM);
+ OMElement child = (OMElement)responseOM.getFirstElement();
+ Assert.assertEquals("Hello petra", ((OMText)child.getFirstOMChild()).getText());
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ }
+
+ protected String getCompositeName() {
+ String className = this.getClass().getName();
+ return className.substring(0, className.length() - 8).replace('.', '/') + ".composite";
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/DefaultMultiServiceTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/DefaultMultiServiceTestCase.java
new file mode 100644
index 0000000000..4ecf016e5a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/DefaultMultiServiceTestCase.java
@@ -0,0 +1,24 @@
+/*
+ * 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.axis2;
+
+public class DefaultMultiServiceTestCase extends AbstractHelloWorldOMTestCase {
+ // super class does it all getting composite based on this class name
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/DefaultSingleServiceTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/DefaultSingleServiceTestCase.java
new file mode 100644
index 0000000000..13163d62ab
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/DefaultSingleServiceTestCase.java
@@ -0,0 +1,24 @@
+/*
+ * 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.axis2;
+
+public class DefaultSingleServiceTestCase extends AbstractHelloWorldOMTestCase {
+ // super class does it all getting composite based on this class name
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/RelativeURITestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/RelativeURITestCase.java
new file mode 100644
index 0000000000..108aa1ce70
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/RelativeURITestCase.java
@@ -0,0 +1,63 @@
+/*
+ * 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.axis2;
+
+import junit.framework.Assert;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMText;
+
+public class RelativeURITestCase extends AbstractHelloWorldOMTestCase {
+ // super class does it all getting composite based on this class name
+
+ /**
+ * Test binding.ws uri="../helloWorld"
+ */
+ public void testRelative1() throws Exception {
+ HelloWorldOM helloWorld = node.getService(HelloWorldOM.class, "HelloWorldComponent1");
+
+ OMFactory fac = OMAbstractFactory.getOMFactory();
+ OMElement requestOM = fac.createOMElement("getGreetings", "http://helloworld-om", "helloworld");
+ OMElement parmE = fac.createOMElement("name", "http://helloworld-om", "helloworld");
+ requestOM.addChild(parmE);
+ parmE.addChild(fac.createOMText("petra"));
+ OMElement responseOM = helloWorld.getGreetings(requestOM);
+ OMElement child = (OMElement)responseOM.getFirstElement();
+ Assert.assertEquals("Hello petra", ((OMText)child.getFirstOMChild()).getText());
+ }
+
+ /**
+ * Test binding.ws uri="../../helloWorld"
+ */
+ public void testRelative2() throws Exception {
+ HelloWorldOM helloWorld = node.getService(HelloWorldOM.class, "HelloWorldComponent2");
+
+ OMFactory fac = OMAbstractFactory.getOMFactory();
+ OMElement requestOM = fac.createOMElement("getGreetings", "http://helloworld-om", "helloworld");
+ OMElement parmE = fac.createOMElement("name", "http://helloworld-om", "helloworld");
+ requestOM.addChild(parmE);
+ parmE.addChild(fac.createOMText("petra"));
+ OMElement responseOM = helloWorld.getGreetings(requestOM);
+ OMElement child = (OMElement)responseOM.getFirstElement();
+ Assert.assertEquals("Hello petra", ((OMText)child.getFirstOMChild()).getText());
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLExplicitURITestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLExplicitURITestCase.java
new file mode 100644
index 0000000000..bb492557d4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLExplicitURITestCase.java
@@ -0,0 +1,24 @@
+/*
+ * 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.axis2;
+
+public class WSDLExplicitURITestCase extends AbstractHelloWorldOMTestCase {
+ // super class does it all getting composite based on this class name
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLRelativeURITestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLRelativeURITestCase.java
new file mode 100644
index 0000000000..e038cc3116
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/endpoints/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLRelativeURITestCase.java
@@ -0,0 +1,24 @@
+/*
+ * 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.axis2;
+
+public class WSDLRelativeURITestCase extends AbstractHelloWorldOMTestCase {
+ // super class does it all getting composite based on this class name
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-client/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-client/pom.xml
new file mode 100644
index 0000000000..b32afbc13b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-client/pom.xml
@@ -0,0 +1,106 @@
+<?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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-ws-external-client</artifactId>
+ <name>Apache Tuscany SCA iTest WS External Client</name>
+
+ <repositories>
+ <repository>
+ <id>java.net2</id>
+ <name>java.net Maven 2.x Repository</name>
+ <url>http://download.java.net/maven/2</url>
+ </repository>
+ </repositories>
+
+ <dependencies>
+ <!-- Deliberately empty -->
+ </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>wsimport1</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>wsimport</goal>
+ </goals>
+ <configuration>
+ <packageName>org.apache.tuscany.sca.binding.ws.jaxws.sca</packageName>
+ <wsdlDirectory>${basedir}/target/classes</wsdlDirectory>
+ <wsdlFiles>
+ <wsdlFile>HelloWorldImplService.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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-client/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/client/HelloWorldClientLauncher.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-client/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/client/HelloWorldClientLauncher.java
new file mode 100644
index 0000000000..ccecf5695f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-client/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/client/HelloWorldClientLauncher.java
@@ -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.
+ */
+
+package org.apache.tuscany.sca.binding.ws.jaxws.external.client;
+
+import java.io.File;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import org.apache.tuscany.sca.binding.ws.jaxws.sca.Exception_Exception;
+import org.apache.tuscany.sca.binding.ws.jaxws.sca.Foo;
+import org.apache.tuscany.sca.binding.ws.jaxws.sca.HelloWorldImpl;
+
+public class HelloWorldClientLauncher {
+
+ public HelloWorldImpl wsProxy;
+
+ public HelloWorldClientLauncher(){
+ }
+
+ public void createClient() throws Exception{
+ System.out.println(">>> Starting external JAXWS client ");
+
+ // default JVM JAXWS support
+ QName serviceName = new QName("http://ws.binding.sca.tuscany.apache.org/", "HelloWorldImplService");
+ QName portName = new QName("http://ws.binding.sca.tuscany.apache.org/", "HelloWorldImplPort");
+ //URL wsdlLocation = new File("../external-client/target/classes/helloworld-sca.wsdl").toURL();
+ URL wsdlLocation = new File("../external-client/target/classes/HelloWorldImplService.wsdl").toURL();
+ javax.xml.ws.Service webService = Service.create(wsdlLocation, serviceName);
+ wsProxy = (HelloWorldImpl) webService.getPort(portName, HelloWorldImpl.class);
+ }
+
+ public void destroyClient(){
+ System.out.println(">>> Stopping external JAXWS client: ");
+ // TODO
+ }
+
+ public String getGreetings(String name){
+ System.out.println("Entering External Client HelloWorld.getGreetings: " + name);
+ String response = wsProxy.getGreetings(name);
+ System.out.println("Leaving External Client HelloWorld.getGreetings: " + response);
+ return response;
+ }
+
+ public String getGreetingsException(String name) throws Exception_Exception {
+ System.out.println("Entering External Client HelloWorld.getGreetingsException: " + name);
+ String response = wsProxy.getGreetingsException(name);
+ System.out.println("Leaving External Client HelloWorld.getGreetingsException: " + response);
+ return response;
+ }
+
+ public Foo getGreetingsComplex(Foo f) throws Exception_Exception {
+ System.out.println("Entering External Client HelloWorld.getGreetingsComplex: " + f.getBars().get(0).getS());
+ Foo response = wsProxy.getGreetingsComplex(f);
+ System.out.println("Leaving External Client HelloWorld.getGreetingsComplex: " + response.getBars().get(0).getS());
+ return response;
+ }
+
+ public String getGreetingsCaps(String s) throws Exception_Exception {
+ System.out.println("Entering External Client HelloWorld.getGreetingsCaps: " + s);
+ String response = wsProxy.getGreetingsCaps(s);
+ System.out.println("Leaving External Client HelloWorld.getGreetingsCaps: " + response);
+ return response;
+ }
+
+ public static void main(String[] args) throws Exception {
+ HelloWorldClientLauncher launcher = new HelloWorldClientLauncher();
+ launcher.createClient();
+ launcher.getGreetings("Fred");
+ launcher.destroyClient();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-client/src/main/resources/HelloWorldImplService.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-client/src/main/resources/HelloWorldImplService.wsdl
new file mode 100644
index 0000000000..d175589d7b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-client/src/main/resources/HelloWorldImplService.wsdl
@@ -0,0 +1,128 @@
+<?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>
+ <operation name="GetGreetingsCaps">
+ <input message="tns:GetGreetingsCaps"/>
+ <output message="tns:GetGreetingsCapsResponse"/>
+ </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>
+ <operation name="GetGreetingsCaps">
+ <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>
+
+
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-client/src/main/resources/HelloWorldImplService_schema1.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-client/src/main/resources/HelloWorldImplService_schema1.xsd
new file mode 100644
index 0000000000..c9c0acb038
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-client/src/main/resources/HelloWorldImplService_schema1.xsd
@@ -0,0 +1,111 @@
+<?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:xs="http://www.w3.org/2001/XMLSchema">
+
+ <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="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: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>
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/pom.xml
new file mode 100644
index 0000000000..2cfc58dacd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/pom.xml
@@ -0,0 +1,96 @@
+<?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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-ws-external-service</artifactId>
+ <name>Apache Tuscany SCA iTest WS External Service</name>
+
+ <dependencies>
+
+
+ </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.jaxws.external.service.HelloWorldService</sei>
+ <genWsdl>true</genWsdl>
+ <staleFile>${project.build.directory}/jaxws/stale/.wsgen1StaleFlag</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>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/Bar.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/Bar.java
new file mode 100644
index 0000000000..1f330aa441
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/Bar.java
@@ -0,0 +1,152 @@
+/*
+ * 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.jaxws.external.service;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for bar complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="bar">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;element name="b" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
+ * &lt;element name="s" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * &lt;element name="x" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * &lt;element name="y" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "bar", propOrder = {
+ "b",
+ "s",
+ "x",
+ "y"
+})
+public class Bar {
+
+ protected Boolean b;
+ protected String s;
+ protected int x;
+ protected Integer y;
+
+ /**
+ * Gets the value of the b property.
+ *
+ * @return
+ * possible object is
+ * {@link Boolean }
+ *
+ */
+ public Boolean isB() {
+ return b;
+ }
+
+ /**
+ * Sets the value of the b property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Boolean }
+ *
+ */
+ public void setB(Boolean value) {
+ this.b = value;
+ }
+
+ /**
+ * Gets the value of the s property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getS() {
+ return s;
+ }
+
+ /**
+ * Sets the value of the s property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setS(String value) {
+ this.s = value;
+ }
+
+ /**
+ * Gets the value of the x property.
+ *
+ */
+ public int getX() {
+ return x;
+ }
+
+ /**
+ * Sets the value of the x property.
+ *
+ */
+ public void setX(int value) {
+ this.x = value;
+ }
+
+ /**
+ * Gets the value of the y property.
+ *
+ * @return
+ * possible object is
+ * {@link Integer }
+ *
+ */
+ public Integer getY() {
+ return y;
+ }
+
+ /**
+ * Sets the value of the y property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Integer }
+ *
+ */
+ public void setY(Integer value) {
+ this.y = value;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/Foo.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/Foo.java
new file mode 100644
index 0000000000..1b22153169
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/Foo.java
@@ -0,0 +1,88 @@
+/*
+ * 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.jaxws.external.service;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for foo complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="foo">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;element name="bars" type="{http://ws.binding.sca.tuscany.apache.org/}bar" maxOccurs="unbounded" minOccurs="0"/>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "foo", propOrder = {
+ "bars"
+})
+public class Foo {
+
+ @XmlElement(nillable = true)
+ protected List<Bar> bars;
+
+ /**
+ * Gets the value of the bars property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the bars property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getBars().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Bar }
+ *
+ *
+ */
+ public List<Bar> getBars() {
+ if (bars == null) {
+ bars = new ArrayList<Bar>();
+ }
+ return this.bars;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldService.java
new file mode 100644
index 0000000000..129365b5e4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldService.java
@@ -0,0 +1,64 @@
+/*
+ * 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.jaxws.external.service;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+@WebService(name = "HelloWorldService", targetNamespace = "http://helloworld/external")
+public class HelloWorldService {
+
+ @WebMethod
+ @WebResult(name = "getGreetingsReturn", targetNamespace = "http://helloworld/external")
+ @RequestWrapper(localName = "getGreetings", targetNamespace = "http://helloworld/external", className = "org.apache.tuscany.sca.binding.ws.jaxws.external.service.GetGreetings")
+ @ResponseWrapper(localName = "getGreetingsResponse", targetNamespace = "http://helloworld/external", className = "org.apache.tuscany.sca.binding.ws.jaxws.external.service.GetGreetingsResponse")
+ public String getGreetings( @WebParam(name = "name", targetNamespace = "http://helloworld/external")
+ String name) {
+ System.out.println("Entering External Service HelloWorld.getGreetings: " + name);
+ String response = "Hello " + name;
+ System.out.println("Leaving External Service HelloWorld.getGreetings: " + response);
+ return response;
+ }
+
+ public Foo getGreetingsComplex(Foo foo){
+ System.out.println("Entering External Service HelloWorld.getGreetingsComplex: " + foo.getBars().get(0).getS());
+ Foo response = foo;
+ Bar b3 = new Bar();
+ b3.setS("simon");
+ b3.setX(7);
+ b3.setY(new Integer(8));
+ b3.setB(Boolean.TRUE);
+ response.getBars().add(b3);
+ System.out.println("Leaving External Service HelloWorld.getGreetingsComplex: " + foo.getBars().get(0).getS());
+ return response;
+ }
+
+ public String GetGreetingsCaps(String name) {
+ System.out.println("Entering External Service HelloWorld.GetGreetingsCaps: " + name);
+ String response = "Hello " + name;
+ System.out.println("Leaving External Service HelloWorld.GetGreetingsCaps: " + response);
+ return response;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldServiceLauncher.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldServiceLauncher.java
new file mode 100644
index 0000000000..3a6266f1ef
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldServiceLauncher.java
@@ -0,0 +1,49 @@
+/*
+ * 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.jaxws.external.service;
+
+import javax.xml.ws.Endpoint;
+
+public class HelloWorldServiceLauncher {
+
+ public Endpoint endpoint;
+
+ public HelloWorldServiceLauncher(){
+
+ }
+
+ public void createService(){
+ System.out.println(">>> Starting external JAXWS service at http://localhost:8086/External/HelloWorld");
+
+ // default JVM JAXWS support.
+ endpoint= Endpoint.publish("http://localhost:8086/External/HelloWorld",
+ new HelloWorldService());
+ }
+
+ public void destoryService(){
+ System.out.println(">>> Stopping external JAXWS service at http://localhost:8086/External/HelloWorld");
+ endpoint.stop();
+ }
+
+ public static void main(String[] args) throws Exception {
+ HelloWorldServiceLauncher launcher = new HelloWorldServiceLauncher();
+ launcher.createService();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml
new file mode 100644
index 0000000000..21ecf7d50a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/pom.xml
@@ -0,0 +1,123 @@
+<?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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <packaging>jar</packaging>
+ <artifactId>itest-holder-ws-service-multiple-outputs</artifactId>
+ <name>Apache Tuscany SCA itest WS Holder Input/MultipleOutputs</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-assembly</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-api</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>2.0.1</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws</artifactId>
+ <version>2.0.1</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-wsdlgen</artifactId>
+ <version>2.0.1</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-http</artifactId>
+ <version>2.0.1</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-jetty</artifactId>
+ <version>2.0.1</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-policy-security</artifactId>
+ <version>2.0.1</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-maven-plugin</artifactId>
+ <version>2.0.1</version>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/Order.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/Order.java
new file mode 100644
index 0000000000..2a4bb26858
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/Order.java
@@ -0,0 +1,147 @@
+/*
+ * 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.example.orderservice;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for order complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="order">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;element name="customerId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * &lt;element name="status" type="{http://www.example.org/OrderService/}status" minOccurs="0"/>
+ * &lt;element name="total" type="{http://www.w3.org/2001/XMLSchema}double"/>
+ * &lt;element name="orderId" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "order", propOrder = {
+ "customerId",
+ "status",
+ "total",
+ "orderId"
+})
+public class Order {
+
+ protected String customerId;
+ protected Status status;
+ protected double total;
+ protected int orderId;
+
+ /**
+ * Gets the value of the customerId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCustomerId() {
+ return customerId;
+ }
+
+ /**
+ * Sets the value of the customerId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCustomerId(String value) {
+ this.customerId = value;
+ }
+
+ /**
+ * Gets the value of the status property.
+ *
+ * @return
+ * possible object is
+ * {@link Status }
+ *
+ */
+ public Status getStatus() {
+ return status;
+ }
+
+ /**
+ * Sets the value of the status property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Status }
+ *
+ */
+ public void setStatus(Status value) {
+ this.status = value;
+ }
+
+ /**
+ * Gets the value of the total property.
+ *
+ */
+ public double getTotal() {
+ return total;
+ }
+
+ /**
+ * Sets the value of the total property.
+ *
+ */
+ public void setTotal(double value) {
+ this.total = value;
+ }
+
+ /**
+ * Gets the value of the orderId property.
+ *
+ */
+ public int getOrderId() {
+ return orderId;
+ }
+
+ /**
+ * Sets the value of the orderId property.
+ *
+ */
+ public void setOrderId(int value) {
+ this.orderId = value;
+ }
+
+ // Added manually from wsimport generated class to improve debugging.
+ public String toString() {
+ return "Order[customerId=" + customerId + ",orderId=" + orderId + ",total=" + total + ",status=" + status.value() + "]";
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderService.java
new file mode 100644
index 0000000000..718be0b46d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderService.java
@@ -0,0 +1,72 @@
+/*
+ * 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.example.orderservice;
+
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.xml.ws.Holder;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+
+
+@WebService
+@Remotable
+public interface OrderService {
+
+ public String[] reviewOrder(
+ @WebParam(name = "myData", targetNamespace = "", mode = WebParam.Mode.INOUT)
+ Holder<Order> myData,
+ @WebParam(name = "myOutParam", targetNamespace = "", mode = WebParam.Mode.OUT)
+ Holder<Float> myOutParam);
+
+ public String[] reviewOrderTwoInOuts(
+ @WebParam(name = "myData", targetNamespace = "", mode = WebParam.Mode.INOUT)
+ Holder<Order> myData,
+ @WebParam(name = "myOutParam", targetNamespace = "", mode = WebParam.Mode.INOUT)
+ Holder<Float> myOutParam);
+
+ public String[] reviewOrderTwoOutHolders(
+ @WebParam(name = "myData", targetNamespace = "", mode = WebParam.Mode.OUT)
+ Holder<Order> myData,
+ @WebParam(targetNamespace = "", mode = WebParam.Mode.OUT)
+ Holder<Float> myOutParam);
+
+ public String[] reviewOrderTwoInOutsThenIn(
+ @WebParam(targetNamespace = "", mode = WebParam.Mode.INOUT)
+ Holder<Order> myData,
+ @WebParam(name = "myOutParam", targetNamespace = "", mode = WebParam.Mode.INOUT)
+ Holder<Float> myOutParam,
+ Integer myCode);
+
+ public void reviewOrderTwoInOutsVoid(
+ @WebParam(name = "myData", targetNamespace = "", mode = WebParam.Mode.INOUT)
+ Holder<Order> myData,
+ @WebParam(name = "myOutParam", targetNamespace = "", mode = WebParam.Mode.INOUT)
+ Holder<Float> myOutParam);
+
+ public String[] reviewOrderOutThenInOut(
+ @WebParam(name = "myOutParam", targetNamespace = "", mode = WebParam.Mode.OUT)
+ Holder<Float> myOutParam,
+ @WebParam(name = "myData", targetNamespace = "", mode = WebParam.Mode.INOUT)
+ Holder<Order> myData);
+
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBare.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBare.java
new file mode 100644
index 0000000000..ca05c28627
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBare.java
@@ -0,0 +1,45 @@
+/*
+ * 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.example.orderservice;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.Holder;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@WebService
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public interface OrderServiceBare {
+
+ public Order bareReviewOrder(Order order);
+
+ public void bareReviewOrderInOutHolder(
+ @WebParam(mode = WebParam.Mode.INOUT)
+ Holder<Order> myData);
+
+ @WebMethod(action = "bareReviewOrderOutHolder")
+ public void bareReviewOrderOutHolder(
+ @WebParam(mode = WebParam.Mode.OUT)
+ Holder<Order> myData);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareForwardImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareForwardImpl.java
new file mode 100644
index 0000000000..31af9e19f9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareForwardImpl.java
@@ -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.example.orderservice;
+
+import javax.xml.ws.Holder;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(OrderServiceBare.class)
+public class OrderServiceBareForwardImpl implements OrderServiceBare {
+
+ @Reference
+ public OrderServiceBare ref;
+
+ @Override
+ public Order bareReviewOrder(Order myData) {
+ Order retVal = ref.bareReviewOrder(myData);
+ return retVal;
+ }
+
+ @Override
+ public void bareReviewOrderInOutHolder(Holder<Order> myData) {
+ ref.bareReviewOrderInOutHolder(myData);
+ }
+
+ @Override
+ public void bareReviewOrderOutHolder(Holder<Order> myData) {
+ ref.bareReviewOrderOutHolder(myData);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareImpl.java
new file mode 100644
index 0000000000..05b8538c2a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceBareImpl.java
@@ -0,0 +1,75 @@
+/*
+ * 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.example.orderservice;
+
+// import org.osoa.sca.annotations.Service;
+import java.util.Random;
+
+import javax.jws.WebParam;
+import javax.xml.ws.Holder;
+
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements the OrderService service.
+ */
+@Service(OrderServiceBare.class)
+public class OrderServiceBareImpl implements OrderServiceBare {
+
+ @Override
+ public Order bareReviewOrder(Order order) {
+ double total = order.getTotal();
+ Order retVal = new Order();
+ if ( total < 100.0 ) {
+ retVal.setStatus( Status.APPROVED );
+ } else if ( total > 1100.0 ) {
+ retVal.setStatus( Status.REJECTED );
+ }
+ return retVal;
+ }
+
+ @Override
+ public void bareReviewOrderInOutHolder(Holder<Order> myData) {
+ String customerId = "cust1234";
+ double total = myData.value.getTotal();
+ Order newOrder = new Order();
+
+ if ( total < 100.0 ) {
+ newOrder.setStatus( Status.APPROVED );
+ } else if ( total > 1100.0 ) {
+ newOrder.setStatus( Status.REJECTED );
+ }
+ newOrder.setCustomerId(customerId);
+ myData.value = newOrder;
+ }
+
+ @Override
+ public void bareReviewOrderOutHolder(Holder<Order> myData) {
+ boolean holderEmpty = (myData.value == null ? true : false);
+ Order newOrder = new Order();
+
+ if (holderEmpty) {
+ newOrder.setStatus( Status.APPROVED );
+ newOrder.setCustomerId("approved.1234");
+ } else {
+ newOrder.setStatus( Status.REJECTED );
+ }
+ myData.value = newOrder;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceForwardImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceForwardImpl.java
new file mode 100644
index 0000000000..d14269fde2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceForwardImpl.java
@@ -0,0 +1,70 @@
+/*
+ * 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.example.orderservice;
+
+import javax.xml.ws.Holder;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(OrderService.class)
+public class OrderServiceForwardImpl implements OrderService {
+
+ @Reference
+ public OrderService ref;
+
+ public String[] reviewOrder(Holder<Order> myData, Holder<Float> myOutParam) {
+ String[] retVal = ref.reviewOrder(myData, myOutParam);
+ return retVal;
+ }
+
+ @Override
+ public String[] reviewOrderTwoInOuts(Holder<Order> myData,
+ Holder<Float> myOutParam) {
+ String[] retVal = ref.reviewOrderTwoInOuts(myData, myOutParam);
+ return retVal;
+ }
+
+ @Override
+ public String[] reviewOrderTwoOutHolders(Holder<Order> myData,
+ Holder<Float> myOutParam) {
+ String[] retVal = ref.reviewOrderTwoOutHolders(myData, myOutParam);
+ return retVal;
+ }
+
+ @Override
+ public String[] reviewOrderTwoInOutsThenIn(Holder<Order> myData,
+ Holder<Float> myOutParam, Integer myCode) {
+ String[] retVal = ref.reviewOrderTwoInOutsThenIn(myData, myOutParam, myCode);
+ return retVal;
+ }
+
+ @Override
+ public void reviewOrderTwoInOutsVoid(Holder<Order> myData, Holder<Float> myOutParam) {
+ ref.reviewOrderTwoInOutsVoid(myData, myOutParam);
+ }
+
+ @Override
+ public String[] reviewOrderOutThenInOut(Holder<Float> myOutParam, Holder<Order> myData) {
+ String[] retVal = ref.reviewOrderOutThenInOut(myOutParam, myData);
+ return retVal;
+ }
+
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceImpl.java
new file mode 100644
index 0000000000..8ec9a94248
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/OrderServiceImpl.java
@@ -0,0 +1,165 @@
+/*
+ * 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.example.orderservice;
+
+// import org.osoa.sca.annotations.Service;
+import java.util.Random;
+
+import javax.jws.WebParam;
+import javax.xml.ws.Holder;
+
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements the OrderService service.
+ */
+@Service(OrderService.class)
+public class OrderServiceImpl implements OrderService {
+
+ /** This dummy implementation approves or rejects orders:
+ * < 100 - always approved.
+ * 100-1100 - randomly approved. Probability = (1100 - amount)/10
+ * >1100 - always rejected.
+ */
+ // public Order reviewOrder(Order order) {
+ // @WebMethod(action = "http://www.example.org/OrderService/reviewOrder")
+ // @RequestWrapper(localName = "reviewOrder", targetNamespace = "http://www.example.org/OrderService/", className = "org.example.orderservice.ReviewOrder")
+ // @ResponseWrapper(localName = "reviewOrderResponse", targetNamespace = "http://www.example.org/OrderService/", className = "org.example.orderservice.ReviewOrderResponse")
+ public String[] reviewOrder(
+ @WebParam(name = "myData", targetNamespace = "", mode = WebParam.Mode.INOUT)
+ Holder<Order> myData,
+ @WebParam(name="myOutParam", targetNamespace = "", mode = WebParam.Mode.OUT)
+ Holder<Float> myOutParam) {
+ String[] returnVal = {"retval1", "retval2"};
+ Order order = myData.value;
+ double total = order.getTotal();
+ if ( total < 100.0 ) {
+ order.setStatus( Status.APPROVED );
+ } else if ( total > 1100.0 ) {
+ order.setStatus( Status.REJECTED );
+ } else {
+ int probability = (int) ((-100.0 + total) / 10.0);
+ Random approver = new Random();
+ if ( approver.nextInt( 100 ) < probability )
+ order.setStatus( Status.APPROVED );
+ else
+ order.setStatus( Status.REJECTED );
+ }
+ System.out.println( ">>> OrderService.reviewOrder return=" + order );
+
+ if ( myOutParam.value == null ) {
+ myOutParam.value = new Float("97");
+ } else {
+ myOutParam.value = new Float("-1000");
+ }
+ return returnVal;
+ }
+
+ @Override
+ public String[] reviewOrderTwoInOuts(Holder<Order> myData,
+ Holder<Float> myOutParam) {
+ String[] returnVal = {"retval1", "retval2"};
+ Order order = myData.value;
+ double total = order.getTotal();
+ if ( total < 100.0 ) {
+ order.setStatus( Status.APPROVED );
+ } else if ( total > 1100.0 ) {
+ order.setStatus( Status.REJECTED );
+ } else {
+ int probability = (int) ((-100.0 + total) / 10.0);
+ Random approver = new Random();
+ if ( approver.nextInt( 100 ) < probability )
+ order.setStatus( Status.APPROVED );
+ else
+ order.setStatus( Status.REJECTED );
+ }
+ System.out.println( ">>> OrderService.reviewOrder return=" + order );
+
+ // Since this is an INOUT, expect "111" to signify test pass
+ if ( myOutParam.value.equals(new Float("111"))) {
+ myOutParam.value = new Float("97");
+ } else {
+ myOutParam.value = new Float("-1000");
+ }
+ return returnVal;
+ }
+
+ @Override
+ public String[] reviewOrderTwoOutHolders(Holder<Order> myData,
+ Holder<Float> myOutParam) {
+ String[] returnVal = {"retval1", "retval2"};
+ if (myData.value == null) {
+ myData.value = new Order();
+ myData.value.setStatus(Status.REJECTED);
+ } else {
+ // Do nothing so test logic will fail
+ }
+
+ // Use test logic to check it's truly treated as an OUT parm
+ if ( myOutParam.value == null ) {
+ myOutParam.value = new Float("97");
+ } else {
+ myOutParam.value = new Float("-1000");
+ }
+ return returnVal;
+ }
+
+ @Override
+ public String[] reviewOrderTwoInOutsThenIn(Holder<Order> myData,
+ Holder<Float> myOutParam,
+ Integer myCode) {
+ String[] returnVal = {"retval1", "retval2"};
+ Order order = myData.value;
+ double total = order.getTotal();
+ if ( total < 50.1 && myCode.equals(new Integer("23")) ) {
+ order.setStatus( Status.APPROVED );
+ } else {
+ order.setStatus( Status.REJECTED);
+ }
+
+ // Use test logic to check it's truly treated as an INOUT parm
+ if ( myOutParam.value != null ) {
+ myOutParam.value = new Float("97");
+ } else {
+ myOutParam.value = new Float("-1000");
+ }
+ return returnVal;
+ }
+
+ @Override
+ public void reviewOrderTwoInOutsVoid(Holder<Order> myData, Holder<Float> myOutParam) {
+ double total = myData.value.getTotal();
+ Order retOrder = new Order();
+ if (total < 50.1 && myOutParam.value < 50) {
+ myOutParam.value = new Float("1");
+ retOrder.setStatus(Status.APPROVED);
+ } else {
+ myOutParam.value = new Float("-1");
+ retOrder.setStatus(Status.REJECTED);
+ }
+ myData.value = retOrder;
+ }
+
+ @Override
+ // Simply delegate to existing test method with parms reversed.
+ public String[] reviewOrderOutThenInOut(Holder<Float> myOutParam, Holder<Order> myData) {
+ String[] retVal = reviewOrder(myData, myOutParam);
+ return retVal;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/Status.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/Status.java
new file mode 100644
index 0000000000..83b198ab35
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/java/org/example/orderservice/Status.java
@@ -0,0 +1,75 @@
+/*
+ * 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.example.orderservice;
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlEnumValue;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for status.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p>
+ * <pre>
+ * &lt;simpleType name="status">
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ * &lt;enumeration value="Created"/>
+ * &lt;enumeration value="Submitted"/>
+ * &lt;enumeration value="Approved"/>
+ * &lt;enumeration value="Rejected"/>
+ * &lt;/restriction>
+ * &lt;/simpleType>
+ * </pre>
+ *
+ */
+@XmlType(name = "status")
+@XmlEnum
+public enum Status {
+
+ @XmlEnumValue("Created")
+ CREATED("Created"),
+ @XmlEnumValue("Submitted")
+ SUBMITTED("Submitted"),
+ @XmlEnumValue("Approved")
+ APPROVED("Approved"),
+ @XmlEnumValue("Rejected")
+ REJECTED("Rejected");
+ private final String value;
+
+ Status(String v) {
+ value = v;
+ }
+
+ public String value() {
+ return value;
+ }
+
+ public static Status fromValue(String v) {
+ for (Status c: Status.values()) {
+ if (c.value.equals(v)) {
+ return c;
+ }
+ }
+ throw new IllegalArgumentException(v);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.bare.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.bare.composite
new file mode 100644
index 0000000000..8a563666c8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.bare.composite
@@ -0,0 +1,46 @@
+<?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"
+ targetNamespace="http://orderservice"
+ xmlns:hw="http://orderservice"
+ name="orderws.bare">
+
+ <component name="OrderServiceBareComponent">
+ <implementation.java class="org.example.orderservice.OrderServiceBareImpl" />
+ <service name="OrderServiceBare">
+ <interface.java interface="org.example.orderservice.OrderServiceBare"/>
+<!-- TODO - start mailing list discussion about implications of @SOAPBinding plus binding.sca not being supported in OASIS.
+ <binding.sca name="sca"/>
+ -->
+ <binding.ws/>
+ </service>
+ </component>
+
+ <component name="OrderServiceBareForwardComponent">
+ <implementation.java class="org.example.orderservice.OrderServiceBareForwardImpl" />
+ <reference name="ref">
+ <binding.ws uri="http://localhost:8080/OrderServiceBareComponent/OrderServiceBare"/>
+ </reference>
+ <service name="OrderServiceBare">
+ <binding.ws/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.composite
new file mode 100644
index 0000000000..9d7d052472
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/main/resources/ordersca.composite
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://orderservice"
+ xmlns:hw="http://orderservice"
+ name="orderws">
+
+ <component name="OrderServiceComponent">
+ <implementation.java class="org.example.orderservice.OrderServiceImpl" />
+ <service name="OrderService">
+ <interface.java interface="org.example.orderservice.OrderService"/>
+ <binding.sca name="sca"/>
+ <binding.ws/>
+ </service>
+ </component>
+
+ <component name="OrderServiceForwardComponent">
+ <implementation.java class="org.example.orderservice.OrderServiceForwardImpl" />
+ <reference name="ref">
+ <binding.ws uri="http://localhost:8080/OrderServiceComponent/OrderService"/>
+ </reference>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java
new file mode 100644
index 0000000000..5da7e870ed
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceBareTestCase.java
@@ -0,0 +1,206 @@
+/*
+ * 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.example.orderservice;
+
+import static junit.framework.Assert.assertNotNull;
+import static junit.framework.Assert.assertTrue;
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+
+import javax.xml.ws.Holder;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * Tests that the order server responds.
+ */
+
+public class OrderServiceBareTestCase {
+
+ private static Node node;
+
+ @BeforeClass
+ public static void startServer() throws Exception {
+ try {
+
+ NodeFactory factory = NodeFactory.newInstance();
+ String contribution = ContributionLocationHelper.getContributionLocation(OrderServiceBare.class);
+ node = factory.createNode("ordersca.bare.composite", new Contribution("order.bare", contribution)).start();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ @Test
+ public void testOrderReviewBareApprovedSCA() throws IOException {
+ OrderServiceBare orderServiceBare =
+ node.getService(OrderServiceBare.class, "OrderServiceBareComponent/OrderServiceBare");
+ assertNotNull(orderServiceBare);
+ testOrderReviewApproved(orderServiceBare);
+ }
+
+ @Test
+ public void testOrderReviewBareApprovedWS() throws IOException {
+ OrderServiceBare orderServiceBare =
+ node.getService(OrderServiceBare.class, "OrderServiceBareForwardComponent/OrderServiceBare");
+ assertNotNull(orderServiceBare);
+ testOrderReviewApproved(orderServiceBare);
+ }
+
+ @Test
+ public void testOrderReviewBareRejectedSCA() throws IOException {
+ OrderServiceBare orderServiceBare =
+ node.getService(OrderServiceBare.class, "OrderServiceBareComponent/OrderServiceBare");
+ assertNotNull(orderServiceBare);
+ testOrderReviewRejected(orderServiceBare);
+ }
+
+ @Test
+ public void testOrderReviewBareRejectedWS() throws IOException {
+ OrderServiceBare orderServiceBare =
+ node.getService(OrderServiceBare.class, "OrderServiceBareForwardComponent/OrderServiceBare");
+ assertNotNull(orderServiceBare);
+ testOrderReviewRejected(orderServiceBare);
+ }
+
+ @Test
+ public void testOrderReviewInOutBareApprovedSCA() throws IOException {
+ OrderServiceBare orderServiceBare =
+ node.getService(OrderServiceBare.class, "OrderServiceBareComponent/OrderServiceBare");
+ assertNotNull(orderServiceBare);
+ testOrderReviewApprovedInOutHolder(orderServiceBare);
+ }
+
+ @Test
+ public void testOrderReviewInOutBareApprovedWS() throws IOException {
+ OrderServiceBare orderServiceBare =
+ node.getService(OrderServiceBare.class, "OrderServiceBareForwardComponent/OrderServiceBare");
+ assertNotNull(orderServiceBare);
+ testOrderReviewApprovedInOutHolder(orderServiceBare);
+ }
+
+ @Test
+ public void testOrderReviewInOutBareRejectedSCA() throws IOException {
+ OrderServiceBare orderServiceBare =
+ node.getService(OrderServiceBare.class, "OrderServiceBareComponent/OrderServiceBare");
+ assertNotNull(orderServiceBare);
+ testOrderReviewRejectedInOutHolder(orderServiceBare);
+ }
+
+ @Test
+ public void testOrderReviewInOutBareRejectedWS() throws IOException {
+ OrderServiceBare orderServiceBare =
+ node.getService(OrderServiceBare.class, "OrderServiceBareForwardComponent/OrderServiceBare");
+ assertNotNull(orderServiceBare);
+ testOrderReviewRejectedInOutHolder(orderServiceBare);
+ }
+
+ @Test
+ public void testOrderReviewBareOutHolderSCA() throws IOException {
+ OrderServiceBare orderServiceBare =
+ node.getService(OrderServiceBare.class, "OrderServiceBareComponent/OrderServiceBare");
+ assertNotNull(orderServiceBare);
+ testOrderReviewOutHolder(orderServiceBare);
+ }
+
+ @Test
+ public void testOrderReviewBareOutHolderWS() throws IOException {
+ OrderServiceBare orderServiceBare =
+ node.getService(OrderServiceBare.class, "OrderServiceBareForwardComponent/OrderServiceBare");
+ assertNotNull(orderServiceBare);
+ testOrderReviewOutHolder(orderServiceBare);
+ }
+
+ private void testOrderReviewApproved(OrderServiceBare orderServiceBare) throws IOException {
+ Order order = new Order();
+ order.setStatus( Status.CREATED );
+ order.setCustomerId("cust1234");
+ order.setTotal( 50.0 );
+
+ Order returnValue = null;
+ returnValue = orderServiceBare.bareReviewOrder(order);
+ assertTrue( returnValue.getStatus() == Status.APPROVED );
+ }
+
+ private void testOrderReviewRejected(OrderServiceBare orderServiceBare) throws IOException {
+ Order order = new Order();
+ order.setStatus( Status.CREATED );
+ order.setCustomerId("cust1234");
+ order.setTotal( 50000.0 );
+
+ Order returnValue = null;
+ returnValue = orderServiceBare.bareReviewOrder(order);
+ assertTrue( returnValue.getStatus() == Status.REJECTED );
+ }
+
+ private void testOrderReviewApprovedInOutHolder(OrderServiceBare orderServiceBare) throws IOException {
+ String customerId = "cust1234";
+ Order order = new Order();
+ order.setStatus( Status.CREATED );
+ order.setCustomerId(customerId);
+ order.setTotal( 50.0 );
+
+ Holder<Order> holder = new Holder<Order>(order);
+ orderServiceBare.bareReviewOrderInOutHolder(holder);
+ assertTrue( holder.value.getStatus() == Status.APPROVED );
+ assertTrue( holder.value.getCustomerId().equals(customerId));
+ }
+
+ private void testOrderReviewRejectedInOutHolder(OrderServiceBare orderServiceBare) throws IOException {
+ String customerId = "cust1234";
+ Order order = new Order();
+ order.setStatus( Status.CREATED );
+ order.setCustomerId(customerId);
+ order.setTotal( 50000.0 );
+
+ Holder<Order> holder = new Holder<Order>(order);
+ orderServiceBare.bareReviewOrderInOutHolder(holder);
+ assertTrue( holder.value.getStatus() == Status.REJECTED );
+ assertTrue( holder.value.getCustomerId().equals(customerId));
+ }
+
+ private void testOrderReviewOutHolder(OrderServiceBare orderServiceBare) throws IOException {
+ Order order = new Order();
+ order.setStatus( Status.CREATED );
+ order.setCustomerId("cust1234");
+ order.setTotal( 50.0 );
+ Holder<Order> holder = new Holder<Order>(order);
+ orderServiceBare.bareReviewOrderOutHolder(holder);
+ assertTrue( holder.value.getStatus() == Status.APPROVED );
+ assertTrue( holder.value.getCustomerId().equals("approved.1234"));
+ }
+
+
+
+ @AfterClass
+ public static void stopServer() throws Exception {
+ if (node != null)
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java
new file mode 100644
index 0000000000..f762709a4c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/holder-ws-service-multiple-outputs/src/test/java/org/example/orderservice/OrderServiceTestCase.java
@@ -0,0 +1,395 @@
+/*
+ * 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.example.orderservice;
+
+import static junit.framework.Assert.assertNotNull;
+import static junit.framework.Assert.assertTrue;
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+
+import javax.xml.ws.Holder;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * Tests that the order server responds.
+ */
+public class OrderServiceTestCase {
+
+ private static Node node;
+
+ @BeforeClass
+ public static void startServer() throws Exception {
+ try {
+ NodeFactory factory = NodeFactory.newInstance();
+ String contribution = ContributionLocationHelper.getContributionLocation(OrderService.class);
+ node = factory.createNode("ordersca.composite", new Contribution("order", contribution)).start();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ @Test
+ public void testOrderReviewApprovedSCA() throws IOException {
+ OrderService orderService =
+ node.getService(OrderService.class, "OrderServiceComponent/OrderService");
+ assertNotNull(orderService);
+ Holder<Float> outParam = new Holder<Float>(new Float(57.4));
+ testOrderReviewApproved(orderService, outParam);
+ }
+
+ @Test
+ public void testOrderReviewApprovedWS() throws IOException {
+ OrderService orderService =
+ node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService");
+ assertNotNull(orderService);
+ Holder<Float> outParam = new Holder<Float>(new Float(57.4));
+ testOrderReviewApproved(orderService, outParam);
+ }
+
+ @Test
+ public void testOrderReviewRejectedSCA() throws IOException {
+ OrderService orderService =
+ node.getService(OrderService.class, "OrderServiceComponent/OrderService");
+ assertNotNull(orderService);
+ Holder<Float> outParam = new Holder<Float>(new Float(57.4));
+ testOrderReviewRejected(orderService, outParam);
+ }
+
+ @Test
+ public void testOrderReviewRejectedWS() throws IOException {
+ OrderService orderService =
+ node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService");
+ assertNotNull(orderService);
+ Holder<Float> outParam = new Holder<Float>(new Float(57.4));
+ testOrderReviewRejected(orderService, outParam);
+ }
+
+ @Test
+ public void testOrderReviewRandomSCA() throws IOException {
+ OrderService orderService =
+ node.getService(OrderService.class, "OrderServiceComponent/OrderService");
+ assertNotNull(orderService);
+ Holder<Float> outParam = new Holder<Float>(new Float(57.4));
+ testOrderReviewRandom(orderService, outParam);
+ }
+
+ @Test
+ public void testOrderReviewRandomWS() throws IOException {
+ OrderService orderService =
+ node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService");
+ assertNotNull(orderService);
+ Holder<Float> outParam = new Holder<Float>(new Float(57.4));
+ testOrderReviewRandom(orderService, outParam);
+ }
+
+
+
+ @Test
+ public void testOrderReviewApprovedTwoInOutsSCA() throws IOException {
+ OrderService orderService =
+ node.getService(OrderService.class, "OrderServiceComponent/OrderService");
+ assertNotNull(orderService);
+ Holder<Float> outParam = new Holder<Float>(new Float(111));
+ testOrderReviewApproved(orderService, outParam);
+ }
+
+ @Test
+ public void testOrderReviewApprovedTwoInOutsWS() throws IOException {
+ OrderService orderService =
+ node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService");
+ assertNotNull(orderService);
+ Holder<Float> outParam = new Holder<Float>(new Float(111));
+ testOrderReviewApproved(orderService, outParam);
+ }
+
+ @Test
+ public void testOrderReviewRejectedTwoInOutsSCA() throws IOException {
+ OrderService orderService =
+ node.getService(OrderService.class, "OrderServiceComponent/OrderService");
+ assertNotNull(orderService);
+ Holder<Float> outParam = new Holder<Float>(new Float(111));
+ testOrderReviewRejected(orderService, outParam);
+ }
+
+ @Test
+ public void testOrderReviewRejectedTwoInOutsWS() throws IOException {
+ OrderService orderService =
+ node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService");
+ assertNotNull(orderService);
+ Holder<Float> outParam = new Holder<Float>(new Float(111));
+ testOrderReviewRejected(orderService, outParam);
+ }
+
+ @Test
+ public void testOrderReviewRandomTwoInOutsSCA() throws IOException {
+ OrderService orderService =
+ node.getService(OrderService.class, "OrderServiceComponent/OrderService");
+ assertNotNull(orderService);
+ Holder<Float> outParam = new Holder<Float>(new Float(111));
+ testOrderReviewRandom(orderService, outParam);
+ }
+
+ @Test
+ public void testOrderReviewRandomTwoInOutsWS() throws IOException {
+ OrderService orderService =
+ node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService");
+ assertNotNull(orderService);
+ Holder<Float> outParam = new Holder<Float>(new Float(111));
+ testOrderReviewRandom(orderService, outParam);
+ }
+
+ @Test
+ public void testOrderReviewTwoOutHoldersSCA() throws IOException {
+ OrderService orderService =
+ node.getService(OrderService.class, "OrderServiceComponent/OrderService");
+ assertNotNull(orderService);
+ testOrderReviewTwoOutHolders(orderService);
+ }
+
+ @Test
+ public void testOrderReviewTwoOutHoldersWS() throws IOException {
+ OrderService orderService =
+ node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService");
+ assertNotNull(orderService);
+ testOrderReviewTwoOutHolders(orderService);
+ }
+
+ @Test
+ public void testOrderReviewTwoInOutsThenInSCA() throws IOException {
+ OrderService orderService =
+ node.getService(OrderService.class, "OrderServiceComponent/OrderService");
+ assertNotNull(orderService);
+ testOrderReviewOrderTwoInOutsThenIn(orderService);
+ }
+
+ @Test
+ public void testOrderReviewTwoInOutsThenInWS() throws IOException {
+ OrderService orderService =
+ node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService");
+ assertNotNull(orderService);
+ testOrderReviewOrderTwoInOutsThenIn(orderService);
+ }
+
+ @Test
+ public void testOrderReviewVoidApprovedSCA() throws IOException {
+ OrderService orderService =
+ node.getService(OrderService.class, "OrderServiceComponent/OrderService");
+ assertNotNull(orderService);
+ testOrderReviewVoidApproved(orderService);
+ }
+
+ @Test
+ public void testOrderReviewVoidApprovedWS() throws IOException {
+ OrderService orderService =
+ node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService");
+ assertNotNull(orderService);
+ testOrderReviewVoidApproved(orderService);
+ }
+
+ @Test
+ public void testOrderReviewVoidRejectedSCA() throws IOException {
+ OrderService orderService =
+ node.getService(OrderService.class, "OrderServiceComponent/OrderService");
+ assertNotNull(orderService);
+ testOrderReviewVoidRejected(orderService);
+ }
+
+ @Test
+ public void testOrderReviewVoidRejectedWS() throws IOException {
+ OrderService orderService =
+ node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService");
+ assertNotNull(orderService);
+ testOrderReviewVoidRejected(orderService);
+ }
+
+ @Test
+ public void testOrderReviewOutThenInOutApprovedWS() throws IOException {
+ OrderService orderService =
+ node.getService(OrderService.class, "OrderServiceForwardComponent/OrderService");
+ assertNotNull(orderService);
+ Order order = new Order();
+ order.setStatus( Status.CREATED );
+ order.setCustomerId("cust1234");
+ order.setTotal( 50.0 );
+ System.out.println( ">>> Order submitted=" + order );
+ Holder<Float> outParam = new Holder<Float>(new Float(57.4));
+ Holder<Order> holder = new Holder<Order>( order );
+ String[] returnValue = null;
+ returnValue = orderService.reviewOrderOutThenInOut(outParam, holder);
+ assertTrue( holder.value.getStatus() == Status.APPROVED );
+ assertEquals("retval1", returnValue[0]);
+ assertEquals("retval2", returnValue[1]);
+ assertTrue(outParam.value.floatValue() == 97);
+ }
+
+
+ private void testOrderReviewApproved(OrderService orderService, Holder<Float> outParam) throws IOException {
+ Order order = new Order();
+ order.setStatus( Status.CREATED );
+ order.setCustomerId("cust1234");
+ order.setTotal( 50.0 );
+
+ System.out.println( ">>> Order submitted=" + order );
+ Holder<Order> holder = new Holder<Order>( order );
+ String[] returnValue = null;
+ if (outParam.value.equals(new Float("111"))) {
+ returnValue = orderService.reviewOrderTwoInOuts( holder, outParam );
+ } else {
+ returnValue = orderService.reviewOrder( holder, outParam );
+ }
+ System.out.println( ">>> Order returned=" + holder.value );
+ assertTrue( holder.value.getStatus() == Status.APPROVED );
+ assertEquals("retval1", returnValue[0]);
+ assertEquals("retval2", returnValue[1]);
+ assertTrue(outParam.value.floatValue() == 97);
+ }
+
+ private void testOrderReviewRejected(OrderService orderService, Holder<Float> outParam) throws IOException {
+ Order order = new Order();
+ order.setStatus( Status.CREATED );
+ order.setCustomerId("cust2345");
+ order.setTotal( 50000.0 );
+
+ System.out.println( ">>> Order submitted=" + order );
+ Holder<Order> holder = new Holder<Order>( order );
+ String[] returnValue = null;
+ if (outParam.value.equals(new Float("111"))) {
+ returnValue = orderService.reviewOrderTwoInOuts( holder, outParam );
+ } else {
+ returnValue = orderService.reviewOrder( holder, outParam );
+ }
+ System.out.println( ">>> Order returned=" + holder.value );
+ System.out.println( ">>> return values: " + returnValue[0] + " " + returnValue[1]);
+ assertTrue( holder.value.getStatus() == Status.REJECTED );
+ assertEquals("retval1", returnValue[0]);
+ assertEquals("retval2", returnValue[1]);
+ assertTrue(outParam.value.floatValue() == 97);
+ }
+
+ private void testOrderReviewRandom(OrderService orderService, Holder<Float> outParam) throws IOException {
+ Order order = new Order();
+ order.setStatus( Status.CREATED );
+ order.setCustomerId("cust3456");
+ order.setTotal( 600.0 );
+
+ System.out.println( ">>> Order submitted=" + order );
+ Holder<Order> holder = new Holder<Order>( order );
+ String[] returnValue = null;
+ if (outParam.value.equals(new Float("111"))) {
+ returnValue = orderService.reviewOrderTwoInOuts( holder, outParam );
+ } else {
+ returnValue = orderService.reviewOrder( holder, outParam );
+ }
+ System.out.println( ">>> Order returned=" + holder.value );
+ assertTrue( holder.value.getStatus() != Status.CREATED );
+ assertEquals("retval1", returnValue[0]);
+ assertEquals("retval2", returnValue[1]);
+ assertTrue(outParam.value.floatValue() == 97);
+ }
+
+ private void testOrderReviewTwoOutHolders(OrderService orderService) throws IOException {
+ Order order = new Order();
+ order.setStatus( Status.CREATED );
+ order.setCustomerId("cust3456");
+ order.setTotal( 600.0 );
+
+ System.out.println( ">>> Order submitted=" + order );
+ Holder<Order> holder = new Holder<Order>( order );
+ Holder<Float> outParam = new Holder<Float>(new Float(57.4));
+ String[] returnValue = orderService.reviewOrderTwoOutHolders( holder, outParam );
+ System.out.println( ">>> Order returned=" + holder.value );
+ assertTrue( holder.value.getStatus() == Status.REJECTED );
+ assertEquals("retval1", returnValue[0]);
+ assertEquals("retval2", returnValue[1]);
+ assertTrue(outParam.value.floatValue() == 97);
+ }
+
+ private void testOrderReviewOrderTwoInOutsThenIn(OrderService orderService) throws IOException {
+ Order order = new Order();
+ order.setStatus( Status.CREATED );
+ order.setCustomerId("cust1234");
+ order.setTotal( 50.0 );
+
+ System.out.println( ">>> Order submitted=" + order );
+ Holder<Order> holder = new Holder<Order>( order );
+ Holder<Float> outParam = new Holder<Float>( new Float("1820.234"));
+ String[] returnValue = null;
+ Integer checkForMe = new Integer("23");
+ returnValue = orderService.reviewOrderTwoInOutsThenIn( holder, outParam, checkForMe);
+ System.out.println( ">>> Order returned=" + holder.value );
+ assertTrue( holder.value.getStatus() == Status.APPROVED );
+ assertEquals("retval1", returnValue[0]);
+ assertEquals("retval2", returnValue[1]);
+ assertTrue(outParam.value.floatValue() == 97);
+ }
+
+ private void testOrderReviewVoidApproved(OrderService orderService) throws IOException {
+ Order order = new Order();
+ order.setStatus( Status.CREATED );
+ order.setCustomerId("cust1234");
+ order.setTotal( 50.0 );
+
+ System.out.println( ">>> Order submitted=" + order );
+ Holder<Order> holder = new Holder<Order>(order);
+
+ Float parm2 = new Float("45");
+ Holder<Float> outParam = new Holder<Float>(parm2);
+
+ orderService.reviewOrderTwoInOutsVoid(holder, outParam );
+
+ assertTrue( holder.value.getStatus() == Status.APPROVED );
+ assertEquals(outParam.value, new Float("1"));
+ }
+
+ private void testOrderReviewVoidRejected(OrderService orderService) throws IOException {
+ Order order = new Order();
+ order.setStatus( Status.CREATED );
+ order.setCustomerId("cust2345");
+ order.setTotal( 50000.0 );
+
+ System.out.println( ">>> Order submitted=" + order );
+ Holder<Order> holder = new Holder<Order>(order);
+
+ Float parm2 = new Float("76");
+ Holder<Float> outParam = new Holder<Float>(parm2);
+
+ orderService.reviewOrderTwoInOutsVoid(holder, outParam );
+
+ assertTrue( holder.value.getStatus() == Status.REJECTED );
+ assertEquals(outParam.value, new Float("-1"));
+ }
+
+
+ @AfterClass
+ public static void stopServer() throws Exception {
+ if (node != null)
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/README b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/README
new file mode 100644
index 0000000000..41dcb8680b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/README
@@ -0,0 +1,68 @@
+The module tests web service communications running over HTTPS. HTTPS is configured
+in this embedded test environment by adding the confidentiality intent to both
+reference and service and by configuring reference and service side policy sets
+to configure the web service binding appropriately to enable SSL.
+
+When running the web service binding in a container that itself is configured
+to provide SSL support these policy sets are not required. TODO can they themselves
+detect that they are not required.
+
+The SSL configuration depends on public/private key pairs and a keystore. This is how
+they are organized and generated
+
+
+Generate Private/Public keys into a keystore for use at the server
+------------------------------------------------------------------
+
+keytool -genkey -keyalg RSA -sigalg MD5withRSA -keysize 1024 -alias TuscanyUser -dname "CN=Tuscany Service, OU=Tuscany, O=Apache, L=Hursley, S=Hampshire, C=UK" -storetype JKS -keystore tuscany.jks -validity 9999 -keypass tuscany -storepass tuscany
+
+View the contents of the key store that result
+----------------------------------------------
+
+keytool -list -v -keystore tuscany.jks -storepass tuscany
+
+Keystore type: JKS
+Keystore provider: SUN
+
+Your keystore contains 1 entry
+
+Alias name: tuscanyuser
+Creation date: 26-Feb-2010
+Entry type: PrivateKeyEntry
+Certificate chain length: 1
+Certificate[1]:
+Owner: CN=Tuscany Service, OU=Tuscany, O=Apache, L=Hursley, ST=Hampshire, C=UK
+Issuer: CN=Tuscany Service, OU=Tuscany, O=Apache, L=Hursley, ST=Hampshire, C=UK
+Serial number: 4b87b4d7
+Valid from: Fri Feb 26 11:47:35 GMT 2010 until: Mon Jul 13 12:47:35 BST 2037
+Certificate fingerprints:
+ MD5: C3:0C:D6:DF:F6:27:26:47:AD:41:44:CA:D7:98:FA:41
+ SHA1: 2E:82:AD:F6:54:E0:C6:A5:47:5C:8C:9F:3B:5A:65:8E:F9:5A:40:07
+ Signature algorithm name: MD5withRSA
+ Version: 3
+
+
+IN THIS EMBEDDED TEST THE FOLLOWING ARE NOT REQUIRED AS BOTH REFERENCE AND SERVICES
+ARE RUNNING IN THE SAME JVM AND HAVE ACCESS TO THE SERVICE SIDE KEY STORE
+
+Generate the client side certificate
+------------------------------------
+
+keytool -export -alias TuscanyUser -file tuscany.cer -keystore tuscany.jks -storepass tuscany
+
+Print the contents of the generated certificate file
+----------------------------------------------------
+
+keytool -printcert -v -file tuscany.cer
+
+Owner: CN=Tuscany Service, OU=Tuscany, O=Apache, L=Hursley, ST=Hampshire, C=UK
+Issuer: CN=Tuscany Service, OU=Tuscany, O=Apache, L=Hursley, ST=Hampshire, C=UK
+Serial number: 4b87b4d7
+Valid from: Fri Feb 26 11:47:35 GMT 2010 until: Mon Jul 13 12:47:35 BST 2037
+Certificate fingerprints:
+ MD5: C3:0C:D6:DF:F6:27:26:47:AD:41:44:CA:D7:98:FA:41
+ SHA1: 2E:82:AD:F6:54:E0:C6:A5:47:5C:8C:9F:3B:5A:65:8E:F9:5A:40:07
+ Signature algorithm name: MD5withRSA
+ Version: 3
+
+ \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/pom.xml
new file mode 100644
index 0000000000..9ccb63691f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/pom.xml
@@ -0,0 +1,58 @@
+<?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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-ws-http-ssl</artifactId>
+ <name>Apache Tuscany SCA iTest WS HTTP SSL</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.19</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorld.java
new file mode 100644
index 0000000000..98eb6e361b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorld.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorld {
+
+ String getGreetings(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldClient.java
new file mode 100644
index 0000000000..2c6c4fc92c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldClient.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClient implements HelloWorld {
+
+ @Reference
+ public HelloWorld helloWorldWS;
+
+ public String getGreetings(String s) {
+ String response = helloWorldWS.getGreetings(s);
+ System.out.println("At client: " + response);
+ return response;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..3662007984
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldService.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.helloworld;
+
+public class HelloWorldService implements HelloWorld {
+
+ public String getGreetings(String s) {
+ String response = "Hello " + s;
+ System.out.println("At service: " + response);
+ return response;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..7e71dd465f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/resources/META-INF/sca-contribution.xml
@@ -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
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions
new file mode 100644
index 0000000000..04fe620be4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions
@@ -0,0 +1,17 @@
+# 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.
+org/apache/tuscany/sca/binding/ws/axis2/helloworld/definitions.xml \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/definitions.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/definitions.xml
new file mode 100644
index 0000000000..d7251590ba
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/definitions.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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 xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://www.tuscany.apache.org/itests/binding/ws/axis2"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:itest="http://www.tuscany.apache.org/itests/binding/ws/axis2" >
+
+ <sca:policySet name="HTTPSPolicySet"
+ provides="confidentiality.transport"
+ appliesTo="//sca:reference | //sca:binding.ws">
+ <tuscany:https>
+ <tuscany:keyStore type="JKS" file="target/classes/org/apache/tuscany/sca/binding/ws/axis2/helloworld/tuscany.jks" password="tuscany"/>
+ <tuscany:trustStore type="JKS" file="target/classes/org/apache/tuscany/sca/binding/ws/axis2/helloworld/tuscany.jks" password="tuscany"/>
+ </tuscany:https>
+ </sca:policySet>
+
+</definitions> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.composite
new file mode 100644
index 0000000000..aa21221b30
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.composite
@@ -0,0 +1,59 @@
+<?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"
+ xmlns:itest="http://www.tuscany.apache.org/itests/binding/ws/axis2"
+ targetNamespace="http://www.tuscany.apache.org/itests/binding/ws/axis2"
+ name="HelloWorld"
+ policySets="itest:HTTPSPolicySet">
+
+ <component name="HelloWorldClient">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorldClient"/>
+ <reference name="helloWorldWS" requires="confidentiality">
+ <binding.ws uri="https://localhost:8443/HelloWorldService/HelloWorld" />
+ </reference>
+ </component>
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorldService"/>
+ <service name="HelloWorld" requires="confidentiality">
+ <binding.ws uri="https://0.0.0.0:8443/HelloWorldService/HelloWorld" />
+ </service>
+ </component>
+
+ <component name="HelloWorldClient2">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorldClient"/>
+ <reference name="helloWorldWS" requires="confidentiality">
+ <binding.ws uri="https://localhost:8443/HelloWorldService2/HelloWorld" />
+ </reference>
+ </component>
+
+ <component name="HelloWorldService2">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorldService"/>
+ <service name="HelloWorld" requires="confidentiality">
+ <binding.ws/>
+ </service>
+ </component>
+
+ <component name="HelloWorldClient3">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorldClient"/>
+ <reference name="helloWorldWS" target="HelloWorldService2"/>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.wsdl
new file mode 100644
index 0000000000..a352696b8e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.wsdl
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld"
+ xmlns:tns="http://helloworld"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ </wsdl:binding>
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort1">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService1"/>
+ </wsdl:port>
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort2">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService2"/>
+ </wsdl:port>
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort3">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService3"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/tuscany.jks b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/tuscany.jks
new file mode 100644
index 0000000000..d67bccdf8b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/tuscany.jks
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/HTTPSTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/HTTPSTestCase.java
new file mode 100644
index 0000000000..d58f761b79
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/http-ssl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/HTTPSTestCase.java
@@ -0,0 +1,59 @@
+/*
+ * 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.axis2;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorld;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.Ignore;
+
+@Ignore("TUSCANY-3632")
+public class HTTPSTestCase extends TestCase {
+
+ private Node node;
+ private HelloWorld helloWorld;
+ private HelloWorld helloWorld2;
+ private HelloWorld helloWorld3;
+
+ @Override
+ protected void setUp() throws Exception {
+ node = NodeFactory.newInstance().createNode(new Contribution("test", "target/classes"));
+ node.start();
+ helloWorld = node.getService(HelloWorld.class, "HelloWorldClient");
+ helloWorld2 = node.getService(HelloWorld.class, "HelloWorldClient2");
+ helloWorld3 = node.getService(HelloWorld.class, "HelloWorldClient3");
+ }
+
+ public void testCalculator() throws Exception {
+ assertEquals("Hello petra", helloWorld.getGreetings("petra"));
+ assertEquals("Hello petra", helloWorld2.getGreetings("petra"));
+ // TODO - check policy matching for unconfigure reference
+ //assertEquals("Hello petra", helloWorld3.getGreetings("petra"));
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/pom.xml
new file mode 100644
index 0000000000..dde15a5c61
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/pom.xml
@@ -0,0 +1,72 @@
+<?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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-ws-launcher-axis2</artifactId>
+ <name>Apache Tuscany SCA iTest WS Launcher Axis2</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.19</version>
+ </dependency>
+
+ <!-- Test resources -->
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-ws-external-client</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-ws-external-service</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+
+ </build>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackForwardSpecTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackForwardSpecTestCase.java
new file mode 100644
index 0000000000..aaf9504116
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackForwardSpecTestCase.java
@@ -0,0 +1,114 @@
+/*
+ * 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 CallbackForwardSpecTestCase {
+
+ 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("java-first", "../contribution-callback-forwardspec/target/itest-ws-contribution-callback-forwardspec.jar"));
+ node.start();
+
+ // start the external client
+ try {
+ externalClient = new HelloWorldClientLauncher();
+ externalClient.createClient();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ throw ex;
+ }
+ }
+
+ @Test
+ @Ignore
+ public void testWait() throws Exception {
+ System.out.println("Press a key");
+ System.in.read();
+ }
+
+ // Test may be causing build hang problems: temporarily ignore
+ // see dev list 16th July '10
+ @Test
+ @Ignore
+ 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();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackFullSpecTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackFullSpecTestCase.java
new file mode 100644
index 0000000000..d5cfbb9c0e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackFullSpecTestCase.java
@@ -0,0 +1,133 @@
+/*
+ * 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 org.apache.tuscany.sca.assembly.Binding;
+import org.apache.tuscany.sca.assembly.Component;
+import org.apache.tuscany.sca.assembly.EndpointReference;
+import org.apache.tuscany.sca.assembly.Reference;
+import org.apache.tuscany.sca.assembly.Service;
+import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
+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.impl.NodeImpl;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.policy.PolicySubject;
+import org.apache.tuscany.sca.runtime.RuntimeComponentService;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+
+public class CallbackFullSpecTestCase {
+
+ 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("java-first", "../contribution-callback-fullspec/target/itest-ws-contribution-callback-fullspec.jar"));
+ node.start();
+
+ // start the external client
+ try {
+ externalClient = new HelloWorldClientLauncher();
+ externalClient.createClient();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ throw ex;
+ }
+ }
+
+ @Test
+ @Ignore
+ 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"));
+ 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());
+ }
+
+ @Test
+ public void testCallbackBindingConfig() throws Exception {
+ Component helloWorldCallbackServiceComponent = ((NodeImpl)node).getDomainComposite().getComponent("HelloWorldCallbackService");
+ Service helloWorldService = helloWorldCallbackServiceComponent.getService("HelloWorldCallbackService");
+ Reference callbackReference = ((RuntimeComponentService)helloWorldService).getCallbackReference();
+ for (EndpointReference epr : callbackReference.getEndpointReferences()){
+ Binding callbackBinding = epr.getBinding();
+ assertEquals(WebServiceBinding.TYPE, callbackBinding.getType());
+ assertEquals(1, ((PolicySubject)callbackBinding).getPolicySets().size());
+ }
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ externalClient.destroyClient();
+ externalService.destoryService();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackPromotionTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackPromotionTestCase.java
new file mode 100644
index 0000000000..8c26e5c54a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackPromotionTestCase.java
@@ -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 CallbackPromotionTestCase {
+
+ 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("java-first", "../contribution-callback-promotion/target/itest-ws-contribution-callback-promotion.jar"));
+ node.start();
+
+ // start the external client
+ try {
+ externalClient = new HelloWorldClientLauncher();
+ externalClient.createClient();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ throw ex;
+ }
+ }
+
+ @Test
+ @Ignore
+ 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();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackTestCase.java
new file mode 100644
index 0000000000..3bd65d549a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackTestCase.java
@@ -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 CallbackTestCase {
+
+ 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("java-first", "../contribution-callback/target/itest-ws-contribution-callback.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();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackWSDLIfaceTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackWSDLIfaceTestCase.java
new file mode 100644
index 0000000000..c8adcdd7ac
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/CallbackWSDLIfaceTestCase.java
@@ -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();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/DocLitTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/DocLitTestCase.java
new file mode 100644
index 0000000000..a7fb6d6125
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/DocLitTestCase.java
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.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 DocLitTestCase {
+
+ 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("doc-lit", "../contribution-doc-lit/target/itest-ws-contribution-doc-lit.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 testGetGreetingsException() throws Exception {
+ try {
+ externalClient.getGreetingsException("Fred");
+ } catch (Exception ex) {
+ return;
+ }
+
+ fail("expecting exception");
+ }
+
+ @Test
+ @Ignore("TUSCANY-3621")
+ 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();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/DocLitWrappedDOMTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/DocLitWrappedDOMTestCase.java
new file mode 100644
index 0000000000..8febc2e988
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/DocLitWrappedDOMTestCase.java
@@ -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.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.Test;
+
+public class DocLitWrappedDOMTestCase {
+
+ 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("doc-lit-wrapped", "../contribution-doc-lit-wrapped-dom/target/itest-ws-contribution-doc-lit-wrapped-dom.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 testGetGreetingsDOM() throws Exception {
+ assertEquals("Hello Fred", externalClient.getGreetings("Fred"));
+ }
+
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ externalClient.destroyClient();
+ externalService.destoryService();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/DocLitWrappedTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/DocLitWrappedTestCase.java
new file mode 100644
index 0000000000..95e61ccc1b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/DocLitWrappedTestCase.java
@@ -0,0 +1,122 @@
+/*
+ * 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.Test;
+
+public class DocLitWrappedTestCase {
+
+ 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("doc-lit-wrapped", "../contribution-doc-lit-wrapped/target/itest-ws-contribution-doc-lit-wrapped.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 testGetGreetingsException() throws Exception {
+ try {
+ externalClient.getGreetingsException("Fred");
+ } catch (Exception ex) {
+ return;
+ }
+
+ fail("expecting exception");
+ }
+
+ @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();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/JavaFirstTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/JavaFirstTestCase.java
new file mode 100644
index 0000000000..77418f331f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/JavaFirstTestCase.java
@@ -0,0 +1,123 @@
+/*
+ * 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 JavaFirstTestCase {
+
+ 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("java-first", "../contribution-java-first/target/itest-ws-contribution-java-first.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 testGetGreetingsException() throws Exception {
+ try {
+ externalClient.getGreetingsException("Fred");
+ } catch (Exception ex) {
+ return;
+ }
+
+ fail("expecting exception");
+ }
+
+ @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();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/ReferenceTargetTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/ReferenceTargetTestCase.java
new file mode 100644
index 0000000000..98b7741ab6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/ReferenceTargetTestCase.java
@@ -0,0 +1,130 @@
+/*
+ * 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 junit.framework.TestCase;
+
+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 ReferenceTargetTestCase extends TestCase {
+
+ 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("reference-target", "../contribution-reference-target/target/itest-ws-contribution-reference-target.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
+ @Ignore
+ public void testGetGreetingsException() throws Exception {
+ try {
+ externalClient.getGreetingsException("Fred");
+ } catch (Exception ex) {
+ return;
+ }
+
+ fail("expecting exception");
+ }
+
+ @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());
+ }
+
+ @Test
+ public void testGetGreetingsCaps() throws Exception {
+ assertEquals("Hello Fred", externalClient.getGreetingsCaps("Fred"));
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ externalClient.destroyClient();
+ externalService.destoryService();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/RpcLitTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/RpcLitTestCase.java
new file mode 100644
index 0000000000..9f74dd47b8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/RpcLitTestCase.java
@@ -0,0 +1,122 @@
+/*
+ * 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.Test;
+
+public class RpcLitTestCase {
+
+ 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("rpc-lit", "../contribution-rpc-lit/target/itest-ws-contribution-rpc-lit.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 testGetGreetingsException() throws Exception {
+ try {
+ externalClient.getGreetingsException("Fred");
+ } catch (Exception ex) {
+ return;
+ }
+
+ fail("expecting exception");
+ }
+
+ @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();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/WSDLFirstTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/WSDLFirstTestCase.java
new file mode 100644
index 0000000000..7ed4829d85
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/axis2/WSDLFirstTestCase.java
@@ -0,0 +1,130 @@
+/*
+ * 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 junit.framework.TestCase;
+
+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 WSDLFirstTestCase extends TestCase {
+
+ 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-first", "../contribution-wsdl-first/target/itest-ws-contribution-wsdl-first.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
+ @Ignore
+ public void testGetGreetingsException() throws Exception {
+ try {
+ externalClient.getGreetingsException("Fred");
+ } catch (Exception ex) {
+ return;
+ }
+
+ fail("expecting exception");
+ }
+
+ @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());
+ }
+
+ @Test
+ public void testGetGreetingsCaps() throws Exception {
+ assertEquals("Hello Fred", externalClient.getGreetingsCaps("Fred"));
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ externalClient.destroyClient();
+ externalService.destoryService();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/pom.xml
new file mode 100644
index 0000000000..c4e4919091
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/pom.xml
@@ -0,0 +1,59 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-ws-launcher-base</artifactId>
+ <name>Apache Tuscany SCA iTest WS Launcher Base</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <!-- Test resources -->
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-ws-external-client</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>itest-ws-external-service</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+
+ </build>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/base/CallbackForwardSpecTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/base/CallbackForwardSpecTestCase.java
new file mode 100644
index 0000000000..d349e450c2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/base/CallbackForwardSpecTestCase.java
@@ -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.base;
+
+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 CallbackForwardSpecTestCase {
+
+ 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("java-first", "../contribution-callback-forwardspec/target/itest-ws-contribution-callback-forwardspec.jar"));
+ node.start();
+
+ // start the external client
+ try {
+ externalClient = new HelloWorldClientLauncher();
+ externalClient.createClient();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ throw ex;
+ }
+ }
+
+ @Test
+ @Ignore
+ 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();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/base/CallbackFullSpecTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/base/CallbackFullSpecTestCase.java
new file mode 100644
index 0000000000..0e0e6e93ba
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/base/CallbackFullSpecTestCase.java
@@ -0,0 +1,111 @@
+/*
+ * 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.base;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+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 CallbackFullSpecTestCase {
+
+ 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("java-first", "../contribution-callback-fullspec/target/itest-ws-contribution-callback-fullspec.jar"));
+ node.start();
+
+ // start the external client
+ try {
+ externalClient = new HelloWorldClientLauncher();
+ externalClient.createClient();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ throw ex;
+ }
+ }
+
+ @Test
+ @Ignore
+ 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();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/base/CallbackPromotionTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/base/CallbackPromotionTestCase.java
new file mode 100644
index 0000000000..09697f82ba
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/base/CallbackPromotionTestCase.java
@@ -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.base;
+
+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 CallbackPromotionTestCase {
+
+ 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("java-first", "../contribution-callback-promotion/target/itest-ws-contribution-callback-promotion.jar"));
+ node.start();
+
+ // start the external client
+ try {
+ externalClient = new HelloWorldClientLauncher();
+ externalClient.createClient();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ throw ex;
+ }
+ }
+
+ @Test
+ @Ignore
+ 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();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/base/CallbackTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/base/CallbackTestCase.java
new file mode 100644
index 0000000000..49ba20c20b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/base/CallbackTestCase.java
@@ -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.base;
+
+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 CallbackTestCase {
+
+ 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("java-first", "../contribution-callback/target/itest-ws-contribution-callback.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();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/base/DocLitWrappedTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/base/DocLitWrappedTestCase.java
new file mode 100644
index 0000000000..a85007e019
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/base/DocLitWrappedTestCase.java
@@ -0,0 +1,122 @@
+/*
+ * 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.base;
+
+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.Test;
+
+public class DocLitWrappedTestCase {
+
+ 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("doc-lit-wrapped", "../contribution-doc-lit-wrapped/target/itest-ws-contribution-doc-lit-wrapped.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 testGetGreetingsException() throws Exception {
+ try {
+ externalClient.getGreetingsException("Fred");
+ } catch (Exception ex) {
+ return;
+ }
+
+ fail("expecting exception");
+ }
+
+ @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();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/base/JavaFirstTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/base/JavaFirstTestCase.java
new file mode 100644
index 0000000000..0aa6a71db4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/base/JavaFirstTestCase.java
@@ -0,0 +1,123 @@
+/*
+ * 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.base;
+
+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 JavaFirstTestCase {
+
+ 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("java-first", "../contribution-java-first/target/itest-ws-contribution-java-first.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 testGetGreetingsException() throws Exception {
+ try {
+ externalClient.getGreetingsException("Fred");
+ } catch (Exception ex) {
+ return;
+ }
+
+ fail("expecting exception");
+ }
+
+ @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();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/base/WSDLFirstTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/base/WSDLFirstTestCase.java
new file mode 100644
index 0000000000..c8566bfa3b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/launcher-base/src/test/java/org/apache/tuscany/sca/binding/ws/launcher/base/WSDLFirstTestCase.java
@@ -0,0 +1,125 @@
+/*
+ * 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.base;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import junit.framework.TestCase;
+
+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 WSDLFirstTestCase extends TestCase {
+
+ 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-first", "../contribution-wsdl-first/target/itest-ws-contribution-wsdl-first.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
+ @Ignore
+ public void testGetGreetingsException() throws Exception {
+ try {
+ externalClient.getGreetingsException("Fred");
+ } catch (Exception ex) {
+ return;
+ }
+
+ fail("expecting exception");
+ }
+
+ @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();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/pom.xml
new file mode 100644
index 0000000000..b810a27fb4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/pom.xml
@@ -0,0 +1,67 @@
+<?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>tuscany-itest</artifactId>
+ <version>2.0.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <packaging>pom</packaging>
+ <artifactId>itest-ws</artifactId>
+ <name>Apache Tuscany SCA iTest WS</name>
+
+ <modules>
+ <module>defaults</module>
+ <module>authentication-basic</module>
+ <module>http-ssl</module>
+ <module>wsdl</module>
+ <module>endpoints</module>
+ <module>endpoint-references</module>
+ <module>holder-ws-service-multiple-outputs</module>
+ <module>wspolicy</module>
+<!--
+ <module>jms</module>
+ <module>mtom</module>
+ <module>authentication-wssecurity</module>
+ <module>autherization-wssecurity</module>
+ <module>confidentiality-wssecurity</module>
+-->
+ <!-- separate test contributions from launcher -->
+ <module>contribution-java-first</module>
+ <module>contribution-wsdl-first</module>
+ <module>contribution-callback</module>
+ <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-doc-lit-wrapped-dom</module>
+ <module>contribution-rpc-lit</module>
+ <module>contribution-reference-target</module>
+ <module>external-client</module>
+ <module>external-service</module>
+ <module>launcher-axis2</module>
+ <module>wsdlgen</module>
+ </modules>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/pom.xml
new file mode 100644
index 0000000000..cf26c64f58
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/pom.xml
@@ -0,0 +1,58 @@
+<?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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-ws-wsdl</artifactId>
+ <name>Apache Tuscany SCA iTest WS WSDL</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.19</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Account.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Account.java
new file mode 100644
index 0000000000..963712c0c2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Account.java
@@ -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.axis2;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * Test ?wsdl works and that the returned WSDL has the correct endpoint
+ *
+ * @version $Rev$ $Date$
+ */
+@Remotable
+public interface Account {
+
+ CustomerProfileData getCustomerProfile(String loginID);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/AccountService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/AccountService.java
new file mode 100644
index 0000000000..ab5fc0f873
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/AccountService.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2;
+
+/**
+ * Test ?wsdl works and that the returned WSDL has the correct endpoint
+ *
+ * @version $Rev$ $Date$
+ */
+public class AccountService implements Account {
+
+ public CustomerProfileData getCustomerProfile(String loginID) {
+ return new CustomerProfileData(loginID);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/CustomerProfileData.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/CustomerProfileData.java
new file mode 100644
index 0000000000..6f6a374450
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/CustomerProfileData.java
@@ -0,0 +1,113 @@
+/*
+ * 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.axis2;
+
+/**
+ * Test ?wsdl works and that the returned WSDL has the correct endpoint
+ *
+ * @version $Rev$ $Date$
+ */
+public class CustomerProfileData {
+
+ private String firstName;
+ private String lastName;
+ private String address;
+ private String email;
+ private String loginID;
+ private String password;
+ private int id;
+
+ public CustomerProfileData() {
+ firstName = "John";
+ lastName = "Doe";
+ address = "345 Main Street";
+ email = "john@doe.org";
+ this.loginID = "DefaultloginID";
+ password = "hello";
+ id = 1234;
+ }
+
+ public CustomerProfileData(String loginID) {
+ firstName = "John";
+ lastName = "Doe";
+ address = "345 Main Street";
+ email = "john@doe.org";
+ this.loginID = loginID;
+ password = "hello";
+ id = 1234;
+ }
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+ public String getAddress() {
+ return address;
+ }
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ public String getLoginID() {
+ return loginID;
+ }
+
+ public void setLoginID(String loginID) {
+ this.loginID = loginID;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorld.java
new file mode 100644
index 0000000000..d6db1c2d0b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorld.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorld {
+
+ String getGreetings(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOM.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOM.java
new file mode 100644
index 0000000000..e248815805
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOM.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2;
+
+import org.apache.axiom.om.OMElement;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorldOM {
+
+ OMElement getGreetings(OMElement parmE);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOMComponent.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOMComponent.java
new file mode 100644
index 0000000000..8439696fa8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOMComponent.java
@@ -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.axis2;
+
+import org.apache.axiom.om.OMElement;
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldOMComponent implements HelloWorldOM {
+
+ @Reference
+ public HelloWorldOM helloWorldWS;
+
+ public OMElement getGreetings(OMElement om) {
+ return helloWorldWS.getGreetings(om);
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOMService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOMService.java
new file mode 100644
index 0000000000..5b8578c816
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldOMService.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+
+public class HelloWorldOMService implements HelloWorldOM {
+
+ public OMElement getGreetings(OMElement requestOM) {
+ System.out.println(" **** getGreetings **** ");
+ String name = requestOM.getFirstElement().getText();
+
+ OMFactory omFactory = OMAbstractFactory.getOMFactory();
+ OMElement responseOM = omFactory.createOMElement("getGreetingsResponse", "http://helloworld-om", "helloworld");
+ OMElement param = omFactory.createOMElement("getGreetingsReturn", "http://helloworld-om", "helloworld");
+ responseOM.addChild(param);
+ param.addChild(omFactory.createOMText("Hello " + name));
+
+ return responseOM;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldService.java
new file mode 100644
index 0000000000..052b49ff55
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldService.java
@@ -0,0 +1,28 @@
+/*
+ * 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.axis2;
+
+public class HelloWorldService implements HelloWorld {
+
+ public String getGreetings(String s) {
+ return "Hello " + s;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/package-info.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/package-info.java
new file mode 100644
index 0000000000..805a515382
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * 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.
+ */
+
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://accounts")
+package org.apache.tuscany.sca.binding.ws.axis2;
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/customerdata.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/customerdata.xsd
new file mode 100644
index 0000000000..2479f3dbe5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/customerdata.xsd
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<xsd:schema elementFormDefault="qualified"
+ targetNamespace="http://accounts"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:complexType name="customerProfileData">
+ <xsd:sequence>
+ <xsd:element name="firstName" type="xsd:string" />
+ <xsd:element name="lastName" type="xsd:string" />
+ <xsd:element name="address" type="xsd:string" />
+ <xsd:element name="email" type="xsd:string" />
+ <xsd:element name="loginID" type="xsd:string" />
+ <xsd:element name="password" type="xsd:string" />
+ <xsd:element name="id" type="xsd:int" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+</xsd:schema>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/customerdefs.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/customerdefs.xsd
new file mode 100644
index 0000000000..24cf3eebad
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/customerdefs.xsd
@@ -0,0 +1,27 @@
+<?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.
+-->
+<xsd:schema elementFormDefault="qualified"
+ targetNamespace="http://accounts"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:include schemaLocation="customerdata.xsd" />
+ <xsd:include schemaLocation="/org/apache/tuscany/sca/binding/ws/axis2/customerinfo.xsd" />
+
+</xsd:schema>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/customerinfo.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/customerinfo.xsd
new file mode 100644
index 0000000000..b78909142f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/customerinfo.xsd
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<xsd:schema elementFormDefault="qualified"
+ targetNamespace="http://accounts"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:complexType name="CustomerProfileInfo">
+ <xsd:sequence>
+ <xsd:element name="firstName" type="xsd:string" />
+ <xsd:element name="lastName" type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+</xsd:schema>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld-om-merged.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld-om-merged.composite
new file mode 100644
index 0000000000..c520d2e3b2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld-om-merged.composite
@@ -0,0 +1,43 @@
+<?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/tests/binding/ws/axis2"
+ name="HelloWorldOM-Merged">
+
+
+ <component name="HelloWorldMergedService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.HelloWorldOMService"/>
+ <service name="HelloWorldOM">
+ <interface.wsdl interface="http://helloworld-om-merged#wsdl.interface(HelloWorld)" />
+ <binding.ws uri="http://localhost:8085/HelloWorldService/helloWorld"/>
+ </service>
+ </component>
+
+ <component name="HelloWorldWSDLMergedComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.HelloWorldOMComponent"/>
+ <reference name="helloWorldWS">
+ <interface.wsdl interface="http://helloworld-om-merged#wsdl.interface(HelloWorld)" />
+ <binding.ws uri="http://localhost:8085/HelloWorldService/helloWorld" />
+ </reference>
+ </component>
+
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld-om-merged.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld-om-merged.wsdl
new file mode 100644
index 0000000000..29be66fb71
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld-om-merged.wsdl
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld-om-merged" xmlns:tns="http://helloworld-om-merged" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld-om-porttype">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld-om-merged" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld.wsdl
new file mode 100644
index 0000000000..1a2272d7ee
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld.wsdl
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld" xmlns:tns="http://helloworld" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ </wsdl:binding>
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService"/>
+ </wsdl:port>
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort2">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService2"/>
+ </wsdl:port>
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort3">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService3"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-import-nested.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-import-nested.wsdl
new file mode 100644
index 0000000000..686b08a1d4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-import-nested.wsdl
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://account3"
+ xmlns:tns="http://account3"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="questionmark-import-nested">
+
+ <wsdl:types>
+ <xsd:schema elementFormDefault="qualified"
+ targetNamespace="http://account3"
+ xmlns:account="http://accounts"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:import namespace="http://accounts" schemaLocation="customerdefs.xsd" />
+
+ <xsd:element name="getCustomerProfile">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="loginID" type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="getCustomerProfileResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="customerProfile"
+ type="account:CustomerProfileData" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ </xsd:schema>
+ </wsdl:types>
+
+ <wsdl:message name="getCustomerProfileRequest">
+ <wsdl:part element="tns:getCustomerProfile" name="parameters" />
+ </wsdl:message>
+
+ <wsdl:message name="getCustomerProfileResponse">
+ <wsdl:part element="tns:getCustomerProfileResponse" name="parameters" />
+ </wsdl:message>
+
+ <wsdl:portType name="Account">
+ <wsdl:operation name="getCustomerProfile">
+ <wsdl:input message="tns:getCustomerProfileRequest" name="getCustomerProfileRequest" />
+ <wsdl:output message="tns:getCustomerProfileResponse" name="getCustomerProfileResponse" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-import.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-import.wsdl
new file mode 100644
index 0000000000..105c82a411
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-import.wsdl
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://account2"
+ xmlns:tns="http://account2"
+ xmlns:account3="http://account3"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="questionmark-import">
+
+ <wsdl:import namespace="http://account3" location="/org/apache/tuscany/sca/binding/ws/axis2/questionmark-import-nested.wsdl" />
+
+ <wsdl:binding name="AccountSoapBinding" type="account3:Account">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="getCustomerProfile">
+ <wsdlsoap:operation soapAction="" />
+ <wsdl:input name="getCustomerProfileRequest">
+ <wsdlsoap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output name="getCustomerProfileResponse">
+ <wsdlsoap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="AccountService">
+ <wsdl:port binding="tns:AccountSoapBinding" name="AccountSoapPort">
+ <wsdlsoap:address location="http://localhost:8086/AccountService" />
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-include.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-include.wsdl
new file mode 100644
index 0000000000..7a7a4033ce
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-include.wsdl
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://accounts"
+ xmlns:tns="http://accounts"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="questionmark-include">
+
+ <wsdl:types>
+ <xsd:schema elementFormDefault="qualified"
+ targetNamespace="http://accounts"
+ xmlns:account="http://accounts"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:include schemaLocation="/org/apache/tuscany/sca/binding/ws/axis2/customerdata.xsd" />
+
+ <xsd:element name="getCustomerProfile">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="loginID" type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="getCustomerProfileResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="customerProfile"
+ type="account:customerProfileData" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ </xsd:schema>
+ </wsdl:types>
+
+ <wsdl:message name="getCustomerProfileRequest">
+ <wsdl:part element="tns:getCustomerProfile" name="parameters" />
+ </wsdl:message>
+
+ <wsdl:message name="getCustomerProfileResponse">
+ <wsdl:part element="tns:getCustomerProfileResponse" name="parameters" />
+ </wsdl:message>
+
+ <wsdl:portType name="Account">
+ <wsdl:operation name="getCustomerProfile">
+ <wsdl:input message="tns:getCustomerProfileRequest" name="getCustomerProfileRequest" />
+ <wsdl:output message="tns:getCustomerProfileResponse" name="getCustomerProfileResponse" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="AccountSoapBinding" type="tns:Account">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="getCustomerProfile">
+ <wsdlsoap:operation soapAction="" />
+ <wsdl:input name="getCustomerProfileRequest">
+ <wsdlsoap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output name="getCustomerProfileResponse">
+ <wsdlsoap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+
+ </wsdl:binding>
+
+ <wsdl:service name="AccountService">
+ <wsdl:port binding="tns:AccountSoapBinding" name="AccountSoapPort">
+ <wsdlsoap:address location="http://localhost:8085/AccountService" />
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-wsdl-import.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-wsdl-import.composite
new file mode 100644
index 0000000000..65270b8d6c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-wsdl-import.composite
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
+ name="QuestionMarkWSDLImport">
+
+ <component name="AccountService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.AccountService" />
+ <service name="Account">
+ <binding.ws uri="http://localhost:8086/AccountService" wsdlElement="http://account2#wsdl.binding(AccountSoapBinding)" />
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-wsdl-include.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-wsdl-include.composite
new file mode 100644
index 0000000000..02395c4615
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-wsdl-include.composite
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
+ name="QuestionMarkWSDLInclude">
+
+ <component name="AccountService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.AccountService" />
+ <service name="Account">
+ <binding.ws uri="http://localhost:8085/AccountService" wsdlElement="http://accounts#wsdl.binding(AccountSoapBinding)" />
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-wsdl.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-wsdl.composite
new file mode 100644
index 0000000000..6b06cec722
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/questionmark-wsdl.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://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/tests/binding/ws/axis2"
+ name="QuestionMarkWSDLTests">
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.HelloWorldService"/>
+ <service name="HelloWorld">
+ <binding.ws name="ep1" uri="http://localhost:8085/foo/bar" />
+ <binding.ws name="ep2" uri="http://localhost:8085/services/HelloWorldWebService2" wsdlElement="http://helloworld#wsdl.binding(HelloWorldSoapBinding)"/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize-nested.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize-nested.wsdl
new file mode 100644
index 0000000000..ec72fbd1a6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize-nested.wsdl
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://serialize-nested"
+ xmlns:tns="http://serialize-nested"
+ xmlns:account="http://accounts"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="serialize-nested">
+
+ <wsdl:types>
+ <xsd:schema elementFormDefault="qualified"
+ targetNamespace="http://accounts"
+ xmlns:account="http://accounts"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:import namespace="http://accounts" schemaLocation="wsdl-serialize.xsd" />
+
+ <xsd:element name="getCustomerProfile">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="loginID" type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="getCustomerProfileResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="customerProfile"
+ type="account:CustomerProfileData" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ </xsd:schema>
+ </wsdl:types>
+
+ <wsdl:message name="getCustomerProfileRequest">
+ <wsdl:part element="account:getCustomerProfile" name="parameters" />
+ </wsdl:message>
+
+ <wsdl:message name="getCustomerProfileResponse">
+ <wsdl:part element="account:getCustomerProfileResponse" name="parameters" />
+ </wsdl:message>
+
+ <wsdl:portType name="Account">
+ <wsdl:operation name="getCustomerProfile">
+ <wsdl:input message="tns:getCustomerProfileRequest" name="getCustomerProfileRequest" />
+ <wsdl:output message="tns:getCustomerProfileResponse" name="getCustomerProfileResponse" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize-nested.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize-nested.xsd
new file mode 100644
index 0000000000..c24bd92eff
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize-nested.xsd
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<xsd:schema elementFormDefault="qualified"
+ targetNamespace="http://serialize"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:complexType name="SerializeCustomerProfileInfo">
+ <xsd:sequence>
+ <xsd:element name="firstName" type="xsd:string" />
+ <xsd:element name="lastName" type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+</xsd:schema>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize-top.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize-top.wsdl
new file mode 100644
index 0000000000..6c91e62baf
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize-top.wsdl
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://serialize-top"
+ xmlns:tns="http://serialize-top"
+ xmlns:nested="http://serialize-nested"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="serialize-top">
+
+ <wsdl:import namespace="http://serialize-nested" location="wsdl-serialize-nested.wsdl" />
+
+ <wsdl:binding name="AccountSoapBinding" type="nested:Account">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="getCustomerProfile">
+ <wsdlsoap:operation soapAction="" />
+ <wsdl:input name="getCustomerProfileRequest">
+ <wsdlsoap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output name="getCustomerProfileResponse">
+ <wsdlsoap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="AccountService">
+ <wsdl:port binding="tns:AccountSoapBinding" name="AccountSoapPort">
+ <wsdlsoap:address location="http://localhost:8086/AccountService" />
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize.composite
new file mode 100644
index 0000000000..07f7608bfa
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://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/tests/binding/ws/axis2"
+ name="WSDLSerialize">
+
+ <component name="AccountService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.AccountService"/>
+ <service name="Account">
+ <binding.ws uri="http://localhost:8085/services/AccountService"
+ wsdlElement="http://serialize-top#wsdl.binding(AccountSoapBinding)"/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize.xsd
new file mode 100644
index 0000000000..ce9e017492
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize.xsd
@@ -0,0 +1,28 @@
+<?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.
+-->
+<xsd:schema elementFormDefault="qualified"
+ targetNamespace="http://accounts"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:include schemaLocation="customerdata.xsd" />
+ <xsd:include schemaLocation="customerinfo.xsd" />
+ <xsd:import namespace="http://serialize" schemaLocation="wsdl-serialize-nested.xsd"/>
+
+</xsd:schema>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldWSDLMergedTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldWSDLMergedTestCase.java
new file mode 100644
index 0000000000..74998379c4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/HelloWorldWSDLMergedTestCase.java
@@ -0,0 +1,110 @@
+/*
+ * 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.axis2;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectOutputStream;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMText;
+import org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointImpl;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+import org.junit.Ignore;
+
+public class HelloWorldWSDLMergedTestCase extends TestCase {
+
+ private NodeFactory nodeFactory;
+ private NodeImpl node;
+ private HelloWorldOM helloWorld;
+
+ @Override
+ protected void setUp() throws Exception {
+ String contribution = "target/classes";
+ nodeFactory = NodeFactory.newInstance();
+ // have to set this to stop the node factory killing itself when we stop and re-start the node
+ nodeFactory.setAutoDestroy(false);
+ node = (NodeImpl)nodeFactory.createNode("org/apache/tuscany/sca/binding/ws/axis2/helloworld-om-merged.composite", new Contribution("test", contribution));
+ node.start();
+ helloWorld = node.getService(HelloWorldOM.class, "HelloWorldWSDLMergedComponent");
+ }
+
+ public void testHelloWorld() throws Exception {
+ OMFactory fac = OMAbstractFactory.getOMFactory();
+ OMElement requestOM = fac.createOMElement("getGreetings", "http://helloworld-om", "helloworld");
+ OMElement parmE = fac.createOMElement("name", "http://helloworld-om", "helloworld");
+ requestOM.addChild(parmE);
+ parmE.addChild(fac.createOMText("petra"));
+ OMElement responseOM = helloWorld.getGreetings(requestOM);
+ OMElement child = (OMElement)responseOM.getFirstElement();
+ Assert.assertEquals("Hello petra", ((OMText)child.getFirstOMChild()).getText());
+ }
+
+ public void testHelloWorldRepeating() throws Exception {
+ for (int i = 0; i < 2; i++){
+ OMFactory fac = OMAbstractFactory.getOMFactory();
+ OMElement requestOM = fac.createOMElement("getGreetings", "http://helloworld-om", "helloworld");
+ OMElement parmE = fac.createOMElement("name", "http://helloworld-om", "helloworld");
+ requestOM.addChild(parmE);
+ parmE.addChild(fac.createOMText("petra"));
+ OMElement responseOM = helloWorld.getGreetings(requestOM);
+ OMElement child = (OMElement)responseOM.getFirstElement();
+ Assert.assertEquals("Hello petra", ((OMText)child.getFirstOMChild()).getText());
+
+ node.stop();
+ node.start();
+
+ helloWorld = node.getService(HelloWorldOM.class, "HelloWorldWSDLMergedComponent");
+ }
+ }
+
+
+/*
+ public void testWSDLWrite(){
+ RuntimeEndpointImpl endpoint = (RuntimeEndpointImpl)node.getDomainComposite().getComponents().get(0).getServices().get(0).getEndpoints().get(0);
+ try
+ {
+ ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
+ ObjectOutputStream objectStream = new ObjectOutputStream(byteStream);
+ objectStream.writeObject(endpoint);
+ objectStream.close();
+ System.out.println(byteStream.toString());
+ }
+ catch(IOException ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+*/
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/QuestionMarkWSDLImportTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/QuestionMarkWSDLImportTestCase.java
new file mode 100644
index 0000000000..e48e1bc050
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/QuestionMarkWSDLImportTestCase.java
@@ -0,0 +1,99 @@
+/*
+ * 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.axis2;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.List;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.wsdl.Service;
+import javax.wsdl.extensions.soap.SOAPAddress;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import javax.xml.namespace.QName;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+/**
+ * Test ?wsdl works and that the returned WSDL has the correct endpoint
+ *
+ * @version $Rev$ $Date$
+ */
+public class QuestionMarkWSDLImportTestCase extends TestCase {
+
+ private Node node;
+
+ /**
+ * Tests ?wsdl works and returns the correct port endpoint from the WSDL
+ */
+ public void testWSDLImportPortEndpoint() throws Exception {
+ InputStream inp = new URL("http://localhost:8086/AccountService?wsdl").openStream();
+ BufferedReader br = new BufferedReader(new InputStreamReader(inp));
+ String line;
+ while((line = br.readLine()) != null) {
+ System.out.println(line);
+ }
+ br.close();
+
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ wsdlReader.setFeature("javax.wsdl.verbose", false);
+ wsdlReader.setFeature("javax.wsdl.importDocuments", true);
+
+ Definition definition = wsdlReader.readWSDL("http://localhost:8086/AccountService?wsdl");
+ assertNotNull(definition);
+ Service service = definition.getService(new QName("http://account2/AccountService/Account", "Account"));
+ Port port = service.getPort("AccountSOAP11Port");
+
+ String endpoint = getEndpoint(port);
+ // String ip = HttpUtils.getIpAddress();
+ assertEquals("http://localhost:8086/AccountService", endpoint);
+ }
+
+ private String getEndpoint(Port port) {
+ List wsdlPortExtensions = port.getExtensibilityElements();
+ for (final Object extension : wsdlPortExtensions) {
+ if (extension instanceof SOAPAddress) {
+ return ((SOAPAddress) extension).getLocationURI();
+ }
+ }
+ throw new RuntimeException("no SOAPAddress");
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ String contribution = "target/classes";
+ node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/questionmark-wsdl-import.composite", new Contribution("test", contribution));
+ node.start();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/QuestionMarkWSDLIncludeTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/QuestionMarkWSDLIncludeTestCase.java
new file mode 100644
index 0000000000..ab5713a0ae
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/QuestionMarkWSDLIncludeTestCase.java
@@ -0,0 +1,122 @@
+/*
+ * 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.axis2;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.ObjectOutputStream;
+import java.net.URL;
+import java.util.List;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.wsdl.Service;
+import javax.wsdl.extensions.soap.SOAPAddress;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import javax.xml.namespace.QName;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointImpl;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+import org.junit.Ignore;
+
+/**
+ * Test ?wsdl works and that the returned WSDL has the correct endpoint
+ *
+ * @version $Rev$ $Date$
+ */
+public class QuestionMarkWSDLIncludeTestCase extends TestCase {
+
+ private NodeImpl node;
+
+ /**
+ * Tests ?wsdl works and returns the correct port endpoint from the WSDL
+ */
+ public void testWSDLIncludePortEndpoint() throws Exception {
+ InputStream inp = new URL("http://localhost:8085/AccountService?wsdl").openStream();
+ BufferedReader br = new BufferedReader(new InputStreamReader(inp));
+ String line;
+ while((line = br.readLine()) != null) {
+ System.out.println(line);
+ }
+ br.close();
+
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ wsdlReader.setFeature("javax.wsdl.verbose", false);
+ wsdlReader.setFeature("javax.wsdl.importDocuments", true);
+
+ Definition definition = wsdlReader.readWSDL("http://localhost:8085/AccountService?wsdl");
+ assertNotNull(definition);
+ Service service = definition.getService(new QName("http://accounts/AccountService/Account", "Account"));
+ Port port = service.getPort("AccountSOAP11Port");
+
+ String endpoint = getEndpoint(port);
+ assertEquals("http://localhost:8085/AccountService", endpoint);
+ }
+
+ private String getEndpoint(Port port) {
+ List wsdlPortExtensions = port.getExtensibilityElements();
+ for (final Object extension : wsdlPortExtensions) {
+ if (extension instanceof SOAPAddress) {
+ return ((SOAPAddress) extension).getLocationURI();
+ }
+ }
+ throw new RuntimeException("no SOAPAddress");
+ }
+
+/*
+ public void testWSDLWrite(){
+ RuntimeEndpointImpl endpoint = (RuntimeEndpointImpl)node.getDomainComposite().getComponents().get(0).getServices().get(0).getEndpoints().get(0);
+ try
+ {
+ ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
+ ObjectOutputStream objectStream = new ObjectOutputStream(byteStream);
+ objectStream.writeObject(endpoint);
+ objectStream.close();
+ System.out.println(byteStream.toString());
+ }
+ catch(IOException ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+*/
+
+ @Override
+ protected void setUp() throws Exception {
+ String contribution = "target/classes";
+ node = (NodeImpl)NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/questionmark-wsdl-include.composite", new Contribution("test", contribution));
+ node.start();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/QuestionMarkWSDLTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/QuestionMarkWSDLTestCase.java
new file mode 100644
index 0000000000..dbe172f792
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/QuestionMarkWSDLTestCase.java
@@ -0,0 +1,126 @@
+/*
+ * 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.axis2;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.List;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.wsdl.Service;
+import javax.wsdl.extensions.soap.SOAPAddress;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import javax.xml.namespace.QName;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+/**
+ * Test ?wsdl works and that the returned WSDL has the correct endpoint
+ *
+ * @version $Rev$ $Date$
+ */
+public class QuestionMarkWSDLTestCase extends TestCase {
+
+ private Node node;
+
+ /**
+ * Tests ?wsdl works and returns the correct port endpoint from the WSDL
+ */
+ public void testWSDLPortEndpoint() throws Exception {
+ InputStream inp = new URL("http://localhost:8085/services/HelloWorldWebService2?wsdl").openStream();
+ BufferedReader br = new BufferedReader(new InputStreamReader(inp));
+ String line;
+ while((line = br.readLine()) != null) {
+ System.out.println(line);
+ }
+ br.close();
+
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ wsdlReader.setFeature("javax.wsdl.verbose",false);
+ wsdlReader.setFeature("javax.wsdl.importDocuments",true);
+
+ Definition definition = wsdlReader.readWSDL("http://localhost:8085/services/HelloWorldWebService2?wsdl");
+ assertNotNull(definition);
+ Service service = definition.getService(new QName("http://helloworld/HelloWorldService/HelloWorld",
+ "HelloWorld"));
+ Port port = service.getPort("ep2SOAP11Port");
+
+ String endpoint = getEndpoint(port);
+ assertEquals("http://localhost:8085/services/HelloWorldWebService2", endpoint);
+ }
+
+ /**
+ * Tests ?wsdl works and returns the correct port endpoint from binding.ws with a custom URI
+ */
+ public void testCustomEndpoint() throws Exception {
+ InputStream inp = new URL("http://localhost:8085/foo/bar?wsdl").openStream();
+ BufferedReader br = new BufferedReader(new InputStreamReader(inp));
+ String line;
+ while((line = br.readLine()) != null) {
+ System.out.println(line);
+ }
+ br.close();
+
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ wsdlReader.setFeature("javax.wsdl.verbose",false);
+ wsdlReader.setFeature("javax.wsdl.importDocuments",true);
+
+ Definition definition = wsdlReader.readWSDL("http://localhost:8085/foo/bar?wsdl");
+ assertNotNull(definition);
+ Service service = definition.getService(new QName("http://axis2.ws.binding.sca.tuscany.apache.org/",
+ "HelloWorldService_HelloWorld"));
+ Port port = service.getPort("ep1SOAP11Port");
+
+ String endpoint = getEndpoint(port);
+ // TODO - used to get the real host here but WSDL seems to have localhost in it atm?
+ assertEquals("http://localhost:8085/foo/bar", endpoint);
+ }
+
+ protected String getEndpoint(Port port) {
+ List wsdlPortExtensions = port.getExtensibilityElements();
+ for (final Object extension : wsdlPortExtensions) {
+ if (extension instanceof SOAPAddress) {
+ return ((SOAPAddress) extension).getLocationURI();
+ }
+ }
+ throw new RuntimeException("no SOAPAddress");
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ String contribution = "target/classes";
+ node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/questionmark-wsdl.composite", new Contribution("test", contribution));
+ node.start();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLSerializationTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLSerializationTestCase.java
new file mode 100644
index 0000000000..a3e79ee2af
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdl/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLSerializationTestCase.java
@@ -0,0 +1,477 @@
+/*
+ * 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.axis2;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URI;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Import;
+import javax.wsdl.PortType;
+import javax.wsdl.Types;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLLocator;
+import javax.wsdl.xml.WSDLReader;
+import javax.wsdl.xml.WSDLWriter;
+
+
+import org.apache.tuscany.sca.common.xml.XMLDocumentHelper;
+import org.apache.tuscany.sca.contribution.ContributionFactory;
+import org.apache.tuscany.sca.contribution.processor.ProcessorContext;
+import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver;
+import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+import org.apache.tuscany.sca.core.UtilityExtensionPoint;
+import org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointImpl;
+import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
+import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition;
+import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface;
+import org.apache.tuscany.sca.interfacedef.wsdl.xml.WSDLModelResolver;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
+import org.apache.tuscany.sca.xsd.XSDFactory;
+import org.apache.tuscany.sca.xsd.XSDefinition;
+import org.apache.tuscany.sca.xsd.xml.XSDModelResolver;
+import org.apache.ws.commons.schema.XmlSchema;
+import org.apache.ws.commons.schema.XmlSchemaCollection;
+import org.apache.ws.commons.schema.XmlSchemaCollectionEnumerator;
+import org.apache.ws.commons.schema.XmlSchemaImport;
+import org.apache.ws.commons.schema.XmlSchemaInclude;
+import org.apache.ws.commons.schema.XmlSchemaObject;
+import org.apache.ws.commons.schema.resolver.DefaultURIResolver;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.xml.sax.InputSource;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests that WSDL can be serialized out in a form that can be passed
+ * across the registry in a single shot
+ */
+public class WSDLSerializationTestCase extends TestCase {
+
+ private static byte separator[] = {'_', 'X', '_'};
+
+/*
+ public void testWSDL4JSerialization() throws Exception {
+
+ // read WSDL in
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ wsdlReader.setFeature("javax.wsdl.verbose",false);
+ wsdlReader.setFeature("javax.wsdl.importDocuments",true);
+
+ Definition definition = wsdlReader.readWSDL("target/classes/org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize-top.wsdl");
+ assertNotNull(definition);
+
+ // write WSDL out
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ try {
+ WSDLWriter writer = WSDLFactory.newInstance().newWSDLWriter();
+ writer.writeWSDL(definition, outStream);
+ } catch (Exception e){
+ throw new RuntimeException(e);
+ }
+
+ //System.out.println(outStream.toString());
+ }
+*/
+
+ public void testTuscanySerialization() throws Exception {
+
+ // read in WSDL
+ String contributionLocation = "target/classes";
+ NodeImpl node = (NodeImpl)NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/wsdl-serialize.composite",
+ new Contribution("test", contributionLocation));
+ node.start();
+
+ try {
+
+ RuntimeEndpointImpl endpoint = (RuntimeEndpointImpl)node.getDomainComposite().getComponents().get(0).getServices().get(0).getEndpoints().get(0);
+ WSDLInterface wsdlInterface = (WSDLInterface)endpoint.getBindingInterfaceContract().getInterface();
+
+ WSDLDefinition wsdlDefinition = wsdlInterface.getWsdlDefinition();
+ Definition definition = wsdlDefinition.getDefinition();
+
+ // write out a flattened WSDL along with XSD
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ try {
+ WSDLWriter writer = WSDLFactory.newInstance().newWSDLWriter();
+ String baseURI = null;
+ if (wsdlDefinition.getLocation() != null) {
+ baseURI = wsdlDefinition.getLocation().toString();
+ } else {
+ baseURI = "GeneratedWSDL";
+ }
+ outStream.write(baseURI.getBytes());
+ outStream.write(separator);
+ writer.writeWSDL(definition, outStream);
+ for (WSDLDefinition importedWSDLDefintion : wsdlDefinition.getImportedDefinitions()){
+ outStream.write(separator);
+ baseURI = importedWSDLDefintion.getLocation().toString();
+ outStream.write(baseURI.getBytes());
+ outStream.write(separator);
+ writer.writeWSDL(importedWSDLDefintion.getDefinition(), outStream);
+ }
+ for (XSDefinition xsdDefinition : wsdlDefinition.getXmlSchemas()){
+ // we store a reference to the schema schema. We don't need to write that out.
+ // also ignore schema that are extract from the original WSDL (have in their location)
+ if (!xsdDefinition.getNamespace().equals("http://www.w3.org/2001/XMLSchema") &&
+ xsdDefinition.getSchema() != null){
+ writeSchema(outStream, xsdDefinition.getSchema());
+ }
+ }
+ } catch (Exception e){
+ throw new RuntimeException(e);
+ }
+
+ String wsdlString = outStream.toString();
+ //System.out.println(wsdlString);
+
+ // Read the WSDL and XSD back in from the string
+ String xmlArray[] = wsdlString.split("_X_");
+ String topWSDLLocation = null;
+ Map<String, XMLString> xmlMap = new HashMap<String, XMLString>();
+
+ for (int i = 0; i < xmlArray.length; i = i + 2){
+ String location = xmlArray[i];
+ String xml = xmlArray[i+1];
+ // strip the file name out of the location
+ location = location.substring(location.lastIndexOf("/") + 1);
+
+ if (location.endsWith(".wsdl")){
+ xmlMap.put(location,
+ new WSDLInfo(xmlArray[i],
+ xml));
+
+ if (topWSDLLocation == null){
+ topWSDLLocation = location;
+ }
+ } else {
+ xmlMap.put(location,
+ new XSDInfo(xmlArray[i],
+ xml));
+ }
+ }
+
+ ExtensionPointRegistry registry = endpoint.getCompositeContext().getExtensionPointRegistry();
+ FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class);
+ org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory wsdlFactory = modelFactories.getFactory(org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory.class);
+ XSDFactory xsdFactory = modelFactories.getFactory(XSDFactory.class);
+ XmlSchemaCollection schemaCollection = new XmlSchemaCollection();
+ schemaCollection.setSchemaResolver(new XSDURIResolverImpl(xmlMap));
+ ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);
+ final org.apache.tuscany.sca.contribution.Contribution contribution = contributionFactory.createContribution();
+ ProcessorContext processorContext = new ProcessorContext();
+
+ ExtensibleModelResolver extensibleResolver = new ExtensibleModelResolver(contribution, registry.getExtensionPoint(ModelResolverExtensionPoint.class), modelFactories);
+ WSDLModelResolver wsdlResolver = (WSDLModelResolver)extensibleResolver.getModelResolverInstance(WSDLDefinition.class);
+ XSDModelResolver xsdResolver = (XSDModelResolver)extensibleResolver.getModelResolverInstance(XSDefinition.class);
+ contribution.setURI("temp");
+ contribution.setLocation(topWSDLLocation);
+ contribution.setModelResolver(extensibleResolver);
+
+ // read
+ for (XMLString xmlString : xmlMap.values()){
+ if (xmlString instanceof WSDLInfo){
+ WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
+ reader.setFeature("javax.wsdl.verbose", false);
+ reader.setFeature("javax.wsdl.importDocuments", true);
+ WSDLLocatorImpl locator = new WSDLLocatorImpl(xmlString.getBaseURI(), xmlMap);
+ Definition readDefinition = reader.readWSDL(locator);
+
+ wsdlDefinition = wsdlFactory.createWSDLDefinition();
+ wsdlDefinition.setDefinition(readDefinition);
+ wsdlDefinition.setLocation(new URI(xmlString.getBaseURI()));
+
+ ((WSDLInfo)xmlString).setWsdlDefintion(wsdlDefinition);
+ wsdlResolver.addModel(wsdlDefinition, processorContext);
+
+ } else {
+ InputStream inputStream = new ByteArrayInputStream(xmlString.getXmlString().getBytes());
+ InputSource inputSource = new InputSource(inputStream);
+ inputSource.setSystemId(xmlString.getBaseURI());
+ XmlSchema schema = schemaCollection.read(inputSource, null);
+ inputStream.close();
+
+ XSDefinition xsdDefinition = xsdFactory.createXSDefinition();
+ xsdDefinition.setSchema(schema);
+
+ ((XSDInfo)xmlString).setXsdDefinition(xsdDefinition);
+ xsdResolver.addModel(xsdDefinition, processorContext);
+ }
+ }
+
+ // resolve
+ for (XMLString xmlString : xmlMap.values()){
+ if (xmlString instanceof WSDLInfo){
+ wsdlDefinition = ((WSDLInfo)xmlString).getWsdlDefintion();
+
+ // link to imports
+ for (Map.Entry<String, List<javax.wsdl.Import>> entry :
+ ((Map<String, List<javax.wsdl.Import>>)wsdlDefinition.getDefinition().getImports()).entrySet()) {
+ for (javax.wsdl.Import imp : entry.getValue()) {
+ String wsdlName = imp.getDefinition().getDocumentBaseURI();
+ WSDLInfo wsdlInfo = (WSDLInfo)xmlMap.get(getFilenameWithoutPath(wsdlName));
+ wsdlDefinition.getImportedDefinitions().add(wsdlInfo.getWsdlDefintion());
+ }
+ }
+
+ // link to in-line types
+ Types types = wsdlDefinition.getDefinition().getTypes();
+ if ( types != null){
+ for (int i=0; i < types.getExtensibilityElements().size(); i++){
+ String schemaName = xmlString.getBaseURI() + "#" + i++;
+ XSDInfo xsdInfo = (XSDInfo)xmlMap.get(getFilenameWithoutPath(schemaName));
+ wsdlDefinition.getXmlSchemas().add(xsdInfo.getXsdDefinition());
+ }
+ }
+
+ } else {
+
+ }
+ }
+
+ WSDLInfo topWSDL = (WSDLInfo)xmlMap.get(topWSDLLocation);
+ WSDLDefinition topWSDLDefinition = topWSDL.getWsdlDefintion();
+
+ PortType portType = (PortType)topWSDLDefinition.getDefinition().getAllPortTypes().values().iterator().next();
+ WSDLInterface readWSDLInterface = wsdlFactory.createWSDLInterface(portType, topWSDLDefinition, extensibleResolver, null);
+
+ // now check what we have just read with what we started out with to see if the compatibility test passes
+ // in the real system have to check contracts not interfaces
+ UtilityExtensionPoint utils = registry.getExtensionPoint(UtilityExtensionPoint.class);
+ InterfaceContractMapper interfaceContractMapper = utils.getUtility(InterfaceContractMapper.class);
+ boolean match = interfaceContractMapper.isCompatibleSubset(wsdlInterface, readWSDLInterface);
+ Assert.assertTrue(match);
+ } catch(Exception ex){
+ System.out.println(ex.toString());
+ ex.printStackTrace();
+ node.stop();
+ Assert.fail();
+ }
+
+ node.stop();
+ }
+
+ public void writeSchema(OutputStream outStream, XmlSchema schema) throws IOException {
+ if (!schema.getTargetNamespace().equals("http://www.w3.org/2001/XMLSchema") &&
+ schema.getNamespaceContext() != null){
+ outStream.write(separator);
+ String baseURI = schema.getSourceURI();
+ outStream.write(baseURI.getBytes());
+ outStream.write(separator);
+ schema.write(outStream);
+
+ for (Iterator<?> i = schema.getIncludes().getIterator(); i.hasNext();) {
+ XmlSchemaObject obj = (XmlSchemaObject)i.next();
+ XmlSchema ext = null;
+ if (obj instanceof XmlSchemaInclude) {
+ ext = ((XmlSchemaInclude)obj).getSchema();
+ }
+ if (obj instanceof XmlSchemaImport) {
+ ext = ((XmlSchemaImport)obj).getSchema();
+ }
+ writeSchema(outStream, ext);
+ }
+ }
+ }
+
+ public String calculateUniquePrefix(Map<String, String> targetNamespaces, String prefix){
+ String newPrefix = prefix;
+ boolean notUnique = targetNamespaces.containsKey(newPrefix);
+ int i = 1;
+
+ while(notUnique){
+ newPrefix = prefix + i++;
+ notUnique = targetNamespaces.containsKey(newPrefix);
+ }
+
+ return newPrefix;
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+
+ }
+
+ private class XMLString {
+ private String baseURI;
+ private String xmlString;
+
+ public XMLString(String baseURI, String xmlString){
+ this.baseURI = baseURI;
+ this.xmlString = xmlString;
+ }
+
+ public String getBaseURI() {
+ return baseURI;
+ }
+
+ public String getXmlString() {
+ return xmlString;
+ }
+ }
+
+ private class XSDInfo extends XMLString {
+
+ XSDefinition xsdDefinition;
+
+ public XSDInfo(String baseURI, String xmlString) {
+ super(baseURI, xmlString);
+ }
+
+ public void setXsdDefinition(XSDefinition xsdDefinition) {
+ this.xsdDefinition = xsdDefinition;
+ }
+
+ public XSDefinition getXsdDefinition() {
+ return xsdDefinition;
+ }
+ }
+
+ private class WSDLInfo extends XMLString {
+
+ WSDLDefinition wsdlDefintion;
+
+ public WSDLInfo(String baseURI, String xmlString) {
+ super(baseURI, xmlString);
+ }
+
+ public void setWsdlDefintion(WSDLDefinition wsdlDefintion) {
+ this.wsdlDefintion = wsdlDefintion;
+ }
+
+ public WSDLDefinition getWsdlDefintion() {
+ return wsdlDefintion;
+ }
+ }
+
+ private class WSDLLocatorImpl implements WSDLLocator {
+ private Map<String, XMLString> xmlMap;
+ private String baseURI;
+ private String latestImportURI;
+
+ public WSDLLocatorImpl(String baseURI, Map<String, XMLString> xmlMap) {
+ this.baseURI = baseURI;
+ this.xmlMap = xmlMap;
+ }
+
+ public void close() {
+/*
+ try {
+ inputStream.close();
+ } catch (IOException e) {
+ // Ignore
+ }
+*/
+ }
+
+ public InputSource getBaseInputSource() {
+ return getInputSource(getFilenameWithoutPath(baseURI));
+ }
+
+ public String getBaseURI() {
+ return baseURI;
+ }
+
+ public InputSource getImportInputSource(String parentLocation, String importLocation) {
+ latestImportURI = importLocation;
+ return getInputSource(getFilenameWithoutPath(importLocation));
+ }
+
+ public String getLatestImportURI() {
+ return latestImportURI;
+ }
+
+ private InputSource getInputSource(String uri){
+ String xmlString = xmlMap.get(uri).getXmlString();
+ InputStream inputStream = new ByteArrayInputStream(xmlString.getBytes());
+ //InputSource inputSource = XMLDocumentHelper.getInputSource(uri, inputStream);
+ InputSource inputSource = new InputSource(inputStream);
+ inputSource.setSystemId(uri);
+ return inputSource;
+ }
+ }
+
+ private class XSDURIResolverImpl extends DefaultURIResolver {
+
+ private Map<String, XMLString> xmlMap;
+
+ public XSDURIResolverImpl(Map<String, XMLString> xmlMap) {
+ this.xmlMap = xmlMap;
+ }
+
+
+ @Override
+ protected URL getURL(URL contextURL, String spec) throws IOException {
+ return super.getURL(contextURL, spec);
+ }
+ @Override
+ public InputSource resolveEntity(String namespace,
+ String schemaLocation,
+ String baseUri) {
+ return getInputSource(getFilenameWithoutPath(schemaLocation));
+ }
+
+ private InputSource getInputSource(String uri){
+ String xmlString = xmlMap.get(uri).getXmlString();
+ InputStream inputStream = new ByteArrayInputStream(xmlString.getBytes());
+ InputSource inputSource = new InputSource(inputStream);
+ inputSource.setSystemId(uri);
+ return inputSource;
+ }
+
+ }
+
+ private String getFilenameWithoutPath(String filename){
+ // work out what the file name is that is being imported
+ // XSDs imports are written out by Tuscany with an relative web address such as
+ // /services/AccountService?xsd=wsdl-serialize.xsd
+ // for the time being just string the file name off the end. We are making
+ // assumption that the interface doesn't involve two files with the same
+ // name in different locations
+ int xsdIndex = filename.lastIndexOf("?xsd=");
+ int wsdlIndex = filename.lastIndexOf("/");
+ if ( xsdIndex >= 0){
+ return filename.substring(xsdIndex + 5);
+ } else {
+ return filename.substring(wsdlIndex + 1);
+ }
+ // What happens with generated WSDL?
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/pom.xml
new file mode 100644
index 0000000000..7f6cf26289
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/pom.xml
@@ -0,0 +1,94 @@
+<?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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>itest-ws-wsdlgen</artifactId>
+ <name>Apache Tuscany SCA iTest WS WSDL Generation</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-databinding-sdo</artifactId>
+ <version>2.0.1</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.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>
+ <phase>generate-test-sources</phase>
+ <goals>
+ <goal>wsgen</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <sei>helloworld.HelloWorldImpl</sei>
+ <genWsdl>true</genWsdl>
+ <keep>true</keep>
+ <destDir>${basedir}/target/classes</destDir>
+ <resourceDestDir>${basedir}/target/jaxws/wsgen/wsdl</resourceDestDir>
+ <sourceDestDir>${basedir}/target/jaxws/wsgen/source</sourceDestDir>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/anotherpackage/BBean.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/anotherpackage/BBean.java
new file mode 100644
index 0000000000..41ed1b8878
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/anotherpackage/BBean.java
@@ -0,0 +1,56 @@
+/*
+ * 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 anotherpackage;
+
+import javax.xml.bind.annotation.XmlType;
+
+import yetyetanotherpackage.FBean;
+
+@XmlType(namespace="http://helloworld/")
+public class BBean {
+
+ protected String field1;
+ protected String field2;
+ protected FBean field3;
+
+ public String getField1() {
+ return field1;
+ }
+
+ public void setField1(String field1) {
+ this.field1 = field1;
+ }
+
+ public String getField2() {
+ return field2;
+ }
+
+ public void setField2(String field2) {
+ this.field2 = field2;
+ }
+
+ public FBean getField3() {
+ return field3;
+ }
+
+ public void setField3(FBean field3) {
+ this.field3 = field3;
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/anotherpackage/CBean.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/anotherpackage/CBean.java
new file mode 100644
index 0000000000..4b0064aee8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/anotherpackage/CBean.java
@@ -0,0 +1,45 @@
+/*
+ * 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 anotherpackage;
+
+import javax.xml.bind.annotation.XmlType;
+
+@XmlType(name="")
+public class CBean {
+
+ protected String field1;
+ protected String field2;
+
+ public String getField1() {
+ return field1;
+ }
+
+ public void setField1(String field1) {
+ this.field1 = field1;
+ }
+
+ public String getField2() {
+ return field2;
+ }
+
+ public void setField2(String field2) {
+ this.field2 = field2;
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/datatypes/BaseClass.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/datatypes/BaseClass.java
new file mode 100644
index 0000000000..904ca55617
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/datatypes/BaseClass.java
@@ -0,0 +1,46 @@
+/*
+ * 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 datatypes;
+
+import java.io.Serializable;
+
+public class BaseClass implements Serializable {
+ private static final long serialVersionUID = -4086312879555658070L;
+
+ private long id;
+
+ private String commentair;
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public String getCommentair() {
+ return commentair;
+ }
+
+ public void setCommentair(String commentair) {
+ this.commentair = commentair;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/datatypes/ComplexNumber.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/datatypes/ComplexNumber.java
new file mode 100644
index 0000000000..96a53f7eeb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/datatypes/ComplexNumber.java
@@ -0,0 +1,48 @@
+/*
+ * 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 datatypes;
+
+public class ComplexNumber {
+ private double real, imaginary;
+
+ public ComplexNumber(double real, double imaginary) {
+ this.real = real;
+ this.imaginary = imaginary;
+ }
+
+ public ComplexNumber() {
+ }
+
+ public double getReal() {
+ return real;
+ }
+
+ public void setReal(double real) {
+ this.real = real;
+ }
+
+ public double getImaginary() {
+ return imaginary;
+ }
+
+ public void setImaginary(double imaginary) {
+ this.imaginary = imaginary;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/datatypes/DataTypes.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/datatypes/DataTypes.java
new file mode 100644
index 0000000000..d4e3609abb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/datatypes/DataTypes.java
@@ -0,0 +1,78 @@
+/*
+ * 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 datatypes;
+
+import java.util.List;
+import javax.jws.WebParam;
+import javax.jws.soap.SOAPBinding;
+
+import org.oasisopen.sca.ServiceReference;
+import org.oasisopen.sca.annotation.Remotable;
+
+import commonj.sdo.DataObject;
+import other.OtherPojo;
+
+@Remotable
+public interface DataTypes {
+
+ void testSimpleInt(int simple);
+
+ void testSimpleArrayInt(int[] simple);
+
+ void testSimpleMultiArrayInt(int[][] simple);
+
+ void testSimpleMulti3ArrayInt(int[][][] simple);
+
+ void testList(List any);
+
+ void testSimpleListString(List<String> simple);
+
+ List<String> testReturnSimpleListString();
+
+ void testListByteArray(List<byte[]> byteArrayList);
+
+ void testListWildcard(List<?> wild);
+
+ void testComplex(ComplexNumber complex);
+
+ void testOtherPackage(OtherPojo pojo);
+
+ void testByteArray(byte[] byteArray);
+
+ void testBaseExtension(ExtClass ext);
+
+ void testServiceReference(ServiceReference ref);
+
+ void testException() throws Exception;
+
+ DataObject testDynamicSDO();
+
+ void testWebParamSDO(@WebParam(name="foo") DataObject myObject);
+
+ void testWebParamSDOArray(@WebParam(name="foo") DataObject[] myArray);
+/*
+
+ @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.BARE)
+ void testWebParamBare(@WebParam(name="simpleInt") int simple);
+
+ @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.BARE)
+ void testWebParamBareArray(@WebParam(name="arrayInt") int[] array);
+*/
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/datatypes/ExtClass.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/datatypes/ExtClass.java
new file mode 100644
index 0000000000..86be949630
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/datatypes/ExtClass.java
@@ -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 datatypes;
+
+public class ExtClass extends BaseClass {
+ private static final long serialVersionUID = 7076974968473202208L;
+
+ private String name;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/datatypes/GetDataServiceWithoutException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/datatypes/GetDataServiceWithoutException.java
new file mode 100644
index 0000000000..d4c64a837a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/datatypes/GetDataServiceWithoutException.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package datatypes;
+
+import commonj.sdo.DataObject;
+import java.util.List;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public abstract interface GetDataServiceWithoutException
+{
+ public abstract byte[] getMessage(String paramString);
+
+ public abstract List<byte[]> getMessageList(String paramString);
+
+ public abstract DataObject getMessageSDO(String paramString);
+
+ public abstract List<DataObject> getMessageListSDOList(String paramString);
+
+ public abstract DataObject[] getMessageListSDOArr(String paramString);
+
+ public abstract DataObject getMessageListSDOinSDO(String paramString);
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/datatypes/impl/DataTypesImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/datatypes/impl/DataTypesImpl.java
new file mode 100644
index 0000000000..df492d8e7e
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/datatypes/impl/DataTypesImpl.java
@@ -0,0 +1,100 @@
+/*
+ * 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 datatypes.impl;
+
+import java.util.List;
+import javax.jws.WebParam;
+import javax.jws.soap.SOAPBinding;
+
+import org.oasisopen.sca.ServiceReference;
+
+import other.OtherPojo;
+
+import commonj.sdo.DataObject;
+import datatypes.ComplexNumber;
+import datatypes.DataTypes;
+import datatypes.ExtClass;
+
+public class DataTypesImpl implements DataTypes {
+
+ public void testSimpleInt(int simple) {
+ }
+
+ public void testSimpleArrayInt(int[] simple) {
+ }
+
+ public void testSimpleMultiArrayInt(int[][] simple) {
+ }
+
+ public void testSimpleMulti3ArrayInt(int[][][] simple) {
+ }
+
+ public void testList(List any) {
+ }
+
+ public void testSimpleListString(List<String> simple) {
+ }
+
+ public List<String> testReturnSimpleListString() {
+ return null;
+ }
+
+ public void testListByteArray(List<byte[]> byteArrayList) {
+ }
+
+ public void testListWildcard(List<?> wild) {
+ }
+
+ public void testComplex(ComplexNumber complex) {
+ }
+
+ public void testOtherPackage(OtherPojo pojo) {
+ }
+
+ public void testByteArray(byte[] byteArray) {
+ }
+
+ public void testBaseExtension(ExtClass ext) {
+ }
+
+ public void testServiceReference(ServiceReference ref) {
+ }
+
+ public void testException() throws Exception {
+ }
+
+ public DataObject testDynamicSDO() {
+ return null;
+ }
+
+ public void testWebParamSDO(DataObject myObject) {
+ }
+
+ public void testWebParamSDOArray(DataObject[] myArray) {
+ }
+/*
+
+ public void testWebParamBare(int simple) {
+ }
+
+ public void testWebParamBareArray(int[] array) {
+ }
+*/
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/datatypes/impl/GetDataServiceWithoutExceptionImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/datatypes/impl/GetDataServiceWithoutExceptionImpl.java
new file mode 100644
index 0000000000..d28df3fbdd
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/datatypes/impl/GetDataServiceWithoutExceptionImpl.java
@@ -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 datatypes.impl;
+
+import commonj.sdo.DataObject;
+import java.util.List;
+
+import datatypes.GetDataServiceWithoutException;
+
+public class GetDataServiceWithoutExceptionImpl implements GetDataServiceWithoutException {
+
+ public byte[] getMessage(String paramString) {
+ return null;
+ }
+
+ public List<byte[]> getMessageList(String paramString) {
+ return null;
+ }
+
+ public DataObject getMessageSDO(String paramString) {
+ return null;
+ }
+
+ public List<DataObject> getMessageListSDOList(String paramString) {
+ return null;
+ }
+
+ public DataObject[] getMessageListSDOArr(String paramString) {
+ return null;
+ }
+
+ public DataObject getMessageListSDOinSDO(String paramString) {
+ return null;
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/helloworld/ABean.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/helloworld/ABean.java
new file mode 100644
index 0000000000..2d15ea2334
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/helloworld/ABean.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package helloworld;
+
+import yetanotherpackage.DBean;
+import anotherpackage.BBean;
+
+
+
+public class ABean {
+
+ protected String field1;
+ protected String field2;
+ protected BBean field3;
+ protected DBean field4;
+
+ public String getField1() {
+ return field1;
+ }
+
+ public void setField1(String field1) {
+ this.field1 = field1;
+ }
+
+ public String getField2() {
+ return field2;
+ }
+
+ public void setField2(String field2) {
+ this.field2 = field2;
+ }
+
+ public BBean getField3() {
+ return field3;
+ }
+
+ public void setField3(BBean field3) {
+ this.field3 = field3;
+ }
+
+ public DBean getField4() {
+ return field4;
+ }
+
+ public void setField4(DBean field4) {
+ this.field4 = field4;
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/helloworld/HelloWorldClientImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/helloworld/HelloWorldClientImpl.java
new file mode 100644
index 0000000000..0ec380b935
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/helloworld/HelloWorldClientImpl.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package helloworld;
+
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+import yetanotherpackage.AnotherHelloWorldException;
+import yetanotherpackage.DBean;
+
+import anotherpackage.BBean;
+import anotherpackage.CBean;
+
+/**
+ * This class implements the HelloWorld service.
+ */
+@Service(HelloWorldService.class)
+public class HelloWorldClientImpl implements HelloWorldService {
+
+ @Reference
+ protected HelloWorldService hwService;
+
+ public String getGreetings(String name) {
+ return "Hello " + hwService.getGreetings(name);
+ }
+
+ public String getGreetingsBean(ABean bean){
+ return "Hello " + hwService.getGreetingsBean(bean);
+ }
+
+ public String getGreetingsBeanArray(ABean[] bean){
+ return "Hello " + hwService.getGreetingsBeanArray(bean);
+ }
+
+ /*
+ public String getGreetingsBeanVector(Vector<ABean> bean){
+ return "Hello " + bean.get(0).getField1() + " " + bean.get(0).getField2();
+ }
+ */
+
+ public String getGreetingsBBean(BBean bean){
+ return "Hello " + hwService.getGreetingsBBean(bean);
+ }
+
+ public String getGreetingsCBean(CBean bean){
+ return "Hello " + hwService.getGreetingsCBean(bean);
+ }
+
+ public String getGreetingsDBean(DBean bean){
+ return "Hello " + hwService.getGreetingsDBean(bean);
+ }
+
+ public String getGreetingsException(String input) throws HelloWorldException {
+ return hwService.getGreetingsException(input);
+ }
+
+ public String getGreetingsAnotherException(String input) throws AnotherHelloWorldException {
+ return hwService.getGreetingsAnotherException(input);
+ }
+
+ public byte[] getGreetingsByteArray(byte[] input) {
+ return input;
+ }
+
+ public ABean getGreetingsABeanMultiple(ABean bean1, ABean bean2){
+ return hwService.getGreetingsABeanMultiple(bean1, bean2);
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/helloworld/HelloWorldException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/helloworld/HelloWorldException.java
new file mode 100644
index 0000000000..29b0d11fdb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/helloworld/HelloWorldException.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package helloworld;
+
+public class HelloWorldException extends Exception {
+
+ public HelloWorldException() {
+ }
+
+ public HelloWorldException(String message) {
+ super(message);
+ }
+
+ public HelloWorldException(Throwable cause) {
+ super(cause);
+ }
+
+ public HelloWorldException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+/*
+ public HelloWorldException(String message, String errorCode) {
+ super(message, errorCode);
+ }
+*/
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/helloworld/HelloWorldImpl.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/helloworld/HelloWorldImpl.java
new file mode 100644
index 0000000000..e4dd7523f2
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/helloworld/HelloWorldImpl.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package helloworld;
+
+import javax.jws.WebService;
+
+import org.oasisopen.sca.annotation.Service;
+
+import yetanotherpackage.DBean;
+import yetanotherpackage.AnotherHelloWorldException;
+
+import anotherpackage.BBean;
+import anotherpackage.CBean;
+
+/**
+ * This class implements the HelloWorld service.
+ */
+@WebService
+@Service(HelloWorldService.class)
+public class HelloWorldImpl implements HelloWorldService {
+
+ public String getGreetings(String name) {
+ return "Hello " + name;
+ }
+
+ public String getGreetingsBean(ABean bean) {
+ return "Hello " + bean.getField1() + " " + bean.getField2()
+ + bean.getField3().getField1() + " "
+ + bean.getField3().getField2();
+ }
+
+ public String getGreetingsBeanArray(ABean[] bean) {
+ return "Hello " + bean[0].getField1() + " " + bean[0].getField2();
+ }
+
+ /*
+ * public String getGreetingsBeanVector(Vector<ABean> bean){ return "Hello "
+ * + bean.get(0).getField1() + " " + bean.get(0).getField2(); }
+ */
+
+ public String getGreetingsBBean(BBean bean) {
+ return "Hello " + bean.getField1() + " " + bean.getField2();
+ }
+
+ public String getGreetingsCBean(CBean bean) {
+ return "Hello " + bean.getField1() + " " + bean.getField2();
+ }
+
+ public String getGreetingsDBean(DBean bean) {
+ return "Hello " + bean.getField1() + " " + bean.getField2() + " "
+ + bean.getField3().getField1() + " "
+ + bean.getField3().getField2();
+ }
+
+ public String getGreetingsException(String input) throws HelloWorldException {
+ throw new HelloWorldException("Hello " + input);
+ }
+
+ public String getGreetingsAnotherException(String input) throws AnotherHelloWorldException {
+ throw new AnotherHelloWorldException("Hello " + input);
+ }
+
+ public byte[] getGreetingsByteArray(byte[] input){
+ System.out.println(String.valueOf(input));
+ return input;
+ }
+
+ public ABean getGreetingsABeanMultiple(ABean bean1, ABean bean2){
+ return bean1;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..aae8a6763c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/helloworld/HelloWorldService.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package helloworld;
+
+import javax.jws.WebService;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+import yetanotherpackage.AnotherHelloWorldException;
+import yetanotherpackage.DBean;
+
+import anotherpackage.BBean;
+import anotherpackage.CBean;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@WebService
+@Remotable
+public interface HelloWorldService {
+
+ // primitives
+ public String getGreetings(String name);
+ byte[] getGreetingsByteArray(byte[] input);
+ String getGreetingsException(String input) throws HelloWorldException;
+ String getGreetingsAnotherException(String input) throws AnotherHelloWorldException;
+
+ // simple bean configs
+ public String getGreetingsBean(ABean bean);
+ public String getGreetingsBeanArray(ABean[] bean);
+ public String getGreetingsBBean(BBean bean);
+ public String getGreetingsCBean(CBean bean);
+ public String getGreetingsDBean(DBean bean);
+
+ // more complex bean configs
+ public ABean getGreetingsABeanMultiple(ABean bean1, ABean bean2);
+
+ // collections
+ //public String getGreetingsBeanVector(Vector<ABean> bean);
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/helloworld/package-info.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/helloworld/package-info.java
new file mode 100644
index 0000000000..22583a95a3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/helloworld/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * 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.
+ */
+@javax.xml.bind.annotation.XmlSchema(namespace="http://test")
+package helloworld;
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/other/EBean.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/other/EBean.java
new file mode 100644
index 0000000000..5f097d53cb
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/other/EBean.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package other;
+
+import javax.xml.bind.annotation.XmlType;
+
+public class EBean {
+
+ protected String field1;
+ protected String field2;
+
+ public String getField1() {
+ return field1;
+ }
+
+ public void setField1(String field1) {
+ this.field1 = field1;
+ }
+
+ public String getField2() {
+ return field2;
+ }
+
+ public void setField2(String field2) {
+ this.field2 = field2;
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/other/OtherPojo.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/other/OtherPojo.java
new file mode 100644
index 0000000000..d23327913c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/other/OtherPojo.java
@@ -0,0 +1,48 @@
+/*
+ * 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 other;
+
+public class OtherPojo {
+ private double real, imaginary;
+
+ public OtherPojo(double real, double imaginary) {
+ this.real = real;
+ this.imaginary = imaginary;
+ }
+
+ public OtherPojo() {
+ }
+
+ public double getReal() {
+ return real;
+ }
+
+ public void setReal(double real) {
+ this.real = real;
+ }
+
+ public double getImaginary() {
+ return imaginary;
+ }
+
+ public void setImaginary(double imaginary) {
+ this.imaginary = imaginary;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/other/package-info.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/other/package-info.java
new file mode 100644
index 0000000000..8fd41ce70b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/other/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+
+@XmlSchema(namespace = "http://other.jtest/")
+package other;
+
+import javax.xml.bind.annotation.XmlSchema;
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/yetanotherpackage/AnotherHelloWorldException.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/yetanotherpackage/AnotherHelloWorldException.java
new file mode 100644
index 0000000000..669d9ba3a7
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/yetanotherpackage/AnotherHelloWorldException.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package yetanotherpackage;
+
+public class AnotherHelloWorldException extends Exception {
+
+ public AnotherHelloWorldException() {
+ }
+
+ public AnotherHelloWorldException(String message) {
+ super(message);
+ }
+
+ public AnotherHelloWorldException(Throwable cause) {
+ super(cause);
+ }
+
+ public AnotherHelloWorldException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+/*
+ public HelloWorldException(String message, String errorCode) {
+ super(message, errorCode);
+ }
+*/
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/yetanotherpackage/DBean.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/yetanotherpackage/DBean.java
new file mode 100644
index 0000000000..fe4c28d817
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/yetanotherpackage/DBean.java
@@ -0,0 +1,73 @@
+/*
+ * 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 yetanotherpackage;
+
+import other.EBean;
+import anotherpackage.BBean;
+import anotherpackage.CBean;
+
+public class DBean {
+
+ protected String field1;
+ protected String field2;
+ protected BBean field3;
+ protected CBean field4;
+ protected EBean field5;
+
+ public String getField1() {
+ return field1;
+ }
+
+ public void setField1(String field1) {
+ this.field1 = field1;
+ }
+
+ public String getField2() {
+ return field2;
+ }
+
+ public void setField2(String field2) {
+ this.field2 = field2;
+ }
+
+ public BBean getField3() {
+ return field3;
+ }
+
+ public void setField3(BBean field3) {
+ this.field3 = field3;
+ }
+
+ public CBean getField4() {
+ return field4;
+ }
+
+ public void setField4(CBean field4) {
+ this.field4 = field4;
+ }
+
+ public EBean getField5() {
+ return field5;
+ }
+
+ public void setField5(EBean field5) {
+ this.field5 = field5;
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/yetyetanotherpackage/FBean.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/yetyetanotherpackage/FBean.java
new file mode 100644
index 0000000000..2ea36b3ffa
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/yetyetanotherpackage/FBean.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package yetyetanotherpackage;
+
+public class FBean {
+
+ protected String field1;
+ protected String field2;
+
+ public String getField1() {
+ return field1;
+ }
+
+ public void setField1(String field1) {
+ this.field1 = field1;
+ }
+
+ public String getField2() {
+ return field2;
+ }
+
+ public void setField2(String field2) {
+ this.field2 = field2;
+ }
+}
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/yetyetanotherpackage/package-info.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/yetyetanotherpackage/package-info.java
new file mode 100644
index 0000000000..1472d7c4b8
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/java/yetyetanotherpackage/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+
+@XmlSchema(namespace = "http://wahooo/")
+package yetyetanotherpackage;
+
+import javax.xml.bind.annotation.XmlSchema;
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/DataTypes.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/DataTypes.composite
new file mode 100644
index 0000000000..991b9078d9
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/DataTypes.composite
@@ -0,0 +1,38 @@
+<?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"
+ targetNamespace="http://verify.wsdlgen/"
+ name="DataTypes">
+
+ <component name="DataTypes">
+ <implementation.java class="datatypes.impl.DataTypesImpl" />
+ <service name="DataTypes">
+ <binding.ws uri="http://localhost:8085/DataTypes" />
+ </service>
+ </component>
+
+ <component name="DynamicSDO">
+ <implementation.java class="datatypes.impl.GetDataServiceWithoutExceptionImpl" />
+ <service name="GetDataServiceWithoutException">
+ <binding.ws uri="http://localhost:8085/GetDataServiceWithoutException" />
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..34da25216d
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/META-INF/sca-contribution.xml
@@ -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:hw="http://helloworld">
+ <deployable composite="hw:helloworldws" />
+</contribution>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/definitions.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/definitions.xml
new file mode 100644
index 0000000000..b5679ed329
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/definitions.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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.
+-->
+<sca:definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
+
+ <sca:intent name="transport"
+ constrains="sca:binding.ws">
+ <sca:description>
+ The general intent that a transport is available over which SOAP messages flow
+ </sca:description>
+ </sca:intent>
+
+
+ <sca:intent name="transport.http">
+ <sca:description>
+ An HTTP transport is required
+ </sca:description>
+ </sca:intent>
+
+ <!--
+ how does the following relate to confidentiality intents
+ does confidentiality become a profile intent?
+ -->
+ <sca:intent name="transport.https">
+ <sca:description>
+ An HTTPS transport is required
+ </sca:description>
+ </sca:intent>
+
+ </sca:definitions> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/helloworld.composite
new file mode 100644
index 0000000000..52b957d4a6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/helloworld.composite
@@ -0,0 +1,55 @@
+<?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://helloworld"
+ xmlns:hw="http://helloworld"
+ name="helloworldws">
+
+ <component name="HelloWorldClientComponent">
+ <implementation.java class="helloworld.HelloWorldClientImpl" />
+ <service name="HelloWorldService">
+ <binding.sca/>
+ </service>
+ <reference name="hwService">
+ <binding.ws uri="http://localhost:8085/HelloWorldServiceComponent"/>
+ </reference>
+ </component>
+
+ <component name="HelloWorldServiceComponent">
+ <implementation.java class="helloworld.HelloWorldImpl" />
+ <service name="HelloWorldService">
+ <binding.ws uri="http://localhost:8085/HelloWorldServiceComponent"/>
+ </service>
+ </component>
+
+ <!--
+ test compatibility between the JAXWS-RI wsdlgen'd WSDL and the Tuscany
+ gen'd WSDL by setting the service interface to the RI WSDL. Tuscany should
+ generate a WSDL for the component and compare the two for compatibility
+ -->
+ <component name="HelloWorldServiceCompatibilityComponent">
+ <implementation.java class="helloworld.HelloWorldImpl" />
+ <service name="HelloWorldService">
+ <interface.wsdl interface="http://helloworld/#wsdl.interface(HelloWorldImpl)"/>
+ <binding.ws uri="http://localhost:8085/HelloWorldServiceCompatibilityComponent"/>
+ </service>
+ </component>
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/jaxws/wsgen/wsdl/HelloWorldImplService.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/jaxws/wsgen/wsdl/HelloWorldImplService.wsdl
new file mode 100644
index 0000000000..e544beefbf
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/jaxws/wsgen/wsdl/HelloWorldImplService.wsdl
@@ -0,0 +1,251 @@
+<?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.3-b02-. -->
+<definitions targetNamespace="http://helloworld/" name="HelloWorldImplService" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://helloworld/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://wahooo/" schemaLocation="HelloWorldImplService_schema1.xsd"/>
+ </xsd:schema>
+ <xsd:schema>
+ <xsd:import namespace="http://test" schemaLocation="HelloWorldImplService_schema2.xsd"/>
+ </xsd:schema>
+ <xsd:schema>
+ <xsd:import namespace="http://other.jtest/" schemaLocation="HelloWorldImplService_schema3.xsd"/>
+ </xsd:schema>
+ <xsd:schema>
+ <xsd:import namespace="http://helloworld/" schemaLocation="HelloWorldImplService_schema4.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="getGreetingsBean">
+ <part name="parameters" element="tns:getGreetingsBean"/>
+ </message>
+ <message name="getGreetingsBeanResponse">
+ <part name="parameters" element="tns:getGreetingsBeanResponse"/>
+ </message>
+ <message name="getGreetingsBeanArray">
+ <part name="parameters" element="tns:getGreetingsBeanArray"/>
+ </message>
+ <message name="getGreetingsBeanArrayResponse">
+ <part name="parameters" element="tns:getGreetingsBeanArrayResponse"/>
+ </message>
+ <message name="getGreetingsBBean">
+ <part name="parameters" element="tns:getGreetingsBBean"/>
+ </message>
+ <message name="getGreetingsBBeanResponse">
+ <part name="parameters" element="tns:getGreetingsBBeanResponse"/>
+ </message>
+ <message name="getGreetingsCBean">
+ <part name="parameters" element="tns:getGreetingsCBean"/>
+ </message>
+ <message name="getGreetingsCBeanResponse">
+ <part name="parameters" element="tns:getGreetingsCBeanResponse"/>
+ </message>
+ <message name="getGreetingsDBean">
+ <part name="parameters" element="tns:getGreetingsDBean"/>
+ </message>
+ <message name="getGreetingsDBeanResponse">
+ <part name="parameters" element="tns:getGreetingsDBeanResponse"/>
+ </message>
+ <message name="getGreetingsException">
+ <part name="parameters" element="tns:getGreetingsException"/>
+ </message>
+ <message name="getGreetingsExceptionResponse">
+ <part name="parameters" element="tns:getGreetingsExceptionResponse"/>
+ </message>
+ <message name="HelloWorldException">
+ <part name="fault" element="tns:HelloWorldException"/>
+ </message>
+ <message name="getGreetingsAnotherException">
+ <part name="parameters" element="tns:getGreetingsAnotherException"/>
+ </message>
+ <message name="getGreetingsAnotherExceptionResponse">
+ <part name="parameters" element="tns:getGreetingsAnotherExceptionResponse"/>
+ </message>
+ <message name="AnotherHelloWorldException">
+ <part name="fault" element="tns:AnotherHelloWorldException"/>
+ </message>
+ <message name="getGreetingsByteArray">
+ <part name="parameters" element="tns:getGreetingsByteArray"/>
+ </message>
+ <message name="getGreetingsByteArrayResponse">
+ <part name="parameters" element="tns:getGreetingsByteArrayResponse"/>
+ </message>
+ <message name="getGreetingsABeanMultiple">
+ <part name="parameters" element="tns:getGreetingsABeanMultiple"/>
+ </message>
+ <message name="getGreetingsABeanMultipleResponse">
+ <part name="parameters" element="tns:getGreetingsABeanMultipleResponse"/>
+ </message>
+ <portType name="HelloWorldImpl">
+ <operation name="getGreetings">
+ <input message="tns:getGreetings"/>
+ <output message="tns:getGreetingsResponse"/>
+ </operation>
+ <operation name="getGreetingsBean">
+ <input message="tns:getGreetingsBean"/>
+ <output message="tns:getGreetingsBeanResponse"/>
+ </operation>
+ <operation name="getGreetingsBeanArray">
+ <input message="tns:getGreetingsBeanArray"/>
+ <output message="tns:getGreetingsBeanArrayResponse"/>
+ </operation>
+ <operation name="getGreetingsBBean">
+ <input message="tns:getGreetingsBBean"/>
+ <output message="tns:getGreetingsBBeanResponse"/>
+ </operation>
+ <operation name="getGreetingsCBean">
+ <input message="tns:getGreetingsCBean"/>
+ <output message="tns:getGreetingsCBeanResponse"/>
+ </operation>
+ <operation name="getGreetingsDBean">
+ <input message="tns:getGreetingsDBean"/>
+ <output message="tns:getGreetingsDBeanResponse"/>
+ </operation>
+ <operation name="getGreetingsException">
+ <input message="tns:getGreetingsException"/>
+ <output message="tns:getGreetingsExceptionResponse"/>
+ <fault message="tns:HelloWorldException" name="HelloWorldException"/>
+ </operation>
+ <operation name="getGreetingsAnotherException">
+ <input message="tns:getGreetingsAnotherException"/>
+ <output message="tns:getGreetingsAnotherExceptionResponse"/>
+ <fault message="tns:AnotherHelloWorldException" name="AnotherHelloWorldException"/>
+ </operation>
+ <operation name="getGreetingsByteArray">
+ <input message="tns:getGreetingsByteArray"/>
+ <output message="tns:getGreetingsByteArrayResponse"/>
+ </operation>
+ <operation name="getGreetingsABeanMultiple">
+ <input message="tns:getGreetingsABeanMultiple"/>
+ <output message="tns:getGreetingsABeanMultipleResponse"/>
+ </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="getGreetingsBean">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ <operation name="getGreetingsBeanArray">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ <operation name="getGreetingsBBean">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ <operation name="getGreetingsCBean">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ <operation name="getGreetingsDBean">
+ <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="HelloWorldException">
+ <soap:fault name="HelloWorldException" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="getGreetingsAnotherException">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="AnotherHelloWorldException">
+ <soap:fault name="AnotherHelloWorldException" use="literal"/>
+ </fault>
+ </operation>
+ <operation name="getGreetingsByteArray">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ <operation name="getGreetingsABeanMultiple">
+ <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/HelloWorldServiceComponent"/>
+ </port>
+ </service>
+</definitions>
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/jaxws/wsgen/wsdl/HelloWorldImplService_schema1.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/jaxws/wsgen/wsdl/HelloWorldImplService_schema1.xsd
new file mode 100644
index 0000000000..ff5f9c8f8a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/jaxws/wsgen/wsdl/HelloWorldImplService_schema1.xsd
@@ -0,0 +1,29 @@
+<?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://wahooo/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:complexType name="fBean">
+ <xs:sequence>
+ <xs:element name="field1" type="xs:string" minOccurs="0"/>
+ <xs:element name="field2" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/jaxws/wsgen/wsdl/HelloWorldImplService_schema2.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/jaxws/wsgen/wsdl/HelloWorldImplService_schema2.xsd
new file mode 100644
index 0000000000..9e88adc607
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/jaxws/wsgen/wsdl/HelloWorldImplService_schema2.xsd
@@ -0,0 +1,33 @@
+<?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://test" xmlns:ns1="http://helloworld/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:import namespace="http://helloworld/" schemaLocation="HelloWorldImplService_schema4.xsd"/>
+
+ <xs:complexType name="aBean">
+ <xs:sequence>
+ <xs:element name="field1" type="xs:string" minOccurs="0"/>
+ <xs:element name="field2" type="xs:string" minOccurs="0"/>
+ <xs:element name="field3" type="ns1:bBean" minOccurs="0"/>
+ <xs:element name="field4" type="ns1:dBean" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/jaxws/wsgen/wsdl/HelloWorldImplService_schema3.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/jaxws/wsgen/wsdl/HelloWorldImplService_schema3.xsd
new file mode 100644
index 0000000000..01e04822c0
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/jaxws/wsgen/wsdl/HelloWorldImplService_schema3.xsd
@@ -0,0 +1,29 @@
+<?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://other.jtest/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:complexType name="eBean">
+ <xs:sequence>
+ <xs:element name="field1" type="xs:string" minOccurs="0"/>
+ <xs:element name="field2" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/jaxws/wsgen/wsdl/HelloWorldImplService_schema4.xsd b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/jaxws/wsgen/wsdl/HelloWorldImplService_schema4.xsd
new file mode 100644
index 0000000000..95c82cb269
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/jaxws/wsgen/wsdl/HelloWorldImplService_schema4.xsd
@@ -0,0 +1,237 @@
+<?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/" xmlns:ns2="http://wahooo/" xmlns:ns1="http://test" xmlns:ns3="http://other.jtest/" xmlns:tns="http://helloworld/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:import namespace="http://test" schemaLocation="HelloWorldImplService_schema2.xsd"/>
+
+ <xs:import namespace="http://wahooo/" schemaLocation="HelloWorldImplService_schema1.xsd"/>
+
+ <xs:import namespace="http://other.jtest/" schemaLocation="HelloWorldImplService_schema3.xsd"/>
+
+ <xs:element name="AnotherHelloWorldException" type="tns:AnotherHelloWorldException"/>
+
+ <xs:element name="HelloWorldException" type="tns:HelloWorldException"/>
+
+ <xs:element name="getGreetings" type="tns:getGreetings"/>
+
+ <xs:element name="getGreetingsABeanMultiple" type="tns:getGreetingsABeanMultiple"/>
+
+ <xs:element name="getGreetingsABeanMultipleResponse" type="tns:getGreetingsABeanMultipleResponse"/>
+
+ <xs:element name="getGreetingsAnotherException" type="tns:getGreetingsAnotherException"/>
+
+ <xs:element name="getGreetingsAnotherExceptionResponse" type="tns:getGreetingsAnotherExceptionResponse"/>
+
+ <xs:element name="getGreetingsBBean" type="tns:getGreetingsBBean"/>
+
+ <xs:element name="getGreetingsBBeanResponse" type="tns:getGreetingsBBeanResponse"/>
+
+ <xs:element name="getGreetingsBean" type="tns:getGreetingsBean"/>
+
+ <xs:element name="getGreetingsBeanArray" type="tns:getGreetingsBeanArray"/>
+
+ <xs:element name="getGreetingsBeanArrayResponse" type="tns:getGreetingsBeanArrayResponse"/>
+
+ <xs:element name="getGreetingsBeanResponse" type="tns:getGreetingsBeanResponse"/>
+
+ <xs:element name="getGreetingsByteArray" type="tns:getGreetingsByteArray"/>
+
+ <xs:element name="getGreetingsByteArrayResponse" type="tns:getGreetingsByteArrayResponse"/>
+
+ <xs:element name="getGreetingsCBean" type="tns:getGreetingsCBean"/>
+
+ <xs:element name="getGreetingsCBeanResponse" type="tns:getGreetingsCBeanResponse"/>
+
+ <xs:element name="getGreetingsDBean" type="tns:getGreetingsDBean"/>
+
+ <xs:element name="getGreetingsDBeanResponse" type="tns:getGreetingsDBeanResponse"/>
+
+ <xs:element name="getGreetingsException" type="tns:getGreetingsException"/>
+
+ <xs:element name="getGreetingsExceptionResponse" type="tns:getGreetingsExceptionResponse"/>
+
+ <xs:element name="getGreetingsResponse" type="tns:getGreetingsResponse"/>
+
+ <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="HelloWorldException">
+ <xs:sequence>
+ <xs:element name="message" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="getGreetingsBeanArray">
+ <xs:sequence>
+ <xs:element name="arg0" type="ns1:aBean" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="bBean">
+ <xs:sequence>
+ <xs:element name="field1" type="xs:string" minOccurs="0"/>
+ <xs:element name="field2" type="xs:string" minOccurs="0"/>
+ <xs:element name="field3" type="ns2:fBean" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="dBean">
+ <xs:sequence>
+ <xs:element name="field1" type="xs:string" minOccurs="0"/>
+ <xs:element name="field2" type="xs:string" minOccurs="0"/>
+ <xs:element name="field3" type="tns:bBean" minOccurs="0"/>
+ <xs:element name="field4" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="field1" type="xs:string" minOccurs="0"/>
+ <xs:element name="field2" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="field5" type="ns3:eBean" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="getGreetingsBeanArrayResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="getGreetingsByteArray">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:base64Binary" nillable="true" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="getGreetingsByteArrayResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:base64Binary" nillable="true" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="getGreetingsBBean">
+ <xs:sequence>
+ <xs:element name="arg0" type="tns:bBean" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="getGreetingsBBeanResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="getGreetingsCBean">
+ <xs:sequence>
+ <xs:element name="arg0" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="field1" type="xs:string" minOccurs="0"/>
+ <xs:element name="field2" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="getGreetingsCBeanResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="getGreetingsAnotherException">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="getGreetingsAnotherExceptionResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="AnotherHelloWorldException">
+ <xs:sequence>
+ <xs:element name="message" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="getGreetingsABeanMultiple">
+ <xs:sequence>
+ <xs:element name="arg0" type="ns1:aBean" minOccurs="0"/>
+ <xs:element name="arg1" type="ns1:aBean" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="getGreetingsABeanMultipleResponse">
+ <xs:sequence>
+ <xs:element name="return" type="ns1:aBean" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="getGreetingsBean">
+ <xs:sequence>
+ <xs:element name="arg0" type="ns1:aBean" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="getGreetingsBeanResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="getGreetingsDBean">
+ <xs:sequence>
+ <xs:element name="arg0" type="tns:dBean" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="getGreetingsDBeanResponse">
+ <xs:sequence>
+ <xs:element name="return" 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:schema>
+
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/jaxws/wsgen/wsdl/README b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/jaxws/wsgen/wsdl/README
new file mode 100644
index 0000000000..0830253f0a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/main/resources/jaxws/wsgen/wsdl/README
@@ -0,0 +1,2 @@
+The result of the jaxws-maven-plugin copied manually from ./target
+and updated to include the correct port URL and license headers
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/test/java/datatypes/BaseFramework.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/test/java/datatypes/BaseFramework.java
new file mode 100644
index 0000000000..4cae4595a4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/test/java/datatypes/BaseFramework.java
@@ -0,0 +1,266 @@
+/*
+ * 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 datatypes;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.wsdl.Binding;
+import javax.wsdl.Definition;
+import javax.wsdl.Fault;
+import javax.wsdl.Input;
+import javax.wsdl.Message;
+import javax.wsdl.Operation;
+import javax.wsdl.Output;
+import javax.wsdl.Part;
+import javax.wsdl.Port;
+import javax.wsdl.PortType;
+import javax.wsdl.Service;
+import javax.wsdl.Types;
+import javax.wsdl.extensions.ExtensibilityElement;
+import javax.wsdl.extensions.schema.Schema;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import javax.xml.namespace.QName;
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.apache.tuscany.sca.binding.ws.wsdlgen.WSDLServiceGenerator;
+import static org.junit.Assert.assertNotNull;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+
+/**
+ * Test ?wsdl works and that the returned WSDL is correct
+ *
+ * @version $Rev: 814373 $ $Date: 2009-09-13 19:06:29 +0100 (Sun, 13 Sep 2009) $
+ */
+public class BaseFramework {
+ private static final String SCHEMA_NS = "http://www.w3.org/2001/XMLSchema";
+ private static final String SCHEMA_NAME = "schema";
+ private static final QName SCHEMA_QNAME = new QName(SCHEMA_NS, SCHEMA_NAME);
+
+ private static Map<String, Element> schemaMap;
+ private static PortType portType;
+ private static boolean printWSDL = true;
+ private static org.apache.tuscany.sca.Node node;
+
+ private Map<String, String> prefixMap;
+
+ public BaseFramework() {
+ // create a new instance of this for each of the tests
+ prefixMap = new HashMap<String, String>();
+ }
+
+ protected Element parameterElement(String methodName) {
+ Operation op = portType.getOperation(methodName, null, null);
+ Input in = op.getInput();
+ Message msg = in.getMessage();
+ Part part = msg.getPart(msg.getQName().getLocalPart());
+ if (part == null) {
+ // bare parameter style
+ part = msg.getPart("arg0");
+ return bareElement(part.getElementName());
+ } else {
+ return schemaElement(part.getElementName());
+ }
+ }
+
+ protected String parameterType(String methodName) {
+ return parameterElement(methodName).getAttribute("type");
+ }
+
+ protected Element returnElement(String methodName) {
+ Operation op = portType.getOperation(methodName, null, null);
+ Output out = op.getOutput();
+ Message msg = out.getMessage();
+ Part part = msg.getPart(msg.getQName().getLocalPart());
+ QName elementQName = part.getElementName();
+ return schemaElement(elementQName);
+ }
+
+ protected String returnType(String methodName) {
+ return returnElement(methodName).getAttribute("type");
+ }
+
+ protected Element faultElement(String methodName, String faultName) {
+ Operation op = portType.getOperation(methodName, null, null);
+ Fault fault = op.getFault(faultName);
+ Message msg = fault.getMessage();
+ Part part = msg.getPart(msg.getQName().getLocalPart());
+ QName elementQName = part.getElementName();
+ return schemaElement(elementQName);
+ }
+
+ protected String faultType(String methodName, String faultName) {
+ return faultElement(methodName, faultName).getAttribute("type");
+ }
+
+ private Element bareElement(QName elementQName) {
+ // find schema definition for wrapper element
+ Element schema = schemaMap.get(elementQName.getNamespaceURI());
+
+ // find namespace prefixes for this schema definition
+ NamedNodeMap attrNodes = schema.getAttributes();
+ for (int i = 0; i < attrNodes.getLength(); i++) {
+ Attr attr = (Attr)attrNodes.item(i);
+ String attrName = attr.getName();
+ if (attrName.startsWith("xmlns:")) {
+ prefixMap.put(attrName.substring(6), attr.getValue());
+ }
+ }
+
+ // find wrapper element definition in schema
+ String elementName = elementQName.getLocalPart();
+ Element wrapper = null;
+ NodeList childNodes = schema.getElementsByTagNameNS(SCHEMA_NS, "element");
+ for (int i = 0; i < childNodes.getLength(); i++) {
+ Node childNode = childNodes.item(i);
+ if (childNode instanceof Element) {
+ String name = ((Element)childNode).getAttribute("name");
+ if (elementName.equals(name)) {
+ wrapper = (Element)childNode;
+ break;
+ }
+ }
+ }
+ return wrapper;
+ }
+
+ private Element schemaElement(QName elementQName) {
+ Element wrapper = bareElement(elementQName);
+
+ // find type definition for wrapper element
+ String typeName = wrapper.getAttribute("type");
+ Element wrapperType = null;
+ if ("".equals(typeName)) {
+ NodeList childNodes = wrapper.getElementsByTagNameNS(SCHEMA_NS, "complexType");
+ wrapperType = (Element)childNodes.item(0);
+ } else {
+ wrapperType = typeDefinition(typeName);
+ }
+
+ return firstChild(wrapperType);
+ }
+
+ protected Element typeDefinition(String typeName) {
+ String typePrefix = typeName.substring(0, typeName.indexOf(":"));
+ String typeLocalName = typeName.substring(typeName.indexOf(":") + 1);
+ Element typeSchema = schemaMap.get(prefixMap.get(typePrefix));
+ Element typeElement = null;
+ NodeList childNodes = typeSchema.getElementsByTagNameNS(SCHEMA_NS, "complexType");
+ for (int i = 0; i < childNodes.getLength(); i++) {
+ Node childNode = childNodes.item(i);
+ if (childNode instanceof Element) {
+ String name = ((Element)childNode).getAttribute("name");
+ if (typeLocalName.equals(name)) {
+ typeElement = (Element)childNode;
+ break;
+ }
+ }
+ }
+ return typeElement;
+ }
+
+ protected Element firstChild(Element complexType) {
+ // find xs:sequence child element
+ NodeList childNodes = complexType.getElementsByTagNameNS(SCHEMA_NS, "sequence");
+ Element sequence = (Element)childNodes.item(0);
+
+ // find first xs:element child element
+ childNodes = sequence.getElementsByTagNameNS(SCHEMA_NS, "element");
+ return (Element)childNodes.item(0);
+ }
+
+ protected Element extensionElement(Element complexType) {
+ // find xs:complexContent child element
+ NodeList childNodes = complexType.getElementsByTagNameNS(SCHEMA_NS, "complexContent");
+ Element complexContent = (Element)childNodes.item(0);
+
+ // find first xs:extension child element
+ childNodes = complexContent.getElementsByTagNameNS(SCHEMA_NS, "extension");
+ return (Element)childNodes.item(0);
+ }
+
+ private static void readWSDL(String componentName, String serviceName) throws Exception {
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ wsdlReader.setFeature("javax.wsdl.verbose",false);
+ wsdlReader.setFeature("javax.wsdl.importDocuments",true);
+
+ Definition definition = wsdlReader.readWSDL("http://localhost:8085/" + serviceName + "?wsdl");
+ assertNotNull(definition);
+
+ // find portType
+ Service service = definition.getService(new QName("http://datatypes/", componentName+'_'+serviceName));
+ Port port = service.getPort(serviceName + "SOAP11Port");
+ Binding binding = port.getBinding();
+ portType = binding.getPortType();
+
+ // find schema definitions
+ Types types = definition.getTypes();
+ schemaMap = new HashMap<String, Element>();
+ for (Object ext : types.getExtensibilityElements()) {
+ ExtensibilityElement extElement = (ExtensibilityElement)ext;
+ if (SCHEMA_QNAME.equals(extElement.getElementType())) {
+ if (extElement instanceof Schema) {
+ Element schemaElement = ((Schema)extElement).getElement();
+ schemaMap.put(schemaElement.getAttribute("targetNamespace"), schemaElement);
+ }
+ }
+ }
+ }
+
+ /*
+ * Used for debugging DOM problems
+ */
+ private void printDOM(Node node){
+ try {
+ Transformer transformer = TransformerFactory.newInstance().newTransformer();
+ Source source = new DOMSource(node);
+ Result result = new StreamResult(System.out);
+ transformer.transform(source, result);
+ } catch (Exception ex){
+ ex.printStackTrace();
+ }
+ }
+
+ protected static void start(String componentName, String serviceName) throws Exception {
+ WSDLServiceGenerator.printWSDL = printWSDL;
+ node = TuscanyRuntime.newInstance().createNode("default");
+ node.installContribution("datatypescontrib", "target/classes", null, null);
+ node.startComposite("datatypescontrib", "DataTypes.composite");
+ printWSDL = false; // print WSDL once only
+ readWSDL(componentName, serviceName);
+ }
+
+ protected static void stop() throws Exception {
+ node.stop();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/test/java/datatypes/DataTypesTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/test/java/datatypes/DataTypesTestCase.java
new file mode 100644
index 0000000000..1e83fe3435
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/test/java/datatypes/DataTypesTestCase.java
@@ -0,0 +1,186 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package datatypes;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.w3c.dom.Element;
+import static org.junit.Assert.assertEquals;
+
+/**
+ * Test ?wsdl works and that the returned WSDL is correct
+ *
+ * @version $Rev: 814373 $ $Date: 2009-09-13 19:06:29 +0100 (Sun, 13 Sep 2009) $
+ */
+public class DataTypesTestCase extends BaseFramework {
+
+ @Test
+ public void testSimpleInt() throws Exception {
+ assertEquals("xs:int", parameterType("testSimpleInt"));
+ }
+
+ @Test
+ public void testSimpleArrayInt() throws Exception {
+ Element paramElement = parameterElement("testSimpleArrayInt");
+ assertEquals("xs:int", paramElement.getAttribute("type"));
+ assertEquals("unbounded", paramElement.getAttribute("maxOccurs"));
+ }
+
+ @Test
+ public void testSimpleMultiArrayInt() throws Exception {
+ Element paramElement = parameterElement("testSimpleMultiArrayInt");
+ // prefix name can vary, so compare only the fixed parts
+ assertEquals("ns", paramElement.getAttribute("type").substring(0, 2));
+ assertEquals(":intArray", paramElement.getAttribute("type").substring(3));
+ assertEquals("unbounded", paramElement.getAttribute("maxOccurs"));
+ }
+
+ @Test
+ public void testSimpleMulti3ArrayInt() throws Exception {
+ Element paramElement = parameterElement("testSimpleMulti3ArrayInt");
+ // prefix name can vary, so compare only the fixed parts
+ assertEquals("ns", paramElement.getAttribute("type").substring(0, 2));
+ assertEquals(":intArrayArray", paramElement.getAttribute("type").substring(3));
+ assertEquals("unbounded", paramElement.getAttribute("maxOccurs"));
+ }
+
+ @Test
+ public void testList() throws Exception {
+ Element paramElement = parameterElement("testList");
+ assertEquals("xs:anyType", paramElement.getAttribute("type"));
+ assertEquals("unbounded", paramElement.getAttribute("maxOccurs"));
+ }
+
+ @Test
+ public void testSimpleListString() throws Exception {
+ Element paramElement = parameterElement("testSimpleListString");
+ assertEquals("xs:string", paramElement.getAttribute("type"));
+ assertEquals("unbounded", paramElement.getAttribute("maxOccurs"));
+ }
+
+ @Test
+ public void testReturnSimpleListString() throws Exception {
+ Element retElement = returnElement("testReturnSimpleListString");
+ assertEquals("xs:string", retElement.getAttribute("type"));
+ assertEquals("unbounded", retElement.getAttribute("maxOccurs"));
+ }
+
+ @Test
+ public void testListByteArray() throws Exception {
+ Element paramElement = parameterElement("testListByteArray");
+ assertEquals("xs:base64Binary", paramElement.getAttribute("type"));
+ assertEquals("unbounded", paramElement.getAttribute("maxOccurs"));
+ }
+
+ @Test
+ public void testListWildcard() throws Exception {
+ Element paramElement = parameterElement("testListWildcard");
+ assertEquals("xs:anyType", paramElement.getAttribute("type"));
+ assertEquals("unbounded", paramElement.getAttribute("maxOccurs"));
+ }
+
+ @Test
+ public void testComplex() throws Exception {
+ String paramType = parameterType("testComplex");
+ assertEquals("tns:complexNumber", paramType);
+ assertEquals("xs:double", firstChild(typeDefinition(paramType)).getAttribute("type"));
+ }
+
+ @Test
+ public void testOtherPackage() throws Exception {
+ String paramType = parameterType("testOtherPackage");
+ // prefix name can vary, so compare only the fixed parts
+ assertEquals("ns", paramType.substring(0, 2));
+ assertEquals(":otherPojo", paramType.substring(3));
+ assertEquals("xs:double", firstChild(typeDefinition(paramType)).getAttribute("type"));
+ }
+
+ @Test
+ public void testByteArray() throws Exception {
+ assertEquals("xs:base64Binary", parameterType("testByteArray"));
+ }
+
+ @Test
+ public void testBaseExtension() throws Exception {
+ String paramType = parameterType("testBaseExtension");
+ assertEquals("tns:extClass", paramType);
+ assertEquals("tns:baseClass", extensionElement(typeDefinition(paramType)).getAttribute("base"));
+ }
+
+ @Test
+ public void testServiceReference() throws Exception {
+ assertEquals("xs:anyType", parameterType("testServiceReference"));
+ }
+
+ @Test
+ public void testException() throws Exception {
+ assertEquals("xs:string", faultType("testException", "Exception"));
+ }
+
+ @Test
+ public void testDynamicSDO() throws Exception {
+ assertEquals("xs:anyType", returnType("testDynamicSDO"));
+ }
+
+ @Test
+ public void testWebParamSDO() throws Exception {
+ Element paramElement = parameterElement("testWebParamSDO");
+ assertEquals("foo", paramElement.getAttribute("name"));
+ assertEquals("xs:anyType", paramElement.getAttribute("type"));
+ }
+
+ @Test
+ public void testWebParamSDOArray() throws Exception {
+ Element paramElement = parameterElement("testWebParamSDOArray");
+ assertEquals("foo", paramElement.getAttribute("name"));
+ assertEquals("xs:anyType", paramElement.getAttribute("type"));
+ assertEquals("unbounded", paramElement.getAttribute("maxOccurs"));
+ }
+/*
+
+ @Test
+ public void testWebParamBare() throws Exception {
+ Element paramElement = parameterElement("testWebParamBare");
+ assertEquals("simpleInt", paramElement.getAttribute("name"));
+ assertEquals("xs:int", paramElement.getAttribute("type"));
+ }
+
+ @Test
+ @Ignore
+ public void testWebParamBareArray() throws Exception {
+ Element paramElement = parameterElement("testWebParamBareArray");
+ assertEquals("arrayInt", paramElement.getAttribute("name"));
+ assertEquals("xs:int", paramElement.getAttribute("type"));
+ assertEquals("unbounded", paramElement.getAttribute("maxOccurs"));
+ }
+*/
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ BaseFramework.start("DataTypes", "DataTypes");
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ BaseFramework.stop();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/test/java/datatypes/DynamicSDOTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/test/java/datatypes/DynamicSDOTestCase.java
new file mode 100644
index 0000000000..94d7765466
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/test/java/datatypes/DynamicSDOTestCase.java
@@ -0,0 +1,81 @@
+/*
+ * 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 datatypes;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.w3c.dom.Element;
+import static org.junit.Assert.assertEquals;
+
+/**
+ * Test ?wsdl works and that the returned WSDL is correct
+ *
+ * @version $Rev: 814373 $ $Date: 2009-09-13 19:06:29 +0100 (Sun, 13 Sep 2009) $
+ */
+public class DynamicSDOTestCase extends BaseFramework {
+
+ @Test
+ public void testGetMessage() throws Exception {
+ assertEquals("xs:base64Binary", returnType("getMessage"));
+ }
+
+ @Test
+ public void testGetMessageList() throws Exception {
+ Element retElement = returnElement("getMessageList");
+ assertEquals("xs:base64Binary", retElement.getAttribute("type"));
+ assertEquals("unbounded", retElement.getAttribute("maxOccurs"));
+ }
+
+ @Test
+ public void testGetMessageSDO() throws Exception {
+ assertEquals("xs:anyType", returnType("getMessageSDO"));
+ }
+
+ @Test
+ public void testGetMessageListSDOList() throws Exception {
+ Element retElement = returnElement("getMessageListSDOList");
+ assertEquals("xs:anyType", retElement.getAttribute("type"));
+ assertEquals("unbounded", retElement.getAttribute("maxOccurs"));
+ }
+
+ @Test
+ public void testGetMessageListSDOArr() throws Exception {
+ Element retElement = returnElement("getMessageListSDOArr");
+ assertEquals("xs:anyType", retElement.getAttribute("type"));
+ assertEquals("unbounded", retElement.getAttribute("maxOccurs"));
+ }
+
+ @Test
+ public void testGetMessageListSDOinSDO() throws Exception {
+ assertEquals("xs:anyType", returnType("getMessageListSDOinSDO"));
+ }
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ BaseFramework.start("DynamicSDO", "GetDataServiceWithoutException");
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() throws Exception {
+ BaseFramework.stop();
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/test/java/helloworld/SchemaCorrectionTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/test/java/helloworld/SchemaCorrectionTestCase.java
new file mode 100644
index 0000000000..39f5380a00
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/test/java/helloworld/SchemaCorrectionTestCase.java
@@ -0,0 +1,462 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package helloworld;
+
+import java.io.IOException;
+import java.lang.annotation.Annotation;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.SchemaOutputResolver;
+import javax.xml.bind.annotation.XmlSchema;
+import javax.xml.namespace.QName;
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMResult;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.databinding.jaxb.JAXBContextHelper;
+import org.apache.tuscany.sca.databinding.jaxb.JAXBTypeHelper;
+import org.apache.tuscany.sca.impl.NodeImpl;
+import org.apache.tuscany.sca.interfacedef.java.jaxws.GeneratedClassLoader;
+import org.apache.ws.commons.schema.XmlSchemaCollection;
+import org.apache.ws.commons.schema.XmlSchemaComplexType;
+import org.apache.ws.commons.schema.XmlSchemaElement;
+import org.apache.ws.commons.schema.XmlSchemaGroupBase;
+import org.apache.ws.commons.schema.XmlSchemaImport;
+import org.apache.ws.commons.schema.XmlSchemaObject;
+import org.apache.ws.commons.schema.XmlSchemaObjectCollection;
+import org.apache.ws.commons.schema.XmlSchemaSerializer.XmlSchemaSerializerException;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.objectweb.asm.AnnotationVisitor;
+import org.objectweb.asm.ClassWriter;
+import org.objectweb.asm.FieldVisitor;
+import org.objectweb.asm.MethodVisitor;
+import org.objectweb.asm.Opcodes;
+import org.w3c.dom.Document;
+
+import anotherpackage.BBean;
+import anotherpackage.CBean;
+import yetanotherpackage.DBean;
+
+/**
+ * Tests that the helloworld server is available
+ */
+@Ignore("Just some scratch code I don't want to loose just yet")
+public class SchemaCorrectionTestCase{
+
+ private Node node;
+
+ @Before
+ public void startServer() throws Exception {
+ node = TuscanyRuntime.newInstance().createNode("default");
+ }
+
+ @Test
+ public void testSchemaGen() throws JAXBException, IOException, TransformerException, Exception {
+ ExtensionPointRegistry extensionPointRegistry = ((NodeImpl)node).getExtensionPointRegistry();
+ JAXBTypeHelper typeHelper = new JAXBTypeHelper(extensionPointRegistry);
+ JAXBContextHelper contextHelper = new JAXBContextHelper(extensionPointRegistry);
+
+ //typeHelper.getSchemaDefinitions(factory, resolver, intf);
+
+ Package pkg = CBean.class.getPackage();
+ String pkgName = pkg.getName();
+ Annotation[] pkgAnnotations = pkg.getAnnotations();
+ boolean genPkgInfo = true;
+
+ for (Annotation annotation : pkgAnnotations){
+ if (annotation instanceof XmlSchema){
+ XmlSchema schemaAnnotation = (XmlSchema)annotation;
+ if (schemaAnnotation.namespace() != null){
+ genPkgInfo = false;
+ break;
+ }
+ }
+ }
+
+ JAXBContext context = null;
+
+ if (genPkgInfo){
+ System.out.println("There is no package info so generate one");
+/* Can gen the annotation but then what?
+ Class<?> genClass = generatePackageInfo(pkgName, "http://sometestsnamespace");
+
+ Package pkgGen = aClass.getPackage();
+ String pkgGenName = pkg.getName();
+ Annotation[] pkgGenAnnotations = pkg.getAnnotations();
+ XmlSchema schemaAnnotation = null;
+
+ for (Annotation annotation : pkgGenAnnotations){
+ if (annotation instanceof XmlSchema){
+ schemaAnnotation = (XmlSchema)annotation;
+ }
+ }
+
+ pkgAnnotations = pkgGenAnnotations;
+*/
+
+/* Can't pass the generarted package into JAXB. It has to
+ * be properly referenced as a package of a class you're trying
+ * generate.
+ Class<?>[] classes = {aClass, genClass};
+ context = contextHelper.createJAXBContext(classes);
+*/
+ } else {
+ System.out.println("There is package info");
+ }
+
+ Class<?>[] classes = {ABean.class, BBean.class, CBean.class, DBean.class};
+ context = contextHelper.createJAXBContext(classes);
+
+ DOMResolverImpl resolver = new DOMResolverImpl();
+ context.generateSchema(resolver);
+
+ String toNamespace = null;
+ String fromNamespace = null;
+ Document toDocument = null;
+ Document fromDocument = null;
+ Map<String, Document> otherDocuments = new HashMap<String, Document>();
+
+ Map<String, DOMResult> results = resolver.getResults();
+ for (Map.Entry<String, DOMResult> entry : results.entrySet()) {
+ System.out.println("\nPREMERGE NS: " + entry.getKey());
+ if (entry.getKey().equals("")){
+ fromNamespace = entry.getKey();
+ fromDocument = (Document)entry.getValue().getNode();
+ } else if (entry.getKey().equals("http://helloworld/")){
+ toNamespace = entry.getKey();
+ toDocument = (Document)entry.getValue().getNode();
+ } else {
+ otherDocuments.put(entry.getKey(), (Document)entry.getValue().getNode());
+ }
+ System.out.println("PREMERGE XSD: ");
+ printDOM((Document)entry.getValue().getNode());
+ }
+
+ // merge no-namespace XSD into default namespace XSD
+ System.out.println("\nPOSTMERGE");
+ List<Document> mergedDocuments = mergeSchema(fromNamespace, fromDocument, toNamespace, toDocument, otherDocuments.values());
+
+ for (Document mergedDocument : mergedDocuments){
+ System.out.println("\n");
+ printDOM(mergedDocument);
+ }
+ }
+
+ @After
+ public void stopServer() throws Exception {
+
+ }
+
+ private static class DOMResolverImpl extends SchemaOutputResolver {
+ private Map<String, DOMResult> results = new HashMap<String, DOMResult>();
+
+ @Override
+ public Result createOutput(String ns, String file) throws IOException {
+ DOMResult result = new DOMResult();
+ // TUSCANY-2498: Set the system id to "" so that the xsd:import doesn't produce
+ // an illegal schemaLocation attr
+ result.setSystemId("");
+ results.put(ns, result);
+ return result;
+ }
+
+ public Map<String, DOMResult> getResults() {
+ return results;
+ }
+ }
+
+ private void printDOM(Document document)throws TransformerException {
+ Transformer transformer = TransformerFactory.newInstance().newTransformer();
+ Source source = new DOMSource(document);
+ Result output = new StreamResult(System.out);
+ transformer.transform(source, output);
+ }
+
+ public Class<?> generatePackageInfo(String packageName, String namespace) throws Exception{
+ String className = packageName + ".package-info";
+ String internalClassName = className.replace('.', '/');
+
+ PackageInfoGenerator pig = new PackageInfoGenerator();
+
+ byte[] byteCode = pig.dump(internalClassName, namespace);
+
+ GeneratedClassLoader classLoader = new GeneratedClassLoader(this.getClass().getClassLoader());
+ return classLoader.getGeneratedClass(className, byteCode);
+ }
+
+
+ public class PackageInfoGenerator implements Opcodes {
+
+ public byte[] dump (String internalClassName, String namespace) throws Exception {
+ ClassWriter cw = new ClassWriter(0);
+ FieldVisitor fv;
+ MethodVisitor mv;
+ AnnotationVisitor av0;
+
+ cw.visit(V1_6, ACC_ABSTRACT + ACC_INTERFACE + ACC_SYNTHETIC, internalClassName, null, "java/lang/Object", null);
+
+ cw.visitSource("package-info.java", null);
+
+
+ av0 = cw.visitAnnotation("Ljavax/xml/bind/annotation/XmlSchema;", true);
+ av0.visit("namespace", namespace);
+ av0.visitEnd();
+
+ cw.visitEnd();
+
+ return cw.toByteArray();
+ }
+ }
+
+ private List<Document> mergeSchema(String fromNamespace, Document fromDoc, String toNamespace, Document toDoc, Collection<Document> relatedDocs) throws XmlSchemaSerializerException{
+ // Read all the input DOMs into a schema collection so we can maniuplate them
+ XmlSchemaCollection schemaCollection = new XmlSchemaCollection();
+ schemaCollection.read(fromDoc.getDocumentElement());
+ schemaCollection.read(toDoc.getDocumentElement());
+
+ for(Document doc : relatedDocs){
+ schemaCollection.read(doc.getDocumentElement());
+ }
+
+ org.apache.ws.commons.schema.XmlSchema fromSchema = null;
+ org.apache.ws.commons.schema.XmlSchema toSchema = null;
+ List<org.apache.ws.commons.schema.XmlSchema> relatedSchema = new ArrayList<org.apache.ws.commons.schema.XmlSchema>();
+ org.apache.ws.commons.schema.XmlSchema schemas[] = schemaCollection.getXmlSchemas();
+ for (int i=1; i < schemas.length; i++){
+ org.apache.ws.commons.schema.XmlSchema schema = schemas[i];
+ if (schema.getTargetNamespace() == null){
+ fromSchema = schema;
+ } else if (schema.getTargetNamespace().equals(toNamespace)){
+ toSchema = schema;
+ relatedSchema.add(schema);
+ } else {
+ relatedSchema.add(schema);
+ }
+ }
+
+ // copy all the FROM items to the TO schema
+ XmlSchemaObjectCollection fromItems = fromSchema.getItems();
+ XmlSchemaObjectCollection toItems = toSchema.getItems();
+
+ Iterator<XmlSchemaObject> iter = fromItems.getIterator();
+ while(iter.hasNext()){
+ // don't copy import for TO namespace
+ XmlSchemaObject obj = iter.next();
+ if (obj instanceof XmlSchemaImport &&
+ ((XmlSchemaImport)obj).getNamespace().equals(toNamespace)){
+ // do nothing
+ } else {
+ toItems.add(obj);
+ // correct any references to the item just moved
+ fixUpMovedTypeReferences(fromNamespace, toNamespace, obj, relatedSchema);
+ }
+ }
+
+ // Create the list of resulting DOMs
+ List<Document> resultDocs = new ArrayList<Document>();
+
+ for (org.apache.ws.commons.schema.XmlSchema related : relatedSchema){
+ resultDocs.add(related.getSchemaDocument());
+ }
+
+ return resultDocs;
+ }
+
+ public void fixUpMovedTypeReferences(String fromNamespace, String toNamespace, XmlSchemaObject fixUpObj, List<org.apache.ws.commons.schema.XmlSchema> relatedSchema){
+
+ if (!(fixUpObj instanceof XmlSchemaComplexType)){
+ return;
+ }
+
+ for (org.apache.ws.commons.schema.XmlSchema schema : relatedSchema){
+ int importRemoveIndex = -1;
+ for (int i = 0; i < schema.getItems().getCount(); i++){
+ XmlSchemaObject obj = schema.getItems().getItem(i);
+
+ // if this is not the TO schema then fix up all references
+ // to items moved to the TO schema
+ if(!schema.getTargetNamespace().equals(toNamespace)){
+ processXMLSchemaObject(toNamespace, obj, fixUpObj);
+ }
+
+ // remove FROM imports
+ if (obj instanceof XmlSchemaImport &&
+ ((XmlSchemaImport)obj).getNamespace().equals(fromNamespace)){
+ importRemoveIndex = i;
+ }
+ }
+
+ if (importRemoveIndex >= 0){
+ schema.getItems().removeAt(importRemoveIndex);
+ }
+ }
+ }
+
+ public void processXMLSchemaObject(String toNamespace, XmlSchemaObject obj, XmlSchemaObject fixUpObj){
+ if (obj instanceof XmlSchemaComplexType){
+ processXMLSchemaObject(toNamespace, ((XmlSchemaComplexType)obj).getParticle(), fixUpObj);
+ } else if (obj instanceof XmlSchemaElement){
+ XmlSchemaElement element = (XmlSchemaElement)obj;
+ if(element.getSchemaType() == fixUpObj){
+ QName name = element.getSchemaTypeName();
+ QName newName = new QName(toNamespace, name.getLocalPart());
+ element.setSchemaTypeName(newName);
+ }
+ ((XmlSchemaElement)obj).getSchemaType();
+ } else if (obj instanceof XmlSchemaGroupBase){
+ XmlSchemaObjectCollection items = ((XmlSchemaGroupBase)obj).getItems();
+ Iterator<XmlSchemaObject> iter = items.getIterator();
+ while(iter.hasNext()){
+ processXMLSchemaObject(toNamespace, iter.next(), fixUpObj);
+ }
+ }
+ }
+
+/*
+ private List<Document> mergeSchema(String fromNamespace, Document fromDoc, String toNamespace, Document toDoc, Collection<Document> relatedDocs) throws XmlSchemaSerializerException{
+ XmlSchemaCollection schemaCollection = new XmlSchemaCollection();
+ schemaCollection.read(fromDoc.getDocumentElement());
+ schemaCollection.read(toDoc.getDocumentElement());
+
+ for(Document doc : relatedDocs){
+ schemaCollection.read(doc.getDocumentElement());
+ }
+
+ org.apache.ws.commons.schema.XmlSchema fromSchema = null;
+ org.apache.ws.commons.schema.XmlSchema toSchema = null;
+ List<org.apache.ws.commons.schema.XmlSchema> relatedSchema = new ArrayList<org.apache.ws.commons.schema.XmlSchema>();
+ org.apache.ws.commons.schema.XmlSchema schemas[] = schemaCollection.getXmlSchemas();
+ for (int i=1; i < schemas.length; i++){
+ org.apache.ws.commons.schema.XmlSchema schema = schemas[i];
+ if (schema.getTargetNamespace() == null){
+ fromSchema = schema;
+ } else if (schema.getTargetNamespace().equals(toNamespace)){
+ toSchema = schema;
+ } else {
+ relatedSchema.add(schema);
+ }
+ }
+
+ // add all the FROM items to the TO schema
+ XmlSchemaObjectCollection fromItems = fromSchema.getItems();
+ XmlSchemaObjectCollection toItems = toSchema.getItems();
+
+ Iterator<XmlSchemaObject> iter = fromItems.getIterator();
+ while(iter.hasNext()){
+ // don't copy import for TO namespace
+ XmlSchemaObject obj = iter.next();
+ if (obj instanceof XmlSchemaImport &&
+ ((XmlSchemaImport)obj).getNamespace().equals(toNamespace)){
+ // do nothing
+ } else {
+ toItems.add(obj);
+ fixUpMovedTypeReferences(fromNamespace, toNamespace, obj, relatedSchema);
+ }
+ }
+
+ // remove the FROM namespace from TO schema includes list
+ XmlSchemaObjectCollection toIncludes = toSchema.getIncludes();
+ XmlSchemaImport schemaImport = null;
+ iter = toIncludes.getIterator();
+ while(iter.hasNext()){
+ XmlSchemaImport tmpImport = (XmlSchemaImport)iter.next();
+ if (tmpImport.getNamespace().equals(fromNamespace)){
+ schemaImport = tmpImport;
+ break;
+ }
+ }
+
+ if (schemaImport != null){
+ toIncludes.remove(schemaImport);
+ toItems.remove(schemaImport);
+ }
+
+ List<Document> resultDocs = new ArrayList<Document>();
+ resultDocs.add(toSchema.getSchemaDocument());
+
+ for (org.apache.ws.commons.schema.XmlSchema related : relatedSchema){
+ resultDocs.add(related.getSchemaDocument());
+ }
+
+ return resultDocs;
+ }
+
+ public void fixUpMovedTypeReferences(String fromNamespace, String toNamespace, XmlSchemaObject fixUpObj, List<org.apache.ws.commons.schema.XmlSchema> relatedSchema){
+ for (org.apache.ws.commons.schema.XmlSchema schema : relatedSchema){
+ XmlSchemaObjectCollection items = schema.getItems();
+ Iterator<XmlSchemaObject> iter = items.getIterator();
+ XmlSchemaImport importToRemove = null;
+ while(iter.hasNext()){
+ XmlSchemaObject obj = iter.next();
+ processXMLSchemaObject(toNamespace, obj, fixUpObj);
+
+ // remote FROM imports
+ if (obj instanceof XmlSchemaImport &&
+ ((XmlSchemaImport)obj).getNamespace().equals(fromNamespace)){
+ importToRemove = (XmlSchemaImport)obj;
+ }
+ }
+
+ if (importToRemove != null){
+ items.remove(importToRemove);
+ schema.getIncludes().remove(importToRemove);
+ }
+ }
+ }
+
+ public void processXMLSchemaObject(String toNamespace, XmlSchemaObject obj, XmlSchemaObject fixUpObj){
+ if (obj instanceof XmlSchemaComplexType){
+ processXMLSchemaObject(toNamespace, ((XmlSchemaComplexType)obj).getParticle(), fixUpObj);
+ } else if (obj instanceof XmlSchemaElement){
+ XmlSchemaElement element = (XmlSchemaElement)obj;
+ if(element.getSchemaType() == fixUpObj){
+ QName name = element.getSchemaTypeName();
+ QName newName = new QName(toNamespace, name.getLocalPart());
+ element.setSchemaTypeName(newName);
+ }
+ ((XmlSchemaElement)obj).getSchemaType();
+ } else if (obj instanceof XmlSchemaGroupBase){
+ XmlSchemaObjectCollection items = ((XmlSchemaGroupBase)obj).getItems();
+ Iterator<XmlSchemaObject> iter = items.getIterator();
+ while(iter.hasNext()){
+ processXMLSchemaObject(toNamespace, iter.next(), fixUpObj);
+ }
+ }
+ }
+ */
+
+} \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/test/java/helloworld/WSDLGenTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/test/java/helloworld/WSDLGenTestCase.java
new file mode 100644
index 0000000000..6954a8a7ac
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/src/test/java/helloworld/WSDLGenTestCase.java
@@ -0,0 +1,184 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package helloworld;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertNotNull;
+import static junit.framework.Assert.fail;
+
+import java.io.IOException;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.oasisopen.sca.NoSuchServiceException;
+
+import yetanotherpackage.DBean;
+
+import anotherpackage.BBean;
+
+/**
+ * Tests that the helloworld server is available
+ */
+public class WSDLGenTestCase{
+
+ private Node node;
+
+ @Before
+ public void startServer() throws Exception {
+ node = TuscanyRuntime.newInstance().createNode("default");
+ node.installContribution("helloworld", "target/classes", null, null);
+ node.startComposite("helloworld", "helloworld.composite");
+ }
+
+ @Ignore
+ @Test
+ public void testWaitForInput() {
+ System.out.println("Press a key to end");
+ try {
+ System.in.read();
+ } catch (Exception ex) {
+ }
+ System.out.println("Shutting down");
+ }
+
+ @Test
+ public void testComponentSCA() throws IOException, NoSuchServiceException {
+ HelloWorldService helloWorldService = node.getService(HelloWorldService.class, "HelloWorldServiceComponent/HelloWorldService");
+ assertNotNull(helloWorldService);
+
+ HelloWorldService helloWorldClient = node.getService(HelloWorldService.class, "HelloWorldClientComponent/HelloWorldService");
+ assertNotNull(helloWorldClient);
+
+ assertEquals("Hello Smith", helloWorldService.getGreetings("Smith"));
+ assertEquals("Hello Hello Smith", helloWorldClient.getGreetings("Smith"));
+
+ BBean bbean = new BBean();
+ bbean.setField1("1");
+ bbean.setField2("2");
+
+ DBean abean = new DBean();
+ abean.setField1("3");
+ abean.setField2("4");
+ abean.setField3(bbean);
+
+ assertEquals("Hello Hello 3 4 1 2", helloWorldClient.getGreetingsDBean(abean));
+
+ try {
+ helloWorldClient.getGreetingsException("Fred");
+ fail("exception not returned");
+ } catch(Exception ex) {
+
+ }
+ }
+
+ @Test
+ public void testComponentJAXWSwsgen() throws IOException {
+
+ // talk to the service using JAXWS with WSDL generated from this service using wsgen
+ // the idea here is to demonstrate that the service is providing a JAXWS compliant
+ // interface
+ QName serviceName = new QName("http://helloworld/", "HelloWorldImplService");
+ QName portName = new QName("http://helloworld/", "HelloWorldImplPort");
+ URL wsdlLocation = this.getClass().getClassLoader().getResource("jaxws/wsgen/wsdl/HelloWorldImplService.wsdl");
+ Service webService = Service.create( wsdlLocation, serviceName );
+ HelloWorldService wsProxy = (HelloWorldService) webService.getPort(portName, HelloWorldService.class);
+
+ assertEquals("Hello Fred", wsProxy.getGreetings("Fred"));
+
+ BBean bbean = new BBean();
+ bbean.setField1("1");
+ bbean.setField2("2");
+
+ DBean abean = new DBean();
+ abean.setField1("3");
+ abean.setField2("4");
+ abean.setField3(bbean);
+
+ assertEquals("Hello 3 4 1 2", wsProxy.getGreetingsDBean(abean));
+
+ String byteArrayString = "Hello World";
+ assertEquals(byteArrayString, new String(wsProxy.getGreetingsByteArray(byteArrayString.getBytes())));
+
+ try {
+ wsProxy.getGreetingsException("Fred");
+ fail("exception not returned");
+ } catch(Exception ex) {
+
+ }
+ }
+
+ @Test
+ public void testComponentJAXWStuscanygen() throws IOException {
+ // talk to the service using JAXWS with WSDL generated from this service used Tuscany's ?wsdl
+ // the idea here is to demonstrate that the service is providing a JAXWS compliant
+ // WSDL
+ QName serviceName = new QName("http://helloworld/", "HelloWorldServiceComponent_HelloWorldService");
+ QName portName = new QName("http://helloworld/", "HelloWorldServiceSOAP11Port");
+ URL wsdlLocation = new URL("http://localhost:8085/HelloWorldServiceComponent?wsdl");
+ Service webService = Service.create( wsdlLocation, serviceName );
+ HelloWorldService wsProxy = (HelloWorldService) webService.getPort(portName, HelloWorldService.class);
+
+ assertEquals("Hello Fred", wsProxy.getGreetings("Fred"));
+
+ BBean bbean = new BBean();
+ bbean.setField1("1");
+ bbean.setField2("2");
+
+ DBean abean = new DBean();
+ abean.setField1("3");
+ abean.setField2("4");
+ abean.setField3(bbean);
+
+ assertEquals("Hello 3 4 1 2", wsProxy.getGreetingsDBean(abean));
+
+ String byteArrayString = "Hello World";
+ assertEquals(byteArrayString, new String(wsProxy.getGreetingsByteArray(byteArrayString.getBytes())));
+
+ try {
+ wsProxy.getGreetingsException("Fred");
+ fail("exception not returned");
+ } catch(Exception ex) {
+
+ }
+ }
+
+ // Differences between JAXWS WSDL (J) and Tuscany WSDL (T)
+ //
+ // Service name
+ // J/ HelloWorldImplService T/ HelloWorldService
+ //
+ // Port name
+ // J/ HelloWorldImplPort T/ HelloWorldServiceSOAP11Port
+
+ @After
+ public void stopServer() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/wsgen.bat b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/wsgen.bat
new file mode 100644
index 0000000000..5426508882
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wsdlgen/wsgen.bat
@@ -0,0 +1,18 @@
+# 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.
+
+c:\simon\apps\jdk-60-ibm\bin\wsgen.exe -cp target/classes;"C:\Users\slaws\.m2\repository\org\apache\tuscany\sca\tuscany-sca-api\2.0-SNAPSHOT\tuscany-sca-api-2.0-SNAPSHOT.jar" -d target/wsgenout -wsdl -verbose helloworld.HelloWorldImpl
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/README b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/README
new file mode 100644
index 0000000000..60a1b09598
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/README
@@ -0,0 +1,116 @@
+No Security
+===========
+
+POST /HelloWorldService/HelloWorld HTTP/1.1
+Content-Type: text/xml; charset=UTF-8
+SOAPAction: ""
+User-Agent: Axis2
+Host: localhost:8081
+Content-Length: 287
+
+<?xml version='1.0' encoding='UTF-8'?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Body>
+ <ns2:getGreetings xmlns:ns2="http://helloworld.axis2.ws.binding.sca.tuscany.apache.org/">
+ <arg0>fred</arg0>
+ </ns2:getGreetings>
+ </soapenv:Body>
+</soapenv:Envelope>
+
+HTTP/1.1 200 OK
+Content-Type: text/xml; charset=utf-8
+Transfer-Encoding: chunked
+
+146
+<?xml version='1.0' encoding='UTF-8'?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soapenv:Body>
+ <ns2:getGreetingsResponse xmlns:ns2="http://helloworld.axis2.ws.binding.sca.tuscany.apache.org/">
+ <return>Hello fred null subject</return>
+ </ns2:getGreetingsResponse>
+ </soapenv:Body>
+</soapenv:Envelope>
+
+Integrity
+=========
+
+POST /HelloWorldService/HelloWorld HTTP/1.1
+Content-Type: text/xml; charset=UTF-8
+SOAPAction: ""
+User-Agent: Axis2
+Host: localhost:8081
+Content-Length: 3714
+
+<?xml version='1.0' encoding='UTF-8'?>
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
+ <soape nv:Header>
+ <wsse:Security
+ xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
+ soapenv:mustUnderstand="1">
+ <wsu:Timestamp
+ xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+ wsu:Id="Timestamp-1">
+ <wsu:Created>2011-06-29T13:19:32.343Z</wsu:Created>
+ <wsu:Expires>2011-06-29T13:24:32.343Z</wsu:Expires>
+ </wsu:Timestamp>
+ <wsse:BinarySecurityToken
+ xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+ EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"
+ ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"
+ wsu:Id="CertId-3FC5F405BC1C8FD92213093535726401">
+ MIICPTCCAaagAwIBAgIESZNUvDANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVSz
+ ELMAkGA1UECBMCVUsxEzARBgNVBAcTCldpbmNoZXN0ZXIxDzANBgNVBAoTBkFwYWNoZTEPMA0GA1UECxMGQXBhY2hlMRAwDgYDVQQDEwdUdXNjYW55MB4XDT
+ A5MDIxMTIyNDQxMloXDTM2MDYyODIyNDQxMlowYzELMAkGA1UEBhMCVUsxCzAJBgNVBAgTAlVLMRMwEQYDVQQHEwpXaW5jaGVzdGVyMQ8wDQYDVQQKEwZBcG
+ FjaGUxDzANBgNVBAsTBkFwYWNoZTEQMA4GA1UEAxMHVHVzY2FueTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAm9V5SuYbkyZreLyHuEaorRya3fEkpF
+ q2n3Sg9kaQH5L0Zb81MNEUkoNk4jeFDC7GnQ4QQU9UfM/xAX3d0VIZSFdp7I5lxVRnXg5tcacDmckuJRCAO0AkeI4aRTD/iHQ2RfcJCwZtXJPdo2OywBGIf4
+ CQnZI5mkNDAbK2SEaN+/cCAwEAATANBgkqhkiG9w0BAQUFAAOBgQAX593t0K195ZQc3g2+mIhjuwh5tKktaKS6x0AEmaTxI1c3F8LY6bK89DiQ1gEf36ryfA
+ CGgHrRyufgcQtlIHEbbppPiPHgaBW4pQjJqyMa9/TlU+OqhBcc7dyGZd9MU0ZNwJPXW4vmSFLKp95bjmfxXNPm7Oln1StAD3BLo5YsYA==
+ </wsse:BinarySecurityToken>
+ <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="Signature-2">
+ <ds:SignedInfo>
+ <ds:CanonicalizationMethod
+ Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
+ <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
+ <ds:Reference URI="#Id-28141700">
+ <ds:Transforms>
+ <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
+ </ds:Transforms>
+ <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
+ <ds:DigestValue>cUwRlwItvnyGcmaDX9hBhoVYgUA=</ds:DigestValue>
+ </ds:Reference>
+ <ds:Reference URI="#Timestamp-1">
+ <ds:Transforms>
+ <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
+ </ds:Transforms>
+ <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
+ <ds:DigestValue>AR60PsgLRdjhQjx3Kn5myNfcx4g=</ds:DigestValue>
+ </ds:Reference>
+ </ds:SignedInfo>
+ <ds:SignatureValue>
+ jvDnLfKdyxnDCVtmJr0lrwQsigBBlZhYMyYJeQswjit1th4fxatyywV4wRxu/rm3iuNl+svnS9HA
+ Vyv1Enr2/5+2QFTAeKKcGa/HtpSL/dtZr8UTHwFVR9/ecDpAxupb2k2vumpxH2WQlvnrj1lVQjE4
+ ewLiWB6NEjdhnbYL9Ws=
+ </ds:SignatureValue>
+ <ds:KeyInfo Id="KeyId-3FC5F405BC1C8FD92213093535726562">
+ <wsse:SecurityTokenReference
+ xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+ wsu:Id="STRId-3FC5F405BC1C8FD92213093535726563">
+ <wsse:Reference URI="#CertId-3FC5F405BC1C8FD92213093535726401"
+ Value
+ Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" />
+ </wsse:SecurityTokenReference>
+ </ds:KeyInfo>
+ </ds:Signature>
+ </wsse:Security>
+ </soapenv:Header>
+ <soapenv:Body
+ xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+ wsu:Id="Id-28141700">
+ <_ns_:getGreetings xmlns:_ns_="http://helloworld">
+ <ns3:name xm lns:ns3="http://helloworld"
+ xmlns:ns2="http://helloworld.axis2.ws.binding.sca.tuscany.apache.org/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:type="xs:string">fred</ns3:name>
+ </_ns_:getGreetings>
+ </soapenv:Body>
+</soapenv:Envelope> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/pom.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/pom.xml
new file mode 100644
index 0000000000..d3293d6fa3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/pom.xml
@@ -0,0 +1,68 @@
+<?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.1</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>itest-ws-wspolicy</artifactId>
+ <name>Apache Tuscany SCA iTest WS with WSPolicy</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-base-runtime-pom</artifactId>
+ <type>pom</type>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.19</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>wstx-asl</artifactId>
+ <version>3.2.9</version>
+ </dependency>
+ <dependency>
+ <groupId>xalan</groupId>
+ <artifactId>xalan</artifactId>
+ <version>2.7.1</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorld.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorld.java
new file mode 100644
index 0000000000..057b00a21c
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorld.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.helloworld;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorld {
+
+ String getGreetings(String s);
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldClient.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldClient.java
new file mode 100644
index 0000000000..212617af6a
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldClient.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.helloworld;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldClient implements HelloWorld {
+
+ @Reference
+ public HelloWorld helloWorldWS;
+
+ public String getGreetings(String s) {
+ String response = helloWorldWS.getGreetings(s);
+ System.out.println("At client: " + response);
+ return response;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldService.java
new file mode 100644
index 0000000000..b1ecba682b
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/HelloWorldService.java
@@ -0,0 +1,45 @@
+/*
+ * 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.axis2.helloworld;
+
+import javax.security.auth.Subject;
+
+import org.oasisopen.sca.RequestContext;
+import org.oasisopen.sca.annotation.Context;
+
+public class HelloWorldService implements HelloWorld {
+
+ @Context
+ protected RequestContext requestContext;
+
+ public String getGreetings(String name) {
+ Subject subject = requestContext.getSecuritySubject();
+ String response = "Hello " + name;
+/*
+ if (subject == null){
+ response += "null subject";
+ } else {
+ response += subject.getPrincipals().iterator().next().getName();
+ }
+*/
+ System.out.println("At service: " + response);
+ return response;
+ }
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/ServerPWCBHandler.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/ServerPWCBHandler.java
new file mode 100644
index 0000000000..4ada132172
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/helloworld/ServerPWCBHandler.java
@@ -0,0 +1,55 @@
+/*
+ * 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.axis2.helloworld;
+
+import java.io.IOException;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import org.apache.ws.security.WSPasswordCallback;
+
+/**
+ * Sample userid passwd generation class
+ */
+public class ServerPWCBHandler implements CallbackHandler {
+
+ public void handle(Callback[] callbacks) throws IOException,
+ UnsupportedCallbackException {
+ for (int i = 0; i < callbacks.length; i++) {
+ System.out.println("*** Calling Server User/Passwd Handler....");
+ WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
+ System.out.println("User Id = " + pwcb.getIdentifer());
+ System.out.println("Password = " + pwcb.getPassword());
+
+ if ( pwcb.getUsage() == WSPasswordCallback.USERNAME_TOKEN ) {
+ if ( pwcb.getIdentifer().equals("TuscanyWsUser") &&
+ pwcb.getPassword().equals("TuscanyWsUserPasswd") ){
+ return;
+ } else {
+ throw new UnsupportedCallbackException(pwcb, "Authentication Failed : UserId - Password mismatch");
+ }
+ } else if ( pwcb.getUsage() == WSPasswordCallback.SIGNATURE ) {
+ pwcb.setPassword("TuscanyWsUserPasswd");
+ }
+ }
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/resources/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..350ad6be96
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/resources/META-INF/sca-contribution.xml
@@ -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
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions
new file mode 100644
index 0000000000..04fe620be4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions
@@ -0,0 +1,17 @@
+# 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.
+org/apache/tuscany/sca/binding/ws/axis2/helloworld/definitions.xml \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/resources/helloworldKeys.jks b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/resources/helloworldKeys.jks
new file mode 100644
index 0000000000..e2184ad3c6
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/resources/helloworldKeys.jks
Binary files differ
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/definitions.xml b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/definitions.xml
new file mode 100644
index 0000000000..95089c39f3
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/definitions.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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 xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://www.tuscany.apache.org/itests/binding/ws/axis2"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:itest="http://www.tuscany.apache.org/itests/binding/ws/axis2" >
+
+
+ <sca:policySet name="WSPolicyIntegrityPolicySet"
+ attachTo="//sca:binding.ws"
+ provides="integrity"
+ appliesTo="//sca:binding.ws">
+ <wsp:Policy wsu:Id="SignOnly"
+ xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:TripleDesRsa15/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>TuscanyWsUser</ramp:user>
+ <ramp:encryptionUser>TuscanyWsUser</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.helloworld.ServerPWCBHandler</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">helloworldKeys.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">TuscanyWsUserPasswd</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ </ramp:RampartConfig>
+
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+ </sca:policySet>
+
+
+</definitions> \ No newline at end of file
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.composite b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.composite
new file mode 100644
index 0000000000..463979ef6f
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.composite
@@ -0,0 +1,46 @@
+<?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="HelloWorldClient">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorldClient"/>
+<!--
+ <reference name="helloWorldWS" target="HelloWorldService/HelloWorld"/>
+-->
+ <reference name="helloWorldWS" requires="integrity">
+ <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld#wsdl.binding(HelloWorldSoapBinding)"
+ uri="http://localhost:8080/HelloWorldService/HelloWorld"/>
+ </reference>
+ </component>
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorldService"/>
+ <service name="HelloWorld" requires="integrity">
+ <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld#wsdl.binding(HelloWorldSoapBinding)"
+ uri="http://localhost:8080/HelloWorldService/HelloWorld"/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.wsdl b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.wsdl
new file mode 100644
index 0000000000..15b89dbcea
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.wsdl
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld"
+ xmlns:tns="http://helloworld"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ </wsdl:binding>
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort1">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService1"/>
+ </wsdl:port>
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort2">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService2"/>
+ </wsdl:port>
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort3">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService3"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/HelloworldTestCase.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/HelloworldTestCase.java
new file mode 100644
index 0000000000..610f9e4bd5
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/wspolicy/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/HelloworldTestCase.java
@@ -0,0 +1,50 @@
+/*
+ * 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.axis2;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorld;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+public class HelloworldTestCase extends TestCase {
+
+ private Node node;
+ private HelloWorld helloWorld;
+
+ public void testCalculator() throws Exception {
+ assertEquals("Hello fred", helloWorld.getGreetings("fred"));
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ node = NodeFactory.newInstance().createNode(new Contribution("test", "target/classes"));
+ node.start();
+ helloWorld = node.getService(HelloWorld.class, "HelloWorldClient");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ }
+
+}