From a40e527938d76ba71f211da7e327adb50384ba69 Mon Sep 17 00:00:00 2001 From: lresende Date: Wed, 11 Nov 2009 23:26:33 +0000 Subject: Moving 1.x tags git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835157 13f79535-47bb-0310-9956-ffa450edef68 --- .../itest/callablereferences/pom.xml | 46 ++ .../tuscany/sca/itest/callableref/AComponent.java | 35 + .../sca/itest/callableref/AComponentImpl.java | 88 +++ .../tuscany/sca/itest/callableref/BComponent.java | 28 + .../sca/itest/callableref/BComponentImpl.java | 38 ++ .../tuscany/sca/itest/callableref/CComponent.java | 24 + .../sca/itest/callableref/CComponentImpl.java | 30 + .../tuscany/sca/itest/callableref/DComponent.java | 26 + .../sca/itest/callableref/DComponentImpl.java | 52 ++ .../main/resources/CallableReferenceTest.composite | 45 ++ .../callableref/CallableReferenceTestCase.java | 83 +++ .../0.99-incubating/itest/callback-api/pom.xml | 45 ++ .../tuscany/sca/test/CallBackApiCallBack.java | 33 + .../apache/tuscany/sca/test/CallBackApiClient.java | 28 + .../tuscany/sca/test/CallBackApiClientImpl.java | 135 ++++ .../tuscany/sca/test/CallBackApiService.java | 37 ++ .../tuscany/sca/test/CallBackApiServiceImpl.java | 78 +++ .../src/main/resources/CallBackApiTest.composite | 33 + .../tuscany/sca/test/CallBackApiTestCase.java | 46 ++ .../0.99-incubating/itest/callback-basic/pom.xml | 45 ++ .../tuscany/sca/test/CallBackBasicCallBack.java | 33 + .../tuscany/sca/test/CallBackBasicClient.java | 28 + .../tuscany/sca/test/CallBackBasicClientImpl.java | 135 ++++ .../tuscany/sca/test/CallBackBasicService.java | 37 ++ .../tuscany/sca/test/CallBackBasicServiceImpl.java | 59 ++ .../src/main/resources/CallBackBasicTest.composite | 33 + .../tuscany/sca/test/CallBackBasicTestCase.java | 47 ++ .../itest/callback-complex-type/pom.xml | 45 ++ .../tuscany/sca/test/CallBackCTypeCallBack.java | 33 + .../tuscany/sca/test/CallBackCTypeClient.java | 28 + .../tuscany/sca/test/CallBackCTypeClientImpl.java | 142 ++++ .../tuscany/sca/test/CallBackCTypeService.java | 36 + .../tuscany/sca/test/CallBackCTypeServiceImpl.java | 62 ++ .../main/resources/CallBackCTypeClient.composite | 33 + .../test/CallBackCTypeServiceImpl.componentType | 28 + .../sca/test/CallBackCTypeTestCaseFIXME.java | 48 ++ .../tags/0.99-incubating/itest/callback-id/pom.xml | 45 ++ .../tuscany/sca/test/CallBackIdCallBack.java | 31 + .../apache/tuscany/sca/test/CallBackIdClient.java | 28 + .../tuscany/sca/test/CallBackIdClientImpl.java | 147 +++++ .../apache/tuscany/sca/test/CallBackIdService.java | 33 + .../tuscany/sca/test/CallBackIdServiceImpl.java | 48 ++ .../src/main/resources/CallBackIdClient.composite | 33 + .../tuscany/sca/test/CallBackIdTestCase.java | 45 ++ .../itest/callback-multiple-wires/pom.xml | 45 ++ .../apache/tuscany/sca/test/callback/MyClient.java | 27 + .../tuscany/sca/test/callback/MyClientImpl1.java | 49 ++ .../tuscany/sca/test/callback/MyClientImpl2.java | 49 ++ .../tuscany/sca/test/callback/MyService.java | 32 + .../sca/test/callback/MyServiceCallback.java | 27 + .../tuscany/sca/test/callback/MyServiceImpl.java | 51 ++ .../main/resources/CallbackMultiWireTest.composite | 38 ++ .../test/callback/CallbackMultiWireTestCase.java | 55 ++ .../itest/callback-set-callback/pom.xml | 45 ++ .../sca/test/CallBackSetCalbackService.java | 34 + .../sca/test/CallBackSetCallbackBadCallback.java | 38 ++ .../sca/test/CallBackSetCallbackCallback.java | 31 + .../sca/test/CallBackSetCallbackCallbackImpl.java | 66 ++ .../sca/test/CallBackSetCallbackClient.java | 28 + .../sca/test/CallBackSetCallbackClientImpl.java | 199 ++++++ .../test/CallBackSetCallbackObjectCallback.java | 44 ++ .../sca/test/CallBackSetCallbackServiceImpl.java | 85 +++ .../resources/CallBackSetCallbackTest.composite | 37 ++ .../sca/test/CallBackSetCallbackTestCase.java | 49 ++ .../itest/callback-set-conversation/pom.xml | 45 ++ .../test/CallBackSetCallbackConvBadCallback.java | 38 ++ .../sca/test/CallBackSetCallbackConvCallback.java | 31 + .../sca/test/CallBackSetCallbackConvClient.java | 28 + .../test/CallBackSetCallbackConvClientImpl.java | 173 +++++ .../CallBackSetCallbackConvNonSerCallback.java | 58 ++ .../CallBackSetCallbackConvObjectCallback.java | 59 ++ .../sca/test/CallBackSetCallbackConvService.java | 34 + .../test/CallBackSetCallbackConvServiceImpl.java | 102 +++ .../CallBackSetCallbackConvTest.composite | 33 + .../test/CallBackSetCallbackConvTestCaseFIXME.java | 49 ++ .../0.99-incubating/itest/component-type/pom.xml | 46 ++ .../src/main/java/calculator/AddService.java | 28 + .../src/main/java/calculator/AddServiceImpl.java | 30 + .../src/main/java/calculator/CalculatorClient.java | 45 ++ .../main/java/calculator/CalculatorService.java | 35 + .../java/calculator/CalculatorServiceImpl.java | 66 ++ .../src/main/java/calculator/DivideService.java | 28 + .../main/java/calculator/DivideServiceImpl.java | 30 + .../src/main/java/calculator/MultiplyService.java | 28 + .../main/java/calculator/MultiplyServiceImpl.java | 30 + .../src/main/java/calculator/SubtractService.java | 28 + .../main/java/calculator/SubtractServiceImpl.java | 30 + .../src/main/resources/Calculator.composite | 49 ++ .../calculator/AddServiceImpl.componentType | 27 + .../calculator/CalculatorServiceImpl.componentType | 43 ++ .../calculator/DivideServiceImpl.componentType | 27 + .../calculator/MultiplyServiceImpl.componentType | 27 + .../calculator/SubtractServiceImpl.componentType | 27 + .../test/java/calculator/CalculatorTestCase.java | 52 ++ .../export-composite/.ruleset | 190 ++++++ .../export-composite/pom.xml | 67 ++ .../src/main/java/hello/Hello.java | 33 + .../src/main/java/hello/HelloImpl.java | 33 + .../main/resources/META-INF/sca-contribution.xml | 25 + .../src/main/resources/hello.composite | 31 + .../sca/test/contribution/HelloTestCase.java | 80 +++ .../export-java/.ruleset | 190 ++++++ .../contribution-import-export/export-java/pom.xml | 67 ++ .../main/java/helloworld/HelloWorldService.java | 33 + .../main/resources/META-INF/sca-contribution.xml | 24 + .../export-wsdl/.ruleset | 190 ++++++ .../contribution-import-export/export-wsdl/pom.xml | 31 + .../main/resources/META-INF/sca-contribution.xml | 24 + .../export-wsdl/src/main/resources/helloworld.wsdl | 76 +++ .../export-wsdl/src/main/resources/helloworld.xsd | 35 + .../import-composite/.ruleset | 190 ++++++ .../import-composite/pom.xml | 73 ++ .../src/main/java/helloworld/HelloWorldImpl.java | 38 ++ .../src/main/java/helloworld/HelloWorldServer.java | 46 ++ .../main/java/helloworld/HelloWorldService.java | 33 + .../main/resources/META-INF/sca-contribution.xml | 27 + .../src/main/resources/helloworld.wsdl | 76 +++ .../src/main/resources/helloworld.xsd | 35 + .../src/main/resources/helloworldws.composite | 39 ++ .../contribution/HelloWorldServerTestCase.java | 111 ++++ .../import-java/.ruleset | 190 ++++++ .../contribution-import-export/import-java/pom.xml | 73 ++ .../src/main/java/helloworld/HelloWorldImpl.java | 33 + .../main/resources/META-INF/sca-contribution.xml | 25 + .../src/main/resources/helloworldws.composite | 32 + .../contribution/HelloWorldServerTestCase.java | 110 +++ .../import-wsdl/.ruleset | 190 ++++++ .../contribution-import-export/import-wsdl/pom.xml | 67 ++ .../src/main/java/helloworld/HelloWorldImpl.java | 33 + .../src/main/java/helloworld/HelloWorldServer.java | 46 ++ .../main/java/helloworld/HelloWorldService.java | 33 + .../main/resources/META-INF/sca-contribution.xml | 25 + .../src/main/resources/helloworldws.composite | 33 + .../contribution/HelloWorldServerTestCase.java | 109 +++ .../itest/contribution-import-export/pom.xml | 54 ++ .../0.99-incubating/itest/contribution/pom.xml | 45 ++ .../src/main/java/calculator/AddService.java | 25 + .../src/main/java/calculator/AddServiceImpl.java | 30 + .../src/main/java/calculator/CalculatorClient.java | 46 ++ .../main/java/calculator/CalculatorService.java | 35 + .../java/calculator/CalculatorServiceImpl.java | 70 ++ .../src/main/java/calculator/DivideService.java | 25 + .../main/java/calculator/DivideServiceImpl.java | 30 + .../src/main/java/calculator/MultiplyService.java | 25 + .../main/java/calculator/MultiplyServiceImpl.java | 30 + .../src/main/java/calculator/SubtractService.java | 25 + .../main/java/calculator/SubtractServiceImpl.java | 30 + .../src/main/resources/ContributionTest.composite | 24 + .../main/resources/calculator/Calculator.composite | 51 ++ .../main/resources/calculator/sca-contribution.xml | 24 + .../contribution/ContributionServiceTestCase.java | 175 +++++ .../resources/deployables/sample-calculator.jar | Bin 0 -> 26901 bytes .../resources/repository/sample-calculator.jar | Bin 0 -> 26901 bytes .../0.99-incubating/itest/conversations/pom.xml | 45 ++ .../conversational/ConversationalCallback.java | 50 ++ .../itest/conversational/ConversationalClient.java | 48 ++ .../ConversationalReferenceClient.java | 36 + .../conversational/ConversationalService.java | 62 ++ .../impl/ConversationAgeComponentImpl.java | 75 +++ .../impl/ConversationIdComponentImpl.java | 47 ++ .../conversational/impl/ConversationIdService.java | 29 + .../impl/ConversationMaxIdleComponentImpl.java | 75 +++ .../impl/ConversationalClientStatefulImpl.java | 249 +++++++ .../impl/ConversationalClientStatelessImpl.java | 243 +++++++ .../impl/ConversationalReferenceClientImpl.java | 43 ++ .../impl/ConversationalServiceStatefulImpl.java | 117 ++++ .../impl/ConversationalServiceStatelessImpl.java | 121 ++++ .../impl/ConversationalServiceStatelessScope.java | 93 +++ .../apache/tuscany/sca/test/AnotherService.java | 37 ++ .../tuscany/sca/test/AnotherServiceImpl.java | 69 ++ .../tuscany/sca/test/ConversationsCallback.java | 34 + .../tuscany/sca/test/ConversationsClient.java | 31 + .../tuscany/sca/test/ConversationsClient2.java | 30 + .../tuscany/sca/test/ConversationsClientImpl.java | 496 ++++++++++++++ .../sca/test/ConversationsLifeCycleService.java | 38 ++ .../test/ConversationsLifeCycleServiceImpl.java | 97 +++ .../tuscany/sca/test/ConversationsService.java | 43 ++ .../tuscany/sca/test/ConversationsServiceImpl.java | 147 +++++ .../src/main/resources/ConversationAge.composite | 31 + .../src/main/resources/ConversationsTest.composite | 43 ++ .../src/main/resources/conversationId.composite | 27 + .../src/main/resources/conversational.composite | 64 ++ .../conversational/ConversationIdTestCase.java | 55 ++ .../conversational/ConversationalAgeTestCase.java | 95 +++ .../conversational/ConversationalJ2SETestCase.java | 84 +++ .../conversational/ConversationalTestCase.java | 322 +++++++++ .../sca/test/ConversationsTestCaseFIXME.java | 51 ++ .../itest/databindings/common/pom.xml | 120 ++++ .../tuscany/sca/itest/generate/Generate.java | 123 ++++ .../resources/generate/DatabindingTestCase.java.vm | 112 ++++ .../src/main/resources/generate/Greeter.wsdl.vm | 103 +++ .../main/resources/generate/GreeterService.java.vm | 53 ++ .../generate/GreeterServiceClient.java.vm | 42 ++ .../generate/GreeterServiceClientImpl.java.vm | 65 ++ .../resources/generate/GreeterServiceImpl.java.vm | 55 ++ .../src/main/resources/generate/generate.xsd | 61 ++ .../common/src/main/resources/wsdl/Dummy.txt | 4 + .../common/src/main/resources/xsd/Annotation.xml | 24 + .../common/src/main/resources/xsd/Annotation.xsd | 38 ++ .../common/src/main/resources/xsd/Attribute.xml | 24 + .../common/src/main/resources/xsd/Attribute.xsd | 39 ++ .../src/main/resources/xsd/AttributeReference.xml | 24 + .../src/main/resources/xsd/AttributeReference.xsd | 40 ++ .../resources/xsd/AttributeWithDefaultValue.xml | 24 + .../resources/xsd/AttributeWithDefaultValue.xsd | 38 ++ .../main/resources/xsd/AttributeWithFixedValue.xml | 24 + .../main/resources/xsd/AttributeWithFixedValue.xsd | 38 ++ .../resources/xsd/AttributeWithSDOAliasName.xml | 24 + .../resources/xsd/AttributeWithSDOAliasName.xsd | 38 ++ .../resources/xsd/AttributeWithSDODataType.xml | 24 + .../resources/xsd/AttributeWithSDODataType.xsd | 38 ++ .../main/resources/xsd/AttributeWithSDOName.xml | 24 + .../main/resources/xsd/AttributeWithSDOName.xsd | 38 ++ ...ibuteWithSDOPropertySDOOppositePropertyType.xml | 24 + ...ibuteWithSDOPropertySDOOppositePropertyType.xsd | 38 ++ .../resources/xsd/AttributeWithSDOPropertyType.xml | 24 + .../resources/xsd/AttributeWithSDOPropertyType.xsd | 38 ++ .../main/resources/xsd/AttributeWithSDOString.xml | 24 + .../main/resources/xsd/AttributeWithSDOString.xsd | 38 ++ .../main/resources/xsd/BuiltInAnySimpleType.xml | 24 + .../main/resources/xsd/BuiltInAnySimpleType.xsd | 31 + .../src/main/resources/xsd/BuiltInAnyType.xml | 24 + .../src/main/resources/xsd/BuiltInAnyType.xsd | 31 + .../src/main/resources/xsd/BuiltInAnyURI.xml | 24 + .../src/main/resources/xsd/BuiltInAnyURI.xsd | 31 + .../src/main/resources/xsd/BuiltInBase64Binary.xml | 24 + .../src/main/resources/xsd/BuiltInBase64Binary.xsd | 31 + .../src/main/resources/xsd/BuiltInBoolean.xml | 27 + .../src/main/resources/xsd/BuiltInBoolean.xsd | 31 + .../common/src/main/resources/xsd/BuiltInByte.xml | 25 + .../common/src/main/resources/xsd/BuiltInByte.xsd | 31 + .../common/src/main/resources/xsd/BuiltInDate.xml | 24 + .../common/src/main/resources/xsd/BuiltInDate.xsd | 31 + .../src/main/resources/xsd/BuiltInDateTime.xml | 24 + .../src/main/resources/xsd/BuiltInDateTime.xsd | 31 + .../src/main/resources/xsd/BuiltInDecimal.xml | 23 + .../src/main/resources/xsd/BuiltInDecimal.xsd | 31 + .../src/main/resources/xsd/BuiltInDouble.xml | 25 + .../src/main/resources/xsd/BuiltInDouble.xsd | 31 + .../src/main/resources/xsd/BuiltInDuration.xml | 24 + .../src/main/resources/xsd/BuiltInDuration.xsd | 31 + .../common/src/main/resources/xsd/BuiltInFloat.xml | 24 + .../common/src/main/resources/xsd/BuiltInFloat.xsd | 31 + .../common/src/main/resources/xsd/BuiltInGDay.xml | 24 + .../common/src/main/resources/xsd/BuiltInGDay.xsd | 31 + .../src/main/resources/xsd/BuiltInGMonth.xml | 24 + .../src/main/resources/xsd/BuiltInGMonth.xsd | 31 + .../src/main/resources/xsd/BuiltInGMonthDay.xml | 24 + .../src/main/resources/xsd/BuiltInGMonthDay.xsd | 31 + .../common/src/main/resources/xsd/BuiltInGYear.xml | 24 + .../common/src/main/resources/xsd/BuiltInGYear.xsd | 31 + .../src/main/resources/xsd/BuiltInGYearMonth.xml | 24 + .../src/main/resources/xsd/BuiltInGYearMonth.xsd | 31 + .../src/main/resources/xsd/BuiltInHexBinary.xml | 24 + .../src/main/resources/xsd/BuiltInHexBinary.xsd | 31 + .../common/src/main/resources/xsd/BuiltInID.xml | 24 + .../common/src/main/resources/xsd/BuiltInID.xsd | 31 + .../common/src/main/resources/xsd/BuiltInIDREF.xml | 24 + .../common/src/main/resources/xsd/BuiltInIDREF.xsd | 31 + .../src/main/resources/xsd/BuiltInIDREFS.xml | 24 + .../src/main/resources/xsd/BuiltInIDREFS.xsd | 31 + .../common/src/main/resources/xsd/BuiltInInt.xml | 25 + .../common/src/main/resources/xsd/BuiltInInt.xsd | 31 + .../src/main/resources/xsd/BuiltInInteger.xml | 25 + .../src/main/resources/xsd/BuiltInInteger.xsd | 31 + .../src/main/resources/xsd/BuiltInLanguage.xml | 24 + .../src/main/resources/xsd/BuiltInLanguage.xsd | 31 + .../common/src/main/resources/xsd/BuiltInLong.xml | 25 + .../common/src/main/resources/xsd/BuiltInLong.xsd | 33 + .../src/main/resources/xsd/BuiltInNCName.xml | 24 + .../src/main/resources/xsd/BuiltInNCName.xsd | 31 + .../src/main/resources/xsd/BuiltInNMTOKEN.xml | 24 + .../src/main/resources/xsd/BuiltInNMTOKEN.xsd | 31 + .../src/main/resources/xsd/BuiltInNMTOKENS.xml | 24 + .../src/main/resources/xsd/BuiltInNMTOKENS.xsd | 31 + .../src/main/resources/xsd/BuiltInNOTATION.xml | 24 + .../src/main/resources/xsd/BuiltInNOTATION.xsd | 39 ++ .../common/src/main/resources/xsd/BuiltInName.xml | 24 + .../common/src/main/resources/xsd/BuiltInName.xsd | 31 + .../main/resources/xsd/BuiltInNegativeInteger.xml | 24 + .../main/resources/xsd/BuiltInNegativeInteger.xsd | 31 + .../resources/xsd/BuiltInNonNegativeInteger.xml | 24 + .../resources/xsd/BuiltInNonNegativeInteger.xsd | 31 + .../resources/xsd/BuiltInNonPositiveInteger.xml | 24 + .../resources/xsd/BuiltInNonPositiveInteger.xsd | 31 + .../main/resources/xsd/BuiltInNormalizedString.xml | 24 + .../main/resources/xsd/BuiltInNormalizedString.xsd | 31 + .../main/resources/xsd/BuiltInPositiveInteger.xml | 24 + .../main/resources/xsd/BuiltInPositiveInteger.xsd | 31 + .../common/src/main/resources/xsd/BuiltInQName.xml | 24 + .../common/src/main/resources/xsd/BuiltInQName.xsd | 31 + .../common/src/main/resources/xsd/BuiltInShort.xml | 25 + .../common/src/main/resources/xsd/BuiltInShort.xsd | 31 + .../src/main/resources/xsd/BuiltInString.xml | 24 + .../src/main/resources/xsd/BuiltInString.xsd | 31 + .../common/src/main/resources/xsd/BuiltInTime.xml | 24 + .../common/src/main/resources/xsd/BuiltInTime.xsd | 31 + .../common/src/main/resources/xsd/BuiltInToken.xml | 24 + .../common/src/main/resources/xsd/BuiltInToken.xsd | 31 + .../src/main/resources/xsd/BuiltInUnsignedByte.xml | 25 + .../src/main/resources/xsd/BuiltInUnsignedByte.xsd | 31 + .../src/main/resources/xsd/BuiltInUnsignedInt.xml | 25 + .../src/main/resources/xsd/BuiltInUnsignedInt.xsd | 31 + .../src/main/resources/xsd/BuiltInUnsignedLong.xml | 25 + .../src/main/resources/xsd/BuiltInUnsignedLong.xsd | 31 + .../main/resources/xsd/BuiltInUnsignedShort.xml | 25 + .../main/resources/xsd/BuiltInUnsignedShort.xsd | 31 + ...lexTypeComplexContentRestrictingComplexType.xml | 26 + ...lexTypeComplexContentRestrictingComplexType.xsd | 44 ++ .../xsd/ComplexTypeExtendingComplexType.xml | 27 + .../xsd/ComplexTypeExtendingComplexType.xsd | 43 ++ .../xsd/ComplexTypeExtendingSimpleType.xml | 24 + .../xsd/ComplexTypeExtendingSimpleType.xsd | 41 ++ ...plexTypeSimpleContentRestrictingComplexType.xml | 24 + ...plexTypeSimpleContentRestrictingComplexType.xsd | 41 ++ .../main/resources/xsd/ComplexTypeWithAbstract.xml | 27 + .../main/resources/xsd/ComplexTypeWithAbstract.xsd | 47 ++ .../main/resources/xsd/ComplexTypeWithCDATA.xml | 30 + .../main/resources/xsd/ComplexTypeWithCDATA.xsd | 39 ++ .../main/resources/xsd/ComplexTypeWithContent.xml | 26 + .../main/resources/xsd/ComplexTypeWithContent.xsd | 37 ++ .../main/resources/xsd/ComplexTypeWithMixed.xml | 29 + .../main/resources/xsd/ComplexTypeWithMixed.xsd | 39 ++ .../xsd/ComplexTypeWithOpenAttributes.xml | 24 + .../xsd/ComplexTypeWithOpenAttributes.xsd | 42 ++ .../resources/xsd/ComplexTypeWithOpenContent.xml | 31 + .../resources/xsd/ComplexTypeWithOpenContent.xsd | 39 ++ .../xsd/ComplexTypeWithOppositeProperty.xml | 30 + .../xsd/ComplexTypeWithOppositeProperty.xsd | 59 ++ .../resources/xsd/ComplexTypeWithSDOAliasName.xml | 26 + .../resources/xsd/ComplexTypeWithSDOAliasName.xsd | 38 ++ .../main/resources/xsd/ComplexTypeWithSDOName.xml | 26 + .../main/resources/xsd/ComplexTypeWithSDOName.xsd | 38 ++ .../resources/xsd/ComplexTypeWithSDOSequence.xml | 26 + .../resources/xsd/ComplexTypeWithSDOSequence.xsd | 40 ++ .../resources/xsd/ComplexTypeWithoutContent.xml | 24 + .../resources/xsd/ComplexTypeWithoutContent.xsd | 33 + .../main/resources/xsd/ComplexTypeWithoutName.xml | 26 + .../main/resources/xsd/ComplexTypeWithoutName.xsd | 39 ++ .../src/main/resources/xsd/DefaultNamespace.xml | 23 + .../src/main/resources/xsd/DefaultNamespace.xsd | 32 + .../common/src/main/resources/xsd/ElementInAll.xml | 27 + .../common/src/main/resources/xsd/ElementInAll.xsd | 40 ++ .../src/main/resources/xsd/ElementInChoice.xml | 25 + .../src/main/resources/xsd/ElementInChoice.xsd | 48 ++ .../xsd/ElementOfSDOChangeSummaryType.xml | 29 + .../xsd/ElementOfSDOChangeSummaryType.xsd | 34 + .../xsd/ElementOfSimpleTypeWithDefault.xml | 24 + .../xsd/ElementOfSimpleTypeWithDefault.xsd | 31 + .../resources/xsd/ElementOfSimpleTypeWithFixed.xml | 24 + .../resources/xsd/ElementOfSimpleTypeWithFixed.xsd | 31 + .../xsd/ElementOfSimpleTypeWithSDODataType.xml | 24 + .../xsd/ElementOfSimpleTypeWithSDODataType.xsd | 33 + ...mentOfSimpleTypeWithSDOOppositePropertyType.xml | 24 + ...mentOfSimpleTypeWithSDOOppositePropertyType.xsd | 33 + .../xsd/ElementOfSimpleTypeWithSDOPropertyType.xml | 24 + .../xsd/ElementOfSimpleTypeWithSDOPropertyType.xsd | 32 + .../xsd/ElementOfSimpleTypeWithSDOString.xml | 24 + .../xsd/ElementOfSimpleTypeWithSDOString.xsd | 32 + .../resources/xsd/ElementSubstitutionGroupBase.xml | 40 ++ .../resources/xsd/ElementSubstitutionGroupBase.xsd | 52 ++ .../main/resources/xsd/ElementWithMaxOccurs.xml | 25 + .../main/resources/xsd/ElementWithMaxOccurs.xsd | 31 + .../src/main/resources/xsd/ElementWithNillable.xml | 24 + .../src/main/resources/xsd/ElementWithNillable.xsd | 31 + .../main/resources/xsd/ElementWithSDOAliasName.xml | 24 + .../main/resources/xsd/ElementWithSDOAliasName.xsd | 32 + .../src/main/resources/xsd/ElementWithSDOName.xml | 24 + .../src/main/resources/xsd/ElementWithSDOName.xsd | 32 + .../resources/xsd/GlobalElementComplexType.xml | 24 + .../resources/xsd/GlobalElementComplexType.xsd | 31 + .../main/resources/xsd/GlobalElementSimpleType.xml | 24 + .../main/resources/xsd/GlobalElementSimpleType.xsd | 26 + .../common/src/main/resources/xsd/Import.xml | 30 + .../common/src/main/resources/xsd/Import.xsd | 40 ++ .../src/main/resources/xsd/ImportedSchema.xsd | 33 + .../common/src/main/resources/xsd/Include.xml | 24 + .../common/src/main/resources/xsd/Include.xsd | 36 + .../common/src/main/resources/xsd/Interop.xsd | 138 ++++ .../common/src/main/resources/xsd/Notation.xml | 24 + .../common/src/main/resources/xsd/Notation.xsd | 35 + .../common/src/main/resources/xsd/Person.xsd | 30 + .../src/main/resources/xsd/SDOJavaPackage.xml | 25 + .../src/main/resources/xsd/SDOJavaPackage.xsd | 39 ++ .../main/resources/xsd/SimpleTypeWithAbstract.xml | 24 + .../main/resources/xsd/SimpleTypeWithAbstract.xsd | 40 ++ .../xsd/SimpleTypeWithExtendedInstanceClass.xml | 24 + .../xsd/SimpleTypeWithExtendedInstanceClass.xsd | 36 + .../resources/xsd/SimpleTypeWithInstanceClass.xml | 24 + .../resources/xsd/SimpleTypeWithInstanceClass.xsd | 37 ++ .../src/main/resources/xsd/SimpleTypeWithList.xml | 24 + .../src/main/resources/xsd/SimpleTypeWithList.xsd | 37 ++ .../src/main/resources/xsd/SimpleTypeWithName.xml | 24 + .../src/main/resources/xsd/SimpleTypeWithName.xsd | 36 + .../main/resources/xsd/SimpleTypeWithSDOName.xml | 24 + .../main/resources/xsd/SimpleTypeWithSDOName.xsd | 37 ++ .../src/main/resources/xsd/SimpleTypeWithUnion.xml | 25 + .../src/main/resources/xsd/SimpleTypeWithUnion.xsd | 46 ++ .../main/resources/xsd/SimpleTypeWithoutName.xml | 26 + .../main/resources/xsd/SimpleTypeWithoutName.xsd | 38 ++ .../src/main/resources/xsd/TargetNamespace.xml | 24 + .../src/main/resources/xsd/TargetNamespace.xsd | 34 + .../common/src/main/resources/xsd/datagraph.xsd | 88 +++ .../common/src/main/resources/xsd/sdoJava.xsd | 88 +++ .../common/src/main/resources/xsd/sdoModel.xsd | 221 +++++++ .../sca/itest/generate/GenerateTestCase.java | 49 ++ .../0.99-incubating/itest/databindings/config.png | Bin 0 -> 31222 bytes .../0.99-incubating/itest/databindings/config.svg | 117 ++++ .../itest/databindings/databinding.png | Bin 0 -> 14106 bytes .../itest/databindings/databinding.svg | 242 +++++++ .../0.99-incubating/itest/databindings/interop.png | Bin 0 -> 23179 bytes .../0.99-incubating/itest/databindings/interop.svg | 352 ++++++++++ .../itest/databindings/interop/pom.xml | 190 ++++++ .../generate/InteropDatabindingTestCase.java.vm | 113 ++++ .../main/resources/generate/JAXBGreeter.wsdl.vm | 103 +++ .../src/main/resources/generate/SDOGreeter.wsdl.vm | 103 +++ .../src/main/resources/generate/generate.xml | 159 +++++ .../resources/generate/interopgreeter.composite.vm | 78 +++ .../itest/databindings/jaxbgen/pom.xml | 218 ++++++ .../src/main/resources/generate/generate.xml | 172 +++++ .../jaxbgen/src/main/resources/greeter.composite | 49 ++ .../0.99-incubating/itest/databindings/pom.xml | 45 ++ .../0.99-incubating/itest/databindings/readme.html | 157 +++++ .../itest/databindings/sdogen/pom.xml | 225 +++++++ .../src/main/resources/generate/generate.xml | 173 +++++ .../main/resources/generate/greeter.composite.vm | 56 ++ .../sdogen/src/main/resources/generate/pom.xml.vm | 223 +++++++ .../itest/exceptions-cross-binding-ws/pom.xml | 187 ++++++ .../exceptions/impl/StockExceptionTestJAXB.java | 31 + .../test/exceptions/impl/StockExchangeJaxB.java | 76 +++ .../sca/test/exceptions/impl/StockTraderSDO.java | 37 ++ .../test/exceptions/impl/StockTraderSDOImpl.java | 122 ++++ .../sdohandgen/InvalidSymbolSDOException.java | 85 +++ .../sdohandgen/MarketClosedSDOException.java | 78 +++ .../exceptions/sdohandgen/StockExceptionTest.java | 46 ++ .../src/main/resources/ExceptionTest.composite | 23 + .../src/main/resources/intracomposite.composite | 48 ++ .../resources/wsdl.sdo/StockExceptionTest.wsdl | 141 ++++ .../main/resources/wsdl/StockExceptionTest.wsdl | 148 +++++ .../src/main/resources/xsd/StockExceptionTest.xsd | 65 ++ .../exceptions/IntraCompositeTestCaseFIXME.java | 92 +++ .../itest/exceptions-cross-binding/pom.xml | 181 +++++ .../exceptions/impl/StockExceptionTestJAXB.java | 31 + .../test/exceptions/impl/StockExchangeJaxB.java | 76 +++ .../sca/test/exceptions/impl/StockTraderSDO.java | 37 ++ .../test/exceptions/impl/StockTraderSDOImpl.java | 122 ++++ .../sdohandgen/InvalidSymbolSDOException.java | 85 +++ .../sdohandgen/MarketClosedSDOException.java | 78 +++ .../exceptions/sdohandgen/StockExceptionTest.java | 46 ++ .../src/main/resources/ExceptionTest.composite | 25 + .../src/main/resources/intracomposite.composite | 35 + .../resources/wsdl.sdo/StockExceptionTest.wsdl | 141 ++++ .../main/resources/wsdl/StockExceptionTest.wsdl | 148 +++++ .../src/main/resources/xsd/StockExceptionTest.xsd | 65 ++ .../exceptions/IntraCompositeTestCaseFIXME.java | 93 +++ .../tags/0.99-incubating/itest/exceptions/pom.xml | 45 ++ .../tuscany/sca/test/exceptions/Checked.java | 58 ++ .../sca/test/exceptions/ExceptionHandler.java | 32 + .../sca/test/exceptions/ExceptionThrower.java | 31 + .../tuscany/sca/test/exceptions/UnChecked.java | 57 ++ .../test/exceptions/impl/ExceptionHandlerImpl.java | 120 ++++ .../test/exceptions/impl/ExceptionThrowerImpl.java | 48 ++ .../src/main/resources/ExceptionTest.composite | 27 + .../src/main/resources/intracomposite.composite | 34 + .../test/exceptions/IntraCompositeTestCase.java | 51 ++ .../0.99-incubating/itest/extended-api/pom.xml | 51 ++ .../tuscany/sca/test/extended/BasicService.java | 26 + .../tuscany/sca/test/extended/MathService.java | 25 + .../sca/test/extended/impl/BasicServiceImpl.java | 45 ++ .../sca/test/extended/impl/MathServiceImpl.java | 31 + .../src/main/resources/BasicService.composite | 29 + .../src/main/resources/MathService.composite | 29 + .../sca/test/extended/ServiceLocateTestCase.java | 72 ++ .../itest/old/bindings/bindingsclient/pom.xml | 64 ++ .../tuscany/sca/itest/SCATestToolService.java | 40 ++ .../src/main/resources/bindingsclient.composite | 47 ++ .../src/main/resources/wsdl/testtool.wsdl | 272 ++++++++ .../bindingsclient/src/main/webapp/SCATestTool.jsp | 130 ++++ .../bindingsclient/src/main/webapp/WEB-INF/web.xml | 31 + .../tuscany/sca/itest/SCATestToolServerTest.java | 45 ++ .../sca/itest/WSBindingsClientTestCase.java | 80 +++ .../tuscany/sca/util/SCATestUtilityServerTest.java | 46 ++ .../itest/old/bindings/bindingscomposite/pom.xml | 58 ++ .../tuscany/sca/itest/SCADataTypeHelper.java | 341 ++++++++++ .../sca/itest/SCADataTypeHelperException.java | 29 + .../sca/itest/SCATestToolCallbackService.java | 27 + .../tuscany/sca/itest/SCATestToolServer.java | 46 ++ .../tuscany/sca/itest/SCATestToolService.java | 39 ++ .../tuscany/sca/itest/SCATestToolServiceImpl.java | 76 +++ .../tuscany/sca/util/SCATestUtilityService.java | 64 ++ .../resources/bindingscomposite-system.composite | 36 + .../src/main/resources/bindingscomposite.composite | 49 ++ .../src/main/resources/wsdl/testtool.wsdl | 272 ++++++++ .../src/main/resources/wsdl/testutility.wsdl | 704 ++++++++++++++++++++ .../sca/itest/SCATestToolServerTestCase.java | 45 ++ .../itest/old/bindings/bindingsutility/pom.xml | 59 ++ .../sca/itest/SCATestToolCallbackService.java | 28 + .../tuscany/sca/util/SCATestUtilityServer.java | 46 ++ .../tuscany/sca/util/SCATestUtilityService.java | 64 ++ .../sca/util/SCATestUtilityServiceImpl.java | 157 +++++ .../resources/bindingsutility-system.composite | 36 + .../src/main/resources/bindingsutility.composite | 39 ++ .../src/main/resources/wsdl/testutility.wsdl | 704 ++++++++++++++++++++ .../sca/util/SCATestUtilityServerTestCase.java | 45 ++ .../0.99-incubating/itest/old/bindings/pom.xml | 41 ++ .../itest/old/interop-soap-client/pom.xml | 77 +++ .../LoopbackInteropDocServiceComponentImpl.java | 49 ++ .../src/main/resources/META-INF/README.txt | 35 + .../src/main/resources/META-INF/sca/default.scdl | 50 ++ .../tuscany/extensions/includes/binding.axis2.scdl | 39 ++ .../extensions/includes/databinding.axiom.scdl | 50 ++ .../extensions/includes/databinding.sdo.scdl | 60 ++ .../extensions/includes/interface.wsdl.scdl | 55 ++ .../tuscany/extensions/test-extensions.scdl | 25 + .../src/main/resources/wsdl/interopdoc.wsdl | 185 ++++++ .../interop/client/InteropDocClientTestCase.java | 155 +++++ .../itest/old/interop-soap-round2-client/pom.xml | 77 +++ .../test/interop/client/InteropTestDocLit.java | 44 ++ .../src/main/resources/META-INF/README.txt | 35 + .../src/main/resources/META-INF/sca/default.scdl | 38 ++ .../tuscany/extensions/includes/binding.axis2.scdl | 39 ++ .../extensions/includes/databinding.axiom.scdl | 50 ++ .../extensions/includes/databinding.sdo.scdl | 60 ++ .../extensions/includes/interface.wsdl.scdl | 55 ++ .../tuscany/extensions/test-extensions.scdl | 25 + .../src/main/resources/wsdl/interoptestdoclit.wsdl | 155 +++++ .../interop/client/InteropTestDocLitTestCase.java | 133 ++++ .../itest/old/interop-soap-service/pom.xml | 109 +++ .../server/InteropDocServiceComponentImpl.java | 47 ++ .../src/main/resources/wsdl/interopdoc.wsdl | 180 +++++ .../src/main/webapp/META-INF/sca/default.scdl | 42 ++ .../src/main/webapp/WEB-INF/web.xml | 51 ++ .../itest/old/interop-soap-service/t.bat | 34 + .../itest/old/interop-xsq-client/pom.xml | 60 ++ .../src/main/resources/META-INF/README.txt | 35 + .../src/test/java/interop/ClientTestCase.java | 77 +++ .../src/test/resources/META-INF/sca/test.scdl | 31 + .../resources/META-INF/tuscany/binding.axis2.scdl | 39 ++ .../META-INF/tuscany/databinding.axiom.scdl | 52 ++ .../META-INF/tuscany/databinding.sdo.scdl | 60 ++ .../resources/META-INF/tuscany/interface.wsdl.scdl | 55 ++ .../META-INF/tuscany/test-extensions.scdl | 29 + .../src/test/resources/wsdl/sq.wsdl | 142 ++++ .../0.99-incubating/itest/old/spec-api/pom.xml | 45 ++ .../apache/tuscany/sca/test/spec/BasicService.java | 26 + .../apache/tuscany/sca/test/spec/MathService.java | 25 + .../tuscany/sca/test/spec/MyListService.java | 28 + .../tuscany/sca/test/spec/MyListServiceByYear.java | 27 + .../apache/tuscany/sca/test/spec/MyService.java | 29 + .../tuscany/sca/test/spec/MyServiceByDate.java | 29 + .../tuscany/sca/test/spec/MyTotalService.java | 23 + .../tuscany/sca/test/spec/SCAComponentService.java | 25 + .../sca/test/spec/impl/BasicServiceImpl.java | 49 ++ .../sca/test/spec/impl/MathServiceImpl.java | 31 + .../sca/test/spec/impl/MyListServiceImpl.java | 73 ++ .../tuscany/sca/test/spec/impl/MyServiceImpl.java | 112 ++++ .../sca/test/spec/impl/MyTotalServiceImpl.java | 78 +++ .../src/main/resources/BasicService.composite | 30 + .../src/main/resources/CompositeTest.composite | 33 + .../src/main/resources/MathService.composite | 29 + .../src/main/resources/myListService.composite | 33 + .../main/resources/myServiceInComposite.composite | 50 ++ .../main/resources/myServiceInRecursive.composite | 50 ++ .../src/main/resources/mySimpleService.composite | 35 + .../resources/mySimpleServiceInRecursive.composite | 45 ++ .../mySimpleServiceInRecursive2.composite | 44 ++ .../src/main/resources/myTotalService.composite | 34 + .../resources/myTotalServiceInComposite.composite | 45 ++ ...erviceInCompositeForReferenceOverride.composite | 88 +++ .../resources/myTotalServiceInRecursive.composite | 64 ++ ...erviceInRecursiveForReferenceOverride.composite | 56 ++ .../src/main/resources/myservice.composite | 52 ++ .../sca/test/spec/ComponentContextTestCase.java | 61 ++ ...ComponentServiceReferenceListTestCaseFIXME.java | 50 ++ .../spec/ComponentServiceReferenceTestCase.java | 64 ++ .../tuscany/sca/test/spec/ComponentTestCase.java | 98 +++ .../CompositeOneService2LevelTestCaseFIXME.java | 106 +++ .../sca/test/spec/CompositeOneServiceTestCase.java | 60 ++ ...siteServiceReferenceForRefOverrideTestCase.java | 80 +++ .../spec/CompositeServiceReferenceTestCase.java | 92 +++ .../tuscany/sca/test/spec/CompositeTestCase.java | 78 +++ .../itest/operation-overloading/pom.xml | 45 ++ .../sca/test/opoverload/OverloadASourceTarget.java | 42 ++ .../sca/test/opoverload/impl/OverloadASource.java | 104 +++ .../sca/test/opoverload/impl/OverloadATarget.java | 96 +++ .../src/main/resources/OperationOverload.composite | 34 + .../test/opoverload/impl/OverloadATestCase.java | 72 ++ .../itest/osgi-implementation/build-bundles.xml | 34 + .../itest/osgi-implementation/pom.xml | 734 +++++++++++++++++++++ .../src/main/java/helloworld/Greetings.java | 36 + .../src/main/java/helloworld/HelloWorld.java | 29 + .../java/helloworld/JavaGreetingsComponent.java | 73 ++ .../java/helloworld/JavaHelloWorldComponent.java | 41 ++ .../main/java/helloworld/OSGiGreetingsImpl.java | 109 +++ .../main/java/helloworld/OSGiHelloWorldImpl.java | 81 +++ .../src/main/java/helloworld/ws/HelloWorld.java | 29 + .../main/java/helloworld/ws/HelloWorldService.java | 28 + .../stockquote/OSGiStockQuoteComponentImpl.java | 83 +++ .../java/stockquote/OSGiStockQuoteFactoryImpl.java | 65 ++ .../main/java/stockquote/OSGiStockQuoteImpl.java | 116 ++++ .../src/main/java/stockquote/StockQuote.java | 31 + .../src/main/java/supplychain/OSGiBundleImpl.java | 163 +++++ .../main/java/supplychain/customer/Customer.java | 39 ++ .../customer/JavaCustomerComponentImpl.java | 88 +++ .../customer/OSGiCustomerComponentImpl.java | 104 +++ .../customer/OSGiCustomerFactoryImpl.java | 65 ++ .../supplychain/customer/OSGiCustomerImpl.java | 89 +++ .../OSGiCustomerWithQueryComponentImpl.java | 100 +++ .../customer/OSGiCustomerWithQueryImpl.java | 82 +++ .../customer/OSGiVersionedCustomerImpl.java | 98 +++ .../retailer/JavaRetailerComponentImpl.java | 67 ++ .../retailer/OSGiRetailerComponentImpl.java | 64 ++ .../supplychain/retailer/OSGiRetailerImpl.java | 58 ++ .../retailer/OSGiRetailerServiceImpl.java | 45 ++ .../OSGiRetailerWithQueryComponentImpl.java | 78 +++ .../retailer/OSGiRetailerWithQueryImpl.java | 64 ++ .../retailer/OSGiVersionedRetailerImpl.java | 75 +++ .../retailer/OSGiVersionedRetailerServiceImpl.java | 47 ++ .../main/java/supplychain/retailer/Retailer.java | 28 + .../java/supplychain/retailer/RetailerQuery.java | 28 + .../shipper/JavaShipperComponentImpl.java | 58 ++ .../shipper/OSGiShipperComponentImpl.java | 62 ++ .../shipper/OSGiShipperFactoryImpl.java | 78 +++ .../java/supplychain/shipper/OSGiShipperImpl.java | 57 ++ .../shipper/OSGiShipperServiceImpl.java | 43 ++ .../shipper/OSGiVersionedShipperImpl.java | 76 +++ .../shipper/OSGiVersionedShipperServiceImpl.java | 46 ++ .../src/main/java/supplychain/shipper/Shipper.java | 28 + .../warehouse/JavaWarehouseComponentImpl.java | 48 ++ .../JavaWarehouseWithQueryComponentImpl.java | 52 ++ .../warehouse/OSGiWarehouseComponentImpl.java | 57 ++ .../supplychain/warehouse/OSGiWarehouseImpl.java | 68 ++ .../warehouse/OSGiWarehouseServiceImpl.java | 62 ++ .../main/java/supplychain/warehouse/Warehouse.java | 28 + .../java/supplychain/warehouse/WarehouseQuery.java | 28 + .../src/main/resources/META-INF/LICENSE.txt | 202 ++++++ .../src/main/resources/META-INF/NOTICE | 14 + .../src/main/resources/META-INF/README.txt | 35 + .../main/resources/META-INF/sca-contribution.xml | 24 + .../resources/helloworld/Greetings.componentType | 30 + .../resources/helloworld/HelloWorld.componentType | 31 + .../src/main/resources/osgi/factory/Customer.mf | 11 + .../src/main/resources/osgi/factory/Retailer.mf | 10 + .../src/main/resources/osgi/factory/Shipper.mf | 10 + .../src/main/resources/osgi/factory/ds/Customer.mf | 10 + .../main/resources/osgi/factory/ds/Customer.xml | 41 ++ .../src/main/resources/osgi/factory/ds/Retailer.mf | 11 + .../main/resources/osgi/factory/ds/Retailer1.xml | 32 + .../main/resources/osgi/factory/ds/Retailer2.xml | 32 + .../src/main/resources/osgi/factory/ds/Shipper.mf | 10 + .../main/resources/osgi/factory/ds/Shipper1.xml | 34 + .../main/resources/osgi/factory/ds/Shipper2.xml | 34 + .../main/resources/osgi/factory/ds/Warehouse.mf | 11 + .../main/resources/osgi/factory/ds/Warehouse.xml | 32 + .../src/main/resources/osgi/interfaces/Customer.mf | 11 + .../src/main/resources/osgi/interfaces/Retailer.mf | 10 + .../src/main/resources/osgi/interfaces/Shipper.mf | 10 + .../main/resources/osgi/interfaces/ds/Customer.mf | 10 + .../main/resources/osgi/interfaces/ds/Customer.xml | 43 ++ .../main/resources/osgi/interfaces/ds/Retailer.mf | 11 + .../main/resources/osgi/interfaces/ds/Retailer.xml | 39 ++ .../main/resources/osgi/interfaces/ds/Shipper.mf | 10 + .../main/resources/osgi/interfaces/ds/Shipper.xml | 34 + .../src/main/resources/osgi/passbyref/Greetings.mf | 10 + .../osgi/properties/ManagedStockQuoteFactory.mf | 10 + .../main/resources/osgi/properties/StockQuote.mf | 10 + .../resources/osgi/properties/StockQuoteFactory.mf | 10 + .../resources/osgi/properties/ds/StockQuote.mf | 11 + .../resources/osgi/properties/ds/StockQuote.xml | 27 + .../osgi/properties/ds/StockQuoteFactory.mf | 11 + .../osgi/properties/ds/StockQuoteFactory.xml | 27 + .../src/main/resources/osgi/services/Customer.mf | 11 + .../src/main/resources/osgi/services/Retailer.mf | 10 + .../src/main/resources/osgi/services/Shipper.mf | 10 + .../src/main/resources/osgi/services/Warehouse.mf | 10 + .../main/resources/osgi/services/ds/Customer.mf | 10 + .../main/resources/osgi/services/ds/Customer.xml | 41 ++ .../main/resources/osgi/services/ds/Retailer.mf | 11 + .../main/resources/osgi/services/ds/Retailer1.xml | 32 + .../main/resources/osgi/services/ds/Retailer2.xml | 32 + .../src/main/resources/osgi/services/ds/Shipper.mf | 10 + .../main/resources/osgi/services/ds/Shipper1.xml | 34 + .../main/resources/osgi/services/ds/Shipper2.xml | 34 + .../main/resources/osgi/services/ds/Warehouse.mf | 11 + .../main/resources/osgi/services/ds/Warehouse1.xml | 32 + .../main/resources/osgi/services/ds/Warehouse2.xml | 32 + .../src/main/resources/osgi/version/Customer1.mf | 11 + .../src/main/resources/osgi/version/Customer2.mf | 11 + .../src/main/resources/osgi/version/Retailer1.mf | 10 + .../src/main/resources/osgi/version/Retailer2.mf | 10 + .../src/main/resources/osgi/version/Shipper1.mf | 10 + .../src/main/resources/osgi/version/Shipper2.mf | 10 + .../src/main/resources/osgi/version/Warehouse1.mf | 10 + .../src/main/resources/osgi/version/Warehouse2.mf | 10 + .../main/resources/osgi/version/ds/Customer1.mf | 10 + .../main/resources/osgi/version/ds/Customer2.mf | 10 + .../main/resources/osgi/version/ds/CustomerV1.xml | 41 ++ .../main/resources/osgi/version/ds/CustomerV2.xml | 41 ++ .../main/resources/osgi/version/ds/Retailer1.mf | 11 + .../main/resources/osgi/version/ds/Retailer1V1.xml | 34 + .../main/resources/osgi/version/ds/Retailer1V2.xml | 34 + .../main/resources/osgi/version/ds/Retailer2.mf | 11 + .../main/resources/osgi/version/ds/Retailer2V1.xml | 33 + .../main/resources/osgi/version/ds/Retailer2V2.xml | 33 + .../src/main/resources/osgi/version/ds/Shipper1.mf | 10 + .../main/resources/osgi/version/ds/Shipper1V1.xml | 35 + .../main/resources/osgi/version/ds/Shipper1V2.xml | 35 + .../src/main/resources/osgi/version/ds/Shipper2.mf | 10 + .../main/resources/osgi/version/ds/Shipper2V1.xml | 35 + .../main/resources/osgi/version/ds/Shipper2V2.xml | 35 + .../main/resources/osgi/version/ds/Warehouse1.mf | 11 + .../resources/osgi/version/ds/Warehouse1V1.xml | 32 + .../resources/osgi/version/ds/Warehouse1V2.xml | 32 + .../main/resources/osgi/version/ds/Warehouse2.mf | 11 + .../resources/osgi/version/ds/Warehouse2V1.xml | 32 + .../resources/osgi/version/ds/Warehouse2V2.xml | 32 + .../src/main/resources/osgi/wiring/Customer.mf | 11 + .../src/main/resources/osgi/wiring/Retailer.mf | 10 + .../src/main/resources/osgi/wiring/Shipper.mf | 10 + .../src/main/resources/osgi/wiring/Warehouse.mf | 10 + .../src/main/resources/osgi/wiring/ds/Customer.mf | 10 + .../src/main/resources/osgi/wiring/ds/Customer.xml | 41 ++ .../src/main/resources/osgi/wiring/ds/Retailer.mf | 11 + .../main/resources/osgi/wiring/ds/Retailer1.xml | 33 + .../main/resources/osgi/wiring/ds/Retailer2.xml | 33 + .../src/main/resources/osgi/wiring/ds/Shipper.mf | 10 + .../src/main/resources/osgi/wiring/ds/Shipper1.xml | 35 + .../src/main/resources/osgi/wiring/ds/Shipper2.xml | 34 + .../src/main/resources/osgi/wiring/ds/Warehouse.mf | 11 + .../main/resources/osgi/wiring/ds/Warehouse1.xml | 32 + .../main/resources/osgi/wiring/ds/Warehouse2.xml | 32 + .../src/main/resources/osgi/ws/HelloWorld.mf | 12 + .../main/resources/sca/factory-ds-test.composite | 136 ++++ .../src/main/resources/sca/factory-test.composite | 121 ++++ .../src/main/resources/sca/helloworld.wsdl | 80 +++ .../resources/sca/interfaces-ds-test.composite | 60 ++ .../main/resources/sca/interfaces-test.composite | 60 ++ .../main/resources/sca/passbyref-test.composite | 41 ++ .../resources/sca/properties-ds-test.composite | 41 ++ .../main/resources/sca/properties-test.composite | 41 ++ .../resources/sca/properties2-ds-test.composite | 58 ++ .../main/resources/sca/properties2-test.composite | 52 ++ .../main/resources/sca/services-ds-test.composite | 93 +++ .../src/main/resources/sca/services-test.composite | 92 +++ .../main/resources/sca/version-ds-test.composite | 160 +++++ .../src/main/resources/sca/version-test.composite | 150 +++++ .../main/resources/sca/wiring-ds-test1.composite | 142 ++++ .../main/resources/sca/wiring-ds-test2.composite | 159 +++++ .../src/main/resources/sca/wiring-test1.composite | 132 ++++ .../src/main/resources/sca/wiring-test2.composite | 159 +++++ .../src/main/resources/sca/ws-helloworld.composite | 52 ++ .../resources/stockquote/StockQuote.componentType | 28 + .../resources/supplychain/Customer.componentType | 34 + .../supplychain/CustomerServices.componentType | 34 + .../supplychain/CustomerWithQuery.componentType | 31 + .../resources/supplychain/Retailer.componentType | 29 + .../supplychain/RetailerServices.componentType | 33 + .../supplychain/RetailerWithQuery.componentType | 35 + .../resources/supplychain/Shipper.componentType | 29 + .../supplychain/ShipperServices.componentType | 30 + .../resources/supplychain/Warehouse.componentType | 28 + .../supplychain/WarehouseServices.componentType | 28 + .../supplychain/WarehouseWithQuery.componentType | 31 + .../test/java/helloworld/HelloWorldTestCase.java | 55 ++ .../test/java/helloworld/PassByRefTestCase.java | 135 ++++ .../test/java/supplychain/SupplyChainTestCase.java | 79 +++ .../supplychain/VersionedSupplyChainTestCase.java | 81 +++ .../supplychain/factory/DSFactoryTestCase.java | 32 + .../java/supplychain/factory/FactoryTestCase.java | 52 ++ .../interfaces/DSInterfacesTestCase.java | 32 + .../supplychain/interfaces/InterfacesTestCase.java | 32 + .../properties/DSProperties2TestCase.java | 31 + .../properties/DSPropertiesTestCase.java | 31 + .../properties/Properties2TestCase.java | 83 +++ .../supplychain/properties/PropertiesTestCase.java | 73 ++ .../supplychain/services/DSServicesTestCase.java | 32 + .../supplychain/services/ServicesTestCase.java | 32 + .../supplychain/version/DSVersionTestCase.java | 33 + .../java/supplychain/version/VersionTestCase.java | 33 + .../java/supplychain/wiring/DSWiring1TestCase.java | 33 + .../java/supplychain/wiring/DSWiring2TestCase.java | 33 + .../java/supplychain/wiring/Wiring1TestCase.java | 32 + .../java/supplychain/wiring/Wiring2TestCase.java | 32 + .../src/test/java/util/OSGiTestUtil.java | 71 ++ .../resources/osgi/felix/felix.config.properties | 44 ++ sca-java-1.x/tags/0.99-incubating/itest/pom.xml | 88 +++ .../tags/0.99-incubating/itest/properties/pom.xml | 84 +++ .../apache/tuscany/sca/itest/ABCDComponent.java | 27 + .../tuscany/sca/itest/ABCDComponentImpl.java | 55 ++ .../org/apache/tuscany/sca/itest/ABComponent.java | 35 + .../apache/tuscany/sca/itest/ABComponentImpl.java | 98 +++ .../org/apache/tuscany/sca/itest/CDComponent.java | 33 + .../apache/tuscany/sca/itest/CDComponentImpl.java | 97 +++ .../tuscany/sca/itest/ComplexPropertyBean.java | 89 +++ .../apache/tuscany/sca/itest/OverrideService.java | 25 + .../tuscany/sca/itest/OverrideServiceImpl.java | 24 + .../tuscany/sca/itest/PropertyComponent.java | 36 + .../tuscany/sca/itest/PropertyComponentImpl.java | 99 +++ .../apache/tuscany/sca/itest/PropertyService.java | 24 + .../src/main/resources/OuterPropertyTest.composite | 41 ++ .../src/main/resources/PropertyTest.composite | 212 ++++++ .../properties/src/main/resources/customer.xsd | 30 + .../properties/src/main/resources/fileProperty.txt | 21 + .../src/main/resources/manyValuesFileProperty.txt | 23 + .../tuscany/sca/itest/OuterPropertyTestCase.java | 92 +++ .../apache/tuscany/sca/itest/PropertyTestCase.java | 208 ++++++ .../tags/0.99-incubating/itest/recursive/pom.xml | 45 ++ .../src/main/java/composite/CompositeClient.java | 42 ++ .../recursive/src/main/java/composite/Source.java | 24 + .../src/main/java/composite/SourceCallback.java | 24 + .../src/main/java/composite/SourceImpl.java | 55 ++ .../recursive/src/main/java/composite/Target.java | 30 + .../src/main/java/composite/TargetImpl.java | 41 ++ .../src/main/java/sample/ComponentAImpl.java | 41 ++ .../src/main/java/sample/ComponentCImpl.java | 41 ++ .../src/main/java/sample/ComponentEImpl.java | 38 ++ .../src/main/java/sample/ComponentFImpl.java | 45 ++ .../recursive/src/main/java/sample/Service1.java | 27 + .../recursive/src/main/java/test/Aggregator.java | 27 + .../src/main/java/test/AggregatorImpl.java | 55 ++ .../src/main/java/test/InnerSourceImpl.java | 34 + .../src/main/java/test/OuterSourceImpl.java | 34 + .../itest/recursive/src/main/java/test/Source.java | 30 + .../src/main/java/test1/composite/Target.java | 23 + .../src/main/java/test1/composite/TargetOne.java | 29 + .../src/main/java/test1/composite/TargetTwo.java | 29 + .../src/main/resources/Composite1.composite | 42 ++ .../src/main/resources/Composite2.composite | 43 ++ .../src/main/resources/Composite3.composite | 48 ++ .../recursive/src/main/resources/Inner.composite | 45 ++ .../src/main/resources/InnerComposite.composite | 41 ++ .../src/main/resources/InnerComposite2.composite | 33 + .../main/resources/META-INF/sca-contribution.xml | 24 + .../recursive/src/main/resources/Outer.composite | 39 ++ .../src/main/resources/OuterComposite.composite | 39 ++ .../main/resources/test1/InnerComposite.composite | 39 ++ .../main/resources/test1/OuterComposite.composite | 27 + .../src/test/java/composite/CompositeTestCase.java | 51 ++ .../LocateServiceEmbeddedSCADomainTestCase.java | 112 ++++ .../composite/LocateServiceSCADomainTestCase.java | 72 ++ .../sample/RecursiveCompositeTestCaseFIXME.java | 53 ++ .../src/test/java/test/InnerTestCase.java | 51 ++ .../src/test/java/test/OuterTestCase.java | 51 ++ .../test1/composite/CompositeClientTestCase.java | 38 ++ .../tags/0.99-incubating/itest/references/pom.xml | 46 ++ .../tuscany/sca/itest/references/AComponent.java | 34 + .../sca/itest/references/AComponentImpl.java | 76 +++ .../tuscany/sca/itest/references/BComponent.java | 26 + .../sca/itest/references/BComponentImpl.java | 39 ++ .../tuscany/sca/itest/references/CComponent.java | 24 + .../sca/itest/references/CComponentImpl.java | 27 + .../tuscany/sca/itest/references/DComponent.java | 24 + .../sca/itest/references/DComponentImpl.java | 27 + .../main/resources/InnerReferencesTest.composite | 46 ++ .../itest/references/InnerReferenceTestCase.java | 78 +++ .../tags/0.99-incubating/itest/scopes/pom.xml | 47 ++ .../scopes/CompositeScopeStateVerifierImpl.java | 44 ++ .../scopes/RequestScopeStateVerifierImpl.java | 37 ++ .../tuscany/sca/itest/scopes/StateVerifier.java | 25 + .../scopes/src/main/resources/scopes.composite | 33 + .../org/apache/tuscany/sca/test/ScopeTestCase.java | 93 +++ .../tags/0.99-incubating/itest/services/pom.xml | 46 ++ .../tuscany/sca/itest/services/AComponent.java | 25 + .../tuscany/sca/itest/services/AComponentImpl.java | 28 + .../tuscany/sca/itest/services/BComponent.java | 25 + .../tuscany/sca/itest/services/BComponentImpl.java | 31 + .../tuscany/sca/itest/services/CComponent.java | 27 + .../tuscany/sca/itest/services/CComponentImpl.java | 28 + .../tuscany/sca/itest/services/D1Component.java | 25 + .../tuscany/sca/itest/services/DComponent.java | 25 + .../tuscany/sca/itest/services/DComponentImpl.java | 34 + .../src/main/resources/ServicesTest.composite | 70 ++ .../sca/itest/services/ServicesTestCase.java | 103 +++ .../tags/0.99-incubating/itest/wsdl/pom.xml | 135 ++++ .../services/accountdata/AccountDataService.java | 92 +++ .../accountdata/AccountDataServiceImpl.java | 93 +++ .../accountdata/AccountServiceClientImpl.java | 79 +++ .../services/accountdata/Component2aImpl.java | 79 +++ .../services/accountdata/Component2bImpl.java | 79 +++ .../services/accountdata/Component3aImpl.java | 79 +++ .../services/accountdata/Component3bImpl.java | 79 +++ .../services/accountdata/CustomerIdService.java | 98 +++ .../src/main/java/helloworld/HelloWorldImpl.java | 33 + .../main/java/helloworld/HelloWorldService.java | 33 + .../helloworld/HelloWorldServiceComponent.java | 43 ++ .../apache/tuscany/sca/itest/Component2aImpl.java | 38 ++ .../apache/tuscany/sca/itest/Component2bImpl.java | 39 ++ .../apache/tuscany/sca/itest/Component3aImpl.java | 39 ++ .../apache/tuscany/sca/itest/Component3bImpl.java | 39 ++ .../wsdl/src/main/resources/SDOWSDLTest.composite | 344 ++++++++++ .../wsdl/src/main/resources/WSDLTest.composite | 371 +++++++++++ .../accountdata/Component2bImpl.componentType | 29 + .../accountdata/Component3bImpl.componentType | 29 + .../sca/itest/Component2bImpl.componentType | 29 + .../sca/itest/Component3bImpl.componentType | 29 + .../src/main/resources/wsdl/AccountService.wsdl | 453 +++++++++++++ .../wsdl/src/main/resources/wsdl/helloworld.wsdl | 80 +++ .../apache/tuscany/sca/itest/SDOWSDLTestCase.java | 169 +++++ .../org/apache/tuscany/sca/itest/WSDLTestCase.java | 146 ++++ .../tags/0.99-incubating/itest/wsdl2java/pom.xml | 175 +++++ .../src/test/resources/AccountService.wsdl | 479 ++++++++++++++ .../src/test/resources/StockExceptionTest.wsdl | 167 +++++ .../tags/0.99-incubating/itest/wsdlless/pom.xml | 135 ++++ .../services/accountdata/AccountDataService.java | 91 +++ .../accountdata/AccountDataServiceImpl.java | 91 +++ .../accountdata/AccountServiceClientImpl.java | 77 +++ .../services/accountdata/Component2aImpl.java | 77 +++ .../services/accountdata/Component2bImpl.java | 77 +++ .../services/accountdata/Component3aImpl.java | 77 +++ .../services/accountdata/Component3bImpl.java | 77 +++ .../services/accountdata/CustomerIdService.java | 98 +++ .../src/main/java/helloworld/HelloWorldImpl.java | 33 + .../main/java/helloworld/HelloWorldService.java | 33 + .../helloworld/HelloWorldServiceComponent.java | 43 ++ .../apache/tuscany/sca/itest/Component2aImpl.java | 38 ++ .../apache/tuscany/sca/itest/Component2bImpl.java | 39 ++ .../apache/tuscany/sca/itest/Component3aImpl.java | 39 ++ .../apache/tuscany/sca/itest/Component3bImpl.java | 39 ++ .../src/main/resources/SDOWSDLTest.composite | 321 +++++++++ .../wsdlless/src/main/resources/WSDLTest.composite | 350 ++++++++++ .../accountdata/Component2bImpl.componentType | 29 + .../accountdata/Component3bImpl.componentType | 29 + .../sca/itest/Component2bImpl.componentType | 29 + .../sca/itest/Component3bImpl.componentType | 29 + .../src/main/resources/wsdl/AccountService.wsdl | 453 +++++++++++++ .../src/main/resources/wsdl/helloworld.wsdl | 80 +++ .../apache/tuscany/sca/itest/SDOWSDLTestCase.java | 169 +++++ .../org/apache/tuscany/sca/itest/WSDLTestCase.java | 146 ++++ 928 files changed, 52887 insertions(+) create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callablereferences/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/AComponent.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/AComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/BComponent.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/BComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/CComponent.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/CComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/DComponent.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/DComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/resources/CallableReferenceTest.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/test/java/org/apache/tuscany/sca/itest/callableref/CallableReferenceTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-api/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiCallBack.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClient.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClientImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-api/src/main/resources/CallBackApiTest.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-api/src/test/java/org/apache/tuscany/sca/test/CallBackApiTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-basic/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-basic/src/main/resources/CallBackBasicTest.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-basic/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeCallBack.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClient.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClientImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/src/main/resources/CallBackCTypeClient.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/src/main/resources/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.componentType create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/src/test/java/org/apache/tuscany/sca/test/CallBackCTypeTestCaseFIXME.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-id/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdCallBack.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdClient.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdClientImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-id/src/main/resources/CallBackIdClient.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-id/src/test/java/org/apache/tuscany/sca/test/CallBackIdTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-multiple-wires/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClient.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl1.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl2.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceCallback.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-multiple-wires/src/main/resources/CallbackMultiWireTest.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-multiple-wires/src/test/java/org/apache/tuscany/sca/test/callback/CallbackMultiWireTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCalbackService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackBadCallback.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackCallback.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackCallbackImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackClient.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackClientImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackObjectCallback.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/resources/CallBackSetCallbackTest.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/test/java/org/apache/tuscany/sca/test/CallBackSetCallbackTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvBadCallback.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvCallback.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvClient.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvClientImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvNonSerCallback.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvObjectCallback.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/resources/CallBackSetCallbackConvTest.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/test/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvTestCaseFIXME.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/component-type/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/AddService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/AddServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/CalculatorClient.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/CalculatorService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/CalculatorServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/DivideService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/DivideServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/MultiplyService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/MultiplyServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/SubtractService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/SubtractServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/resources/Calculator.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/resources/calculator/AddServiceImpl.componentType create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/resources/calculator/CalculatorServiceImpl.componentType create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/resources/calculator/DivideServiceImpl.componentType create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/resources/calculator/MultiplyServiceImpl.componentType create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/resources/calculator/SubtractServiceImpl.componentType create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/component-type/src/test/java/calculator/CalculatorTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-composite/.ruleset create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-composite/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-composite/src/main/java/hello/Hello.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-composite/src/main/java/hello/HelloImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-composite/src/main/resources/META-INF/sca-contribution.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-composite/src/main/resources/hello.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-composite/src/test/java/org/apache/tuscany/sca/test/contribution/HelloTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-java/.ruleset create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-java/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-java/src/main/java/helloworld/HelloWorldService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-java/src/main/resources/META-INF/sca-contribution.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-wsdl/.ruleset create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-wsdl/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-wsdl/src/main/resources/META-INF/sca-contribution.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.wsdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/.ruleset create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldServer.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/src/main/resources/META-INF/sca-contribution.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/src/main/resources/helloworld.wsdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/src/main/resources/helloworld.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/src/main/resources/helloworldws.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/src/test/java/org/apache/tuscany/test/contribution/HelloWorldServerTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-java/.ruleset create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-java/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-java/src/main/java/helloworld/HelloWorldImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-java/src/main/resources/META-INF/sca-contribution.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-java/src/main/resources/helloworldws.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-java/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/.ruleset create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldServer.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/src/main/resources/META-INF/sca-contribution.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/src/main/resources/helloworldws.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/AddService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/AddServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/CalculatorClient.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/CalculatorService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/CalculatorServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/DivideService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/DivideServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/MultiplyService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/MultiplyServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/SubtractService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/SubtractServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/resources/ContributionTest.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/resources/calculator/Calculator.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/resources/calculator/sca-contribution.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution/src/test/java/org/apache/tuscany/sca/test/contribution/ContributionServiceTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution/src/test/resources/deployables/sample-calculator.jar create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/contribution/src/test/resources/repository/sample-calculator.jar create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalCallback.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalClient.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalReferenceClient.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationAgeComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationMaxIdleComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalClientStatefulImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalClientStatelessImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalReferenceClientImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatefulImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatelessImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatelessScope.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/AnotherService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/AnotherServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsCallback.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClient.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClient2.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClientImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsLifeCycleService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsLifeCycleServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/resources/ConversationAge.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/resources/ConversationsTest.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/resources/conversationId.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/resources/conversational.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationIdTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalAgeTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalJ2SETestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/conversations/src/test/java/org/apache/tuscany/sca/test/ConversationsTestCaseFIXME.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/java/org/apache/tuscany/sca/itest/generate/Generate.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/generate/DatabindingTestCase.java.vm create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/generate/Greeter.wsdl.vm create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/generate/GreeterService.java.vm create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/generate/GreeterServiceClient.java.vm create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/generate/GreeterServiceClientImpl.java.vm create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/generate/GreeterServiceImpl.java.vm create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/generate/generate.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/wsdl/Dummy.txt create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Annotation.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Annotation.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Attribute.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Attribute.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeReference.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeReference.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithDefaultValue.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithDefaultValue.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithFixedValue.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithFixedValue.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOAliasName.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOAliasName.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDODataType.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDODataType.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOName.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOName.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertySDOOppositePropertyType.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertySDOOppositePropertyType.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertyType.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertyType.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOString.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOString.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInAnySimpleType.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInAnySimpleType.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInAnyType.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInAnyType.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInAnyURI.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInAnyURI.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInBase64Binary.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInBase64Binary.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInBoolean.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInBoolean.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInByte.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInByte.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDate.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDate.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDateTime.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDateTime.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDecimal.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDecimal.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDouble.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDouble.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDuration.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDuration.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInFloat.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInFloat.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGDay.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGDay.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGMonth.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGMonth.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGMonthDay.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGMonthDay.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGYear.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGYear.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGYearMonth.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGYearMonth.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInHexBinary.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInHexBinary.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInID.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInID.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInIDREF.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInIDREF.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInIDREFS.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInIDREFS.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInInt.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInInt.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInInteger.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInInteger.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInLanguage.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInLanguage.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInLong.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInLong.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNCName.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNCName.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKEN.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKEN.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKENS.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKENS.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNOTATION.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNOTATION.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInName.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInName.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNegativeInteger.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNegativeInteger.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNonNegativeInteger.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNonNegativeInteger.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNonPositiveInteger.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNonPositiveInteger.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNormalizedString.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNormalizedString.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInPositiveInteger.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInPositiveInteger.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInQName.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInQName.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInShort.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInShort.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInString.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInString.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInTime.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInTime.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInToken.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInToken.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedByte.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedByte.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedInt.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedInt.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedLong.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedLong.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedShort.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedShort.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeComplexContentRestrictingComplexType.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeComplexContentRestrictingComplexType.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingComplexType.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingComplexType.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingSimpleType.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingSimpleType.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeSimpleContentRestrictingComplexType.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeSimpleContentRestrictingComplexType.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithAbstract.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithAbstract.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithCDATA.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithCDATA.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithContent.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithContent.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithMixed.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithMixed.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenAttributes.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenAttributes.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenContent.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenContent.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOppositeProperty.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOppositeProperty.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOAliasName.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOAliasName.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOName.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOName.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOSequence.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOSequence.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutContent.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutContent.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutName.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutName.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/DefaultNamespace.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/DefaultNamespace.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementInAll.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementInAll.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementInChoice.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementInChoice.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSDOChangeSummaryType.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSDOChangeSummaryType.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithDefault.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithDefault.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithFixed.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithFixed.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDODataType.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDODataType.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOOppositePropertyType.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOOppositePropertyType.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOPropertyType.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOPropertyType.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOString.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOString.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementSubstitutionGroupBase.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementSubstitutionGroupBase.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithMaxOccurs.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithMaxOccurs.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithNillable.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithNillable.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithSDOAliasName.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithSDOAliasName.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithSDOName.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithSDOName.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/GlobalElementComplexType.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/GlobalElementComplexType.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/GlobalElementSimpleType.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/GlobalElementSimpleType.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Import.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Import.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ImportedSchema.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Include.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Include.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Interop.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Notation.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Notation.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Person.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SDOJavaPackage.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SDOJavaPackage.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithAbstract.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithAbstract.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithExtendedInstanceClass.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithExtendedInstanceClass.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithInstanceClass.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithInstanceClass.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithList.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithList.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithName.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithName.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithSDOName.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithSDOName.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithUnion.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithUnion.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithoutName.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithoutName.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/TargetNamespace.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/TargetNamespace.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/datagraph.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/sdoJava.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/sdoModel.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/test/java/org/apache/tuscany/sca/itest/generate/GenerateTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/config.png create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/config.svg create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/databinding.png create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/databinding.svg create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/interop.png create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/interop.svg create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/interop/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/interop/src/main/resources/generate/InteropDatabindingTestCase.java.vm create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/interop/src/main/resources/generate/JAXBGreeter.wsdl.vm create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/interop/src/main/resources/generate/SDOGreeter.wsdl.vm create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/interop/src/main/resources/generate/generate.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/interop/src/main/resources/generate/interopgreeter.composite.vm create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/jaxbgen/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/jaxbgen/src/main/resources/generate/generate.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/jaxbgen/src/main/resources/greeter.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/readme.html create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/sdogen/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/sdogen/src/main/resources/generate/generate.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/sdogen/src/main/resources/generate/greeter.composite.vm create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/databindings/sdogen/src/main/resources/generate/pom.xml.vm create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions-cross-binding-ws/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions-cross-binding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExceptionTestJAXB.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions-cross-binding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExchangeJaxB.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions-cross-binding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockTraderSDO.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions-cross-binding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockTraderSDOImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions-cross-binding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/InvalidSymbolSDOException.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions-cross-binding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/MarketClosedSDOException.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions-cross-binding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/StockExceptionTest.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions-cross-binding-ws/src/main/resources/ExceptionTest.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions-cross-binding-ws/src/main/resources/intracomposite.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions-cross-binding-ws/src/main/resources/wsdl.sdo/StockExceptionTest.wsdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions-cross-binding-ws/src/main/resources/wsdl/StockExceptionTest.wsdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions-cross-binding-ws/src/main/resources/xsd/StockExceptionTest.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions-cross-binding-ws/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTestCaseFIXME.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions-cross-binding/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions-cross-binding/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExceptionTestJAXB.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions-cross-binding/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExchangeJaxB.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions-cross-binding/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockTraderSDO.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions-cross-binding/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockTraderSDOImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions-cross-binding/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/InvalidSymbolSDOException.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions-cross-binding/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/MarketClosedSDOException.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions-cross-binding/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/StockExceptionTest.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions-cross-binding/src/main/resources/ExceptionTest.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions-cross-binding/src/main/resources/intracomposite.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions-cross-binding/src/main/resources/wsdl.sdo/StockExceptionTest.wsdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions-cross-binding/src/main/resources/wsdl/StockExceptionTest.wsdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions-cross-binding/src/main/resources/xsd/StockExceptionTest.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions-cross-binding/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTestCaseFIXME.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/Checked.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionHandler.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionThrower.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/UnChecked.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionHandlerImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionThrowerImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions/src/main/resources/ExceptionTest.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions/src/main/resources/intracomposite.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/exceptions/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/extended-api/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/extended-api/src/main/java/org/apache/tuscany/sca/test/extended/BasicService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/extended-api/src/main/java/org/apache/tuscany/sca/test/extended/MathService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/extended-api/src/main/java/org/apache/tuscany/sca/test/extended/impl/BasicServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/extended-api/src/main/java/org/apache/tuscany/sca/test/extended/impl/MathServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/extended-api/src/main/resources/BasicService.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/extended-api/src/main/resources/MathService.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/extended-api/src/test/java/org/apache/tuscany/sca/test/extended/ServiceLocateTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingsclient/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingsclient/src/main/java/org/apache/tuscany/sca/itest/SCATestToolService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingsclient/src/main/resources/bindingsclient.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingsclient/src/main/resources/wsdl/testtool.wsdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingsclient/src/main/webapp/SCATestTool.jsp create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingsclient/src/main/webapp/WEB-INF/web.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTest.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/WSBindingsClientTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTest.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingscomposite/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCADataTypeHelper.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCADataTypeHelperException.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolCallbackService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolServer.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingscomposite/src/main/resources/bindingscomposite-system.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingscomposite/src/main/resources/bindingscomposite.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingscomposite/src/main/resources/wsdl/testtool.wsdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingscomposite/src/main/resources/wsdl/testutility.wsdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingscomposite/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingsutility/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/itest/SCATestToolCallbackService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityServer.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingsutility/src/main/resources/bindingsutility-system.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingsutility/src/main/resources/bindingsutility.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingsutility/src/main/resources/wsdl/testutility.wsdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/bindingsutility/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/bindings/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-soap-client/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-soap-client/src/main/java/org/apache/tuscany/test/interop/client/LoopbackInteropDocServiceComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-soap-client/src/main/resources/META-INF/README.txt create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-soap-client/src/main/resources/META-INF/sca/default.scdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/includes/binding.axis2.scdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/includes/databinding.axiom.scdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/includes/databinding.sdo.scdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/includes/interface.wsdl.scdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-soap-client/src/main/resources/META-INF/tuscany/extensions/test-extensions.scdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-soap-client/src/main/resources/wsdl/interopdoc.wsdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-soap-client/src/test/java/org/apache/tuscany/test/interop/client/InteropDocClientTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-soap-round2-client/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-soap-round2-client/src/main/java/org/apache/tuscany/test/interop/client/InteropTestDocLit.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-soap-round2-client/src/main/resources/META-INF/README.txt create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-soap-round2-client/src/main/resources/META-INF/sca/default.scdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-soap-round2-client/src/main/resources/META-INF/tuscany/extensions/includes/binding.axis2.scdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-soap-round2-client/src/main/resources/META-INF/tuscany/extensions/includes/databinding.axiom.scdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-soap-round2-client/src/main/resources/META-INF/tuscany/extensions/includes/databinding.sdo.scdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-soap-round2-client/src/main/resources/META-INF/tuscany/extensions/includes/interface.wsdl.scdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-soap-round2-client/src/main/resources/META-INF/tuscany/extensions/test-extensions.scdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-soap-round2-client/src/main/resources/wsdl/interoptestdoclit.wsdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-soap-round2-client/src/test/java/org/apache/tuscany/test/interop/client/InteropTestDocLitTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-soap-service/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-soap-service/src/main/java/org/apache/tuscany/test/interop/server/InteropDocServiceComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-soap-service/src/main/resources/wsdl/interopdoc.wsdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-soap-service/src/main/webapp/META-INF/sca/default.scdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-soap-service/src/main/webapp/WEB-INF/web.xml create mode 100755 sca-java-1.x/tags/0.99-incubating/itest/old/interop-soap-service/t.bat create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-xsq-client/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-xsq-client/src/main/resources/META-INF/README.txt create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-xsq-client/src/test/java/interop/ClientTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-xsq-client/src/test/resources/META-INF/sca/test.scdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/binding.axis2.scdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/databinding.axiom.scdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/databinding.sdo.scdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/interface.wsdl.scdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-xsq-client/src/test/resources/META-INF/tuscany/test-extensions.scdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/interop-xsq-client/src/test/resources/wsdl/sq.wsdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/BasicService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MathService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyListService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyListServiceByYear.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyServiceByDate.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/MyTotalService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/SCAComponentService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/BasicServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MathServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyListServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyTotalServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/main/resources/BasicService.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/main/resources/CompositeTest.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/main/resources/MathService.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/main/resources/myListService.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/main/resources/myServiceInComposite.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/main/resources/myServiceInRecursive.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/main/resources/mySimpleService.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/main/resources/mySimpleServiceInRecursive.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/main/resources/mySimpleServiceInRecursive2.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/main/resources/myTotalService.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/main/resources/myTotalServiceInComposite.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/main/resources/myTotalServiceInCompositeForReferenceOverride.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/main/resources/myTotalServiceInRecursive.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/main/resources/myTotalServiceInRecursiveForReferenceOverride.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/main/resources/myservice.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentContextTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceListTestCaseFIXME.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/ComponentTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeOneService2LevelTestCaseFIXME.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeOneServiceTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeServiceReferenceForRefOverrideTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeServiceReferenceTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/old/spec-api/src/test/java/org/apache/tuscany/sca/test/spec/CompositeTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/operation-overloading/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/OverloadASourceTarget.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadASource.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATarget.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/operation-overloading/src/main/resources/OperationOverload.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/operation-overloading/src/test/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/build-bundles.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/helloworld/Greetings.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/helloworld/HelloWorld.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/helloworld/JavaGreetingsComponent.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/helloworld/JavaHelloWorldComponent.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/helloworld/OSGiGreetingsImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/helloworld/OSGiHelloWorldImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/helloworld/ws/HelloWorld.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/helloworld/ws/HelloWorldService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/stockquote/OSGiStockQuoteComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/stockquote/OSGiStockQuoteFactoryImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/stockquote/OSGiStockQuoteImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/stockquote/StockQuote.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/OSGiBundleImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/customer/Customer.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/customer/JavaCustomerComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiCustomerComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiCustomerFactoryImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiCustomerImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiCustomerWithQueryComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiCustomerWithQueryImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/customer/OSGiVersionedCustomerImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/retailer/JavaRetailerComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiRetailerComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiRetailerImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiRetailerServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiRetailerWithQueryComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiRetailerWithQueryImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiVersionedRetailerImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/retailer/OSGiVersionedRetailerServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/retailer/Retailer.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/retailer/RetailerQuery.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/shipper/JavaShipperComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiShipperComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiShipperFactoryImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiShipperImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiShipperServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiVersionedShipperImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/shipper/OSGiVersionedShipperServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/shipper/Shipper.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/warehouse/JavaWarehouseComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/warehouse/JavaWarehouseWithQueryComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/warehouse/OSGiWarehouseComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/warehouse/OSGiWarehouseImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/warehouse/OSGiWarehouseServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/warehouse/Warehouse.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/java/supplychain/warehouse/WarehouseQuery.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/META-INF/LICENSE.txt create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/META-INF/NOTICE create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/META-INF/README.txt create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/META-INF/sca-contribution.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/helloworld/Greetings.componentType create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/helloworld/HelloWorld.componentType create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/factory/Customer.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/factory/Retailer.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/factory/Shipper.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Customer.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Customer.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Retailer.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Retailer1.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Retailer2.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Shipper.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Shipper1.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Shipper2.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Warehouse.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/factory/ds/Warehouse.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/interfaces/Customer.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/interfaces/Retailer.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/interfaces/Shipper.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Customer.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Customer.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Retailer.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Retailer.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Shipper.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/interfaces/ds/Shipper.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/passbyref/Greetings.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/properties/ManagedStockQuoteFactory.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/properties/StockQuote.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/properties/StockQuoteFactory.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/properties/ds/StockQuote.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/properties/ds/StockQuote.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/properties/ds/StockQuoteFactory.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/properties/ds/StockQuoteFactory.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/services/Customer.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/services/Retailer.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/services/Shipper.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/services/Warehouse.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/services/ds/Customer.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/services/ds/Customer.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/services/ds/Retailer.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/services/ds/Retailer1.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/services/ds/Retailer2.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/services/ds/Shipper.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/services/ds/Shipper1.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/services/ds/Shipper2.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/services/ds/Warehouse.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/services/ds/Warehouse1.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/services/ds/Warehouse2.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/Customer1.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/Customer2.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/Retailer1.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/Retailer2.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/Shipper1.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/Shipper2.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/Warehouse1.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/Warehouse2.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/ds/Customer1.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/ds/Customer2.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/ds/CustomerV1.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/ds/CustomerV2.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer1.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer1V1.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer1V2.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer2.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer2V1.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/ds/Retailer2V2.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper1.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper1V1.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper1V2.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper2.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper2V1.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/ds/Shipper2V2.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse1.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse1V1.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse1V2.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse2.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse2V1.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/version/ds/Warehouse2V2.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/wiring/Customer.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/wiring/Retailer.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/wiring/Shipper.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/wiring/Warehouse.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Customer.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Customer.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Retailer.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Retailer1.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Retailer2.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Shipper.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Shipper1.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Shipper2.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Warehouse.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Warehouse1.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/wiring/ds/Warehouse2.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/osgi/ws/HelloWorld.mf create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/sca/factory-ds-test.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/sca/factory-test.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/sca/helloworld.wsdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/sca/interfaces-ds-test.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/sca/interfaces-test.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/sca/passbyref-test.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/sca/properties-ds-test.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/sca/properties-test.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/sca/properties2-ds-test.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/sca/properties2-test.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/sca/services-ds-test.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/sca/services-test.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/sca/version-ds-test.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/sca/version-test.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/sca/wiring-ds-test1.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/sca/wiring-ds-test2.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/sca/wiring-test1.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/sca/wiring-test2.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/sca/ws-helloworld.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/stockquote/StockQuote.componentType create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/supplychain/Customer.componentType create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/supplychain/CustomerServices.componentType create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/supplychain/CustomerWithQuery.componentType create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/supplychain/Retailer.componentType create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/supplychain/RetailerServices.componentType create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/supplychain/RetailerWithQuery.componentType create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/supplychain/Shipper.componentType create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/supplychain/ShipperServices.componentType create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/supplychain/Warehouse.componentType create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/supplychain/WarehouseServices.componentType create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/main/resources/supplychain/WarehouseWithQuery.componentType create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/test/java/helloworld/HelloWorldTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/test/java/helloworld/PassByRefTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/test/java/supplychain/SupplyChainTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/test/java/supplychain/VersionedSupplyChainTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/test/java/supplychain/factory/DSFactoryTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/test/java/supplychain/factory/FactoryTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/test/java/supplychain/interfaces/DSInterfacesTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/test/java/supplychain/interfaces/InterfacesTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/test/java/supplychain/properties/DSProperties2TestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/test/java/supplychain/properties/DSPropertiesTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/test/java/supplychain/properties/Properties2TestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/test/java/supplychain/properties/PropertiesTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/test/java/supplychain/services/DSServicesTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/test/java/supplychain/services/ServicesTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/test/java/supplychain/version/DSVersionTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/test/java/supplychain/version/VersionTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/test/java/supplychain/wiring/DSWiring1TestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/test/java/supplychain/wiring/DSWiring2TestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/test/java/supplychain/wiring/Wiring1TestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/test/java/supplychain/wiring/Wiring2TestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/test/java/util/OSGiTestUtil.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/osgi-implementation/src/test/resources/osgi/felix/felix.config.properties create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/properties/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponent.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponent.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponent.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ComplexPropertyBean.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponent.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/properties/src/main/resources/OuterPropertyTest.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/properties/src/main/resources/PropertyTest.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/properties/src/main/resources/customer.xsd create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/properties/src/main/resources/fileProperty.txt create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/properties/src/main/resources/manyValuesFileProperty.txt create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/properties/src/test/java/org/apache/tuscany/sca/itest/OuterPropertyTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/properties/src/test/java/org/apache/tuscany/sca/itest/PropertyTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/java/composite/CompositeClient.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/java/composite/Source.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/java/composite/SourceCallback.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/java/composite/SourceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/java/composite/Target.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/java/composite/TargetImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/java/sample/ComponentAImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/java/sample/ComponentCImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/java/sample/ComponentEImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/java/sample/ComponentFImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/java/sample/Service1.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/java/test/Aggregator.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/java/test/AggregatorImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/java/test/InnerSourceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/java/test/OuterSourceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/java/test/Source.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/java/test1/composite/Target.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/java/test1/composite/TargetOne.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/java/test1/composite/TargetTwo.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/resources/Composite1.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/resources/Composite2.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/resources/Composite3.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/resources/Inner.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/resources/InnerComposite.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/resources/InnerComposite2.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/resources/META-INF/sca-contribution.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/resources/Outer.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/resources/OuterComposite.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/resources/test1/InnerComposite.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/main/resources/test1/OuterComposite.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/test/java/composite/CompositeTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/test/java/composite/LocateServiceEmbeddedSCADomainTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/test/java/composite/LocateServiceSCADomainTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/test/java/sample/RecursiveCompositeTestCaseFIXME.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/test/java/test/InnerTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/test/java/test/OuterTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/recursive/src/test/java/test1/composite/CompositeClientTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/references/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponent.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/AComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponent.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/BComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponent.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/CComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponent.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/references/src/main/java/org/apache/tuscany/sca/itest/references/DComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/references/src/main/resources/InnerReferencesTest.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/references/src/test/java/org/apache/tuscany/sca/itest/references/InnerReferenceTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/scopes/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/CompositeScopeStateVerifierImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/RequestScopeStateVerifierImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/scopes/src/main/java/org/apache/tuscany/sca/itest/scopes/StateVerifier.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/scopes/src/main/resources/scopes.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/scopes/src/test/java/org/apache/tuscany/sca/test/ScopeTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/services/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponent.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/AComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponent.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/BComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponent.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/CComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/D1Component.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponent.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/services/src/main/java/org/apache/tuscany/sca/itest/services/DComponentImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/services/src/main/resources/ServicesTest.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/services/src/test/java/org/apache/tuscany/sca/itest/services/ServicesTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdl/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdl/src/main/java/bigbank/account/services/accountdata/AccountDataService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdl/src/main/java/bigbank/account/services/accountdata/AccountDataServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdl/src/main/java/bigbank/account/services/accountdata/AccountServiceClientImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdl/src/main/java/bigbank/account/services/accountdata/Component2aImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdl/src/main/java/bigbank/account/services/accountdata/Component2bImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdl/src/main/java/bigbank/account/services/accountdata/Component3aImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdl/src/main/java/bigbank/account/services/accountdata/Component3bImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdl/src/main/java/bigbank/account/services/accountdata/CustomerIdService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdl/src/main/java/helloworld/HelloWorldImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdl/src/main/java/helloworld/HelloWorldService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdl/src/main/java/helloworld/HelloWorldServiceComponent.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdl/src/main/java/org/apache/tuscany/sca/itest/Component2aImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdl/src/main/java/org/apache/tuscany/sca/itest/Component2bImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdl/src/main/java/org/apache/tuscany/sca/itest/Component3aImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdl/src/main/java/org/apache/tuscany/sca/itest/Component3bImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdl/src/main/resources/SDOWSDLTest.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdl/src/main/resources/WSDLTest.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdl/src/main/resources/bigbank/account/services/accountdata/Component2bImpl.componentType create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdl/src/main/resources/bigbank/account/services/accountdata/Component3bImpl.componentType create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdl/src/main/resources/org/apache/tuscany/sca/itest/Component2bImpl.componentType create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdl/src/main/resources/org/apache/tuscany/sca/itest/Component3bImpl.componentType create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdl/src/main/resources/wsdl/AccountService.wsdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdl/src/main/resources/wsdl/helloworld.wsdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdl/src/test/java/org/apache/tuscany/sca/itest/SDOWSDLTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdl/src/test/java/org/apache/tuscany/sca/itest/WSDLTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdl2java/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdl2java/src/test/resources/AccountService.wsdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdl2java/src/test/resources/StockExceptionTest.wsdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdlless/pom.xml create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdlless/src/main/java/bigbank/account/services/accountdata/AccountDataService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdlless/src/main/java/bigbank/account/services/accountdata/AccountDataServiceImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdlless/src/main/java/bigbank/account/services/accountdata/AccountServiceClientImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdlless/src/main/java/bigbank/account/services/accountdata/Component2aImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdlless/src/main/java/bigbank/account/services/accountdata/Component2bImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdlless/src/main/java/bigbank/account/services/accountdata/Component3aImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdlless/src/main/java/bigbank/account/services/accountdata/Component3bImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdlless/src/main/java/bigbank/account/services/accountdata/CustomerIdService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdlless/src/main/java/helloworld/HelloWorldImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdlless/src/main/java/helloworld/HelloWorldService.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdlless/src/main/java/helloworld/HelloWorldServiceComponent.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdlless/src/main/java/org/apache/tuscany/sca/itest/Component2aImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdlless/src/main/java/org/apache/tuscany/sca/itest/Component2bImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdlless/src/main/java/org/apache/tuscany/sca/itest/Component3aImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdlless/src/main/java/org/apache/tuscany/sca/itest/Component3bImpl.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdlless/src/main/resources/SDOWSDLTest.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdlless/src/main/resources/WSDLTest.composite create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdlless/src/main/resources/bigbank/account/services/accountdata/Component2bImpl.componentType create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdlless/src/main/resources/bigbank/account/services/accountdata/Component3bImpl.componentType create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdlless/src/main/resources/org/apache/tuscany/sca/itest/Component2bImpl.componentType create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdlless/src/main/resources/org/apache/tuscany/sca/itest/Component3bImpl.componentType create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdlless/src/main/resources/wsdl/AccountService.wsdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdlless/src/main/resources/wsdl/helloworld.wsdl create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdlless/src/test/java/org/apache/tuscany/sca/itest/SDOWSDLTestCase.java create mode 100644 sca-java-1.x/tags/0.99-incubating/itest/wsdlless/src/test/java/org/apache/tuscany/sca/itest/WSDLTestCase.java (limited to 'sca-java-1.x/tags/0.99-incubating/itest') diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/pom.xml b/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/pom.xml new file mode 100644 index 0000000000..20a379b924 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/pom.xml @@ -0,0 +1,46 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-itest + 0.99-incubating + ../pom.xml + + itest-callablereferences + Apache Tuscany Callable References Integration Tests + + + + org.apache.tuscany.sca + tuscany-host-embedded + 0.99-incubating + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 0.99-incubating + runtime + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/AComponent.java b/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/AComponent.java new file mode 100644 index 0000000000..fa63d975a6 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/AComponent.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.callableref; + +public interface AComponent { + String foo(); + + String fooB(); + String fooB1(); + + String fooC(); + String fooC1(); + + String fooD(); + + String fooBC(); + + DComponent getDReference(); +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/AComponentImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/AComponentImpl.java new file mode 100644 index 0000000000..af3e624dc7 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/AComponentImpl.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.callableref; + +import org.osoa.sca.CallableReference; +import org.osoa.sca.ComponentContext; +import org.osoa.sca.ServiceReference; +import org.osoa.sca.annotations.Context; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.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 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() { + CallableReference bRef = componentContext.cast(b); + return bRef.getService().foo(); + } + + public String fooC() { + return cReference.foo(); + } + + public String fooC1() { + return cServiceReference.getService().foo(); + } + + public String fooBC() { + CallableReference cReference = componentContext.getServiceReference(CComponent.class, "cReference"); + return b.fooC(cReference); + } + + public String fooD() { + CallableReference aReference = componentContext.createSelfReference(AComponent.class); + return dReference1.foo(aReference); + } + + public DComponent getDReference() { + return dReference; + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/BComponent.java b/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/BComponent.java new file mode 100644 index 0000000000..72253ac801 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/BComponent.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.callableref; + +import org.osoa.sca.CallableReference; + +public interface BComponent { + + String foo(); + + String fooC(CallableReference cComponent); +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/BComponentImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/BComponentImpl.java new file mode 100644 index 0000000000..518e77d3a8 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/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.callableref; + +import org.osoa.sca.CallableReference; +import org.osoa.sca.annotations.Service; + +@Service(BComponent.class) +public class BComponentImpl implements BComponent { + + public BComponentImpl() { + } + + public String foo() { + return "BComponent"; + } + + public String fooC(CallableReference cReference) { + return "B" + cReference.getService().foo(); + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/CComponent.java b/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/CComponent.java new file mode 100644 index 0000000000..0a1fbfc951 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/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.callableref; + +public interface CComponent { + + String foo(); +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/CComponentImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/CComponentImpl.java new file mode 100644 index 0000000000..cc8ec8f000 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/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.callableref; + +import org.osoa.sca.annotations.Service; + +@Service(CComponent.class) +public class CComponentImpl implements CComponent { + + public String foo() { + return "CComponent"; + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/DComponent.java b/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/DComponent.java new file mode 100644 index 0000000000..18375a7cf5 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/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.callableref; + +import org.osoa.sca.CallableReference; + +public interface DComponent { + + String foo(CallableReference aReference); +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/DComponentImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/DComponentImpl.java new file mode 100644 index 0000000000..1ab1973476 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/java/org/apache/tuscany/sca/itest/callableref/DComponentImpl.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.callableref; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; + +import org.osoa.sca.CallableReference; +import org.osoa.sca.RequestContext; +import org.osoa.sca.annotations.Context; +import org.osoa.sca.annotations.Service; + +@Service(DComponent.class) +public class DComponentImpl implements DComponent { + + @Context + protected RequestContext requestContext; + + public String foo(CallableReference 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 = (CallableReference) obj; + } catch (Exception e) { + e.printStackTrace(); + } + System.out.println("Invoking service: " + requestContext.getServiceName()); + return "D" + aReference.getService().foo(); + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/resources/CallableReferenceTest.composite b/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/resources/CallableReferenceTest.composite new file mode 100644 index 0000000000..49b75f56e4 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/main/resources/CallableReferenceTest.composite @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/test/java/org/apache/tuscany/sca/itest/callableref/CallableReferenceTestCase.java b/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/test/java/org/apache/tuscany/sca/itest/callableref/CallableReferenceTestCase.java new file mode 100644 index 0000000000..3d21841edb --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callablereferences/src/test/java/org/apache/tuscany/sca/itest/callableref/CallableReferenceTestCase.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.callableref; + +import static junit.framework.Assert.assertEquals; +import junit.framework.Assert; + +import org.apache.tuscany.sca.host.embedded.SCADomain; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +public class CallableReferenceTestCase { + private static SCADomain domain; + private static AComponent acomponent; + + @BeforeClass + public static void init() throws Exception { + domain = SCADomain.newInstance("CallableReferenceTest.composite"); + acomponent = domain.getService(AComponent.class, "AComponent"); + } + + @AfterClass + public static void destroy() throws Exception { + domain.close(); + } + + @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.getDReference().foo(null); + } catch (Exception e) { + Assert.assertTrue(true); + } + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-api/pom.xml b/sca-java-1.x/tags/0.99-incubating/itest/callback-api/pom.xml new file mode 100644 index 0000000000..e5eab80acc --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-api/pom.xml @@ -0,0 +1,45 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-itest + 0.99-incubating + ../pom.xml + + itest-callback-api + Apache Tuscany SCA Callback API Integration Tests + + + + org.apache.tuscany.sca + tuscany-host-embedded + 0.99-incubating + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 0.99-incubating + runtime + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiCallBack.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiCallBack.java new file mode 100644 index 0000000000..e03bc1bda8 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiCallBack.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.osoa.sca.annotations.Remotable; + +@Remotable +/** + * + */ +public interface CallBackApiCallBack { + + public void callBackMessage(String aString); + + public void callBackIncrement(String aString); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClient.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClient.java new file mode 100644 index 0000000000..3e7c840e15 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClient.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.osoa.sca.annotations.Remotable; + +@Remotable +public interface CallBackApiClient { + + public void run(); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClientImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClientImpl.java new file mode 100644 index 0000000000..1c32783271 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClientImpl.java @@ -0,0 +1,135 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * 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 junit.framework.Assert; + +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.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(); + + 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(); + + // 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(); + + return; + } + + private void test3a() { + aCallBackService.knockKnock("Knock Knock"); + int count = 0; + + // + // If we cant 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()); + + } + + private void test3b() { + aCallBackService.noCallBack("No Reply Desired"); + Assert.assertEquals("CallBackApiITest - test3b", 1, 1); + return; + } + + private void test3c() { + aCallBackService.multiCallBack("Call me back 3 times"); + int count = 0; + + // + // If we cant 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()); + return; + } + + 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-1.x/tags/0.99-incubating/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiService.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiService.java new file mode 100644 index 0000000000..51d9f24723 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiService.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.osoa.sca.annotations.Callback; +import org.osoa.sca.annotations.Remotable; + +@Remotable +@Callback(CallBackApiCallBack.class) +/** + * + */ +public interface CallBackApiService { + + public void knockKnock(String aString); + + public void noCallBack(String aString); + + public void multiCallBack(String aString); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiServiceImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiServiceImpl.java new file mode 100644 index 0000000000..9e06db42aa --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiServiceImpl.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.test; + +import org.osoa.sca.ComponentContext; +import org.osoa.sca.RequestContext; +import org.osoa.sca.ServiceReference; +import org.osoa.sca.annotations.Context; +import org.osoa.sca.annotations.Service; + +@Service(CallBackApiService.class) +public class CallBackApiServiceImpl implements CallBackApiService { + + @Context + protected ComponentContext componentContext; + + private CallBackApiCallBack callback; + + 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"); + return; + + } + + 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"); + return; + + } + + public void noCallBack(String aString) { + + System.out.println("CallBackApiServiceImpl message received: " + aString); + + return; + + } + + 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-1.x/tags/0.99-incubating/itest/callback-api/src/main/resources/CallBackApiTest.composite b/sca-java-1.x/tags/0.99-incubating/itest/callback-api/src/main/resources/CallBackApiTest.composite new file mode 100644 index 0000000000..946c4862ee --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-api/src/main/resources/CallBackApiTest.composite @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-api/src/test/java/org/apache/tuscany/sca/test/CallBackApiTestCase.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-api/src/test/java/org/apache/tuscany/sca/test/CallBackApiTestCase.java new file mode 100644 index 0000000000..6d6ca66ab8 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-api/src/test/java/org/apache/tuscany/sca/test/CallBackApiTestCase.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; + +import junit.framework.TestCase; + +import org.apache.tuscany.sca.host.embedded.SCADomain; + +public class CallBackApiTestCase extends TestCase { + + private SCADomain domain; + private CallBackApiClient aCallBackClient; + + public void testCallBackBasic() { + aCallBackClient.run(); + } + + @Override + protected void setUp() throws Exception { + domain = SCADomain.newInstance("CallBackApiTest.composite"); + + aCallBackClient = domain.getService(CallBackApiClient.class, "CallBackApiClient"); + } + + @Override + protected void tearDown() throws Exception { + domain.close(); + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-basic/pom.xml b/sca-java-1.x/tags/0.99-incubating/itest/callback-basic/pom.xml new file mode 100644 index 0000000000..2e1f9b8bad --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-basic/pom.xml @@ -0,0 +1,45 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-itest + 0.99-incubating + ../pom.xml + + itest-callback-basic + Apache Tuscany SCA Callback Basic Integration Tests + + + + org.apache.tuscany.sca + tuscany-host-embedded + 0.99-incubating + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 0.99-incubating + runtime + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java new file mode 100644 index 0000000000..5e9d3d6821 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/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.osoa.sca.annotations.Remotable; + +@Remotable +/** + * + */ +public interface CallBackBasicCallBack { + + public void callBackMessage(String aString); + + public void callBackIncrement(String aString); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java new file mode 100644 index 0000000000..9f4019f28c --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/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.osoa.sca.annotations.Remotable; + +@Remotable +public interface CallBackBasicClient { + + public void run(); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java new file mode 100644 index 0000000000..1bb2dc22b7 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java @@ -0,0 +1,135 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * 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 junit.framework.Assert; + +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.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(); + + return; + } + + private void test1a() { + aCallBackService.knockKnock("Knock Knock"); + int count = 0; + + // + // If we cant 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); + + return; + } + + private void test1c() { + aCallBackService.multiCallBack("Call me back 3 times"); + int count = 0; + + // + // If we cant 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()); + return; + } + + 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-1.x/tags/0.99-incubating/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java new file mode 100644 index 0000000000..bd41fa7037 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/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.osoa.sca.annotations.Callback; +import org.osoa.sca.annotations.Remotable; + +@Remotable +@Callback(CallBackBasicCallBack.class) +/** + * + */ +public interface CallBackBasicService { + + public void knockKnock(String aString); + + public void noCallBack(String aString); + + public void multiCallBack(String aString); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java new file mode 100644 index 0000000000..4ca2dc9af9 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.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.osoa.sca.annotations.Callback; +import org.osoa.sca.annotations.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"); + return; + + } + + 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"); + return; + + } + + public void noCallBack(String aString) { + + System.out.println("CallBackBasicServiceImpl message received: " + aString); + // System.out.println("CallBackBasicServiceImpl No response desired"); + return; + + } +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-basic/src/main/resources/CallBackBasicTest.composite b/sca-java-1.x/tags/0.99-incubating/itest/callback-basic/src/main/resources/CallBackBasicTest.composite new file mode 100644 index 0000000000..c506956088 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-basic/src/main/resources/CallBackBasicTest.composite @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-basic/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-basic/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java new file mode 100644 index 0000000000..177c4bcd18 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-basic/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.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; + +import junit.framework.TestCase; + +import org.apache.tuscany.sca.host.embedded.SCADomain; + +public class CallBackBasicTestCase extends TestCase { + + private SCADomain domain; + private CallBackBasicClient aCallBackClient; + + public void testCallBackBasic() { + aCallBackClient.run(); + } + + @Override + protected void setUp() throws Exception { + domain = SCADomain.newInstance("CallBackBasicTest.composite"); + aCallBackClient = domain.getService(CallBackBasicClient.class, "CallBackBasicClient"); + } + + @Override + protected void tearDown() throws Exception { + domain.close(); + } + + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/pom.xml b/sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/pom.xml new file mode 100644 index 0000000000..b97072ebfb --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/pom.xml @@ -0,0 +1,45 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-itest + 0.99-incubating + ../pom.xml + + itest-callback-complex-type + Apache Tuscany SCA Callback Complex Type Integration Tests + + + + org.apache.tuscany.sca + tuscany-host-embedded + 0.99-incubating + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 0.99-incubating + runtime + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeCallBack.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeCallBack.java new file mode 100644 index 0000000000..9fddb850ba --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/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.osoa.sca.annotations.Remotable; + +@Remotable +/** + * + */ +public interface CallBackCTypeCallBack { + + public void callBackMessage(String aString); + + public void callBackIncrement(String aString); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClient.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClient.java new file mode 100644 index 0000000000..739983c277 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/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.osoa.sca.annotations.Remotable; + +@Remotable +public interface CallBackCTypeClient { + + public void run(); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClientImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClientImpl.java new file mode 100644 index 0000000000..188b1f2c01 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClientImpl.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.test; + +import junit.framework.Assert; + +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.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(); + + return; + } + + private void test12a() { + aCallBackService.knockKnock("Knock Knock"); + int count = 0; + + // + // If we cant 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); + return; + } + + private void test12c() { + aCallBackService.multiCallBack("Call me back 3 times"); + int count = 0; + + // + // If we cant 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()); + return; + } + + 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-1.x/tags/0.99-incubating/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeService.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeService.java new file mode 100644 index 0000000000..ffbf4f35fa --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeService.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; + +import org.osoa.sca.annotations.Remotable; + +@Remotable +// @Callback(CallBackCTypeCallBack.class) +/** + * + */ +public interface CallBackCTypeService { + + public void knockKnock(String aString); + + public void noCallBack(String aString); + + public void multiCallBack(String aString); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.java new file mode 100644 index 0000000000..dc31ed156b --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.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; + +import org.osoa.sca.annotations.Callback; +import org.osoa.sca.annotations.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"); + return; + + } + + 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"); + return; + + } + + public void noCallBack(String aString) { + + System.out.println("CallBackCTypeServiceImpl message received: " + aString); + System.out.println("CallBackCTypeServiceImpl No response desired"); + return; + + } +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/src/main/resources/CallBackCTypeClient.composite b/sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/src/main/resources/CallBackCTypeClient.composite new file mode 100644 index 0000000000..3f48f16389 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/src/main/resources/CallBackCTypeClient.composite @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/src/main/resources/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.componentType b/sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/src/main/resources/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.componentType new file mode 100644 index 0000000000..ff38134df5 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/src/main/resources/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.componentType @@ -0,0 +1,28 @@ + + + + + + + + + + \ No newline at end of file diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/src/test/java/org/apache/tuscany/sca/test/CallBackCTypeTestCaseFIXME.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/src/test/java/org/apache/tuscany/sca/test/CallBackCTypeTestCaseFIXME.java new file mode 100644 index 0000000000..33d1afaecd --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-complex-type/src/test/java/org/apache/tuscany/sca/test/CallBackCTypeTestCaseFIXME.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.test; + +import junit.framework.TestCase; + +import org.apache.tuscany.sca.host.embedded.SCADomain; + +//FIXME Fix this test case +public class CallBackCTypeTestCaseFIXME extends TestCase { + + private SCADomain domain; + private CallBackCTypeClient aCallBackClient; + + public void testCallBackBasic() { + aCallBackClient.run(); + } + + @Override + protected void setUp() throws Exception { + domain = SCADomain.newInstance("CallBackCTypeClient.composite"); + + aCallBackClient = + domain.getService(CallBackCTypeClient.class, "CallBackCTypeClient"); + } + + @Override + protected void tearDown() throws Exception { + domain.close(); + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-id/pom.xml b/sca-java-1.x/tags/0.99-incubating/itest/callback-id/pom.xml new file mode 100644 index 0000000000..9ed118df61 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-id/pom.xml @@ -0,0 +1,45 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-itest + 0.99-incubating + ../pom.xml + + itest-callback-id + Apache Tuscany SCA Callback ID Integration Tests + + + + org.apache.tuscany.sca + tuscany-host-embedded + 0.99-incubating + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 0.99-incubating + runtime + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdCallBack.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdCallBack.java new file mode 100644 index 0000000000..b14560a8c3 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdCallBack.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.test; + +import org.osoa.sca.annotations.Remotable; + +@Remotable +/** + * + */ +public interface CallBackIdCallBack { + + public void callBackMessage(String aString); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdClient.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdClient.java new file mode 100644 index 0000000000..a9e551f8b4 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdClient.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.osoa.sca.annotations.Remotable; + +@Remotable +public interface CallBackIdClient { + + public void run(); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdClientImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdClientImpl.java new file mode 100644 index 0000000000..fef0eb50b8 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdClientImpl.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.apache.tuscany.sca.test; + +import junit.framework.Assert; + +import org.osoa.sca.ComponentContext; +import org.osoa.sca.RequestContext; +import org.osoa.sca.ServiceReference; +import org.osoa.sca.annotations.Context; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +@Service(CallBackIdClient.class) +public class CallBackIdClientImpl implements CallBackIdClient, CallBackIdCallBack { + + @Context + protected ComponentContext componentContext; + + @Reference + protected ServiceReference aCallBackService; + + private static String returnMessage = null; + private static Object monitor = new Object(); + private static Object callBackId; + + public void run() { + + // This tests the use of the set/get callbackId API both SCA generated + // and client specified. + + // Test1 uses a SCA generated callback ID and compare that with the + // callbackID returned during callback. + test11a(); + + // Test2 uses a Client specified callback ID and compare that with the + // callbackID returned during callback. + test11b(); + + return; + } + + private void test11a() { + + // Retrieve this services callback ID and save it. Once the callback is + // received the callback ID will be compared with the one + // returned. Equal is good. + + Object origCallBackId = aCallBackService.getCallbackID(); + aCallBackService.getService().knockKnock("Knock Knock - Test1"); + int count = 0; + + // + // If we cannot 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("CallBackIdITest - test11a - SCA Generated Id", origCallBackId, this.getCallBackId()); + + } + + private void test11b() { + + // Set the services callback ID and save it. Once the callback is + // received the callback ID will be compared with the one + // returned. Equal is good. + + String origCallBackId = "CallBackId1"; + aCallBackService.setCallbackID(origCallBackId); + + aCallBackService.getService().knockKnock("Knock Knock - Test2"); + int count = 0; + + // + // If we cant 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("CallBackIdITest - 11b - Client Specified Id", origCallBackId, (String)this.getCallBackId()); + + } + + public String getReturnMessage() { + return returnMessage; + } + + public void setReturnMessage(String aReturnMessage) { + returnMessage = aReturnMessage; + } + + public void callBackMessage(String aString) { + + System.out.println("Entering callback callBackMessage: " + aString); + RequestContext rc = componentContext.getRequestContext(); + Object callBackId = rc.getServiceReference().getCallbackID(); + + synchronized (monitor) { + this.setReturnMessage(aString); + this.setCallBackId(callBackId); + monitor.notify(); + } + } + + protected Object getCallBackId() { + return callBackId; + } + + protected void setCallBackId(Object aCallBackId) { + callBackId = aCallBackId; + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdService.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdService.java new file mode 100644 index 0000000000..18c592a1c1 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdService.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.osoa.sca.annotations.Callback; +import org.osoa.sca.annotations.Remotable; + +@Remotable +@Callback(CallBackIdCallBack.class) +/** + * + */ +public interface CallBackIdService { + + public void knockKnock(String aString); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdServiceImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdServiceImpl.java new file mode 100644 index 0000000000..8b0a4b69cf --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdServiceImpl.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.test; + +import org.osoa.sca.ComponentContext; +import org.osoa.sca.RequestContext; +import org.osoa.sca.annotations.Callback; +import org.osoa.sca.annotations.Context; +import org.osoa.sca.annotations.Service; + +@Service(CallBackIdService.class) +public class CallBackIdServiceImpl implements CallBackIdService { + + @Callback + protected CallBackIdCallBack callback; + @Context + protected ComponentContext compositeContext; + + public void knockKnock(String aString) { + + System.out.println("CallBackIdServiceImpl message received: " + aString); + RequestContext rc = compositeContext.getRequestContext(); + Object callBackId = rc.getServiceReference().getCallbackID(); + System.out.println("CallBackIdServiceImpl callbackID: " + callBackId); + + callback.callBackMessage("Who's There"); + System.out.println("CallBackIdServiceImpl response sent"); + return; + + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-id/src/main/resources/CallBackIdClient.composite b/sca-java-1.x/tags/0.99-incubating/itest/callback-id/src/main/resources/CallBackIdClient.composite new file mode 100644 index 0000000000..c9a6ba6258 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-id/src/main/resources/CallBackIdClient.composite @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-id/src/test/java/org/apache/tuscany/sca/test/CallBackIdTestCase.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-id/src/test/java/org/apache/tuscany/sca/test/CallBackIdTestCase.java new file mode 100644 index 0000000000..771fbb8ff7 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-id/src/test/java/org/apache/tuscany/sca/test/CallBackIdTestCase.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; + +import junit.framework.TestCase; + +import org.apache.tuscany.sca.host.embedded.SCADomain; + +public class CallBackIdTestCase extends TestCase { + + private SCADomain domain; + private CallBackIdClient aCallBackClient; + + public void testCallBackBasic() { + aCallBackClient.run(); + } + + @Override + protected void setUp() throws Exception { + domain = SCADomain.newInstance("CallBackIdClient.composite"); + + aCallBackClient = domain.getService(CallBackIdClient.class, "CallBackIdClient"); + } + + @Override + protected void tearDown() throws Exception { + domain.close(); + } +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-multiple-wires/pom.xml b/sca-java-1.x/tags/0.99-incubating/itest/callback-multiple-wires/pom.xml new file mode 100644 index 0000000000..b39622fe54 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-multiple-wires/pom.xml @@ -0,0 +1,45 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-itest + 0.99-incubating + ../pom.xml + + itest-callback-multiple-wires + Apache Tuscany SCA Callback With Mutiple Wires Test + + + + org.apache.tuscany.sca + tuscany-host-embedded + 0.99-incubating + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 0.99-incubating + runtime + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClient.java b/sca-java-1.x/tags/0.99-incubating/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-1.x/tags/0.99-incubating/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-1.x/tags/0.99-incubating/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl1.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl1.java new file mode 100644 index 0000000000..df91f3d268 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/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.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Scope; +import org.osoa.sca.annotations.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: " + result); + MyClientImpl1.result = result; + } +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl2.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyClientImpl2.java new file mode 100644 index 0000000000..a0a9564002 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/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.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Scope; +import org.osoa.sca.annotations.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: " + result); + MyClientImpl2.result = result; + } +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyService.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyService.java new file mode 100644 index 0000000000..cfd601f546 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/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.osoa.sca.annotations.Callback; +import org.osoa.sca.annotations.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-1.x/tags/0.99-incubating/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceCallback.java b/sca-java-1.x/tags/0.99-incubating/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-1.x/tags/0.99-incubating/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-1.x/tags/0.99-incubating/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceImpl.java new file mode 100644 index 0000000000..08ab7ca56d --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-multiple-wires/src/main/java/org/apache/tuscany/sca/test/callback/MyServiceImpl.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.test.callback; + +import org.osoa.sca.annotations.Callback; +import org.osoa.sca.annotations.Scope; +import org.osoa.sca.annotations.Service; + +/** + * This class implements MyService and uses a callback. + */ +@Service(MyService.class) +@Scope("COMPOSITE") +public class MyServiceImpl implements MyService { + + private MyServiceCallback myServiceCallback; + + /** + * The setter used by the runtime to set the callback reference + * @param myServiceCallback + */ + @Callback + public void setMyServiceCallback(MyServiceCallback myServiceCallback) { + this.myServiceCallback = myServiceCallback; + } + + public void someMethod(String arg) { + // invoke the callback + try { + myServiceCallback.receiveResult(arg + " -> receiveResult"); + } catch(RuntimeException e) { + System.out.println("RuntimeException invoking receiveResult: " + e.toString()); + } + } +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-multiple-wires/src/main/resources/CallbackMultiWireTest.composite b/sca-java-1.x/tags/0.99-incubating/itest/callback-multiple-wires/src/main/resources/CallbackMultiWireTest.composite new file mode 100644 index 0000000000..3dae3ca3a8 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-multiple-wires/src/main/resources/CallbackMultiWireTest.composite @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-multiple-wires/src/test/java/org/apache/tuscany/sca/test/callback/CallbackMultiWireTestCase.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-multiple-wires/src/test/java/org/apache/tuscany/sca/test/callback/CallbackMultiWireTestCase.java new file mode 100644 index 0000000000..41ba766697 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-multiple-wires/src/test/java/org/apache/tuscany/sca/test/callback/CallbackMultiWireTestCase.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.callback; + +import junit.framework.TestCase; + +import org.apache.tuscany.sca.host.embedded.SCADomain; + +/** + * A testcase that demonstrates resolving the client service and initiating the callback sequence + */ +public class CallbackMultiWireTestCase extends TestCase { + + private SCADomain scaDomain; + private MyClient myClient1; + private MyClient myClient2; + + @Override + protected void setUp() throws Exception { + scaDomain = SCADomain.newInstance("CallbackMultiWireTest.composite"); + myClient1 = scaDomain.getService(MyClient.class, "MyClientComponent1"); + myClient2 = scaDomain.getService(MyClient.class, "MyClientComponent2"); + } + + @Override + protected void tearDown() throws Exception { + scaDomain.close(); + } + + 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-1.x/tags/0.99-incubating/itest/callback-set-callback/pom.xml b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/pom.xml new file mode 100644 index 0000000000..57c7c52519 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/pom.xml @@ -0,0 +1,45 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-itest + 0.99-incubating + ../pom.xml + + itest-callback-set-callback + Apache Tuscany SCA Set Callback Integration Tests + + + + org.apache.tuscany.sca + tuscany-host-embedded + 0.99-incubating + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 0.99-incubating + runtime + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCalbackService.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCalbackService.java new file mode 100644 index 0000000000..b352a2f1f7 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCalbackService.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; + +import org.osoa.sca.annotations.Callback; + +// @Remotable +@Callback(CallBackSetCallbackCallback.class) +/** + * + */ +public interface CallBackSetCalbackService { + + public void knockKnock(String aString); + + public void setCallbackIllegally(String aString); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackBadCallback.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackBadCallback.java new file mode 100644 index 0000000000..48752f2ea1 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackBadCallback.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 junit.framework.Assert; + +public class CallBackSetCallbackBadCallback { + + public CallBackSetCallbackBadCallback() { + super(); + } + + public void callback(String aString) { + // + // This callback method should never be called. + // + System.out.println("CallBackSetCallbackBadCallback: callback called"); + Assert.fail("CallBackSetCallbackBadCallback: callback called"); + return; + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackCallback.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackCallback.java new file mode 100644 index 0000000000..ad0e0603a3 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackCallback.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.test; + +// @Remotable +/** + * + */ +public interface CallBackSetCallbackCallback { + + public void callBackMessage(String aString); + + public void callBackIncrement(String aString); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackCallbackImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackCallbackImpl.java new file mode 100644 index 0000000000..0a22b0e01f --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackCallbackImpl.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.test; + +import java.io.File; + +import org.osoa.sca.annotations.Service; + +@Service(CallBackSetCallbackCallback.class) +public class CallBackSetCallbackCallbackImpl implements CallBackSetCallbackCallback { + + private static String returnMessage = null; + private static int callBackCount = 0; + + 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 CallBackSetCallbackCallbackImpl callBackMessage: " + aString); + + File aFile = new File("target/test4_marker"); + try { + aFile.createNewFile(); + } catch (Exception ex) { + System.out.println("Error Creating target/test4_marker marker file"); + ex.printStackTrace(); + } + + } + + public void callBackIncrement(String aString) { + System.out.println("Entering callback increment: " + aString); + this.incrementCallBackCount(); + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackClient.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackClient.java new file mode 100644 index 0000000000..94cb6aa73b --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackClient.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.osoa.sca.annotations.Remotable; + +@Remotable +public interface CallBackSetCallbackClient { + + public void run(); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackClientImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackClientImpl.java new file mode 100644 index 0000000000..ea2918bf6e --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackClientImpl.java @@ -0,0 +1,199 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * 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.io.File; + +import junit.framework.Assert; + +import org.osoa.sca.NoRegisteredCallbackException; +import org.osoa.sca.ServiceReference; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +@Service(CallBackSetCallbackClient.class) +public class CallBackSetCallbackClientImpl implements CallBackSetCallbackClient { + + @Reference + protected ServiceReference aCallBackService; + @Reference + protected ServiceReference callBack; + + public void run() { + + // This test various aspects of the setCallback() API in a stateless + // scope. + + /* + * test4 Client does not implement the callback interface but calls + * setCallback with a service reference before invoking the target, + * Verify successful executon. + */ + + test4(); + + /* + * test5 The client does not implement the callback interface and does + * not call setCallback() before invoking the target. Verify a + * NoRegisteredCallbackException is thrown. + */ + + //FIXME: disabled for now as the runtime does not currently implement this check + //test5(); + + /* + * test6() The client calls setCallback() with an object that is not a + * service reference and the callback interface is stateless. Verify + * that an appropriate exception is thrown. When calling setCallback + * with an object the interface must be stateful. Stateless interfaces + * require a service Reference. + */ + + test6(); + + /* + * test10 The target calls setCallback() on its own service reference, + * e.g. getRequestContext().getServiceReference().getCallback(). Verify + * an appropriate exeception occurs. + */ + + test10(); + + return; + } + + private void test4() { + + // + // Since callbacks do not synchronously return and this test results in + // a callback to a component other + // than this client I am using a marker file to determine the outcome. + // The presence of the marker + // file will be used for the Assertion test. If it exists then the + // callback occurred and all is good. + // + + // Make sure the marker file is not present before starting the test. + File aFile = new File("target/test4_marker"); + if (aFile.exists()) + aFile.delete(); + + aCallBackService.setCallback(callBack); + + aCallBackService.getService().knockKnock("Knock Knock"); + + // Lets give the callback a little time to complete.... + + int count = 0; + long timeout = 1000; + + while (count++ < 30 && (aFile.exists() == false)) { + try { + Thread.sleep(timeout); + } catch (InterruptedException ie) { + } + } + + Assert.assertEquals("CallBackSetCallback - Test4", true, aFile.exists()); + + aCallBackService.setCallback(null); // leave this in the default state for next test + + } + + private void test5() { + + boolean correctException = false; + + // + // The backend service is expecting a callback reference to be set. This + // test will not + // set one so an exception is expected. According to the spec if a + // client calls a method on + // a service reference prior to calling setCallback() then a + // NoRegisteredCallbackException + // will be thrown on the client. + // + + try { + aCallBackService.getService().knockKnock("Knock Knock"); + } catch (NoRegisteredCallbackException NotRegEx) { + correctException = true; + } catch (Exception ex) { + ex.printStackTrace(); + } + + Assert.assertEquals("CallBackSetCallback - Test5", true, correctException); + + } + + private void test6() { + + boolean correctException = false; + + // + // This test is to specify an Object that is not a service reference + // that does implement + // the callback interface. However because this callback service is + // stateless the expected + // result is an appropriate exception. + // + + try { + aCallBackService.setCallback(new CallBackSetCallbackObjectCallback()); + aCallBackService.getService().knockKnock("Knock Knock"); + } + // + // This should catch an appropriate exception. + // + catch (NoRegisteredCallbackException NotRegEx) { + correctException = true; + } catch (Exception ex) { + ex.printStackTrace(); + } + + Assert.assertEquals("CallBackSetCallback - Test6", true, correctException); + + aCallBackService.setCallback(null); // leave this in the default state for next test + + } + + private void test10() { + // + // Since callbacks do not synchronously return and this test results in + // a failure on the service + // side of the fence I am using a marker file to determine the outcome. + // The presence of the marker + // file will be used for the Assertion test. If it exists then all is + // good. + // + + // Make sure the marker file is not present before starting the test. + File aFile = new File("target/test10_marker"); + if (aFile.exists()) + aFile.delete(); + + aCallBackService.getService().setCallbackIllegally("Try to set callback on your own service reference"); + + // FIXME: [rfeng] Not sure why this is illegal, comment out the following test + Assert.assertEquals("CallBackSetCallback - Test10", true, aFile.exists()); + + return; + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackObjectCallback.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackObjectCallback.java new file mode 100644 index 0000000000..afedcdf7f1 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackObjectCallback.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; + +public class CallBackSetCallbackObjectCallback implements CallBackSetCallbackCallback { + + private int callBackCount = 0; + + public CallBackSetCallbackObjectCallback() { + super(); + } + + public void incrementCallBackCount() { + callBackCount++; + } + + public void callBackMessage(String aString) { + + System.out.println("Entering CallBackSetCallbackObjectCallback callBackMessage: " + aString); + + } + + public void callBackIncrement(String aString) { + System.out.println("Entering callback increment: " + aString); + this.incrementCallBackCount(); + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackServiceImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackServiceImpl.java new file mode 100644 index 0000000000..0fbeeb44ef --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackServiceImpl.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.test; + +import java.io.File; + +import org.osoa.sca.ComponentContext; +import org.osoa.sca.RequestContext; +import org.osoa.sca.ServiceReference; +import org.osoa.sca.annotations.Callback; +import org.osoa.sca.annotations.Context; +import org.osoa.sca.annotations.Service; + +@Service(CallBackSetCalbackService.class) +public class CallBackSetCallbackServiceImpl implements CallBackSetCalbackService { + + @Callback + protected CallBackSetCallbackCallback callback; + @Context + protected ComponentContext context; + + public void knockKnock(String aString) { + + try { + System.out.println("CallBackBasicServiceImpl message received: " + aString); + callback.callBackMessage("Who's There"); + System.out.println("CallBackBasicServiceImpl response sent"); + return; + } catch (Exception ex) { + ex.printStackTrace(); + } + + } + + public void setCallbackIllegally(String aString) { + + System.out.println("CallBackBasicServiceImpl.setCallbackIllegally() message received: " + aString); + + boolean exceptionProduced = false; + RequestContext requestContext = null; + ServiceReference serviceRef = null; + + try { + requestContext = context.getRequestContext(); + serviceRef = (ServiceReference) requestContext.getServiceReference(); + serviceRef.setCallback(serviceRef); + } catch (ClassCastException goodEx) { + exceptionProduced = true; + System.out.println("Test10 appropriate exception caught during setCallback to own service reference"); + } catch (Exception badEx) { + System.out.println("CallBackBasicServiceImpl.setCallbackIllegally() " + badEx.toString()); + badEx.printStackTrace(); + return; + } + + // If we get the exception we are looking for then create the marker + // file. + if (exceptionProduced == true) { + File aFile = new File("target/test10_marker"); + try { + aFile.createNewFile(); + } catch (Exception ex) { + System.out.println("Error Creating target/test10_marker marker file"); + ex.printStackTrace(); + } + } + + } +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/resources/CallBackSetCallbackTest.composite b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/resources/CallBackSetCallbackTest.composite new file mode 100644 index 0000000000..3552ddecab --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/main/resources/CallBackSetCallbackTest.composite @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/test/java/org/apache/tuscany/sca/test/CallBackSetCallbackTestCase.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/test/java/org/apache/tuscany/sca/test/CallBackSetCallbackTestCase.java new file mode 100644 index 0000000000..496ae0b1a5 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-callback/src/test/java/org/apache/tuscany/sca/test/CallBackSetCallbackTestCase.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; + +import junit.framework.TestCase; + +import org.apache.tuscany.sca.host.embedded.SCADomain; + +//FIXME Fix this test case +public class CallBackSetCallbackTestCase extends TestCase { + + private SCADomain domain; + private CallBackSetCallbackClient aCallBackClient; + + public void testCallBackSetCallback() { + aCallBackClient.run(); + } + + @Override + protected void setUp() throws Exception { + domain = SCADomain.newInstance("CallBackSetCallbackTest.composite"); + + aCallBackClient = + domain.getService(CallBackSetCallbackClient.class, + "CallBackSetCallbackClient"); + } + + @Override + protected void tearDown() throws Exception { + domain.close(); + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/pom.xml b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/pom.xml new file mode 100644 index 0000000000..6e05dd4388 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/pom.xml @@ -0,0 +1,45 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-itest + 0.99-incubating + ../pom.xml + + itest-callback-set-conversation + Apache Tuscany SCA Callback Set Conversation Integration Tests + + + + org.apache.tuscany.sca + tuscany-host-embedded + 0.99-incubating + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 0.99-incubating + runtime + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvBadCallback.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvBadCallback.java new file mode 100644 index 0000000000..eb840a006d --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvBadCallback.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 junit.framework.Assert; + +public class CallBackSetCallbackConvBadCallback { + + public CallBackSetCallbackConvBadCallback() { + super(); + } + + public void callback(String aString) { + // + // This callback method should never be called. + // + System.out.println("CallBackSetCallbackBadCallback: callback called"); + Assert.fail("CallBackSetCallbackConvBadCallback: callback called"); + return; + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvCallback.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvCallback.java new file mode 100644 index 0000000000..eb7adffc7c --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvCallback.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.test; + +// @Remotable +/** + * + */ +public interface CallBackSetCallbackConvCallback { + + public void callBackMessage(String aString); + + public void callBackIncrement(String aString); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvClient.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvClient.java new file mode 100644 index 0000000000..013424bf5e --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvClient.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.osoa.sca.annotations.Remotable; + +@Remotable +public interface CallBackSetCallbackConvClient { + + public void run(); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvClientImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvClientImpl.java new file mode 100644 index 0000000000..ef9d858126 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvClientImpl.java @@ -0,0 +1,173 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * 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 junit.framework.Assert; + +import org.osoa.sca.NoRegisteredCallbackException; +import org.osoa.sca.ServiceReference; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Scope; +import org.osoa.sca.annotations.Service; + +@Service(CallBackSetCallbackConvClient.class) +@Scope("CONVERSATION") +public class CallBackSetCallbackConvClientImpl implements CallBackSetCallbackConvClient { + + @Reference + protected CallBackSetCallbackConvService aCallBackService; + private CallBackSetCallbackConvObjectCallback aCallbackObject = null; + private Object monitor = new Object(); + + public void run() { + + // This tests aspects of the setCallback() API within a conversational + // scope. + + /* + * test7 The client calls setCallback() with an object that is not a + * service reference and the callback interface is stateful. Verify + * successful execution. + */ + test7(); + + /* + * test8() The client calls setCallback() with an object that does not + * implement the callback interface. Verify an appropriate exception is + * thrown. This requires a STATEFUL interface. + */ + test8(); + + /* + * test9 The client calls setCallback() with an object that is not + * serializable. Verify an appropriate exception is thrown. This + * requires a STATEFUL callback interface. Move from the stateless test + * case. + */ + test9(); + + return; + } + + private void test7() { + + // + // This test is to specify an Object that is not a service reference + // that does implement + // the callback interface and is Serializeable. Verify successful + // execution. + // + + aCallbackObject = new CallBackSetCallbackConvObjectCallback(); + aCallbackObject.incrementCallBackCount(); + aCallbackObject.setMonitor(monitor); + + ((ServiceReference)aCallBackService).setCallback(aCallbackObject); + aCallBackService.knockKnock("Knock Knock"); + + // Lets give the callback a little time to complete.... + + int count = 0; + + synchronized (monitor) { + while (aCallbackObject.getCount() != 2 && count++ < 30) { + try { + monitor.wait(1000L); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + } + + Assert.assertEquals("CallBackSetCallbackConv - Test7", 2, aCallbackObject.getCount()); + + } + + private void test8() { + + boolean correctException = false; + + // + // This test is to specify an Object that is not a service reference + // that does not impliment + // the callback interface. The expected result is an appropriate + // exception. + // + + try { + ((ServiceReference)aCallBackService).setCallback(new CallBackSetCallbackConvBadCallback()); + aCallBackService.knockKnock("Knock Knock"); + } + + // + // This should catch an appropriate exception. + // + + catch (NoRegisteredCallbackException NotRegEx) // This needs to be + // changed to proper + // exception once we + // know what it is ;-) + { + correctException = true; + } + + catch (Exception ex) { + // This means an inappropriate exception occurred + ex.printStackTrace(); + } + + Assert.assertEquals("CallBackSetCallbackConv - Test8", true, correctException); + + } + + private void test9() { + + boolean correctException = false; + + // + // This test is to specify an Object that is not a service reference + // that does impliment + // the callback interface but does not implement Serializeable. Verify + // an appropriate exception + // is thrown. + // + + try { + ((ServiceReference)aCallBackService).setCallback(new CallBackSetCallbackConvNonSerCallback()); + aCallBackService.knockKnock("Knock Knock"); + } + // + // This should catch an appropriate exception. + // + catch (NoRegisteredCallbackException NotRegEx) // This needs to be + // changed to + // appropriate exception + // when we know what it + // is ;-) + { + correctException = true; + } catch (Exception ex) { + ex.printStackTrace(); + } + + Assert.assertEquals("CallBackSetCallbackConv - Test9", true, correctException); + + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvNonSerCallback.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvNonSerCallback.java new file mode 100644 index 0000000000..789e04e907 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvNonSerCallback.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; + +public class CallBackSetCallbackConvNonSerCallback implements CallBackSetCallbackConvCallback { + + private int callBackCount = 0; + private Object monitor; + + public CallBackSetCallbackConvNonSerCallback() { + super(); + } + + public synchronized void incrementCallBackCount() { + callBackCount++; + } + + public synchronized int getCount() { + return callBackCount; + } + + public void setMonitor(Object anObject) { + monitor = anObject; + } + + public void callBackMessage(String aString) { + + System.out.println("Entering CallBackSetCallbackConvNonSerCallback callBackMessage: " + aString); + + } + + public void callBackIncrement(String aString) { + + System.out.println("Entering callback increment: " + aString); + + synchronized (monitor) { + this.incrementCallBackCount(); + monitor.notify(); + } + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvObjectCallback.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvObjectCallback.java new file mode 100644 index 0000000000..643aa00a9d --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvObjectCallback.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; + + +public class CallBackSetCallbackConvObjectCallback implements CallBackSetCallbackConvCallback { + + private int callBackCount = 0; + private Object monitor; + + public CallBackSetCallbackConvObjectCallback() { + super(); + } + + public synchronized void incrementCallBackCount() { + callBackCount++; + } + + public synchronized int getCount() { + return callBackCount; + } + + public void setMonitor(Object anObject) { + monitor = anObject; + } + + public void callBackMessage(String aString) { + + System.out.println("Entering CallBackSetCallbackObjectCallback callBackMessage: " + aString); + + } + + public void callBackIncrement(String aString) { + + System.out.println("Entering callback increment: " + aString); + + synchronized (monitor) { + this.incrementCallBackCount(); + monitor.notify(); + } + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvService.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvService.java new file mode 100644 index 0000000000..4b0dccefdc --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvService.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; + +import org.osoa.sca.annotations.Callback; + +// @Remotable +@Callback(CallBackSetCallbackConvCallback.class) +/** + * + */ +public interface CallBackSetCallbackConvService { + + public void knockKnock(String aString); + + public void setCallbackIllegally(String aString); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvServiceImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvServiceImpl.java new file mode 100644 index 0000000000..5b685e695b --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvServiceImpl.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 org.apache.tuscany.sca.test; + +import java.io.File; + +import org.osoa.sca.ComponentContext; +import org.osoa.sca.RequestContext; +import org.osoa.sca.ServiceReference; +import org.osoa.sca.annotations.Callback; +import org.osoa.sca.annotations.Context; +import org.osoa.sca.annotations.Scope; +import org.osoa.sca.annotations.Service; + +@Service(CallBackSetCallbackConvService.class) +@Scope("CONVERSATION") +public class CallBackSetCallbackConvServiceImpl implements CallBackSetCallbackConvService { + + @Callback + private CallBackSetCallbackConvCallback callback; + @Context + protected ComponentContext context; + + public void knockKnock(String aString) { + + try { + System.out.println("CallBackBasicServiceImpl message received: " + aString); + callback.callBackMessage("Who's There"); + System.out.println("CallBackBasicServiceImpl response sent"); + return; + } catch (Exception ex) { + ex.printStackTrace(); + } + + } + + public void setCallbackIllegally(String aString) { + + System.out.println("CallBackBasicServiceImpl.setCallbackIllegally() message received: " + aString); + + boolean exceptionProduced = false; + RequestContext requestContext = null; + ServiceReference serviceRef = null; + + // Context is not working properly so we can't trust that this is + // working..... + try { + requestContext = context.getRequestContext(); + serviceRef = (ServiceReference) requestContext.getServiceReference(); + } catch (Exception ex) { + System.out.println("CallBackBasicServiceImpl.setCallbackIllegally() " + ex.toString()); + ex.printStackTrace(); + return; + } + + // Ok, call setCallback with my own service reference. + try { + serviceRef.setCallback(serviceRef); + } catch (NullPointerException npe) { + // This is not an appropriate exception. + System.out.println("Test10 NPE exception during setCallback to own service reference"); + npe.printStackTrace(); + return; + } + // This needs to catch the appropriate exception, once we figure out + // what is needs to be! + catch (Exception ex) { + exceptionProduced = true; + System.out.println("Test10 appropriate exception caught during setCallback to own service reference"); + } + ; + + // If we get the exception we are looking for then create the marker + // file. + if (exceptionProduced == true) { + File aFile = new File("target/test10_marker"); + try { + aFile.createNewFile(); + } catch (Exception ex) { + System.out.println("Error Creating target/test10_marker marker file"); + ex.printStackTrace(); + } + } + + } +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/resources/CallBackSetCallbackConvTest.composite b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/resources/CallBackSetCallbackConvTest.composite new file mode 100644 index 0000000000..ce73417f94 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/main/resources/CallBackSetCallbackConvTest.composite @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/test/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvTestCaseFIXME.java b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/test/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvTestCaseFIXME.java new file mode 100644 index 0000000000..addbe3055b --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/callback-set-conversation/src/test/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvTestCaseFIXME.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; + +import junit.framework.TestCase; + +import org.apache.tuscany.sca.host.embedded.SCADomain; + +//FIXME Fix this test case +public class CallBackSetCallbackConvTestCaseFIXME extends TestCase { + + private SCADomain domain; + private CallBackSetCallbackConvClient aCallBackClient; + + public void testCallBackSetCallback() { + aCallBackClient.run(); + } + + @Override + protected void setUp() throws Exception { + domain = SCADomain.newInstance("CallBackSetCallbackConvTest.composite"); + + aCallBackClient = + domain.getService(CallBackSetCallbackConvClient.class, + "CallBackSetCallbackConvClient"); + } + + @Override + protected void tearDown() throws Exception { + domain.close(); + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/component-type/pom.xml b/sca-java-1.x/tags/0.99-incubating/itest/component-type/pom.xml new file mode 100644 index 0000000000..cdab0e4eab --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/component-type/pom.xml @@ -0,0 +1,46 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-itest + 0.99-incubating + ../pom.xml + + itest-component-type + Apache Tuscany SCA Component Type Integration Tests + + + + org.apache.tuscany.sca + tuscany-host-embedded + 0.99-incubating + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 0.99-incubating + runtime + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/AddService.java b/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/AddService.java new file mode 100644 index 0000000000..188451ebac --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/AddService.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 Add service interface + */ +public interface AddService { + + double add(double n1, double n2); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/AddServiceImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/AddServiceImpl.java new file mode 100644 index 0000000000..8b6fe066a6 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/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-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/CalculatorClient.java b/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/CalculatorClient.java new file mode 100644 index 0000000000..9d180bf52e --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/CalculatorClient.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 calculator; + +import org.apache.tuscany.sca.host.embedded.SCADomain; + +/** + * 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 { + + SCADomain scaDomain = SCADomain.newInstance("Calculator.composite"); + + CalculatorService calculatorService = + scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent"); + + // 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)); + + scaDomain.close(); + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/CalculatorService.java b/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/CalculatorService.java new file mode 100644 index 0000000000..031fa8b912 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/CalculatorService.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; + + +/** + * 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-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/CalculatorServiceImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/CalculatorServiceImpl.java new file mode 100644 index 0000000000..803f3104f7 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/CalculatorServiceImpl.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; + +import org.osoa.sca.annotations.Reference; + + +/** + * 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-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/DivideService.java b/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/DivideService.java new file mode 100644 index 0000000000..30d248208b --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/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-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/DivideServiceImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/DivideServiceImpl.java new file mode 100644 index 0000000000..f7ac0b7287 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/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-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/MultiplyService.java b/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/MultiplyService.java new file mode 100644 index 0000000000..5290605938 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/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-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/MultiplyServiceImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/MultiplyServiceImpl.java new file mode 100644 index 0000000000..b7dca792b2 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/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-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/SubtractService.java b/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/SubtractService.java new file mode 100644 index 0000000000..bf0d1882b6 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/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-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/SubtractServiceImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/java/calculator/SubtractServiceImpl.java new file mode 100644 index 0000000000..77b128ab8d --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/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-1.x/tags/0.99-incubating/itest/component-type/src/main/resources/Calculator.composite b/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/resources/Calculator.composite new file mode 100644 index 0000000000..2ecaf84a37 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/resources/Calculator.composite @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/resources/calculator/AddServiceImpl.componentType b/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/resources/calculator/AddServiceImpl.componentType new file mode 100644 index 0000000000..00c48e5a35 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/resources/calculator/AddServiceImpl.componentType @@ -0,0 +1,27 @@ + + + + + + + + + + \ No newline at end of file diff --git a/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/resources/calculator/CalculatorServiceImpl.componentType b/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/resources/calculator/CalculatorServiceImpl.componentType new file mode 100644 index 0000000000..74bedc0a98 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/resources/calculator/CalculatorServiceImpl.componentType @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/resources/calculator/DivideServiceImpl.componentType b/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/resources/calculator/DivideServiceImpl.componentType new file mode 100644 index 0000000000..289fcc3e11 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/resources/calculator/DivideServiceImpl.componentType @@ -0,0 +1,27 @@ + + + + + + + + + + \ No newline at end of file diff --git a/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/resources/calculator/MultiplyServiceImpl.componentType b/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/resources/calculator/MultiplyServiceImpl.componentType new file mode 100644 index 0000000000..015d997f6a --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/resources/calculator/MultiplyServiceImpl.componentType @@ -0,0 +1,27 @@ + + + + + + + + + + \ No newline at end of file diff --git a/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/resources/calculator/SubtractServiceImpl.componentType b/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/resources/calculator/SubtractServiceImpl.componentType new file mode 100644 index 0000000000..6214955141 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/main/resources/calculator/SubtractServiceImpl.componentType @@ -0,0 +1,27 @@ + + + + + + + + + + \ No newline at end of file diff --git a/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/test/java/calculator/CalculatorTestCase.java b/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/test/java/calculator/CalculatorTestCase.java new file mode 100644 index 0000000000..08fc8e33bf --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/component-type/src/test/java/calculator/CalculatorTestCase.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 calculator; + +import junit.framework.TestCase; + +import org.apache.tuscany.sca.host.embedded.SCADomain; + +/** + * This shows how to test the Calculator service component. + */ +public class CalculatorTestCase extends TestCase { + + private CalculatorService calculatorService; + private SCADomain scaDomain; + + @Override + protected void setUp() throws Exception { + scaDomain = SCADomain.newInstance("Calculator.composite"); + calculatorService = scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent/CalculatorService"); + } + + @Override + protected void tearDown() throws Exception { + scaDomain.close(); + } + + public void testCalculator() throws Exception { + // Calculate + assertEquals(calculatorService.add(3, 2), 5.0); + assertEquals(calculatorService.subtract(3, 2), 1.0); + assertEquals(calculatorService.multiply(3, 2), 6.0); + assertEquals(calculatorService.divide(3, 2), 1.5); + + } +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-composite/.ruleset b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-composite/.ruleset new file mode 100644 index 0000000000..ac8671859d --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-composite/.ruleset @@ -0,0 +1,190 @@ + + + + PMD Plugin preferences rule set + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-composite/pom.xml b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-composite/pom.xml new file mode 100644 index 0000000000..234af51f4a --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-composite/pom.xml @@ -0,0 +1,67 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-itest + 0.99-incubating + ../pom.xml + + itest-contribution-export-composite + Apache Tuscany Contribution Export Composite + + + + org.apache.tuscany.sca + tuscany-host-embedded + 0.99-incubating + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 0.99-incubating + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + 0.99-incubating + runtime + + + + org.apache.tuscany.sca + tuscany-http-tomcat + 0.99-incubating + runtime + + + + junit + junit + 4.2 + test + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-composite/src/main/java/hello/Hello.java b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-composite/src/main/java/hello/Hello.java new file mode 100644 index 0000000000..acf2ff1722 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-composite/src/main/java/hello/Hello.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.Remotable; +import org.osoa.sca.annotations.Service; + +/** + * This is the business interface of the Hello service. + */ +@Remotable +@Service +public interface Hello { + + public String getGreetings(String name); +} + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-composite/src/main/java/hello/HelloImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-composite/src/main/java/hello/HelloImpl.java new file mode 100644 index 0000000000..5369c18497 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/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-1.x/tags/0.99-incubating/itest/contribution-import-export/export-composite/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-composite/src/main/resources/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..3c14560a56 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-composite/src/main/resources/META-INF/sca-contribution.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-composite/src/main/resources/hello.composite b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-composite/src/main/resources/hello.composite new file mode 100644 index 0000000000..636b7111d9 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-composite/src/main/resources/hello.composite @@ -0,0 +1,31 @@ + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-composite/src/test/java/org/apache/tuscany/sca/test/contribution/HelloTestCase.java b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-composite/src/test/java/org/apache/tuscany/sca/test/contribution/HelloTestCase.java new file mode 100644 index 0000000000..e8c4eef771 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-composite/src/test/java/org/apache/tuscany/sca/test/contribution/HelloTestCase.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.test.contribution; + +import hello.Hello; + +import java.io.File; +import java.io.IOException; +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.resolver.ModelResolver; +import org.apache.tuscany.sca.contribution.resolver.impl.ModelResolverImpl; +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(); + + ModelResolver helloResolver = new ModelResolverImpl(cl); + File helloContrib = new File("./target/classes/"); + URL helloURL = helloContrib.toURL(); + Contribution consumerContribution = + contributionService.contribute("http://import-export/hello", helloURL, helloResolver, false); + Composite consumerComposite = consumerContribution.getDeployables().get(0); + domain.getDomainComposite().getIncludes().add(consumerComposite); + domain.getCompositeBuilder().build(consumerComposite); + + // Start Components from my composite + domain.getCompositeActivator().activate(consumerComposite); + domain.getCompositeActivator().start(consumerComposite); + } + + 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-1.x/tags/0.99-incubating/itest/contribution-import-export/export-java/.ruleset b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-java/.ruleset new file mode 100644 index 0000000000..ac8671859d --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-java/.ruleset @@ -0,0 +1,190 @@ + + + + PMD Plugin preferences rule set + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-java/pom.xml b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-java/pom.xml new file mode 100644 index 0000000000..f57e275bbf --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-java/pom.xml @@ -0,0 +1,67 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-itest + 0.99-incubating + ../pom.xml + + itest-contribution-export-java + Apache Tuscany Contribution Export Java + + + + org.apache.tuscany.sca + tuscany-host-embedded + 0.99-incubating + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 0.99-incubating + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + 0.99-incubating + runtime + + + + org.apache.tuscany.sca + tuscany-http-tomcat + 0.99-incubating + runtime + + + + junit + junit + 4.2 + test + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-java/src/main/java/helloworld/HelloWorldService.java b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-java/src/main/java/helloworld/HelloWorldService.java new file mode 100644 index 0000000000..3b54724b43 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-java/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 org.osoa.sca.annotations.Remotable; +import org.osoa.sca.annotations.Service; + +/** + * This is the business interface of the HelloWorld greetings service. + */ +@Remotable +@Service +public interface HelloWorldService { + + public String getGreetings(String name); +} + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-java/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-java/src/main/resources/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..dc33dfa560 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-java/src/main/resources/META-INF/sca-contribution.xml @@ -0,0 +1,24 @@ + + + + + \ No newline at end of file diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-wsdl/.ruleset b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-wsdl/.ruleset new file mode 100644 index 0000000000..ac8671859d --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-wsdl/.ruleset @@ -0,0 +1,190 @@ + + + + PMD Plugin preferences rule set + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-wsdl/pom.xml b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-wsdl/pom.xml new file mode 100644 index 0000000000..f933af2df6 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-wsdl/pom.xml @@ -0,0 +1,31 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-itest + 0.99-incubating + ../pom.xml + + itest-contribution-export-wsdl + Apache Tuscany Contribution Export WSDL + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-wsdl/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-wsdl/src/main/resources/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..b7394ec14b --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-wsdl/src/main/resources/META-INF/sca-contribution.xml @@ -0,0 +1,24 @@ + + + + + \ No newline at end of file diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.wsdl b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.wsdl new file mode 100644 index 0000000000..9b31363e1a --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.wsdl @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.xsd b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.xsd new file mode 100644 index 0000000000..d3c83b08c6 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/export-wsdl/src/main/resources/helloworld.xsd @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/.ruleset b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/.ruleset new file mode 100644 index 0000000000..ac8671859d --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/.ruleset @@ -0,0 +1,190 @@ + + + + PMD Plugin preferences rule set + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/pom.xml b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/pom.xml new file mode 100644 index 0000000000..b7314922df --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/pom.xml @@ -0,0 +1,73 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-itest + 0.99-incubating + ../pom.xml + + itest-contribution-import-composite + Apache Tuscany Contribution Import Composite Test + + + + org.apache.tuscany.sca + itest-contribution-export-composite + 0.99-incubating + + + + org.apache.tuscany.sca + tuscany-host-embedded + 0.99-incubating + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 0.99-incubating + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + 0.99-incubating + runtime + + + + org.apache.tuscany.sca + tuscany-http-tomcat + 0.99-incubating + runtime + + + + junit + junit + 4.2 + test + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldImpl.java new file mode 100644 index 0000000000..966f56d7d5 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/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-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldServer.java b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldServer.java new file mode 100644 index 0000000000..3d43290380 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/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-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldService.java b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/src/main/java/helloworld/HelloWorldService.java new file mode 100644 index 0000000000..3b54724b43 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/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 org.osoa.sca.annotations.Remotable; +import org.osoa.sca.annotations.Service; + +/** + * This is the business interface of the HelloWorld greetings service. + */ +@Remotable +@Service +public interface HelloWorldService { + + public String getGreetings(String name); +} + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/src/main/resources/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..9f3f5be452 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/src/main/resources/META-INF/sca-contribution.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/src/main/resources/helloworld.wsdl b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/src/main/resources/helloworld.wsdl new file mode 100644 index 0000000000..9b31363e1a --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/src/main/resources/helloworld.wsdl @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/src/main/resources/helloworld.xsd b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/src/main/resources/helloworld.xsd new file mode 100644 index 0000000000..d3c83b08c6 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/src/main/resources/helloworld.xsd @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/src/main/resources/helloworldws.composite b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/src/main/resources/helloworldws.composite new file mode 100644 index 0000000000..e2f852ff7e --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/src/main/resources/helloworldws.composite @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/src/test/java/org/apache/tuscany/test/contribution/HelloWorldServerTestCase.java b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/src/test/java/org/apache/tuscany/test/contribution/HelloWorldServerTestCase.java new file mode 100644 index 0000000000..d31b417e24 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-composite/src/test/java/org/apache/tuscany/test/contribution/HelloWorldServerTestCase.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.test.contribution; + +import helloworld.HelloWorldService; + +import java.io.File; +import java.io.IOException; +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(); + compositeContribution = + contributionService.contribute("http://import-export/export-composite", compositeContribURL, false); + for (Composite deployable : compositeContribution.getDeployables()) { + domain.getDomainComposite().getIncludes().add(deployable); + domain.getCompositeBuilder().build(deployable); + } + + File helloWorldContribLocation = new File("./target/classes/"); + URL helloWorldContribURL = helloWorldContribLocation.toURL(); + helloWorldContribution = + contributionService.contribute("http://import-export/helloworld", helloWorldContribURL, false); + for (Composite deployable : helloWorldContribution.getDeployables()) { + domain.getDomainComposite().getIncludes().add(deployable); + domain.getCompositeBuilder().build(deployable); + } + + // Start Components from my composite + for (Composite deployable : helloWorldContribution.getDeployables()) { + domain.getCompositeActivator().activate(deployable); + domain.getCompositeActivator().start(deployable); + } + } + + 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-1.x/tags/0.99-incubating/itest/contribution-import-export/import-java/.ruleset b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-java/.ruleset new file mode 100644 index 0000000000..ac8671859d --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-java/.ruleset @@ -0,0 +1,190 @@ + + + + PMD Plugin preferences rule set + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-java/pom.xml b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-java/pom.xml new file mode 100644 index 0000000000..4eb64316f8 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-java/pom.xml @@ -0,0 +1,73 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-itest + 0.99-incubating + ../pom.xml + + itest-contribution-import-java + Apache Tuscany Contribution Import Java Test + + + + org.apache.tuscany.sca + itest-contribution-export-java + 0.99-incubating + + + + org.apache.tuscany.sca + tuscany-host-embedded + 0.99-incubating + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 0.99-incubating + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + 0.99-incubating + runtime + + + + org.apache.tuscany.sca + tuscany-http-tomcat + 0.99-incubating + runtime + + + + junit + junit + 4.2 + test + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-java/src/main/java/helloworld/HelloWorldImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-java/src/main/java/helloworld/HelloWorldImpl.java new file mode 100644 index 0000000000..4cdcc1fd0b --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/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-1.x/tags/0.99-incubating/itest/contribution-import-export/import-java/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-java/src/main/resources/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..e5d14f51d4 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-java/src/main/resources/META-INF/sca-contribution.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-java/src/main/resources/helloworldws.composite b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-java/src/main/resources/helloworldws.composite new file mode 100644 index 0000000000..023b2b6aff --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-java/src/main/resources/helloworldws.composite @@ -0,0 +1,32 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-java/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-java/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java new file mode 100644 index 0000000000..432ca868cf --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-java/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.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.contribution; + +import helloworld.HelloWorldService; + +import java.io.File; +import java.io.IOException; +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(); + javaContribution = contributionService.contribute("http://import-export/export-java", javaContribURL, false); + for (Composite deployable : javaContribution.getDeployables() ) { + domain.getDomainComposite().getIncludes().add(deployable); + domain.getCompositeBuilder().build(deployable); + } + + File helloWorldContribLocation = new File("./target/classes/"); + URL helloWorldContribURL = helloWorldContribLocation.toURL(); + helloWorldContribution = contributionService.contribute("http://import-export/helloworld", helloWorldContribURL, false); + for (Composite deployable : helloWorldContribution.getDeployables() ) { + domain.getDomainComposite().getIncludes().add(deployable); + domain.getCompositeBuilder().build(deployable); + } + + // Start Components from my composite + for (Composite deployable : helloWorldContribution.getDeployables() ) { + domain.getCompositeActivator().activate(deployable); + domain.getCompositeActivator().start(deployable); + } + } + + 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-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/.ruleset b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/.ruleset new file mode 100644 index 0000000000..ac8671859d --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/.ruleset @@ -0,0 +1,190 @@ + + + + PMD Plugin preferences rule set + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/pom.xml b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/pom.xml new file mode 100644 index 0000000000..a2b3300b0f --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/pom.xml @@ -0,0 +1,67 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-itest + 0.99-incubating + ../pom.xml + + itest-contribution-import-wsdl + Apache Tuscany Contribution Import WSDL test + + + + org.apache.tuscany.sca + tuscany-host-embedded + 0.99-incubating + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 0.99-incubating + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + 0.99-incubating + runtime + + + + org.apache.tuscany.sca + tuscany-http-tomcat + 0.99-incubating + runtime + + + + junit + junit + 4.2 + test + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldImpl.java new file mode 100644 index 0000000000..4cdcc1fd0b --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/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-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldServer.java b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldServer.java new file mode 100644 index 0000000000..3d43290380 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/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-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldService.java b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/src/main/java/helloworld/HelloWorldService.java new file mode 100644 index 0000000000..3b54724b43 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/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 org.osoa.sca.annotations.Remotable; +import org.osoa.sca.annotations.Service; + +/** + * This is the business interface of the HelloWorld greetings service. + */ +@Remotable +@Service +public interface HelloWorldService { + + public String getGreetings(String name); +} + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/src/main/resources/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..d46fe0b57c --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/src/main/resources/META-INF/sca-contribution.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/src/main/resources/helloworldws.composite b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/src/main/resources/helloworldws.composite new file mode 100644 index 0000000000..5008a2ea5b --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/src/main/resources/helloworldws.composite @@ -0,0 +1,33 @@ + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.java new file mode 100644 index 0000000000..9dea44386c --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/import-wsdl/src/test/java/org/apache/tuscany/sca/test/contribution/HelloWorldServerTestCase.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.contribution; + +import helloworld.HelloWorldService; + +import java.io.File; +import java.io.IOException; +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(); + wsdlContribution = contributionService.contribute("http://import-export/export-wsdl", wsdlContribURL, false); + for (Composite deployable : wsdlContribution.getDeployables() ) { + domain.getDomainComposite().getIncludes().add(deployable); + domain.getCompositeBuilder().build(deployable); + } + + File helloWorldContribLocation = new File("./target/classes/"); + URL helloWorldContribURL = helloWorldContribLocation.toURL(); + consumerContribution = contributionService.contribute("http://import-export/helloworld", helloWorldContribURL, false); + for (Composite deployable : consumerContribution.getDeployables() ) { + domain.getDomainComposite().getIncludes().add(deployable); + domain.getCompositeBuilder().build(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); + } + + 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-1.x/tags/0.99-incubating/itest/contribution-import-export/pom.xml b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/pom.xml new file mode 100644 index 0000000000..b7eb3ed8d1 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution-import-export/pom.xml @@ -0,0 +1,54 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-itest + 0.99-incubating + ../pom.xml + + itest-contribution-import-export + pom + Apache Tuscany Contribution Import/Export + + + export-wsdl + import-wsdl + export-composite + import-composite + export-java + import-java + + + + + org.apache.tuscany.sca + tuscany-host-embedded + 0.99-incubating + + + + org.apache.tuscany.sca + tuscany-contribution-impl + 0.99-incubating + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution/pom.xml b/sca-java-1.x/tags/0.99-incubating/itest/contribution/pom.xml new file mode 100644 index 0000000000..4b8382efe3 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution/pom.xml @@ -0,0 +1,45 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-itest + 0.99-incubating + ../pom.xml + + itest-contribution + Apache Tuscany Contribution Integration Tests + + + + org.apache.tuscany.sca + tuscany-host-embedded + 0.99-incubating + + + + org.apache.tuscany.sca + tuscany-contribution-impl + 0.99-incubating + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/AddService.java b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/AddService.java new file mode 100644 index 0000000000..6392676e76 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/AddService.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 calculator; + +public interface AddService { + + double add(double n1, double n2); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/AddServiceImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/AddServiceImpl.java new file mode 100644 index 0000000000..e9c635e3c8 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution/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-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/CalculatorClient.java b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/CalculatorClient.java new file mode 100644 index 0000000000..40ca4d9b0f --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/CalculatorClient.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 calculator; + +import org.apache.tuscany.sca.host.embedded.SCADomain; + +/** + * 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 { + + SCADomain domain = SCADomain.newInstance("Calculator.composite"); + + CalculatorService calculatorService = domain.getService(CalculatorService.class, + "CalculatorServiceComponent"); + + // 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)); + + domain.close(); + + } + +} \ No newline at end of file diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/CalculatorService.java b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/CalculatorService.java new file mode 100644 index 0000000000..ad87375529 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/CalculatorService.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; + + +/** + * 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-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/CalculatorServiceImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/CalculatorServiceImpl.java new file mode 100644 index 0000000000..ae4ed12b7b --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/CalculatorServiceImpl.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 calculator; + +import org.osoa.sca.annotations.Reference; + + +/** + * An implementation of the Calculator service. + */ +public class CalculatorServiceImpl implements CalculatorService { + + private AddService addService; + private SubtractService subtractService; + private MultiplyService multiplyService; + private DivideService divideService; + + @Reference + public void setAddService(AddService addService) { + this.addService = addService; + } + + @Reference + public void setSubtractService(SubtractService subtractService) { + this.subtractService = subtractService; + } + + @Reference + public void setDivideService(DivideService divideService) { + this.divideService = divideService; + } + + @Reference + 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-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/DivideService.java b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/DivideService.java new file mode 100644 index 0000000000..3158458b5e --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/DivideService.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 calculator; + +public interface DivideService { + + double divide(double n1, double n2); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/DivideServiceImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/DivideServiceImpl.java new file mode 100644 index 0000000000..8c33862f6d --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution/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-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/MultiplyService.java b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/MultiplyService.java new file mode 100644 index 0000000000..62db05175e --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/MultiplyService.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 calculator; + +public interface MultiplyService { + + double multiply(double n1, double n2); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/MultiplyServiceImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/MultiplyServiceImpl.java new file mode 100644 index 0000000000..c7fbc73c00 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution/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-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/SubtractService.java b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/SubtractService.java new file mode 100644 index 0000000000..309f88f098 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/SubtractService.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 calculator; + +public interface SubtractService { + + double subtract(double n1, double n2); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/SubtractServiceImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/java/calculator/SubtractServiceImpl.java new file mode 100644 index 0000000000..1a7f145ad8 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution/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-1.x/tags/0.99-incubating/itest/contribution/src/main/resources/ContributionTest.composite b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/resources/ContributionTest.composite new file mode 100644 index 0000000000..d814e439e2 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/resources/ContributionTest.composite @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/resources/calculator/Calculator.composite b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/resources/calculator/Calculator.composite new file mode 100644 index 0000000000..657a2f95d8 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/resources/calculator/Calculator.composite @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/resources/calculator/sca-contribution.xml b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/resources/calculator/sca-contribution.xml new file mode 100644 index 0000000000..e95796d83a --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/main/resources/calculator/sca-contribution.xml @@ -0,0 +1,24 @@ + + + + + \ No newline at end of file diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/test/java/org/apache/tuscany/sca/test/contribution/ContributionServiceTestCase.java b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/test/java/org/apache/tuscany/sca/test/contribution/ContributionServiceTestCase.java new file mode 100644 index 0000000000..946f505ead --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/test/java/org/apache/tuscany/sca/test/contribution/ContributionServiceTestCase.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.contribution; + +import java.io.File; +import java.io.InputStream; +import java.net.URL; +import java.util.List; + +import javax.xml.namespace.QName; + +import junit.framework.TestCase; + +import org.apache.tuscany.sca.assembly.Composite; +import org.apache.tuscany.sca.assembly.DefaultAssemblyFactory; +import org.apache.tuscany.sca.contribution.Contribution; +import org.apache.tuscany.sca.contribution.DeployedArtifact; +import org.apache.tuscany.sca.contribution.resolver.ModelResolver; +import org.apache.tuscany.sca.contribution.resolver.impl.ModelResolverImpl; +import org.apache.tuscany.sca.contribution.service.ContributionService; +import org.apache.tuscany.sca.contribution.service.util.FileHelper; +import org.apache.tuscany.sca.contribution.service.util.IOHelper; +import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; + +/** + * This is more intended to be a integration test then a unit test. * + */ +public class ContributionServiceTestCase extends TestCase { + private static final String CONTRIBUTION_001_ID = "contribution001/"; + private static final String CONTRIBUTION_002_ID = "contribution002/"; + private static final String JAR_CONTRIBUTION = "/repository/sample-calculator.jar"; + private static final String FOLDER_CONTRIBUTION = "target/classes/"; + + private ClassLoader cl; + private EmbeddedSCADomain domain; + private ContributionService contributionService; + + @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(); + + //get a reference to the contribution service + contributionService = domain.getContributionService(); + } + + public void testContributeJAR() throws Exception { + URL contributionLocation = getClass().getResource(JAR_CONTRIBUTION); + //URL contributionLocation = new URL("file:/D:/dev/Opensource/Apache/Tuscany/source/java/sca/samples/calculator/target/sample-calculator.jar"); + String contributionId = CONTRIBUTION_001_ID; + ModelResolver resolver = new ModelResolverImpl(getClass().getClassLoader()); + contributionService.contribute(contributionId, contributionLocation, resolver, false); + assertNotNull(contributionService.getContribution(contributionId)); + } + + public void testStoreContributionPackageInRepository() throws Exception { + URL contributionLocation = getClass().getResource(JAR_CONTRIBUTION); + String contributionId = CONTRIBUTION_001_ID; + ModelResolver resolver = new ModelResolverImpl(getClass().getClassLoader()); + contributionService.contribute(contributionId, contributionLocation, resolver, true); + + assertTrue(FileHelper.toFile(new URL(contributionService.getContribution(contributionId).getLocation())) + .exists()); + + assertNotNull(contributionId); + + Contribution contributionModel = contributionService.getContribution(contributionId); + + File contributionFile = FileHelper.toFile(new URL(contributionModel.getLocation())); + assertTrue(contributionFile.exists()); + } + + public void testStoreContributionStreamInRepository() throws Exception { + URL contributionLocation = getClass().getResource(JAR_CONTRIBUTION); + String contributionId = CONTRIBUTION_001_ID; + + InputStream contributionStream = contributionLocation.openStream(); + try { + ModelResolver resolver = new ModelResolverImpl(getClass().getClassLoader()); + contributionService.contribute(contributionId, contributionLocation, contributionStream, resolver); + } finally { + IOHelper.closeQuietly(contributionStream); + } + + assertTrue(FileHelper.toFile(new URL(contributionService.getContribution(contributionId).getLocation())) + .exists()); + + assertNotNull(contributionId); + + Contribution contributionModel = contributionService.getContribution(contributionId); + + File contributionFile = FileHelper.toFile(new URL(contributionModel.getLocation())); + assertTrue(contributionFile.exists()); + } + + public void testStoreDuplicatedContributionInRepository() throws Exception { + URL contributionLocation = getClass().getResource(JAR_CONTRIBUTION); + String contributionId1 = CONTRIBUTION_001_ID; + ModelResolver resolver = new ModelResolverImpl(getClass().getClassLoader()); + contributionService.contribute(contributionId1, contributionLocation, resolver, true); + assertNotNull(contributionService.getContribution(contributionId1)); + String contributionId2 = CONTRIBUTION_002_ID; + ModelResolver resolver2 = new ModelResolverImpl(getClass().getClassLoader()); + contributionService.contribute(contributionId2, contributionLocation, resolver2, true); + assertNotNull(contributionService.getContribution(contributionId2)); + } + + public void testContributeFolder() throws Exception { + File rootContributionFolder = new File(FOLDER_CONTRIBUTION); + String contributionId = CONTRIBUTION_001_ID; + //first rename the sca-contribution metadata file + //File calculatorMetadataFile = new File("target/classes/calculator/sca-contribution.xml"); + //File metadataDirectory = new File("target/classes/META-INF/"); + //if (!metadataDirectory.exists()) { + // FileHelper.forceMkdir(metadataDirectory); + //} + //FileHelper.copyFileToDirectory(calculatorMetadataFile, metadataDirectory); + ModelResolver resolver = new ModelResolverImpl(getClass().getClassLoader()); + contributionService.contribute(contributionId, rootContributionFolder.toURL(), resolver, false); + assertNotNull(contributionService.getContribution(contributionId)); + } + + public void testAddDeploymentComposites() throws Exception { + URL contributionLocation = getClass().getResource(JAR_CONTRIBUTION); + String contributionId = CONTRIBUTION_001_ID; + ModelResolver resolver = new ModelResolverImpl(getClass().getClassLoader()); + Contribution contribution = contributionService.contribute(contributionId, contributionLocation, resolver, false); + assertNotNull(contributionService.getContribution(contributionId)); + + String artifactId = "contributionComposite.composite"; + Composite composite = (new DefaultAssemblyFactory()).createComposite(); + composite.setName(new QName(null, "contributionComposite")); + composite.setURI("contributionComposite.composite"); + + contributionService.addDeploymentComposite(contribution, composite); + + List deployables = contributionService.getContribution(contributionId).getDeployables(); + Composite composite1 = (Composite)deployables.get(deployables.size() - 1); + assertEquals("contributionComposite", composite1.getName().toString()); + + DeployedArtifact artifact = null; + contribution = contributionService.getContribution(contributionId); + String id = artifactId.toString(); + for (DeployedArtifact a : contribution.getArtifacts()) { + if (id.equals(a.getURI())) { + artifact = a; + break; + } + } + Composite composite2 = (Composite)artifact.getModel(); + assertEquals("contributionComposite", composite2.getName().toString()); + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/test/resources/deployables/sample-calculator.jar b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/test/resources/deployables/sample-calculator.jar new file mode 100644 index 0000000000..0ca3a1b781 Binary files /dev/null and b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/test/resources/deployables/sample-calculator.jar differ diff --git a/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/test/resources/repository/sample-calculator.jar b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/test/resources/repository/sample-calculator.jar new file mode 100644 index 0000000000..0ca3a1b781 Binary files /dev/null and b/sca-java-1.x/tags/0.99-incubating/itest/contribution/src/test/resources/repository/sample-calculator.jar differ diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/pom.xml b/sca-java-1.x/tags/0.99-incubating/itest/conversations/pom.xml new file mode 100644 index 0000000000..d869ae5650 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/pom.xml @@ -0,0 +1,45 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-itest + 0.99-incubating + ../pom.xml + + itest-conversations + Apache Tuscany SCA Conversations Integration Tests + + + + org.apache.tuscany.sca + tuscany-host-embedded + 0.99-incubating + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 0.99-incubating + runtime + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalCallback.java b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalCallback.java new file mode 100644 index 0000000000..640ec22a4f --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalCallback.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.conversational; + +import org.osoa.sca.annotations.Conversational; +import org.osoa.sca.annotations.EndsConversation; +import org.osoa.sca.annotations.Remotable; + + +/** + * The callback interface used when testing caonversational callbacks + * + * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $ + */ +@Remotable +@Conversational +public interface ConversationalCallback { + + public void init(); + + public void destroy(); + + public void initializeCount(int count); + + public void incrementCount(); + + public int retrieveCount(); + + public void businessException() throws Exception; + + @EndsConversation + public String endConversation(); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalClient.java b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalClient.java new file mode 100644 index 0000000000..dbe51bcbea --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalClient.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.conversational; + +import org.osoa.sca.annotations.Remotable; + +/** + * The client for the conversational itest. Is implemented by clients + * offering both stateless and stateful callbacks + * + * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $ + */ + +@Remotable +public interface ConversationalClient { + + public int runConversationFromInjectedReference(); + public int runConversationFromServiceReference(); + public int runConversationWithUserDefinedConversationId(); + public String runConversationCheckUserDefinedConversationId(); + public int runConversationCheckingScope(); + public int runConversationWithCallback(); + public int runConversationHavingPassedReference(); + public String runConversationBusinessException(); + public String runConversationBusinessExceptionCallback(); + public int runConversationCallingEndedConversation(); + public int runConversationCallingEndedConversationCallback(); + public int runConversationAgeTimeout(); + public int runConversationIdleTimeout(); + public int runConversationPrincipleError(); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalReferenceClient.java b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalReferenceClient.java new file mode 100644 index 0000000000..8f008fa711 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalReferenceClient.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.conversational; + +import org.osoa.sca.CallableReference; +import org.osoa.sca.annotations.Remotable; + +/** + * The client that calls into an existing conversation by accepting + * a reference to that conversation + * + * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $ + */ + +@Remotable +public interface ConversationalReferenceClient { + + public void incrementCount(CallableReference conversationalService); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalService.java b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalService.java new file mode 100644 index 0000000000..546382cfd1 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/ConversationalService.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.conversational; + +import org.osoa.sca.annotations.Callback; +import org.osoa.sca.annotations.Conversational; +import org.osoa.sca.annotations.EndsConversation; +import org.osoa.sca.annotations.Remotable; + + +/** + * The service interface used when testing conversations + * + * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $ + */ +@Remotable +@Conversational +@Callback(ConversationalCallback.class) +public interface ConversationalService { + + public void init(); + + public void destroy(); + + public void initializeCount(int count); + + public void incrementCount(); + + public int retrieveCount(); + + public void businessException() throws Exception; + + public void initializeCountCallback(int count); + + public void incrementCountCallback(); + + public int retrieveCountCallback(); + + public void businessExceptionCallback() throws Exception; + + @EndsConversation + public String endConversation(); + + public String endConversationCallback(); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationAgeComponentImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationAgeComponentImpl.java new file mode 100644 index 0000000000..9deef312ac --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationAgeComponentImpl.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.conversational.impl; + +import org.apache.tuscany.sca.itest.conversational.ConversationalService; +import org.osoa.sca.annotations.ConversationAttributes; +import org.osoa.sca.annotations.Scope; +import org.osoa.sca.annotations.Service; + +@Service(ConversationalService.class) +@Scope("CONVERSATION") +@ConversationAttributes(maxAge="1 seconds") +public class ConversationAgeComponentImpl implements ConversationalService { + + private int count; + + public void businessException() throws Exception { + } + + public void businessExceptionCallback() throws Exception { + } + + public void destroy() { + } + + public String endConversation() { + return null; + } + + public String endConversationCallback() { + return null; + } + + public void incrementCount() { + } + + public void incrementCountCallback() { + } + + public void init() { + } + + public void initializeCount(int count) { + this.count = count; + } + + public void initializeCountCallback(int count) { + } + + public int retrieveCount() { + return count; + } + + public int retrieveCountCallback() { + return 0; + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdComponentImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdComponentImpl.java new file mode 100644 index 0000000000..1196b6ac0d --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdComponentImpl.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.conversational.impl; + +import org.osoa.sca.annotations.ConversationID; +import org.osoa.sca.annotations.Scope; +import org.osoa.sca.annotations.Service; + +@Service(ConversationIdService.class) +@Scope("CONVERSATION") +public class ConversationIdComponentImpl implements ConversationIdService { + + @ConversationID + public String cid; + + private String setterCid; + + public String getCIDField() { + return cid; + } + public String getCIDSetter() { + return setterCid; + } + + + @ConversationID + public void setCID(String cid) { + this.setterCid = cid; + } +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdService.java b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdService.java new file mode 100644 index 0000000000..11d5ea186b --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationIdService.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.conversational.impl; + +import org.osoa.sca.annotations.Conversational; + +@Conversational +public interface ConversationIdService { + + String getCIDField(); + String getCIDSetter(); +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationMaxIdleComponentImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationMaxIdleComponentImpl.java new file mode 100644 index 0000000000..1272c7ab7f --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationMaxIdleComponentImpl.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.conversational.impl; + +import org.apache.tuscany.sca.itest.conversational.ConversationalService; +import org.osoa.sca.annotations.ConversationAttributes; +import org.osoa.sca.annotations.Scope; +import org.osoa.sca.annotations.Service; + +@Service(ConversationalService.class) +@Scope("CONVERSATION") +@ConversationAttributes(maxIdleTime="1 seconds") +public class ConversationMaxIdleComponentImpl implements ConversationalService { + + private int count; + + public void businessException() throws Exception { + } + + public void businessExceptionCallback() throws Exception { + } + + public void destroy() { + } + + public String endConversation() { + return null; + } + + public String endConversationCallback() { + return null; + } + + public void incrementCount() { + } + + public void incrementCountCallback() { + } + + public void init() { + } + + public void initializeCount(int count) { + this.count = count; + } + + public void initializeCountCallback(int count) { + } + + public int retrieveCount() { + return count; + } + + public int retrieveCountCallback() { + return 0; + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalClientStatefulImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalClientStatefulImpl.java new file mode 100644 index 0000000000..4e2c721040 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalClientStatefulImpl.java @@ -0,0 +1,249 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest.conversational.impl; + +import org.apache.tuscany.sca.itest.conversational.ConversationalCallback; +import org.apache.tuscany.sca.itest.conversational.ConversationalClient; +import org.apache.tuscany.sca.itest.conversational.ConversationalReferenceClient; +import org.apache.tuscany.sca.itest.conversational.ConversationalService; +import org.osoa.sca.ComponentContext; +import org.osoa.sca.ServiceReference; +import org.osoa.sca.annotations.Context; +import org.osoa.sca.annotations.ConversationAttributes; +import org.osoa.sca.annotations.Destroy; +import org.osoa.sca.annotations.Init; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Scope; +import org.osoa.sca.annotations.Service; + +/** + * The client for the conversational itest which presents a stateful + * callback interface + * + * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $ + */ + +@Service(interfaces={ConversationalClient.class}) +@Scope("CONVERSATION") +@ConversationAttributes(maxAge="10 minutes", + maxIdleTime="5 minutes", + singlePrincipal=false) +public class ConversationalClientStatefulImpl implements ConversationalClient, ConversationalCallback { + + @Context + protected ComponentContext componentContext; + + @Reference + protected ConversationalService conversationalService; + + @Reference + protected ConversationalReferenceClient conversationalReferenceClient; + + private int clientCount = 0; + private int callbackCount = 0; + + + // a static member variable that records the number of times this service is called + public static StringBuffer calls = new StringBuffer(); + + // From ConversationalClient + public int runConversationFromInjectedReference(){ + calls.append("runConversationFromInjectedReference,"); + conversationalService.initializeCount(1); + conversationalService.incrementCount(); + clientCount = conversationalService.retrieveCount(); + conversationalService.endConversation(); + + return clientCount; + } + public int runConversationFromServiceReference(){ + calls.append("runConversationFromServiceReference,"); + ServiceReference serviceReference = componentContext.getServiceReference(ConversationalService.class, + "conversationalService"); + ConversationalService callableReference = serviceReference.getService(); + + callableReference.initializeCount(1); + callableReference.incrementCount(); + clientCount = callableReference.retrieveCount(); + callableReference.endConversation(); + + serviceReference.getConversation().end(); + + return clientCount; + } + public int runConversationWithUserDefinedConversationId(){ + calls.append("runConversationWithUserDefinedConversationId,"); + ServiceReference serviceReference = componentContext.getServiceReference(ConversationalService.class, + "conversationalService"); + serviceReference.setConversationID("MyConversation1"); + + ConversationalService callableReference = serviceReference.getService(); + + callableReference.initializeCount(1); + callableReference.incrementCount(); + clientCount = callableReference.retrieveCount(); + callableReference.endConversation(); + + serviceReference.getConversation().end(); + + return clientCount; + } + public String runConversationCheckUserDefinedConversationId(){ + calls.append("runConversationCheckUserDefinedConversationId,"); + ServiceReference serviceReference = componentContext.getServiceReference(ConversationalService.class, + "conversationalService"); + serviceReference.setConversationID("MyConversation2"); + + ConversationalService callableReference = serviceReference.getService(); + + callableReference.initializeCount(1); + callableReference.incrementCount(); + clientCount = callableReference.retrieveCount(); + return callableReference.endConversation(); + + } + public int runConversationCheckingScope(){ + calls.append("runConversationCheckingScope,"); + // run a conversation + return runConversationFromInjectedReference(); + + // test will then use a static method to find out how many times + // init/destroy were called + } + public int runConversationWithCallback(){ + calls.append("runConversationWithCallback,"); + callbackCount = 2; + conversationalService.initializeCountCallback(1); + conversationalService.incrementCountCallback(); + clientCount = conversationalService.retrieveCountCallback(); + conversationalService.endConversationCallback(); + + return clientCount; + } + public int runConversationHavingPassedReference(){ + calls.append("runConversationHavingPassedReference,"); + ServiceReference serviceReference = componentContext.getServiceReference(ConversationalService.class, + "conversationalService"); + ConversationalService callableReference = serviceReference.getService(); + + callableReference.initializeCount(1); + callableReference.incrementCount(); + conversationalReferenceClient.incrementCount(serviceReference); + clientCount = callableReference.retrieveCount(); + callableReference.endConversation(); + + serviceReference.getConversation().end(); + + return clientCount; + } + public String runConversationBusinessException(){ + calls.append("runConversationbusinessException,"); + try { + conversationalService.initializeCount(1); + conversationalService.businessException(); + clientCount = conversationalService.retrieveCount(); + conversationalService.endConversation(); + } catch(Exception ex) { + return ex.getMessage(); + } + + return "No Exception Returned"; + } + + public String runConversationBusinessExceptionCallback(){ + calls.append("runConversationbusinessExceptionCallback,"); + try { + conversationalService.initializeCountCallback(1); + conversationalService.businessExceptionCallback(); + clientCount = conversationalService.retrieveCountCallback(); + conversationalService.endConversationCallback(); + } catch(Exception ex) { + return ex.getMessage(); + } + + return "No Exception Returned"; + } + + public int runConversationCallingEndedConversation(){ + calls.append("runConversationCallingEndedConversation,"); + conversationalService.initializeCount(1); + conversationalService.endConversation(); + return conversationalService.retrieveCount(); + } + + public int runConversationCallingEndedConversationCallback(){ + calls.append("runConversationCallingEndedConversationCallback,"); + conversationalService.initializeCountCallback(1); + conversationalService.endConversationCallback(); + return conversationalService.retrieveCountCallback(); + } + + public int runConversationAgeTimeout(){ + calls.append("runConversationAgeTimeout,"); + // done in other testing + return clientCount; + } + public int runConversationIdleTimeout(){ + calls.append("runConversationIdleTimeout,"); + // done in other testing + return clientCount; + } + public int runConversationPrincipleError(){ + calls.append("runConversationPrincipleError,"); + // TODO - when policy framework is done + return clientCount; + } + + + // From ConversationalCallback + @Init + public void init(){ + calls.append("init,"); + } + + @Destroy + public void destroy(){ + calls.append("destroy,"); + } + + public void initializeCount(int count){ + calls.append("initializeCount,"); + callbackCount += count; + } + + public void incrementCount(){ + calls.append("incrementCount,"); + callbackCount++; + } + + public int retrieveCount(){ + calls.append("retrieveCount,"); + return callbackCount; + } + + public void businessException() throws Exception { + throw new Exception("Business Exception"); + } + + public String endConversation(){ + calls.append("endConversation,"); + return null; + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalClientStatelessImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalClientStatelessImpl.java new file mode 100644 index 0000000000..1470c699c0 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalClientStatelessImpl.java @@ -0,0 +1,243 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest.conversational.impl; + +import org.apache.tuscany.sca.itest.conversational.ConversationalCallback; +import org.apache.tuscany.sca.itest.conversational.ConversationalClient; +import org.apache.tuscany.sca.itest.conversational.ConversationalReferenceClient; +import org.apache.tuscany.sca.itest.conversational.ConversationalService; +import org.osoa.sca.ComponentContext; +import org.osoa.sca.ServiceReference; +import org.osoa.sca.annotations.Context; +import org.osoa.sca.annotations.Destroy; +import org.osoa.sca.annotations.Init; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +/** + * The client for the conversational itest which presents a stateful + * callback interface + * + * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $ + */ + +@Service(interfaces={ConversationalClient.class}) +public class ConversationalClientStatelessImpl implements ConversationalClient, ConversationalCallback { + + @Context + protected ComponentContext componentContext; + + @Reference + protected ConversationalService conversationalService; + + @Reference + protected ConversationalReferenceClient conversationalReferenceClient; + + private int clientCount = 0; + private int callbackCount = 0; + + // a static member variable that records the number of times this service is called + public static StringBuffer calls = new StringBuffer(); + + // From ConversationalClient + public int runConversationFromInjectedReference(){ + calls.append("runConversationFromInjectedReference,"); + conversationalService.initializeCount(1); + conversationalService.incrementCount(); + clientCount = conversationalService.retrieveCount(); + conversationalService.endConversation(); + + return clientCount; + } + public int runConversationFromServiceReference(){ + calls.append("runConversationFromServiceReference,"); + ServiceReference serviceReference = componentContext.getServiceReference(ConversationalService.class, + "conversationalService"); + ConversationalService callableReference = serviceReference.getService(); + + callableReference.initializeCount(1); + callableReference.incrementCount(); + clientCount = callableReference.retrieveCount(); + callableReference.endConversation(); + + serviceReference.getConversation().end(); + + return clientCount; + } + public int runConversationWithUserDefinedConversationId(){ + calls.append("runConversationWithUserDefinedConversationId,"); + ServiceReference serviceReference = componentContext.getServiceReference(ConversationalService.class, + "conversationalService"); + ConversationalService callableReference = serviceReference.getService(); + + callableReference.initializeCount(1); + callableReference.incrementCount(); + clientCount = callableReference.retrieveCount(); + callableReference.endConversation(); + + serviceReference.getConversation().end(); + + return clientCount; + } + public String runConversationCheckUserDefinedConversationId(){ + calls.append("runConversationCheckUserDefinedConversationId,"); + ServiceReference serviceReference = componentContext.getServiceReference(ConversationalService.class, + "conversationalService"); + serviceReference.setConversationID("MyConversation2"); + + ConversationalService callableReference = serviceReference.getService(); + + callableReference.initializeCount(1); + callableReference.incrementCount(); + clientCount = callableReference.retrieveCount(); + return callableReference.endConversation(); + + } + public int runConversationCheckingScope(){ + calls.append("runConversationCheckingScope,"); + // run a conversation + return runConversationFromInjectedReference(); + + // test will then use a static method to find out how many times + // init/destroy were called + } + public int runConversationWithCallback(){ + calls.append("runConversationWithCallback,"); + conversationalService.initializeCountCallback(1); + conversationalService.incrementCountCallback(); + clientCount = conversationalService.retrieveCountCallback(); + conversationalService.endConversationCallback(); + + return clientCount; + } + + public int runConversationHavingPassedReference(){ + calls.append("runConversationHavingPassedReference,"); + ServiceReference serviceReference = componentContext.getServiceReference(ConversationalService.class, + "conversationalService"); + ConversationalService callableReference = serviceReference.getService(); + + callableReference.initializeCount(1); + callableReference.incrementCount(); + conversationalReferenceClient.incrementCount(serviceReference); + clientCount = callableReference.retrieveCount(); + callableReference.endConversation(); + + serviceReference.getConversation().end(); + + return clientCount; + } + + public String runConversationBusinessException(){ + calls.append("runConversationbusinessException,"); + try { + conversationalService.initializeCount(1); + conversationalService.businessException(); + clientCount = conversationalService.retrieveCount(); + conversationalService.endConversation(); + } catch(Exception ex) { + return ex.getMessage(); + } + + return "No Exception Returned"; + } + + public String runConversationBusinessExceptionCallback(){ + calls.append("runConversationbusinessExceptionCallback,"); + try { + conversationalService.initializeCountCallback(1); + conversationalService.businessExceptionCallback(); + clientCount = conversationalService.retrieveCountCallback(); + conversationalService.endConversationCallback(); + } catch(Exception ex) { + return ex.getMessage(); + } + + return "No Exception Returned"; + } + + public int runConversationCallingEndedConversation(){ + calls.append("runConversationCallingEndedConversation,"); + conversationalService.initializeCount(1); + conversationalService.endConversation(); + return conversationalService.retrieveCount(); + } + + public int runConversationCallingEndedConversationCallback(){ + calls.append("runConversationCallingEndedConversationCallback,"); + conversationalService.initializeCountCallback(1); + conversationalService.endConversationCallback(); + return conversationalService.retrieveCountCallback(); + } + + public int runConversationAgeTimeout(){ + calls.append("runConversationAgeTimeout,"); + // done in other testing + return clientCount; + } + public int runConversationIdleTimeout(){ + calls.append("runConversationIdleTimeout,"); + // done in other testing + return clientCount; + } + public int runConversationPrincipleError(){ + calls.append("runConversationPrincipleError,"); + // TODO - when policy framework is done + return clientCount; + } + + + // From ConversationalCallback + @Init + public void init(){ + calls.append("init,"); + + } + + @Destroy + public void destroy(){ + calls.append("destroy,"); + + } + + public void initializeCount(int count){ + calls.append("initializeCount,"); + callbackCount = 0; + } + + public void incrementCount(){ + calls.append("incrementCount,"); + callbackCount++; + } + + public int retrieveCount(){ + calls.append("retrieveCount,"); + return callbackCount; + } + + public void businessException() throws Exception { + throw new Exception("Business Exception"); + } + + public String endConversation(){ + calls.append("endConversation,"); + return null; + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalReferenceClientImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalReferenceClientImpl.java new file mode 100644 index 0000000000..8fe7c5b6ba --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalReferenceClientImpl.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.conversational.impl; + +import org.apache.tuscany.sca.itest.conversational.ConversationalReferenceClient; +import org.apache.tuscany.sca.itest.conversational.ConversationalService; +import org.osoa.sca.CallableReference; +import org.osoa.sca.annotations.Service; + +/** + * A client component that accepts a reference to an ongoing conversation + * and takes part in that conversation + * + * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $ + */ + +@Service(interfaces={ConversationalReferenceClient.class}) +public class ConversationalReferenceClientImpl implements ConversationalReferenceClient{ + + public void incrementCount(CallableReference conversationalService){ + ConversationalService callableReference = conversationalService.getService(); + + callableReference.incrementCount(); + } + + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatefulImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatefulImpl.java new file mode 100644 index 0000000000..efcbdff06f --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatefulImpl.java @@ -0,0 +1,117 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest.conversational.impl; + +import org.apache.tuscany.sca.itest.conversational.ConversationalCallback; +import org.apache.tuscany.sca.itest.conversational.ConversationalService; +import org.osoa.sca.annotations.Callback; +import org.osoa.sca.annotations.ConversationAttributes; +import org.osoa.sca.annotations.ConversationID; +import org.osoa.sca.annotations.Destroy; +import org.osoa.sca.annotations.Init; +import org.osoa.sca.annotations.Scope; +import org.osoa.sca.annotations.Service; + + +/** + * The service used when testing stateful conversations + * + * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $ + */ +@Service(ConversationalService.class) +@Scope("CONVERSATION") +@ConversationAttributes(maxAge="10 minutes", + maxIdleTime="5 minutes", + singlePrincipal=false) +public class ConversationalServiceStatefulImpl implements ConversationalService { + + @ConversationID + protected String conversationId; + + @Callback + protected ConversationalCallback conversationalCallback; + + // local count - accumulates during the conversation + private int count = 0; + + // a static member variable that records the number of times this service is called + public static StringBuffer calls = new StringBuffer(); + + @Init + public void init(){ + calls.append("init,"); + } + + @Destroy + public void destroy(){ + calls.append("destroy,"); + } + + public void initializeCount(int count){ + calls.append("initializeCount,"); + this.count = count; + } + + public void incrementCount(){ + calls.append("incrementCount,"); + count++; + } + + public int retrieveCount(){ + calls.append("retrieveCount,"); + return count; + } + + public void businessException() throws Exception { + throw new Exception("Business Exception"); + } + + public void initializeCountCallback(int count){ + calls.append("initializeCountCallback,"); + this.count = count; + conversationalCallback.initializeCount(count); + } + + public void incrementCountCallback(){ + calls.append("incrementCountCallback,"); + count++; + conversationalCallback.incrementCount(); + } + + public int retrieveCountCallback(){ + calls.append("retrieveCountCallback,"); + return conversationalCallback.retrieveCount(); + } + + public void businessExceptionCallback() throws Exception { + calls.append("businessExceptionCallback,"); + conversationalCallback.businessException(); + } + + public String endConversation(){ + calls.append("endConversation,"); + count = 0; + return conversationId; + } + + public String endConversationCallback(){ + calls.append("endConversationCallback,"); + return conversationalCallback.endConversation(); + } +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatelessImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatelessImpl.java new file mode 100644 index 0000000000..dca0596b87 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatelessImpl.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 org.apache.tuscany.sca.itest.conversational.impl; + +import java.util.HashMap; + +import org.apache.tuscany.sca.itest.conversational.ConversationalCallback; +import org.apache.tuscany.sca.itest.conversational.ConversationalService; +import org.osoa.sca.annotations.Callback; +import org.osoa.sca.annotations.ConversationID; +import org.osoa.sca.annotations.Destroy; +import org.osoa.sca.annotations.Init; +import org.osoa.sca.annotations.Service; + + +/** + * The service used when testing stateful conversations + * + * @version $Rev: 537240 $ $Date: 2007-05-11 18:35:03 +0100 (Fri, 11 May 2007) $ + */ +@Service(ConversationalService.class) +public class ConversationalServiceStatelessImpl implements ConversationalService { + + @ConversationID + protected String conversationId; + + @Callback + protected ConversationalCallback conversationalCallback; + + // static area in which to hold conversational data + private static HashMap conversationalState = new HashMap(); + + // a static member variable that records the number of times this service is called + public static StringBuffer calls = new StringBuffer(); + + @Init + public void init(){ + calls.append("init,"); + } + + @Destroy + public void destroy(){ + calls.append("destroy,"); + } + + public void initializeCount(int count){ + calls.append("initializeCount,"); + Integer conversationalCount = new Integer(count); + conversationalState.put(conversationId, conversationalCount); + } + + public void incrementCount(){ + calls.append("incrementCount,"); + Integer conversationalCount = conversationalState.get(conversationId); + conversationalCount++; + conversationalState.put(conversationId, conversationalCount); + } + + public int retrieveCount(){ + calls.append("retrieveCount,"); + Integer count = conversationalState.get(conversationId); + if (count != null){ + return count.intValue(); + } else { + return -999; + } + } + + public void businessException() throws Exception { + throw new Exception("Business Exception"); + } + + public void initializeCountCallback(int count){ + calls.append("initializeCountCallback,"); + initializeCount(count); + conversationalCallback.initializeCount(count); + } + + public void incrementCountCallback(){ + calls.append("incrementCountCallback,"); + incrementCount(); + conversationalCallback.incrementCount(); + } + + public int retrieveCountCallback(){ + calls.append("retrieveCountCallback,"); + return conversationalCallback.retrieveCount(); + } + + public void businessExceptionCallback() throws Exception { + calls.append("businessExceptionCallback,"); + conversationalCallback.businessException(); + } + + public String endConversation(){ + calls.append("endConversation,"); + conversationalState.remove(conversationId); + return conversationId; + } + + public String endConversationCallback(){ + calls.append("endConversationCallback,"); + return conversationalCallback.endConversation(); + } +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatelessScope.java b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatelessScope.java new file mode 100644 index 0000000000..b1332833bb --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/itest/conversational/impl/ConversationalServiceStatelessScope.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.itest.conversational.impl; + +import java.util.HashMap; +import java.util.Map; + +import org.apache.tuscany.sca.itest.conversational.ConversationalService; +import org.osoa.sca.annotations.ConversationID; +import org.osoa.sca.annotations.Service; + +@Service(ConversationalService.class) +public class ConversationalServiceStatelessScope implements ConversationalService { + + @ConversationID + protected String cid; + + static Map state = new HashMap(); + + public void destroy() { + // TODO Auto-generated method stub + + } + + public String endConversation() { + state.remove(cid); + return cid; + } + + public String endConversationCallback() { + // TODO Auto-generated method stub + return null; + + } + + public void incrementCount() { + state.put(cid, Integer.valueOf(state.get(cid)+1)); + } + + public void businessException() throws Exception { + throw new Exception("Business Exception"); + } + + public void incrementCountCallback() { + // TODO Auto-generated method stub + + } + + public void init() { + // TODO Auto-generated method stub + + } + + public void initializeCount(int count) { + state.put(cid, Integer.valueOf(count)); + } + + public void initializeCountCallback(int count) { + // TODO Auto-generated method stub + + } + + public void businessExceptionCallback() throws Exception { + throw new Exception("Business Exception"); + } + + public int retrieveCount() { + return state.get(cid); + } + + public int retrieveCountCallback() { + // TODO Auto-generated method stub + return 0; + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/AnotherService.java b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/AnotherService.java new file mode 100644 index 0000000000..90c674c6ac --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/AnotherService.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.osoa.sca.ServiceReference; +import org.osoa.sca.annotations.Conversational; +import org.osoa.sca.annotations.Remotable; + +@Remotable +@Conversational +/** + * + */ +public interface AnotherService { + + public void setService(ServiceReference aServiceReference); + public void add(int anInt); + public int getCount(); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/AnotherServiceImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/AnotherServiceImpl.java new file mode 100644 index 0000000000..027109787a --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/AnotherServiceImpl.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.test; + +import junit.framework.Assert; + +import org.osoa.sca.ServiceReference; +import org.osoa.sca.annotations.Scope; +import org.osoa.sca.annotations.Service; + +@Service(AnotherService.class) +@Scope("CONVERSATION") + +public class AnotherServiceImpl implements AnotherService { + + // This is a simple pass-thru service used to test propogation + // of ServiceReference and maintenance of Session state. + + private ServiceReference aServiceReference; + + public void add(int anInt) { + + Assert.assertNotNull("AnotherServiceImpl - add ", aServiceReference); + ((ConversationsService) aServiceReference).add(anInt); + + } + + + public void initializeCount() { + + Assert.assertNotNull("AnotherServiceImpl - initializeCount ", aServiceReference); + ((ConversationsService) aServiceReference).initializeCount(); + + } + + + public void setService(ServiceReference aRef) { + + Assert.assertNotNull("AnotherServiceImpl - setService ", aRef); + aServiceReference = aRef; + + } + + + public int getCount() { + + Assert.assertNotNull("AnotherServiceImpl - getCount ", aServiceReference); + return ((ConversationsService) aServiceReference).getLocalCount(); + } + + +} + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsCallback.java b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsCallback.java new file mode 100644 index 0000000000..18e935e089 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsCallback.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; + +import org.osoa.sca.annotations.Conversational; + +@Conversational +/** + * + * + */ +public interface ConversationsCallback { + + public void callBackMessage(String aString); + public void callBackIncrement(String aString); + public void callBackEndSession(); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClient.java b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClient.java new file mode 100644 index 0000000000..ff677db74d --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClient.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.test; + +import org.osoa.sca.annotations.Conversational; +import org.osoa.sca.annotations.Remotable; + +@Remotable +@Conversational +public interface ConversationsClient { + + public void run(); + public int count(); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClient2.java b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClient2.java new file mode 100644 index 0000000000..389b1f4d93 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClient2.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.osoa.sca.annotations.Conversational; +import org.osoa.sca.annotations.Remotable; + +@Remotable +@Conversational +public interface ConversationsClient2 { + public String getDateTime(); + + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClientImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClientImpl.java new file mode 100644 index 0000000000..54a437e66a --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClientImpl.java @@ -0,0 +1,496 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * 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.io.File; +import java.text.DateFormat; + +import junit.framework.Assert; + +import org.osoa.sca.ComponentContext; +import org.osoa.sca.ConversationEndedException; +import org.osoa.sca.ServiceReference; +import org.osoa.sca.annotations.Context; +import org.osoa.sca.annotations.ConversationAttributes; +import org.osoa.sca.annotations.ConversationID; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Scope; +import org.osoa.sca.annotations.Service; + +@Service(interfaces={ConversationsClient.class,ConversationsClient2.class}) + + +@Scope("CONVERSATION") +@ConversationAttributes(maxIdleTime="10 minutes", + singlePrincipal=false) + + +public class ConversationsClientImpl implements ConversationsClient, ConversationsClient2, ConversationsCallback { + + @Reference + protected ConversationsService aService; + @Reference + protected AnotherService anotherService; + @Reference + protected ConversationsLifeCycleService aLifeCycleService; + @Context + protected ComponentContext myContext; + @ConversationID + protected String conversationID; + + private Object monitor = new Object(); + private int count=0; + private String message; + private String initialState; + private int initialCount = 56; + private String dateTime; + private final static String markerFileName = "target/testConversations_test3_marker"; + + public ConversationsClientImpl() { + System.out.println("xxxxxxxxxx"); + } + + public void run() { + + // This tests various aspects of session lifecycle and maintenance of session state. + // None of these test are working due to various issues. + + /* test0() + This test verifies annotations and API's for ConversationID. + */ + test0(); // - Tuscany-1001. + + /* test1() + Test stateful callbacks. Verify that the client�s state is maintained throughout the execution of + all callback methods. + */ + test1(); // This test is working for MODULE scope. Cant claim succcess because it needs Conversation scope. + + /* test2() + Test each method of starting a session. Test @Init. + */ + test2(); // Tuscany-965, Tuscany-1001 + + /* test3() + Test each method of ending a session. Test @Destroy. + */ + test3(); // Tuscany-965, Tuscany-1001 + + /* test4() + Pass an existing service reference with an active session to another service. Verify the session is maintained + */ + test4(); // Tuscany-964, Tuscant-1001 + + /* test5() + Call the createServiceReferenceForSession() API to get a service reference for the active session. + Pass the service reference to another service. Verify the session is maintained. + */ + test5(); + + /* test6() + * Allow a session to timeout. + */ + test6(); // Tuscany-965, Tuscany-1001 + + + return; + } + + private void test0() + { + + // Verify that conversationID was injected. + Assert.assertNotNull("test0 - conversationID injected", conversationID); + System.out.println("ConversationID: " + conversationID); + + // + // The client may access the ConversationID by calling getConversationID on a Service Reference. + // This also verifies a session was created during injection of this Service Reference. + // + // TODO: this fails as the cid is null as a conversation has not been started yet (which seems expected to me) +// ServiceReference aServiceserviceRef = myContext.getServiceReference(ConversationsService.class, "aService"); +// System.out.println("aServices cid: " + aServiceserviceRef.getConversationID()); +// Assert.assertNotNull("test0 - ConversationID from service reference", aServiceserviceRef.getConversationID()); + + //FIXME Port to the 1.0 spec API + //Object aLifeCycleServicesSessionID =((ServiceReference)aLifeCycleService).getSessionID(); + //Assert.assertNotNull("test0 - ConversationID from LifeCycleService service reference", aLifeCycleServicesSessionID); + + // This will verify the @Init() is working for a session created during injection. See test2(). + aLifeCycleService.knockKnock("Hello"); + + } + + private void test1() + { + + // + // This test verifies that the state of the client is preserved across method calls. Each + // call to the service results in 2 callbacks. One to increment a count and the other to set a string. + // At the end of the test the count should equal 5 and the string should be set. Also the original strings + // values should be preserved. + // + // + initialState = "Initial State"; + + int numCalls = 0; + + for(int i=0; i < 10; i++) + { + aService.knockKnock("Knock Knock " + ++numCalls); + } + + // I want to drive multiple callbacks and then give them time to complete. Don't want to + // force serialization. After 20 seconds check the assertions. + + synchronized(monitor) + { + try + { + monitor.wait(2000L); + } + catch (Exception ex) + {ex.printStackTrace();} + } + + // Here we test for the expected state of several different variables. State needs to be maintained + // across method calls to the service. If the same client instance is used then the state should match + // the following assertions. + + // instance variable count should equal the number of calls to the backend service. count is incremented + // during callback processing. + Assert.assertEquals("Conversations - Test1 count", numCalls, count); + // The returned message should be like the following. + Assert.assertEquals("Conversations - Test1 message", true, message.startsWith("Who's There")); + // any initial state set prior to running the callbacks should be maintained. + Assert.assertEquals("Conversations - Test1 initialState", "Initial State", initialState); + Assert.assertEquals("Conversations - Test1 initialCount", 56, initialCount); + + return; + + } + + private void test2() + { + + // Verify the various methods to create a new Session. + // Sesssions can be started: + // + // 1) When a service reference is injected into a client. This is verified in test0(). + // 2) By the client calling newSession() API with and without a ConversationID. + // + // Verify init() is called prior to any business methods. This is performed in the Service when any + // business methos is called. + + Assert.assertNotNull("current composite context",myContext); + + // This tests creating a conversational session. And that @Init is run prior to business method. + ServiceReference aServRef = null; + //FIXME Port to the 1.0 spec API + //aServRef = myContext.newSession("ConversationsLifeCycleService"); +// Assert.assertNotNull("Conversations - Test2 Service Reference 1 not returned", aServRef); + + //FIXME Port to the 1.0 spec API + //Get the session ID. + //Object aConversationID = aServRef.getSessionID(); + ConversationsLifeCycleService aConversationsLifeCycleService = (ConversationsLifeCycleService) aServRef; + aConversationsLifeCycleService.knockKnock("Hello"); + + //Create a new session this time specifying a session ID. Verify the seesion id is what was specified. + //FIXME Port to the 1.0 spec API + //aServRef = myContext.newSession("ConversationsLifeCycleService","Test2-12345"); + Assert.assertNotNull("Conversations - Test2 Service Reference 2 not returned", aServRef); + //FIXME Port to the 1.0 spec API + //Get the session ID. + //Object aConversationID2 = aServRef.getSessionID(); + //Assert.assertEquals("Conversations - Test2 Session not created with specified ConversationID", "Test2-12345", aConversationID2); + aConversationsLifeCycleService = (ConversationsLifeCycleService) aServRef; + aConversationsLifeCycleService.knockKnock("Hello"); + + //FIXME Port to the 1.0 spec API + //Assert.assertNotSame("Conversations - Test2 sessions are not different", aConversationID, aConversationID2); + + } + + private void test3() + { + + // Note: The @EndSesion and @EndsConversation anotations are not implemented. + // So #1 an #2 cannot be done. + + // + // Verify the various methods to end a session. + // Sesssions can be ended: + // + // 1) Server operation annotated with @EndsConversation. + // 2) Server operation calls an @EndSession annotated callback method. + // 3) Servers conversation lifetime times out. This is test6() so its not implimented in the test3 method. + // 4) The client calls ServiceReference.endSession(); + // + // Verify @Destroy annotated method get called after completion of the business + // method that called the endSession. + // + + ConversationsLifeCycleService aConversationsLifeCycleService; +//FIXME Port to the 1.0 spec API +// Object aConversationID; + Assert.assertNotNull("current composite context",myContext); + ServiceReference aServRef; + this.removeMarkerFile(); + + // + // test3 variation #1 - Cannot be done annotation not implimented yet. 12/15/2006 + // + + //FIXME Port to the 1.0 spec API + //aServRef = myContext.newSession("ConversationsLifeCycleService"); + aServRef = null; + Assert.assertNotNull("Conversations - Test3-1 Service Reference not returned", aServRef); + + aConversationsLifeCycleService = (ConversationsLifeCycleService) aServRef; + aConversationsLifeCycleService.knockKnock("Hello"); + //FIXME Port to the 1.0 spec API + //aConversationID = aServRef.getSessionID(); + //Assert.assertNotNull("Conversations - Test3-1 ConversationID not found", aConversationID); + + //Call the business method annotated with @EndsConversation. + aConversationsLifeCycleService.endThisSession(); // This should also drive @Destroy method. + + // Verify session has ended. The ConversationID should be null; + //FIXME Port to the 1.0 spec API + //aConversationID = aServRef.getSessionID(); + //Assert.assertNull("Conversations - Test3-1 session not null after endSession()", aConversationID); + + // Verify Destroy was run. The baxckend service creates a marker file when @Destroy annotated method is run. + Assert.assertEquals("Conversations - Test3-1 @Destroy method not invoked", true, this.isMarkerFilePresent()); + this.removeMarkerFile(); + + // + // test3 variation #2 - Cannot be done annotation not implimented yet. 12/15/2006 + // + + //FIXME Port to the 1.0 spec API + //aServRef = myContext.newSession("ConversationsLifeCycleService"); + Assert.assertNotNull("Conversations - Test3-2 Service Reference not returned", aServRef); + + aConversationsLifeCycleService = (ConversationsLifeCycleService) aServRef; + aConversationsLifeCycleService.knockKnock("Hello"); + //FIXME Port to the 1.0 spec API + //aConversationID = aServRef.getSessionID(); + //Assert.assertNotNull("Conversations - Test3-2 ConversationID not found", aConversationID); + + //Call the business method that will invoke my @EndSession callback method. + aConversationsLifeCycleService.endThisSessionUsingCallback(); // This should also drive @Destroy method. + + // Verify session has ended. The ConversationID should be null; + //FIXME Port to the 1.0 spec API + //aConversationID = aServRef.getSessionID(); + //Assert.assertNull("Conversations - Test3-2 session not null after endSession()", aConversationID); + + // Verify Destroy was run. The baxckend service creates a marker file when @Destroy annotated method is run. + Assert.assertEquals("Conversations - Test3-2 @Destroy method not invoked", true, this.isMarkerFilePresent()); + this.removeMarkerFile(); + + // + // test3 variation #4 - Client calls endSession() + // + + //FIXME Port to the 1.0 spec API + //aServRef = myContext.newSession("ConversationsLifeCycleService"); + aServRef = null; + Assert.assertNotNull("Conversations - Test3-4 Service Reference not returned", aServRef); + + aConversationsLifeCycleService = (ConversationsLifeCycleService) aServRef; + aConversationsLifeCycleService.knockKnock("Hello"); + //FIXME Port to the 1.0 spec API + //aConversationID = aServRef.getSessionID(); + //Assert.assertNotNull("Conversations - Test3-4 ConversationID not found", aConversationID); + + //Call the endSession() API on the Service Reference. + //FIXME Port to the 1.0 spec API + //aServRef.endSession(); // This should also drive @Destroy method. + + // Verify session has ended. The ConversationID should be null; + //FIXME Port to the 1.0 spec API + //aConversationID = aServRef.getSessionID(); + //Assert.assertNull("Conversations - Test3-4 session not null after endSession()", aConversationID); + + // Verify Destroy was run. The baxckend service creates a marker file when @Destroy annotated method is run. + Assert.assertEquals("Conversations - Test3-4 @Destroy method not invoked", true, this.isMarkerFilePresent()); + this.removeMarkerFile(); + } + + public void test4() + { + + // + // This test uses the injected active session for the ConversationsService. It starts a conversation + // in this method building up state with a counter. It then passes this reference to another backend service adding + // additional state. It then returns and adds more state using original service and then performs the Assertions. + // + + aService.initializeCount(); + aService.add(1); + anotherService.setService((ServiceReference)aService); + anotherService.add(1); + anotherService.add(1); + aService.add(1); + aService.add(1); + int count = anotherService.getCount(); + + Assert.assertEquals("test4 - ConversationsClientImpl ", 5, count); + + return; + } + + + public void test5() + { + + // The first test verifies that the createServiceReferenceForSession(this) API is functioning. + // This is done in the backend serviced as it needs a single interface defined. The 2nd test + // uses the variant of this API when > 1 interfaces are implemented. + // + // The 2nd test obtains a service reference for myself and passes that reference to a backend service. + // The backend service then invokes the count() method on my service reference. It then returns + // the count that it retrieved. The test then asserts that the count returned from the backend + // service matches the client services internal state. + // + + Assert.assertNotNull("current composite context",myContext); + + boolean result = aService.createServiceReferenceForSelf(); + System.out.println("Laa: returned from createServiceReferenceForSelf() " + result); + Assert.assertEquals("test5 - createServiceReferenceForSelf",true,result); + + count = 6; + int returnCount = 0; + //FIXME Port to the 1.0 spec API + //ServiceReference myServiceReference = myContext.createServiceReferenceForSession(this,"ConversationsClient2"); + ServiceReference myServiceReference = null; + Assert.assertNotNull("test5 - createServiceReferenceForSession - myContext.createServiceReferenceForSession(this,ConversationsClient);", myServiceReference); + returnCount = aService.getCount(myServiceReference); + + Assert.assertEquals("test5 - createServiceReferenceForSession(this,ConversationsClient2)",count,returnCount); + String aRemoteDateTime = aService.getDateTime(myServiceReference); + Assert.assertEquals("test5 - createServiceReferenceForSession(this,ConversationsClient2 - dateTime)", dateTime, aRemoteDateTime); + + return; + } + + public void test6() + { + + // + // Create a session and allow it to timeout and verify that it did. + // Invoking a business method on a service that has timed out should result in + // a SessionEndedException. + // + + Assert.assertNotNull("current composite context",myContext); + + // This tests creating a conversational session. This service has a maxAge="5 seconds". + ServiceReference aServRef; + //FIXME Port to the 1.0 spec API + //aServRef = myContext.newSession("ConversationsLifeCycleService"); + aServRef = null; + Assert.assertNotNull("Conversations - Test6 Service Reference not returned", aServRef); + + // Run a business method. + ConversationsLifeCycleService aConversationsLifeCycleService = (ConversationsLifeCycleService) aServRef; + aConversationsLifeCycleService.knockKnock("Hello"); + + // + // wait 10 seconds so session will time out. + // + try { + Thread.sleep(10000L); + } + catch (InterruptedException ex) + { + ex.printStackTrace(); + } + + // Run a busineess method after timeout period has elapsed. + boolean sessionEnded = false; + try + { + aConversationsLifeCycleService.knockKnock("Hello"); + } + catch (ConversationEndedException sex) + { + sessionEnded = true; + } + + Assert.assertEquals("Conversations - Test6 Session did not timeout ", true, sessionEnded); + + return; + } + + + public synchronized void callBackIncrement(String aString) { + + count++; + System.out.println("Laa: callBackIncrement invoked on client. count = " + count); + + } + + public synchronized void callBackMessage(String aString) { + + message = aString; + System.out.println("Laa: callBackIMessage invoked on client. message = " + message); + + } + + // @EndSession - This is for test3() variation #2. + public void callBackEndSession() { + + System.out.println("Laa: callBackEndSession method invoked on client."); + + } + + public int count() + { + return this.count; + } + + public String getDateTime() { + + dateTime = DateFormat.getDateTimeInstance().toString(); + return dateTime; + + } + + private void removeMarkerFile() + { + // Make sure the marker file is not present before starting the test. + File aFile = new File(markerFileName); + if (aFile.exists()) + aFile.delete(); + } + + private boolean isMarkerFilePresent() + { + File aFile = new File(markerFileName); + return aFile.exists(); + } + + + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsLifeCycleService.java b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsLifeCycleService.java new file mode 100644 index 0000000000..26dfcd9a38 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsLifeCycleService.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.osoa.sca.annotations.Callback; +import org.osoa.sca.annotations.Conversational; +import org.osoa.sca.annotations.Remotable; + +@Remotable +@Callback(ConversationsCallback.class) +@Conversational + +/** + * + */ +public interface ConversationsLifeCycleService { + + public String knockKnock(String aString); + public void endThisSession(); + public void endThisSessionUsingCallback(); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsLifeCycleServiceImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsLifeCycleServiceImpl.java new file mode 100644 index 0000000000..7f38e356f6 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsLifeCycleServiceImpl.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; + +import java.io.File; + +import junit.framework.Assert; + +import org.osoa.sca.annotations.Callback; +import org.osoa.sca.annotations.ConversationAttributes; +import org.osoa.sca.annotations.Destroy; +import org.osoa.sca.annotations.Init; +import org.osoa.sca.annotations.Scope; +import org.osoa.sca.annotations.Service; + +@Service(ConversationsLifeCycleService.class) +@Scope("CONVERSATION") +@ConversationAttributes(maxAge="5 seconds") + +// This is a short-lived conversational service. + +public class ConversationsLifeCycleServiceImpl implements ConversationsLifeCycleService { + + @Callback + protected ConversationsCallback callback; + + private String state = "NOT READY"; + private final static String markerFileName = "target/testConversations_test3_marker"; + + + public String knockKnock(String aString) { + + // Prior to any business methods being invoked the state must have been set to READY using the @Init. + System.out.println("ConversationsLifeCycleServiceImpl.knockKnock - State = " + state); + Assert.assertEquals("ConversationsLifeCycleServiceImpl.knockKnock - not in READY state ", "READY", state); + + return "Who's There!"; + } + + @Init + public void init() + { + state = "READY"; + System.out.println("ConversationsLifeCycleServiceImpl.init()"); + } + + + @Destroy + public void destroy() + { + state = "DESTROYED"; + + File aFile = new File(markerFileName); + try + { + aFile.createNewFile(); + } + catch (Exception ex) + { + System.out.println("Error Creating " + markerFileName); + ex.printStackTrace(); + } + System.out.println("ConversationsLifeCycleServiceImpl.destroy()"); + } + +// @EndsConversation + public void endThisSession() { + //This method will end the current session by annotation. + System.out.println("ConversationsLifeCycleServiceImpl.endThisSession()"); + + } + + public void endThisSessionUsingCallback() { + + //This method will end the current session by a callback method annotated with @EndSession. + callback.callBackEndSession(); + System.out.println("ConversationsLifeCycleServiceImpl.endThisSessionUsingCallback()"); + } + +} + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsService.java b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsService.java new file mode 100644 index 0000000000..f878e22bf8 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsService.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; + +import org.osoa.sca.ServiceReference; +import org.osoa.sca.annotations.Callback; +import org.osoa.sca.annotations.Conversational; +import org.osoa.sca.annotations.Remotable; + +@Remotable +@Callback(ConversationsCallback.class) +@Conversational + +/** + * + */ +public interface ConversationsService { + + public void knockKnock(String aString); + public void add(int anInt); + public void initializeCount(); + public int getCount(ServiceReference aServiceReference); + public int getLocalCount(); + public String getDateTime(ServiceReference aServiceReference); + public boolean createServiceReferenceForSelf(); + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsServiceImpl.java b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsServiceImpl.java new file mode 100644 index 0000000000..45fc68308b --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsServiceImpl.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.apache.tuscany.sca.test; + +import org.osoa.sca.ComponentContext; +import org.osoa.sca.ServiceReference; +import org.osoa.sca.annotations.Callback; +import org.osoa.sca.annotations.Context; +import org.osoa.sca.annotations.Scope; +import org.osoa.sca.annotations.Service; + +@Service(ConversationsService.class) +@Scope("CONVERSATION") + +public class ConversationsServiceImpl implements ConversationsService { + + @Context + protected ComponentContext context; + + @Callback + protected ConversationsCallback callback; + private int count=0; + + public void knockKnock(String aString) { + + try + { + count++; + //System.out.println("ConversationsServiceImpl message received: " + aString); + callback.callBackMessage("Who's There " + count); + callback.callBackIncrement("Add one please"); + //System.out.println("ConversationsServiceImpl responses sent"); + return; + } + catch (Exception ex) + { + ex.printStackTrace(); + } + + } + + public int getCount(ServiceReference aServiceReference) + { + + // + // Invoke a method on the service reference and return back the result. + // + + int count=0; + try + { + count = ((ConversationsClient) aServiceReference).count(); + } + catch (Exception ex) + { + ex.printStackTrace(); + } + return count; + + } + + public int getLocalCount() + { + + // + // Return my localc instance count. This is used for test4. + // + + return count; + + } + + public String getDateTime(ServiceReference aServiceReference) + { + + // + // Invoke a method on the service reference and return back the result. + // + + String dateTime; + dateTime = ((ConversationsClient2) aServiceReference).getDateTime(); + return dateTime; + + } + + public void add(int anInt) { + + count +=anInt; + + } + + public void initializeCount() { + + count =0; + + } + + public boolean createServiceReferenceForSelf() { + + // This is done here because we need to test getting a ServiceReference + // from a component that implements a single interface. The client in this test + // impliments 2 interfaces to test the variant of this that takes interface name as an argumnet. + + boolean aBoolean = false; + + ServiceReference myServiceReference = null; + + try + { + myServiceReference = context.createSelfReference(ConversationsService.class); + System.out.println("Laa: Created Service Reference for Session:" + myServiceReference); + } + catch (Exception ex) + { + ex.printStackTrace(); + } + + + if (myServiceReference != null) + { + aBoolean = true; + System.out.println("Laa: Service Reference is not null"); + } + + return aBoolean; + } + + +} + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/resources/ConversationAge.composite b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/resources/ConversationAge.composite new file mode 100644 index 0000000000..abd1c35ced --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/resources/ConversationAge.composite @@ -0,0 +1,31 @@ + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/resources/ConversationsTest.composite b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/resources/ConversationsTest.composite new file mode 100644 index 0000000000..93b44c260f --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/resources/ConversationsTest.composite @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/resources/conversationId.composite b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/resources/conversationId.composite new file mode 100644 index 0000000000..e61eb08194 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/resources/conversationId.composite @@ -0,0 +1,27 @@ + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/resources/conversational.composite b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/resources/conversational.composite new file mode 100644 index 0000000000..43259f67c3 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/main/resources/conversational.composite @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationIdTestCase.java b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationIdTestCase.java new file mode 100644 index 0000000000..1138d2e1f0 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationIdTestCase.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.conversational; + + +import org.apache.tuscany.sca.host.embedded.SCADomain; +import org.apache.tuscany.sca.itest.conversational.impl.ConversationIdService; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +public class ConversationIdTestCase { + + private SCADomain domain; + + @Before + public void setUp() throws Exception { + domain = SCADomain.newInstance("conversationId.composite"); + + } + + @After + public void tearDown() throws Exception { + if (domain != null) { + domain.close(); + } + } + + @Test + public void testConversationId() { + ConversationIdService service = + domain.getService(ConversationIdService.class, "ConversationIdComponent"); + Assert.assertNotNull(service.getCIDField()); + Assert.assertNotNull(service.getCIDSetter()); + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalAgeTestCase.java b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalAgeTestCase.java new file mode 100644 index 0000000000..d7c6a0ed41 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalAgeTestCase.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.itest.conversational; + +import org.apache.tuscany.sca.host.embedded.SCADomain; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.osoa.sca.ConversationEndedException; + +public class ConversationalAgeTestCase { + + private SCADomain domain; + + @Before + public void setUp() throws Exception { + System.setProperty("org.apache.tuscany.sca.core.scope.ConversationalScopeContainer.ReaperInterval", "2"); + domain = SCADomain.newInstance("ConversationAge.composite"); + + } + + @After + public void tearDown() throws Exception { + System.clearProperty("org.apache.tuscany.sca.core.scope.ConversationalScopeContainer.ReaperInterval"); + if (domain != null) { + domain.close(); + } + } + + @Test + public void testMaxAge() throws InterruptedException { + + ConversationalService conversationalService = + domain.getService(ConversationalService.class, "ConversationAgeComponent"); + + Assert.assertEquals(0, conversationalService.retrieveCount()); + conversationalService.initializeCount(42); + Assert.assertEquals(42, conversationalService.retrieveCount()); + Assert.assertEquals(42, conversationalService.retrieveCount()); + Thread.sleep(3100); + Assert.assertEquals(0, conversationalService.retrieveCount()); + } + + @Test + public void testAgeExpired() throws InterruptedException { + + ConversationalService conversationalService = + domain.getService(ConversationalService.class, "ConversationAgeComponent"); + + Assert.assertEquals(0, conversationalService.retrieveCount()); + conversationalService.initializeCount(42); + Assert.assertEquals(42, conversationalService.retrieveCount()); + Assert.assertEquals(42, conversationalService.retrieveCount()); + Thread.sleep(1100); + try { + Assert.assertEquals(0, conversationalService.retrieveCount()); + Assert.fail(); + } catch (ConversationEndedException e) { + // expected + } + } + + @Test + public void testMaxIdle() throws InterruptedException { + + ConversationalService conversationalService = + domain.getService(ConversationalService.class, "ConversationIdleComponent"); + + Assert.assertEquals(0, conversationalService.retrieveCount()); + conversationalService.initializeCount(42); + Assert.assertEquals(42, conversationalService.retrieveCount()); + Assert.assertEquals(42, conversationalService.retrieveCount()); + Thread.sleep(3100); + Assert.assertEquals(0, conversationalService.retrieveCount()); + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalJ2SETestCase.java b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalJ2SETestCase.java new file mode 100644 index 0000000000..8480e04028 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalJ2SETestCase.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.conversational; + +import org.apache.tuscany.sca.host.embedded.SCADomain; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +public class ConversationalJ2SETestCase { + + private SCADomain domain; + + @Before + public void setUp() throws Exception { + domain = SCADomain.newInstance("conversational.composite"); + + } + + @After + public void tearDown() throws Exception { + if (domain != null) { + domain.close(); + } + } + + @Test + public void testStatefulConversation() { + ConversationalService conversationalService = + domain.getService(ConversationalService.class, "ConversationalServiceStateful"); + + conversationalService.initializeCount(1); + Assert.assertEquals(1, conversationalService.retrieveCount()); + conversationalService.incrementCount(); + Assert.assertEquals(2, conversationalService.retrieveCount()); + conversationalService.endConversation(); + + Assert.assertEquals(0, conversationalService.retrieveCount()); + + conversationalService.initializeCount(4); + Assert.assertEquals(4, conversationalService.retrieveCount()); + conversationalService.incrementCount(); + Assert.assertEquals(5, conversationalService.retrieveCount()); + conversationalService.endConversation(); + + } + + @Test + public void testStatelessConversation() { + ConversationalService conversationalService = + domain.getService(ConversationalService.class, "ConversationalServiceStateless"); + + conversationalService.initializeCount(1); + Assert.assertEquals(1, conversationalService.retrieveCount()); + conversationalService.incrementCount(); + Assert.assertEquals(2, conversationalService.retrieveCount()); + conversationalService.endConversation(); + + conversationalService.initializeCount(4); + Assert.assertEquals(4, conversationalService.retrieveCount()); + conversationalService.incrementCount(); + Assert.assertEquals(5, conversationalService.retrieveCount()); + conversationalService.endConversation(); + + } +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalTestCase.java b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalTestCase.java new file mode 100644 index 0000000000..245f0a5597 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/test/java/org/apache/tuscany/sca/itest/conversational/ConversationalTestCase.java @@ -0,0 +1,322 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.conversational; + +import junit.framework.Assert; + +import org.apache.tuscany.sca.host.embedded.SCADomain; +import org.apache.tuscany.sca.itest.conversational.impl.ConversationalClientStatefulImpl; +import org.apache.tuscany.sca.itest.conversational.impl.ConversationalClientStatelessImpl; +import org.apache.tuscany.sca.itest.conversational.impl.ConversationalServiceStatefulImpl; +import org.apache.tuscany.sca.itest.conversational.impl.ConversationalServiceStatelessImpl; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +public class ConversationalTestCase { + + private SCADomain domain; + private ConversationalClient conversationalStatelessClientStatelessService; + private ConversationalClient conversationalStatelessClientStatefulService; + private ConversationalClient conversationalStatefulClientStatelessService; + private ConversationalClient conversationalStatefulClientStatefulService; + + @Before + public void setUp() throws Exception { + domain = SCADomain.newInstance("conversational.composite"); + + conversationalStatelessClientStatelessService = domain.getService(ConversationalClient.class, + "ConversationalStatelessClientStatelessService"); + + conversationalStatelessClientStatefulService = domain.getService(ConversationalClient.class, + "ConversationalStatelessClientStatefulService"); + + conversationalStatefulClientStatelessService = domain.getService(ConversationalClient.class, + "ConversationalStatefulClientStatelessService"); + + conversationalStatefulClientStatefulService = domain.getService(ConversationalClient.class, + "ConversationalStatefulClientStatefulService"); + + + // reset the place where we record the sequence of calls passing + // through each component instance + ConversationalServiceStatelessImpl.calls = new StringBuffer(); + ConversationalServiceStatefulImpl.calls = new StringBuffer(); + ConversationalClientStatelessImpl.calls = new StringBuffer(); + ConversationalClientStatefulImpl.calls = new StringBuffer(); + + } + + @After + public void tearDown() throws Exception { + domain.close(); + } + + // stateless client stateful service tests + // ======================================= + @Test + public void testStatelessStatefulConversationFromInjectedReference() { + int count = conversationalStatelessClientStatefulService.runConversationFromInjectedReference(); + Assert.assertEquals(2, count); + } + + @Test + public void testStatelessStatefulConversationFromServiceReference() { + int count = conversationalStatelessClientStatefulService.runConversationFromServiceReference(); + Assert.assertEquals(2, count); + } + + @Test + public void testStatelessStatefulConversationWithUserDefinedConversationId() { + int count = conversationalStatelessClientStatefulService.runConversationWithUserDefinedConversationId(); + Assert.assertEquals(2, count); + } + + @Test + public void testStatelessStatefulConversationCheckUserDefinedConversationId() { + String conversationId = conversationalStatelessClientStatefulService.runConversationCheckUserDefinedConversationId(); + Assert.assertEquals("MyConversation2", conversationId); + } + + @Test + public void testStatelessStatefulConversationCheckingScope() { + conversationalStatelessClientStatefulService.runConversationCheckingScope(); + Assert.assertEquals("init,initializeCount,incrementCount,retrieveCount,endConversation,destroy,", + ConversationalServiceStatefulImpl.calls.toString()); + } + + @Test + public void testStatelessStatefulConversationWithCallback() { + int count = conversationalStatelessClientStatefulService.runConversationWithCallback(); + Assert.assertEquals(0, count); + + Assert.assertEquals("init,runConversationWithCallback,init,initializeCount,destroy,init,incrementCount,destroy,init,retrieveCount,destroy,init,endConversation,destroy,destroy,", + ConversationalClientStatelessImpl.calls.toString()); + } + + //@Test + public void testStatelessStatefulConversationHavingPassedReference() { + int count = conversationalStatelessClientStatefulService.runConversationHavingPassedReference(); + Assert.assertEquals(3, count); + } + + @Test + public void testStatelessStatefulConversationBusinessException() { + String message = conversationalStatelessClientStatefulService.runConversationBusinessException(); + Assert.assertEquals("Business Exception", message); + } + + @Test + public void testStatelessStatefulConversationBusinessExceptionCallback() { + String message = conversationalStatelessClientStatefulService.runConversationBusinessExceptionCallback(); + Assert.assertEquals("Business Exception", message); + } + + @Test + public void testStatelessStatefulConversationCallingEndedConversation() { + int count = conversationalStatelessClientStatefulService.runConversationCallingEndedConversation(); + Assert.assertEquals(0, count); + } + + @Test + public void testStatelessStatefulConversationCallingEndedConversationCallback() { + int count = conversationalStatelessClientStatefulService.runConversationCallingEndedConversationCallback(); + Assert.assertEquals(0, count); + } + + // stateless client stateless service tests + // ======================================== + @Test + public void testStatelessStatelessConversationFromInjectedReference() { + int count = conversationalStatelessClientStatelessService.runConversationFromInjectedReference(); + Assert.assertEquals(2, count); + } + + @Test + public void testStatelessStatelessConversationFromServiceReference() { + int count = conversationalStatelessClientStatelessService.runConversationFromServiceReference(); + Assert.assertEquals(2, count); + } + + @Test + public void testStatelessStatelessConversationWithUserDefinedConversationId() { + int count = conversationalStatelessClientStatelessService.runConversationWithUserDefinedConversationId(); + Assert.assertEquals(2, count); + } + @Test + public void testStatelessStatelessConversationCheckUserDefinedConversationId() { + String conversationId = conversationalStatelessClientStatelessService.runConversationCheckUserDefinedConversationId(); + Assert.assertEquals("MyConversation2", conversationId); + } + + @Test + public void testStatelessStatelessConversationCheckingScope() { + conversationalStatelessClientStatelessService.runConversationCheckingScope(); + Assert.assertEquals("init,initializeCount,destroy,init,incrementCount,destroy,init,retrieveCount,destroy,init,endConversation,destroy,", + ConversationalServiceStatelessImpl.calls.toString()); + } + + @Test + public void testStatelessStatelessConversationWithCallback() { + int count = conversationalStatelessClientStatelessService.runConversationWithCallback(); + Assert.assertEquals(0, count); + + Assert.assertEquals("init,runConversationWithCallback,init,initializeCount,destroy,init,incrementCount,destroy,init,retrieveCount,destroy,init,endConversation,destroy,destroy,", + ConversationalClientStatelessImpl.calls.toString()); + } + //@Test + public void testStatelessStatelessConversationHavingPassedReference() { + int count = conversationalStatelessClientStatelessService.runConversationHavingPassedReference(); + Assert.assertEquals(3, count); + } + + @Test + public void testStatelessStatelessConversationCallingEndedConversation() { + int count = conversationalStatelessClientStatelessService.runConversationCallingEndedConversation(); + Assert.assertEquals(-999, count); + } + + @Test + public void testStatelessStatelessConversationCallingEndedConversationCallback() { + int count = conversationalStatelessClientStatelessService.runConversationCallingEndedConversationCallback(); + Assert.assertEquals(0, count); + } + + // stateful client stateful service tests + // ====================================== + @Test + public void testStatefulStatefulConversationFromInjectedReference() { + int count = conversationalStatefulClientStatefulService.runConversationFromInjectedReference(); + Assert.assertEquals(2, count); + } + + @Test + public void testStatefulStatefulConversationFromServiceReference() { + int count = conversationalStatefulClientStatefulService.runConversationFromServiceReference(); + Assert.assertEquals(2, count); + } + + @Test + public void testStatefulStatefulConversationWithUserDefinedConversationId() { + int count = conversationalStatefulClientStatefulService.runConversationWithUserDefinedConversationId(); + Assert.assertEquals(2, count); + } + + @Test + public void testStatefulStatefulConversationCheckUserDefinedConversationId() { + String conversationId = conversationalStatefulClientStatefulService.runConversationCheckUserDefinedConversationId(); + Assert.assertEquals("MyConversation2", conversationId); + } + + @Test + public void testStatefulStatefulConversationCheckingScope() { + conversationalStatefulClientStatefulService.runConversationCheckingScope(); + Assert.assertEquals("init,initializeCount,incrementCount,retrieveCount,endConversation,destroy,", + ConversationalServiceStatefulImpl.calls.toString()); + } + + @Test + public void testStatefulStatefulConversationWithCallback() { + int count = conversationalStatefulClientStatefulService.runConversationWithCallback(); + Assert.assertEquals(4, count); + + Assert.assertEquals("init,runConversationWithCallback,initializeCount,incrementCount,retrieveCount,endConversation,destroy,", + ConversationalClientStatefulImpl.calls.toString()); + } + + //@Test + public void testStatefulStatefulConversationHavingPassedReference() { + int count = conversationalStatefulClientStatefulService.runConversationHavingPassedReference(); + Assert.assertEquals(3, count); + } + + @Test + public void testStatefulStatefulConversationCallingEndedConversation() { + int count = conversationalStatefulClientStatefulService.runConversationCallingEndedConversation(); + Assert.assertEquals(0, count); + } + + @Test + public void testStatefulStatefulConversationCallingEndedConversationCallback() { + int count = conversationalStatefulClientStatefulService.runConversationCallingEndedConversationCallback(); + Assert.assertEquals(0, count); + } + + // stateful client stateless service tests + // ======================================= + @Test + public void testStatefulStatelessConversationFromInjectedReference() { + int count = conversationalStatefulClientStatelessService.runConversationFromInjectedReference(); + Assert.assertEquals(2, count); + } + + @Test + public void testStatefulStatelessConversationFromServiceReference() { + int count = conversationalStatefulClientStatelessService.runConversationFromServiceReference(); + Assert.assertEquals(2, count); + } + + @Test + public void testStatefulStatelessConversationWithUserDefinedConversationId() { + int count = conversationalStatefulClientStatelessService.runConversationWithUserDefinedConversationId(); + Assert.assertEquals(2, count); + } + + @Test + public void testStatefulStatelessConversationCheckUserDefinedConversationId() { + String conversationId = conversationalStatefulClientStatelessService.runConversationCheckUserDefinedConversationId(); + Assert.assertEquals("MyConversation2", conversationId); + } + + @Test + public void testStatefulStatelessConversationCheckingScope() { + conversationalStatefulClientStatelessService.runConversationCheckingScope(); + Assert.assertEquals("init,initializeCount,destroy,init,incrementCount,destroy,init,retrieveCount,destroy,init,endConversation,destroy,", + ConversationalServiceStatelessImpl.calls.toString()); + } + + @Test + public void testStatefulStatelessConversationWithCallback() { + int count = conversationalStatefulClientStatelessService.runConversationWithCallback(); + Assert.assertEquals(4, count); + + Assert.assertEquals("init,runConversationWithCallback,initializeCount,incrementCount,retrieveCount,endConversation,destroy,", + ConversationalClientStatefulImpl.calls.toString()); + } + + //@Test + public void testStatefulStatelessConversationHavingPassedReference() { + int count = conversationalStatefulClientStatelessService.runConversationHavingPassedReference(); + Assert.assertEquals(3, count); + } + + @Test + public void testStatefulStatelessConversationCallingEndedConversation() { + int count = conversationalStatefulClientStatelessService.runConversationCallingEndedConversation(); + Assert.assertEquals(-999, count); + } + + @Test + public void testStatefulStatelessConversationCallingEndedConversationCallback() { + int count = conversationalStatefulClientStatelessService.runConversationCallingEndedConversationCallback(); + Assert.assertEquals(0, count); + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/test/java/org/apache/tuscany/sca/test/ConversationsTestCaseFIXME.java b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/test/java/org/apache/tuscany/sca/test/ConversationsTestCaseFIXME.java new file mode 100644 index 0000000000..fdbb1f9dca --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/conversations/src/test/java/org/apache/tuscany/sca/test/ConversationsTestCaseFIXME.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.test; + +import junit.framework.TestCase; + +import org.apache.tuscany.sca.host.embedded.SCADomain; + +//FIXME Fix this test case +public class ConversationsTestCaseFIXME extends TestCase { + + private SCADomain domain; + private ConversationsClient aConversationsClient; + + public void testConversations() { + aConversationsClient.run(); + } + + @Override + protected void setUp() throws Exception { + domain = SCADomain.newInstance("ConversationsTest.composite"); + + aConversationsClient = + domain.getService(ConversationsClient.class, + "ConversationsClient/ConversationsClient"); + + } + + @Override + protected void tearDown() throws Exception { + domain.close(); + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/pom.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/pom.xml new file mode 100644 index 0000000000..0c528c12a4 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/pom.xml @@ -0,0 +1,120 @@ + + + + + org.apache.tuscany.sca + itest-databindings + 0.99-incubating + + + 4.0.0 + + itest-databindings-common + 0.99-incubating + jar + Apache Tuscany Common elements of Databindings Integration Tests + + + + + true + + java.net + java.net Maven 1.x Repository + http://download.java.net/maven/1 + legacy + + + + + + + true + + java.net + java.net Maven 1.x Repository + http://download.java.net/maven/1 + legacy + + + + + + org.apache.tuscany.sca + tuscany-databinding-sdo + ${pom.version} + compile + + + velocity + velocity + 1.4 + compile + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.0 + + + add-test-source + generate-sources + + add-test-source + + + + target/sdo-source + + + + + + + org.apache.tuscany.sdo + tuscany-sdo-plugin + 1.0-incubating + + + generate-sdo + generate-sources + + + + ${basedir}/src/main/resources/generate/generate.xsd + + + true + true + true + + + generate + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/java/org/apache/tuscany/sca/itest/generate/Generate.java b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/java/org/apache/tuscany/sca/itest/generate/Generate.java new file mode 100644 index 0000000000..73dfebb73c --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/java/org/apache/tuscany/sca/itest/generate/Generate.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.itest.generate; + +import java.io.FileInputStream; +import java.io.FileWriter; +import java.util.List; +import java.util.Properties; + +import org.apache.tuscany.generate.GenerateFactory; +import org.apache.tuscany.generate.GenerateType; +import org.apache.tuscany.generate.TemplateType; +import org.apache.tuscany.sdo.util.SDOUtil; +import org.apache.velocity.VelocityContext; +import org.apache.velocity.app.Velocity; + +import commonj.sdo.helper.HelperContext; +import commonj.sdo.helper.XMLDocument; + +/** + * Generates test files based on the information in a configuration files (generate.xml) + * and a set of velocity templates. The process is + * + * for each template + * for each file + * add a line to pom for code gen + * include the factory into the composite + * for each type + * add client iface method + * add client impl method + * add service iface method + * add service impl method + * add test method + * add wsdl type and method + * + * @version $Rev$ $Date$ + */ +public class Generate { + + /** + * Does all the hard work of running the velocity templates against the + * the list of types to test. Both the list of templates and the list of + * XSD files is held in the configuration file (generate.xsd) which lives in the + * resources/generate directory of the project being generated. + * + * @param projectBuildDir the path to the target dir of the project being generated. + */ + public static void generate(String projectBuildDir) { + System.out.println(">> Building project from dir: " + projectBuildDir); + FileInputStream fis = null; + + try { + // Load the config file into a stream + fis = new FileInputStream(projectBuildDir + "/classes/generate/generate.xml"); + + // Load the stream into SDO + // We are just using SDO as a conveniet way to parse the XML config file + HelperContext scope = SDOUtil.createHelperContext(); + GenerateFactory.INSTANCE.register(scope); + XMLDocument xmlDoc = scope.getXMLHelper().load(fis); + GenerateType generateType = (GenerateType)xmlDoc.getRootObject(); + + // Get the file list. This is the list of XSD that is passed into the + // the velocity templates. Each confiured file holds a list of types + // that the velocity templates expand into appropriate methods and method calls + List fileList = generateType.getInputFile(); + + //Intialise velocity ready to generate the various files + Properties p = new Properties(); + p.setProperty("file.resource.loader.path", projectBuildDir + "/classes/generate"); + Velocity.init(p); + VelocityContext context = new VelocityContext(); + context.put("fileList", fileList); + + List templateList = generateType.getTemplate(); + + // For each velocity template in the template list pass in the XSD file list + for ( Object item: templateList){ + TemplateType template = (TemplateType)item; + context.put("template", template); + String tmp = template.getTemplateName(); + String filename = projectBuildDir + "/" + template.getTemplateTargetDir() + "/" + tmp.substring(0,tmp.length() - 3); + FileWriter fw = new FileWriter(filename); + System.out.println(">> Processing " + template.getTemplateName() + " to " + filename); + Velocity.mergeTemplate(template.getTemplateName(), context, fw ); + fw.flush(); + fw.close(); + } + + } catch (Exception e) { + System.out.println("Exception : " + e.toString()); + e.printStackTrace(); + return; + } + } + + /** + * The mainline + * + * @param args the target directory where project in which files are being generated + */ + public static void main(String[] args) { + Generate gen = new Generate(); + gen.generate(args[0]); + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/generate/DatabindingTestCase.java.vm b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/generate/DatabindingTestCase.java.vm new file mode 100644 index 0000000000..b2346aa973 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/generate/DatabindingTestCase.java.vm @@ -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 $template.getJavaPackage(); + +import junit.framework.TestCase; + +import org.apache.tuscany.sca.host.embedded.SCADomain; +import org.osoa.sca.ComponentContext; +import org.osoa.sca.ServiceReference; + +import ${template.getJavaPackage()}.GreeterService; + +// Data types +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) +import $file.getJavaPackage().$typeInstance.getTypeName(); +import $file.getJavaPackage().$file.getFactory(); +#end +#end + +/** + * Automatically generated test case. Calls the greeter client for a number of + * bindings and a number of data types. + * + * @version $Rev: 511417 $ $Date: 2007-02-25 03:06:42 +0000 (Sun, 25 Feb 2007) $ + */ +public class DatabindingTestCase extends TestCase { + + private SCADomain domain; + private GreeterService greeterClient; + + /** + * Runs before each test method + */ + protected void setUp() throws Exception { + domain = SCADomain.newInstance("greeter.composite"); + super.setUp(); + } + + /** + * Runs after each test method + */ + protected void tearDown() { + domain.close(); + } + + /** + * Finds the SCA component that relates to the protocol being tested. This test + * always connects locally to the client component but the client component will + * connect to the back end component using the appropriate protocol + * + * @param ext the protcol required + */ + private void setUpClient(String ext) throws Exception { + greeterClient = domain.getService(GreeterService.class, ext + "GreeterServiceClient"); + } + + /** + * Invokes the SDO Greet service using web service bindings with SDO payload + */ + public void testWSGreet() throws Exception { + setUpClient("WS"); + greet(); + } + + /** + * Invokes the SDO Greet service using default bindings with SDO payload + */ + public void testDefaultGreet() throws Exception { + setUpClient("Default"); + greet(); + } + + /** + * A generic method which, regarless of which client is connected, sends out a + * series of requrests passing different data types. + */ + public void greet() { +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + // test $typeInstance.getTypeName() + { + $typeInstance.getTypeName() param = null; + $typeInstance.getCreateTypeCode() + $typeInstance.getTypeName() result = greeterClient.greet$typeInstance.getTypeName()(param); + $typeInstance.getResultComparison() + } +#end +#end + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/generate/Greeter.wsdl.vm b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/generate/Greeter.wsdl.vm new file mode 100644 index 0000000000..88616cc997 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/generate/Greeter.wsdl.vm @@ -0,0 +1,103 @@ + + + + + + + +#foreach($file in $fileList) + +#end + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + + + + + + +#end +#end + + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + + + + + + +#end +#end + + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + + + +#end +#end + + + + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + + + + + + + + +#end +#end + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/generate/GreeterService.java.vm b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/generate/GreeterService.java.vm new file mode 100644 index 0000000000..b0e298b823 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/generate/GreeterService.java.vm @@ -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 $template.getJavaPackage(); + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) +import $file.getJavaPackage().$typeInstance.getTypeName(); +#end +#end + +import org.osoa.sca.annotations.Remotable; + +/** + * The automcatically generated interface to the service that reflects data objects + * that are sent to it + * + * @version $Rev: 511417 $ $Date: 2007-02-25 03:06:42 +0000 (Sun, 25 Feb 2007) $ + */ +@Remotable +public interface GreeterService { + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + /** + * Take the provided data object, change it slightly and return it + * + * @param param the data object to be changed and returned + * @return the change data object + */ + $typeInstance.getTypeName() greet$typeInstance.getTypeName()($typeInstance.getTypeName() param); +#end +#end + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/generate/GreeterServiceClient.java.vm b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/generate/GreeterServiceClient.java.vm new file mode 100644 index 0000000000..ee73db6152 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/generate/GreeterServiceClient.java.vm @@ -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 $template.getJavaPackage(); + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) +import $file.getJavaPackage().$typeInstance.getTypeName(); +#end +#end + +import org.osoa.sca.annotations.AllowsPassByReference; + +/** + * GreeterServiceClient + */ +@AllowsPassByReference +public interface GreeterServiceClient { +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + $typeInstance.getTypeName() greet$typeInstance.getTypeName()($typeInstance.getTypeName() param); +#end +#end +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/generate/GreeterServiceClientImpl.java.vm b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/generate/GreeterServiceClientImpl.java.vm new file mode 100644 index 0000000000..57827d27b9 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/generate/GreeterServiceClientImpl.java.vm @@ -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 $template.getJavaPackage(); + +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) +import $file.getJavaPackage().$typeInstance.getTypeName(); +#end +#end + +/** + * The automcatically generated service that simply forwards data objects on to + * the GreeterService and passes back the responses + * + * @version $Rev: 508831 $ $Date: 2007-02-18 00:12:31 +0000 (Sun, 18 Feb 2007) $ + */ +@Service(GreeterService.class) +public class GreeterServiceClientImpl implements GreeterService { + + /** + * the reference the the GreeterService that will + * change each data object slightly and return it + */ + private GreeterService service; + + @Reference + public void setGreeterService(GreeterService service) { + this.service = service; + } +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + /* + * (non-Javadoc) + * + * @see org.apache.tuscany.sca.itest.sdodatabinding.GreeterService#greet$typeInstance.getTypeName()($typeInstance.getTypeName() param) + */ + public $typeInstance.getTypeName() greet$typeInstance.getTypeName()($typeInstance.getTypeName() param) { + return service.greet$typeInstance.getTypeName()(param); + } +#end +#end +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/generate/GreeterServiceImpl.java.vm b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/generate/GreeterServiceImpl.java.vm new file mode 100644 index 0000000000..1fd7509667 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/generate/GreeterServiceImpl.java.vm @@ -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 $template.getJavaPackage(); + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) +import $file.getJavaPackage().$typeInstance.getTypeName(); +#end +#end + +import org.osoa.sca.annotations.Service; + +/** + * The automcatically generated service implementation that reflects data objects + * that are sent to it + * + * @version $Rev: 511417 $ $Date: 2007-02-25 03:06:42 +0000 (Sun, 25 Feb 2007) $ + */ +@Service(GreeterService.class) +public class GreeterServiceImpl implements GreeterService { +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + /** + * Take the provided data object, change it slightly and return it + * + * @param param the data object to be changed and returned + * @return the change data object + */ + public $typeInstance.getTypeName() greet$typeInstance.getTypeName()($typeInstance.getTypeName() param) { + $typeInstance.getModifyTypeCode() + return param; + } +#end +#end +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/generate/generate.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/generate/generate.xsd new file mode 100644 index 0000000000..1fabedf55f --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/generate/generate.xsd @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/wsdl/Dummy.txt b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/wsdl/Dummy.txt new file mode 100644 index 0000000000..8927d725b6 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/wsdl/Dummy.txt @@ -0,0 +1,4 @@ +A dummy file that causes the target/classes/wsdl dir to be created in the generated test project. This is +required because the test generator must run in the process-resource phase, after generate.xml has been copied +into target. The generator needs to write out target/classes/wsdl and will fail the directory isn't there. So +this file just gets unpacked and forces the directory to be created. diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Annotation.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Annotation.xml new file mode 100644 index 0000000000..f1f4346e58 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Annotation.xml @@ -0,0 +1,24 @@ + + + + SimpleTypeWithName + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Annotation.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Annotation.xsd new file mode 100644 index 0000000000..1fae43eb09 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Annotation.xsd @@ -0,0 +1,38 @@ + + + + + + SDO 2.0.1 + + A schema that tests the presence of annotations in schema read by SDO + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Attribute.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Attribute.xml new file mode 100644 index 0000000000..c20c80b658 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Attribute.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Attribute.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Attribute.xsd new file mode 100644 index 0000000000..bd3db2e030 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Attribute.xsd @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeReference.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeReference.xml new file mode 100644 index 0000000000..30e4979dca --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeReference.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeReference.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeReference.xsd new file mode 100644 index 0000000000..e7738dcff7 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeReference.xsd @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithDefaultValue.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithDefaultValue.xml new file mode 100644 index 0000000000..9552421e2d --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithDefaultValue.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithDefaultValue.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithDefaultValue.xsd new file mode 100644 index 0000000000..c7b9655749 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithDefaultValue.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithFixedValue.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithFixedValue.xml new file mode 100644 index 0000000000..5e5e7fbd55 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithFixedValue.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithFixedValue.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithFixedValue.xsd new file mode 100644 index 0000000000..5c455c2ab5 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithFixedValue.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOAliasName.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOAliasName.xml new file mode 100644 index 0000000000..635e851632 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOAliasName.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOAliasName.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOAliasName.xsd new file mode 100644 index 0000000000..004dab4fbb --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOAliasName.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDODataType.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDODataType.xml new file mode 100644 index 0000000000..136092951b --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDODataType.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDODataType.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDODataType.xsd new file mode 100644 index 0000000000..796f08e1cf --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDODataType.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOName.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOName.xml new file mode 100644 index 0000000000..927b94885c --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOName.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOName.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOName.xsd new file mode 100644 index 0000000000..93f83cd0a1 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOName.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertySDOOppositePropertyType.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertySDOOppositePropertyType.xml new file mode 100644 index 0000000000..ea7db70595 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertySDOOppositePropertyType.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertySDOOppositePropertyType.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertySDOOppositePropertyType.xsd new file mode 100644 index 0000000000..c64323e7e1 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertySDOOppositePropertyType.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertyType.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertyType.xml new file mode 100644 index 0000000000..85c7d85fd4 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertyType.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertyType.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertyType.xsd new file mode 100644 index 0000000000..543f276c50 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertyType.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOString.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOString.xml new file mode 100644 index 0000000000..fcd281539b --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOString.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOString.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOString.xsd new file mode 100644 index 0000000000..1610c2b861 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOString.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInAnySimpleType.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInAnySimpleType.xml new file mode 100644 index 0000000000..36a0760a61 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInAnySimpleType.xml @@ -0,0 +1,24 @@ + + + + anySimpleType + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInAnySimpleType.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInAnySimpleType.xsd new file mode 100644 index 0000000000..999b72bb35 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInAnySimpleType.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInAnyType.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInAnyType.xml new file mode 100644 index 0000000000..5849165fe0 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInAnyType.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInAnyType.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInAnyType.xsd new file mode 100644 index 0000000000..71dad561ca --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInAnyType.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInAnyURI.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInAnyURI.xml new file mode 100644 index 0000000000..8acf9376d7 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInAnyURI.xml @@ -0,0 +1,24 @@ + + + + http://tempuri.org + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInAnyURI.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInAnyURI.xsd new file mode 100644 index 0000000000..a49987c352 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInAnyURI.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInBase64Binary.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInBase64Binary.xml new file mode 100644 index 0000000000..a35b6e174a --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInBase64Binary.xml @@ -0,0 +1,24 @@ + + + + ABCDEF + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInBase64Binary.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInBase64Binary.xsd new file mode 100644 index 0000000000..e1995890f9 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInBase64Binary.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInBoolean.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInBoolean.xml new file mode 100644 index 0000000000..91cfce51b8 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInBoolean.xml @@ -0,0 +1,27 @@ + + + + true + false + 1 + 0 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInBoolean.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInBoolean.xsd new file mode 100644 index 0000000000..a2f86ba8c5 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInBoolean.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInByte.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInByte.xml new file mode 100644 index 0000000000..907474cd1b --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInByte.xml @@ -0,0 +1,25 @@ + + + + 127 + -127 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInByte.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInByte.xsd new file mode 100644 index 0000000000..a2f6bcfa77 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInByte.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDate.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDate.xml new file mode 100644 index 0000000000..c5820e1a2e --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDate.xml @@ -0,0 +1,24 @@ + + + + 2001-01-01 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDate.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDate.xsd new file mode 100644 index 0000000000..f4d596bfe3 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDate.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDateTime.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDateTime.xml new file mode 100644 index 0000000000..0debe2fec5 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDateTime.xml @@ -0,0 +1,24 @@ + + + + 2001-12-31T12:00:00 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDateTime.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDateTime.xsd new file mode 100644 index 0000000000..b5bcfdcfd4 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDateTime.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDecimal.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDecimal.xml new file mode 100644 index 0000000000..7f001254cc --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDecimal.xml @@ -0,0 +1,23 @@ + + + + -1.23456789 + 1.23456789 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDecimal.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDecimal.xsd new file mode 100644 index 0000000000..8d4d106f59 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDecimal.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDouble.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDouble.xml new file mode 100644 index 0000000000..f875b9f94d --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDouble.xml @@ -0,0 +1,25 @@ + + + + 0.0 + 12.3E-4 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDouble.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDouble.xsd new file mode 100644 index 0000000000..4c8a39b06c --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDouble.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDuration.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDuration.xml new file mode 100644 index 0000000000..7d343d6dda --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDuration.xml @@ -0,0 +1,24 @@ + + + + P1D + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDuration.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDuration.xsd new file mode 100644 index 0000000000..bb12bc04a9 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInDuration.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInFloat.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInFloat.xml new file mode 100644 index 0000000000..7a81f3b0dd --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInFloat.xml @@ -0,0 +1,24 @@ + + + + 0.0 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInFloat.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInFloat.xsd new file mode 100644 index 0000000000..f0e1c21233 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInFloat.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGDay.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGDay.xml new file mode 100644 index 0000000000..d35568b3c9 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGDay.xml @@ -0,0 +1,24 @@ + + + + ---01 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGDay.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGDay.xsd new file mode 100644 index 0000000000..92bd9a4b66 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGDay.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGMonth.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGMonth.xml new file mode 100644 index 0000000000..52cdfa8c4e --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGMonth.xml @@ -0,0 +1,24 @@ + + + + --01-- + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGMonth.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGMonth.xsd new file mode 100644 index 0000000000..78d001a585 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGMonth.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGMonthDay.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGMonthDay.xml new file mode 100644 index 0000000000..2609a858f7 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGMonthDay.xml @@ -0,0 +1,24 @@ + + + + --01-01 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGMonthDay.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGMonthDay.xsd new file mode 100644 index 0000000000..38f6c55059 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGMonthDay.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGYear.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGYear.xml new file mode 100644 index 0000000000..7868a47ca3 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGYear.xml @@ -0,0 +1,24 @@ + + + + 2001 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGYear.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGYear.xsd new file mode 100644 index 0000000000..0d65b124ff --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGYear.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGYearMonth.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGYearMonth.xml new file mode 100644 index 0000000000..3f5080d49f --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGYearMonth.xml @@ -0,0 +1,24 @@ + + + + 2001-01 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGYearMonth.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGYearMonth.xsd new file mode 100644 index 0000000000..340555dc5f --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInGYearMonth.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInHexBinary.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInHexBinary.xml new file mode 100644 index 0000000000..0deb7af980 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInHexBinary.xml @@ -0,0 +1,24 @@ + + + + 0F00 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInHexBinary.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInHexBinary.xsd new file mode 100644 index 0000000000..8059fe6da0 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInHexBinary.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInID.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInID.xml new file mode 100644 index 0000000000..06c92ce19b --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInID.xml @@ -0,0 +1,24 @@ + + + + idvalue0 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInID.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInID.xsd new file mode 100644 index 0000000000..7b1f02d1d4 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInID.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInIDREF.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInIDREF.xml new file mode 100644 index 0000000000..9bc0cefd0f --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInIDREF.xml @@ -0,0 +1,24 @@ + + + + idvalue0 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInIDREF.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInIDREF.xsd new file mode 100644 index 0000000000..0c207983bc --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInIDREF.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInIDREFS.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInIDREFS.xml new file mode 100644 index 0000000000..f91b602f99 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInIDREFS.xml @@ -0,0 +1,24 @@ + + + + idvalue0 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInIDREFS.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInIDREFS.xsd new file mode 100644 index 0000000000..b99bf01b73 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInIDREFS.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInInt.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInInt.xml new file mode 100644 index 0000000000..c99698e175 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInInt.xml @@ -0,0 +1,25 @@ + + + + -2147483648 + 2147483647 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInInt.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInInt.xsd new file mode 100644 index 0000000000..b5b9b0d1eb --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInInt.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInInteger.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInInteger.xml new file mode 100644 index 0000000000..80d22ce057 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInInteger.xml @@ -0,0 +1,25 @@ + + + + -2147483648 + 2147483647 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInInteger.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInInteger.xsd new file mode 100644 index 0000000000..4902935db5 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInInteger.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInLanguage.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInLanguage.xml new file mode 100644 index 0000000000..664bf824b4 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInLanguage.xml @@ -0,0 +1,24 @@ + + + + EN + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInLanguage.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInLanguage.xsd new file mode 100644 index 0000000000..5d3658d224 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInLanguage.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInLong.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInLong.xml new file mode 100644 index 0000000000..c5861fa92a --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInLong.xml @@ -0,0 +1,25 @@ + + + + -9223372036854775808 + 9223372036854775807 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInLong.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInLong.xsd new file mode 100644 index 0000000000..0aa4710057 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInLong.xsd @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNCName.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNCName.xml new file mode 100644 index 0000000000..1f95950394 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNCName.xml @@ -0,0 +1,24 @@ + + + + NCName + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNCName.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNCName.xsd new file mode 100644 index 0000000000..6ee9c435db --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNCName.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKEN.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKEN.xml new file mode 100644 index 0000000000..0297f1aeb4 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKEN.xml @@ -0,0 +1,24 @@ + + + + NMTOKEN + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKEN.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKEN.xsd new file mode 100644 index 0000000000..56d027bdbb --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKEN.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKENS.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKENS.xml new file mode 100644 index 0000000000..81ba1069bd --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKENS.xml @@ -0,0 +1,24 @@ + + + + NMTOKENS + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKENS.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKENS.xsd new file mode 100644 index 0000000000..866ab73024 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKENS.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNOTATION.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNOTATION.xml new file mode 100644 index 0000000000..8bb3a08b94 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNOTATION.xml @@ -0,0 +1,24 @@ + + + + tns:BuiltInNotationNotation + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNOTATION.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNOTATION.xsd new file mode 100644 index 0000000000..c7c62f812b --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNOTATION.xsd @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInName.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInName.xml new file mode 100644 index 0000000000..8235718c5e --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInName.xml @@ -0,0 +1,24 @@ + + + + Name + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInName.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInName.xsd new file mode 100644 index 0000000000..36caba2f16 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInName.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNegativeInteger.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNegativeInteger.xml new file mode 100644 index 0000000000..599c428a44 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNegativeInteger.xml @@ -0,0 +1,24 @@ + + + + -1 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNegativeInteger.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNegativeInteger.xsd new file mode 100644 index 0000000000..389d5a99f0 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNegativeInteger.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNonNegativeInteger.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNonNegativeInteger.xml new file mode 100644 index 0000000000..919c4a20ee --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNonNegativeInteger.xml @@ -0,0 +1,24 @@ + + + + 0 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNonNegativeInteger.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNonNegativeInteger.xsd new file mode 100644 index 0000000000..59887078b5 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNonNegativeInteger.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNonPositiveInteger.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNonPositiveInteger.xml new file mode 100644 index 0000000000..79011f26ab --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNonPositiveInteger.xml @@ -0,0 +1,24 @@ + + + + -1 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNonPositiveInteger.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNonPositiveInteger.xsd new file mode 100644 index 0000000000..5de7d64d7b --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNonPositiveInteger.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNormalizedString.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNormalizedString.xml new file mode 100644 index 0000000000..c40be9e18b --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNormalizedString.xml @@ -0,0 +1,24 @@ + + + + normalizedString + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNormalizedString.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNormalizedString.xsd new file mode 100644 index 0000000000..d4a78787b8 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInNormalizedString.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInPositiveInteger.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInPositiveInteger.xml new file mode 100644 index 0000000000..c30434de66 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInPositiveInteger.xml @@ -0,0 +1,24 @@ + + + + 1 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInPositiveInteger.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInPositiveInteger.xsd new file mode 100644 index 0000000000..5381590cd1 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInPositiveInteger.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInQName.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInQName.xml new file mode 100644 index 0000000000..4cd6ea7e72 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInQName.xml @@ -0,0 +1,24 @@ + + + + QName + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInQName.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInQName.xsd new file mode 100644 index 0000000000..e8faf6225b --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInQName.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInShort.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInShort.xml new file mode 100644 index 0000000000..b4375467c4 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInShort.xml @@ -0,0 +1,25 @@ + + + + -32768 + 32767 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInShort.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInShort.xsd new file mode 100644 index 0000000000..a4f564d9b7 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInShort.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInString.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInString.xml new file mode 100644 index 0000000000..d30ab85530 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInString.xml @@ -0,0 +1,24 @@ + + + + string + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInString.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInString.xsd new file mode 100644 index 0000000000..8abb34b5a5 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInString.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInTime.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInTime.xml new file mode 100644 index 0000000000..7fd9a061ae --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInTime.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInTime.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInTime.xsd new file mode 100644 index 0000000000..1615976813 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInTime.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInToken.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInToken.xml new file mode 100644 index 0000000000..cd567ba528 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInToken.xml @@ -0,0 +1,24 @@ + + + + token + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInToken.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInToken.xsd new file mode 100644 index 0000000000..0beaac571f --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInToken.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedByte.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedByte.xml new file mode 100644 index 0000000000..025362defb --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedByte.xml @@ -0,0 +1,25 @@ + + + + 0 + 255 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedByte.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedByte.xsd new file mode 100644 index 0000000000..d6d951fe5d --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedByte.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedInt.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedInt.xml new file mode 100644 index 0000000000..5736a8c121 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedInt.xml @@ -0,0 +1,25 @@ + + + + 0 + 4294967295 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedInt.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedInt.xsd new file mode 100644 index 0000000000..242be1d53b --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedInt.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedLong.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedLong.xml new file mode 100644 index 0000000000..d728115a77 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedLong.xml @@ -0,0 +1,25 @@ + + + + 0 + 18446744073709551615 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedLong.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedLong.xsd new file mode 100644 index 0000000000..108e3a8619 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedLong.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedShort.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedShort.xml new file mode 100644 index 0000000000..d4ffae5e17 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedShort.xml @@ -0,0 +1,25 @@ + + + + 0 + 65535 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedShort.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedShort.xsd new file mode 100644 index 0000000000..5ee5e0229e --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedShort.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeComplexContentRestrictingComplexType.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeComplexContentRestrictingComplexType.xml new file mode 100644 index 0000000000..3d5aed5aa8 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeComplexContentRestrictingComplexType.xml @@ -0,0 +1,26 @@ + + + + + SimpleTypeWithName + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeComplexContentRestrictingComplexType.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeComplexContentRestrictingComplexType.xsd new file mode 100644 index 0000000000..e7b80ab11c --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeComplexContentRestrictingComplexType.xsd @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingComplexType.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingComplexType.xml new file mode 100644 index 0000000000..2b4fe5594e --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingComplexType.xml @@ -0,0 +1,27 @@ + + + + + SimpleTypeWithName + SimpleTypeWithNameExtended + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingComplexType.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingComplexType.xsd new file mode 100644 index 0000000000..fc4deb63c2 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingComplexType.xsd @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingSimpleType.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingSimpleType.xml new file mode 100644 index 0000000000..03570f41d9 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingSimpleType.xml @@ -0,0 +1,24 @@ + + + + ComplexTypeExtendingSimpeTypeElement + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingSimpleType.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingSimpleType.xsd new file mode 100644 index 0000000000..c754502645 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingSimpleType.xsd @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeSimpleContentRestrictingComplexType.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeSimpleContentRestrictingComplexType.xml new file mode 100644 index 0000000000..4603793bfc --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeSimpleContentRestrictingComplexType.xml @@ -0,0 +1,24 @@ + + + + ComplexTypeSimpleContentRestrictingComplexTypeElement + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeSimpleContentRestrictingComplexType.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeSimpleContentRestrictingComplexType.xsd new file mode 100644 index 0000000000..4bcd2f8c46 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeSimpleContentRestrictingComplexType.xsd @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithAbstract.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithAbstract.xml new file mode 100644 index 0000000000..a6861f803a --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithAbstract.xml @@ -0,0 +1,27 @@ + + + + + BaseElement + ExtensionElement + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithAbstract.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithAbstract.xsd new file mode 100644 index 0000000000..8bb251cab2 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithAbstract.xsd @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithCDATA.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithCDATA.xml new file mode 100644 index 0000000000..467ec007ed --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithCDATA.xml @@ -0,0 +1,30 @@ + + + + + Some + ]]> + Mixed + SimpleType]]>WithName + Content + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithCDATA.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithCDATA.xsd new file mode 100644 index 0000000000..8d00646678 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithCDATA.xsd @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithContent.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithContent.xml new file mode 100644 index 0000000000..7deafd798a --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithContent.xml @@ -0,0 +1,26 @@ + + + + + SimpleTypeWithName + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithContent.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithContent.xsd new file mode 100644 index 0000000000..72ac75fee0 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithContent.xsd @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithMixed.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithMixed.xml new file mode 100644 index 0000000000..f6208f81b3 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithMixed.xml @@ -0,0 +1,29 @@ + + + + + Some + Mixed + SimpleTypeWithName + Content + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithMixed.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithMixed.xsd new file mode 100644 index 0000000000..1f26e13673 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithMixed.xsd @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenAttributes.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenAttributes.xml new file mode 100644 index 0000000000..97de7b98eb --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenAttributes.xml @@ -0,0 +1,24 @@ + + + + + SimpleTypeWithName + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenAttributes.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenAttributes.xsd new file mode 100644 index 0000000000..67716553d8 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenAttributes.xsd @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenContent.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenContent.xml new file mode 100644 index 0000000000..5941348921 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenContent.xml @@ -0,0 +1,31 @@ + + + + + + + Some + Mixed + SimpleTypeWithName + Content + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenContent.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenContent.xsd new file mode 100644 index 0000000000..24d5d09054 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenContent.xsd @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOppositeProperty.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOppositeProperty.xml new file mode 100644 index 0000000000..f684d06a4d --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOppositeProperty.xml @@ -0,0 +1,30 @@ + + + + + SomeData + + + idvalue2 + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOppositeProperty.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOppositeProperty.xsd new file mode 100644 index 0000000000..de4a8a666d --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOppositeProperty.xsd @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOAliasName.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOAliasName.xml new file mode 100644 index 0000000000..242908bd27 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOAliasName.xml @@ -0,0 +1,26 @@ + + + + + SimpleTypeWithName + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOAliasName.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOAliasName.xsd new file mode 100644 index 0000000000..4c00fbe295 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOAliasName.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOName.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOName.xml new file mode 100644 index 0000000000..925e8625d5 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOName.xml @@ -0,0 +1,26 @@ + + + + + SimpleTypeWithName + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOName.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOName.xsd new file mode 100644 index 0000000000..b12bec040b --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOName.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOSequence.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOSequence.xml new file mode 100644 index 0000000000..c73708ce46 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOSequence.xml @@ -0,0 +1,26 @@ + + + + + SimpleTypeWithName + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOSequence.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOSequence.xsd new file mode 100644 index 0000000000..795c3ea7d9 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOSequence.xsd @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutContent.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutContent.xml new file mode 100644 index 0000000000..3ebdc89ae0 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutContent.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutContent.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutContent.xsd new file mode 100644 index 0000000000..21546d0f67 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutContent.xsd @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutName.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutName.xml new file mode 100644 index 0000000000..89657e42ca --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutName.xml @@ -0,0 +1,26 @@ + + + + + SimpleTypeWithName + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutName.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutName.xsd new file mode 100644 index 0000000000..d01b4172e4 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutName.xsd @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/DefaultNamespace.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/DefaultNamespace.xml new file mode 100644 index 0000000000..82fd1eedaf --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/DefaultNamespace.xml @@ -0,0 +1,23 @@ + + + + SimpleTypeWithName + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/DefaultNamespace.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/DefaultNamespace.xsd new file mode 100644 index 0000000000..e1dcf06194 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/DefaultNamespace.xsd @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementInAll.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementInAll.xml new file mode 100644 index 0000000000..ebf03c9d5d --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementInAll.xml @@ -0,0 +1,27 @@ + + + + + ElementInAllOne + ElementInAllTwo + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementInAll.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementInAll.xsd new file mode 100644 index 0000000000..8b9ba5b4b8 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementInAll.xsd @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementInChoice.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementInChoice.xml new file mode 100644 index 0000000000..26466b1b39 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementInChoice.xml @@ -0,0 +1,25 @@ + + + + Element1InChoice + Element2InChoice + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementInChoice.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementInChoice.xsd new file mode 100644 index 0000000000..ff418c56ab --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementInChoice.xsd @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSDOChangeSummaryType.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSDOChangeSummaryType.xml new file mode 100644 index 0000000000..27bb1ce9cc --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSDOChangeSummaryType.xml @@ -0,0 +1,29 @@ + + + + + + ChangeSummaryText + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSDOChangeSummaryType.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSDOChangeSummaryType.xsd new file mode 100644 index 0000000000..2bf1df8c99 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSDOChangeSummaryType.xsd @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithDefault.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithDefault.xml new file mode 100644 index 0000000000..9b5561ed43 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithDefault.xml @@ -0,0 +1,24 @@ + + + + ElementOfSimpleTypeWithDefaultDefault + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithDefault.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithDefault.xsd new file mode 100644 index 0000000000..0b4e7bdf45 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithDefault.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithFixed.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithFixed.xml new file mode 100644 index 0000000000..f1b7cd264c --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithFixed.xml @@ -0,0 +1,24 @@ + + + + ElementOfSimpleTypeWithFixedFixed + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithFixed.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithFixed.xsd new file mode 100644 index 0000000000..a2c8456257 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithFixed.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDODataType.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDODataType.xml new file mode 100644 index 0000000000..1f60b0423f --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDODataType.xml @@ -0,0 +1,24 @@ + + + + ElementOfSimpleTypeWithSDODataTypeElement + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDODataType.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDODataType.xsd new file mode 100644 index 0000000000..21e55ab8c1 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDODataType.xsd @@ -0,0 +1,33 @@ + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOOppositePropertyType.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOOppositePropertyType.xml new file mode 100644 index 0000000000..30762f4912 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOOppositePropertyType.xml @@ -0,0 +1,24 @@ + + + + idvalue0 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOOppositePropertyType.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOOppositePropertyType.xsd new file mode 100644 index 0000000000..5bf35d0d70 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOOppositePropertyType.xsd @@ -0,0 +1,33 @@ + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOPropertyType.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOPropertyType.xml new file mode 100644 index 0000000000..2dd01e4090 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOPropertyType.xml @@ -0,0 +1,24 @@ + + + + idvalue0 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOPropertyType.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOPropertyType.xsd new file mode 100644 index 0000000000..6920cd8dd0 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOPropertyType.xsd @@ -0,0 +1,32 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOString.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOString.xml new file mode 100644 index 0000000000..6a526bdc47 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOString.xml @@ -0,0 +1,24 @@ + + + + ElementOfSimpleTypeWithSDOStringElement + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOString.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOString.xsd new file mode 100644 index 0000000000..1117a95eb8 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOString.xsd @@ -0,0 +1,32 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementSubstitutionGroupBase.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementSubstitutionGroupBase.xml new file mode 100644 index 0000000000..ab91458bff --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementSubstitutionGroupBase.xml @@ -0,0 +1,40 @@ + + + + + + ElementInSubstitutionGroupBase + + + + Some Data + + + + ElementInSubstitutionGroupBase + + + ElementInSubstitutionGroupExtends + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementSubstitutionGroupBase.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementSubstitutionGroupBase.xsd new file mode 100644 index 0000000000..3e015843b5 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementSubstitutionGroupBase.xsd @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithMaxOccurs.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithMaxOccurs.xml new file mode 100644 index 0000000000..b6d68fd08a --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithMaxOccurs.xml @@ -0,0 +1,25 @@ + + + + ElementWithMaxOccursElement1 + ElementWithMaxOccursElement2 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithMaxOccurs.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithMaxOccurs.xsd new file mode 100644 index 0000000000..d4453a4477 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithMaxOccurs.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithNillable.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithNillable.xml new file mode 100644 index 0000000000..6de3adc937 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithNillable.xml @@ -0,0 +1,24 @@ + + + + ElementWithNillableElement + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithNillable.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithNillable.xsd new file mode 100644 index 0000000000..786ab226da --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithNillable.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithSDOAliasName.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithSDOAliasName.xml new file mode 100644 index 0000000000..64093aa803 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithSDOAliasName.xml @@ -0,0 +1,24 @@ + + + + ElementWithSDOAliasName + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithSDOAliasName.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithSDOAliasName.xsd new file mode 100644 index 0000000000..01f4c2b1ef --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithSDOAliasName.xsd @@ -0,0 +1,32 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithSDOName.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithSDOName.xml new file mode 100644 index 0000000000..774646f682 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithSDOName.xml @@ -0,0 +1,24 @@ + + + + ElementWithSDONameElement + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithSDOName.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithSDOName.xsd new file mode 100644 index 0000000000..34da37564c --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ElementWithSDOName.xsd @@ -0,0 +1,32 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/GlobalElementComplexType.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/GlobalElementComplexType.xml new file mode 100644 index 0000000000..a1fb3aa803 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/GlobalElementComplexType.xml @@ -0,0 +1,24 @@ + + + + SimpleTypeWithName + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/GlobalElementComplexType.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/GlobalElementComplexType.xsd new file mode 100644 index 0000000000..8eb7a4fce4 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/GlobalElementComplexType.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/GlobalElementSimpleType.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/GlobalElementSimpleType.xml new file mode 100644 index 0000000000..f68eb1939d --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/GlobalElementSimpleType.xml @@ -0,0 +1,24 @@ + + + + GlobalElementSimpleType + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/GlobalElementSimpleType.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/GlobalElementSimpleType.xsd new file mode 100644 index 0000000000..b9f77e6658 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/GlobalElementSimpleType.xsd @@ -0,0 +1,26 @@ + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Import.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Import.xml new file mode 100644 index 0000000000..fd28850050 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Import.xml @@ -0,0 +1,30 @@ + + + + + SimpleTypeWithName + + SomeString + SomeString + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Import.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Import.xsd new file mode 100644 index 0000000000..eae93fd44a --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Import.xsd @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ImportedSchema.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ImportedSchema.xsd new file mode 100644 index 0000000000..a7e568decf --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/ImportedSchema.xsd @@ -0,0 +1,33 @@ + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Include.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Include.xml new file mode 100644 index 0000000000..d4b9e24fa6 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Include.xml @@ -0,0 +1,24 @@ + + + + SimpleTypeWithName + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Include.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Include.xsd new file mode 100644 index 0000000000..34ff314a19 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Include.xsd @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Interop.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Interop.xsd new file mode 100644 index 0000000000..ae22ab2c44 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Interop.xsd @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Notation.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Notation.xml new file mode 100644 index 0000000000..b75ac6500a --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Notation.xml @@ -0,0 +1,24 @@ + + + +tns:Tuscany + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Notation.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Notation.xsd new file mode 100644 index 0000000000..6ad019cb81 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Notation.xsd @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Person.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Person.xsd new file mode 100644 index 0000000000..5f5021b15e --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/Person.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SDOJavaPackage.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SDOJavaPackage.xml new file mode 100644 index 0000000000..6c5ad88ff4 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SDOJavaPackage.xml @@ -0,0 +1,25 @@ + + + + SimpleTypeWithName + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SDOJavaPackage.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SDOJavaPackage.xsd new file mode 100644 index 0000000000..6b7e39b334 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SDOJavaPackage.xsd @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithAbstract.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithAbstract.xml new file mode 100644 index 0000000000..f9d4a24a49 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithAbstract.xml @@ -0,0 +1,24 @@ + + + + SimpleTypeWithAbstractExtensionElement + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithAbstract.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithAbstract.xsd new file mode 100644 index 0000000000..f649e2ba83 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithAbstract.xsd @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithExtendedInstanceClass.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithExtendedInstanceClass.xml new file mode 100644 index 0000000000..410df4b7e4 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithExtendedInstanceClass.xml @@ -0,0 +1,24 @@ + + + + SimpleTypeWithExtendedInstanceClassElement + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithExtendedInstanceClass.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithExtendedInstanceClass.xsd new file mode 100644 index 0000000000..36629e8295 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithExtendedInstanceClass.xsd @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithInstanceClass.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithInstanceClass.xml new file mode 100644 index 0000000000..7b74867c03 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithInstanceClass.xml @@ -0,0 +1,24 @@ + + + + SimpleTypeWithInstanceClassElement + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithInstanceClass.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithInstanceClass.xsd new file mode 100644 index 0000000000..7a08de84be --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithInstanceClass.xsd @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithList.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithList.xml new file mode 100644 index 0000000000..708d526f44 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithList.xml @@ -0,0 +1,24 @@ + + + + listmember1 listmember2 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithList.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithList.xsd new file mode 100644 index 0000000000..681cf7d5af --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithList.xsd @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithName.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithName.xml new file mode 100644 index 0000000000..e404ac86b7 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithName.xml @@ -0,0 +1,24 @@ + + + + SimpleTypeWithNameElement + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithName.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithName.xsd new file mode 100644 index 0000000000..af0431f048 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithName.xsd @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithSDOName.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithSDOName.xml new file mode 100644 index 0000000000..c86a0f6bcb --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithSDOName.xml @@ -0,0 +1,24 @@ + + + + SimpleTypeWithSDONameElement + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithSDOName.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithSDOName.xsd new file mode 100644 index 0000000000..89b00a36cc --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithSDOName.xsd @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithUnion.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithUnion.xml new file mode 100644 index 0000000000..399b0d8175 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithUnion.xml @@ -0,0 +1,25 @@ + + + + EN + 01:02:03 + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithUnion.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithUnion.xsd new file mode 100644 index 0000000000..fee04b9f24 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithUnion.xsd @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithoutName.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithoutName.xml new file mode 100644 index 0000000000..bc8cf35368 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithoutName.xml @@ -0,0 +1,26 @@ + + + + + SimpleTypeWithoutName + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithoutName.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithoutName.xsd new file mode 100644 index 0000000000..536aa822de --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithoutName.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/TargetNamespace.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/TargetNamespace.xml new file mode 100644 index 0000000000..da2929776e --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/TargetNamespace.xml @@ -0,0 +1,24 @@ + + + + SimpleTypeWithName + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/TargetNamespace.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/TargetNamespace.xsd new file mode 100644 index 0000000000..ace5427786 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/TargetNamespace.xsd @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/datagraph.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/datagraph.xsd new file mode 100644 index 0000000000..e6b9697a8d --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/datagraph.xsd @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Expected type is emof:Package. + + + + + + + + + + + Expected type is xsd:schema. + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/sdoJava.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/sdoJava.xsd new file mode 100644 index 0000000000..7387568942 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/sdoJava.xsd @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/sdoModel.xsd b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/sdoModel.xsd new file mode 100644 index 0000000000..c5aabc9cc8 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/main/resources/xsd/sdoModel.xsd @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/test/java/org/apache/tuscany/sca/itest/generate/GenerateTestCase.java b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/test/java/org/apache/tuscany/sca/itest/generate/GenerateTestCase.java new file mode 100644 index 0000000000..fa3f310d4d --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/common/src/test/java/org/apache/tuscany/sca/itest/generate/GenerateTestCase.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.generate; + +import junit.framework.TestCase; + + +/** + * + */ +public class GenerateTestCase extends TestCase { + + //private Generate generator = null; + + @Override + protected void setUp() throws Exception { + //generator = new Generate(); + } + + @Override + protected void tearDown() { + } + + /** + * Invokes the Generate class to generate databinding test classes and resources. + * + * @throws Exception + */ + public void testGenerate() throws Exception { + //generator.generate(); + } +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/config.png b/sca-java-1.x/tags/0.99-incubating/itest/databindings/config.png new file mode 100644 index 0000000000..7912019e9d Binary files /dev/null and b/sca-java-1.x/tags/0.99-incubating/itest/databindings/config.png differ diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/config.svg b/sca-java-1.x/tags/0.99-incubating/itest/databindings/config.svg new file mode 100644 index 0000000000..aaf027e2df --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/config.svg @@ -0,0 +1,117 @@ + + + + + + + + + + + image/svg+xml + + + + + + <tns:Generate ...> <Template> <TemplateName>greeter.composite.vm</TemplateName> <TemplateTargetDir>classes</TemplateTargetDir> </Template> ... <InputFile> <FileName>Person.xsd</FileName> <FilePath>xsd</FilePath> <JavaPackage>org.apache.tuscany.sca.itest.databinding.types</JavaPackage> <Factory>TypesFactory</Factory> <Namespace>http://apache.org/tuscany/sca/itest/databinding/types</Namespace> <Prefix>p</Prefix> <Type> <TypeName>PersonType</TypeName> <CreateTypeCode> TypesFactory factory = TypesFactory.INSTANCE; param = factory.createPersonType(); param.setFirstName("George"); param.setLastName("Doors"); </CreateTypeCode> <ModifyTypeCode> param.setGreeting("Hello"); </ModifyTypeCode> <ResultComparison> assertNotSame("greetedPerson.getGreeting() not set", "", result.getGreeting()); </ResultComparison> </Type> </InputFile> ...</tns:Generate> + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/databinding.png b/sca-java-1.x/tags/0.99-incubating/itest/databindings/databinding.png new file mode 100644 index 0000000000..76a9c71b7d Binary files /dev/null and b/sca-java-1.x/tags/0.99-incubating/itest/databindings/databinding.png differ diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/databinding.svg b/sca-java-1.x/tags/0.99-incubating/itest/databindings/databinding.svg new file mode 100644 index 0000000000..d6850ccf7d --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/databinding.svg @@ -0,0 +1,242 @@ + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + GreeterService + + DefaultGreeterServiceClient + + + GreeterServiceComponent + + WSGreeterServiceClient + + + + + WSReference WSService + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/interop.png b/sca-java-1.x/tags/0.99-incubating/itest/databindings/interop.png new file mode 100644 index 0000000000..005e0f24ea Binary files /dev/null and b/sca-java-1.x/tags/0.99-incubating/itest/databindings/interop.png differ diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/interop.svg b/sca-java-1.x/tags/0.99-incubating/itest/databindings/interop.svg new file mode 100644 index 0000000000..03897c6d09 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/interop.svg @@ -0,0 +1,352 @@ + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + InteropGreeterService + + SDODefaultGreeterServiceClient + + + SDOGreeterServiceComponent + + SDOWSGreeterServiceClient + + + + WSReference WSService + JAXBDefaultGreeterServiceClient + + + JAXBWSGreeterServiceClient + + + + WSReference WSService + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/interop/pom.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/interop/pom.xml new file mode 100644 index 0000000000..6d1f056fbb --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/interop/pom.xml @@ -0,0 +1,190 @@ + + + + + org.apache.tuscany.sca + itest-databindings + 0.99-incubating + + + 4.0.0 + + itest-databindings-interop + 0.99-incubating + jar + Apache Tuscany Interoperability Databindings Integration Test + + + + + true + + java.net + java.net Maven 1.x Repository + http://download.java.net/maven/1 + legacy + + + + + + + true + + java.net + java.net Maven 1.x Repository + http://download.java.net/maven/1 + legacy + + + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-databinding-jaxb + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-databinding-sdo + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-databinding-axiom + ${pom.version} + compile + + + javax.xml.bind + jaxb-api + 2.1 + compile + + + com.sun.xml.bind + jaxb-impl + 2.1.4 + runtime + + + com.sun.xml.ws + jaxws-rt + 2.1.1 + + + org.apache.tuscany.sca + itest-databindings-common + ${pom.version} + compile + + + org.apache.tuscany.sca + itest-databindings-sdo + ${pom.version} + compile + + + org.apache.tuscany.sca + itest-databindings-jaxb + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-host-embedded + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-interface-java-xml + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-http-jetty + 0.99-incubating + test + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + generate-sources + + unpack + + + + + org.apache.tuscany.sca + itest-databindings-common + ${project.version} + true + ${project.build.directory}/classes + + + + + + + + org.codehaus.mojo + exec-maven-plugin + + + generate-test-source + process-resources + + java + + + + + org.apache.tuscany.sca.itest.generate.Generate + + ${project.build.directory} + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/interop/src/main/resources/generate/InteropDatabindingTestCase.java.vm b/sca-java-1.x/tags/0.99-incubating/itest/databindings/interop/src/main/resources/generate/InteropDatabindingTestCase.java.vm new file mode 100644 index 0000000000..7bdfc57924 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/interop/src/main/resources/generate/InteropDatabindingTestCase.java.vm @@ -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 $template.getJavaPackage(); + +import junit.framework.TestCase; + +import org.apache.tuscany.sca.host.embedded.SCADomain; +import ${template.getJavaPackage()}.GreeterService; + +// Data types +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) +import $file.getJavaPackage().$typeInstance.getTypeName(); +import $file.getJavaPackage().$file.getFactory(); +#end +#end + +/** + * Automatically generated test case. Calls the greeter client for a number of + * bindings and a number of data types. + * + * @version $Rev: 511417 $ $Date: 2007-02-25 03:06:42 +0000 (Sun, 25 Feb 2007) $ + */ +public class InteropDatabindingTestCase extends TestCase { + + private static boolean initalised = false; + private GreeterService greeterClient; + private static SCADomain domain; + + /** + * Runs before each test method + */ + protected void setUp() throws Exception { + if (!initalised) { + domain = SCADomain.newInstance("interopgreeter.composite"); + super.setUp(); + initalised = true; + } + } + + /** + * Runs after each test method + */ + protected void tearDown() { + + } + + /** + * Finds the SCA component that relates to the protocol being tested. This test + * always connects locally to the client component but the client component will + * connect to the back end component using the appropriate protocol + * + * @param ext the protcol required + */ + private void setUpClient(String ext) throws Exception { + greeterClient = domain.getService(GreeterService.class, "SDO" + ext + "GreeterServiceClient"); + } + + /** + * Invokes the SDO Greet service using web service bindings with SDO payload + */ + public void testWSGreet() throws Exception { + setUpClient("WS"); + greet(); + } + + /** + * Invokes the SDO Greet service using default bindings with SDO payload + */ + public void testDefaultGreet() throws Exception { + setUpClient("Default"); + greet(); + } + + /** + * A generic method which, regarless of which client is connected, sends out a + * series of requrests passing different data types. + */ + public void greet() { +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + // test $typeInstance.getTypeName() + { + $typeInstance.getTypeName() param = null; + $typeInstance.getCreateTypeCode() + $typeInstance.getTypeName() result = greeterClient.greet$typeInstance.getTypeName()(param); + $typeInstance.getResultComparison() + } +#end +#end + } + +} diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/interop/src/main/resources/generate/JAXBGreeter.wsdl.vm b/sca-java-1.x/tags/0.99-incubating/itest/databindings/interop/src/main/resources/generate/JAXBGreeter.wsdl.vm new file mode 100644 index 0000000000..38bfccce0c --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/interop/src/main/resources/generate/JAXBGreeter.wsdl.vm @@ -0,0 +1,103 @@ + + + + + + + +#foreach($file in $fileList) + +#end + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + + + + + + +#end +#end + + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + + + + + + +#end +#end + + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + + + +#end +#end + + + + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + + + + + + + + +#end +#end + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/interop/src/main/resources/generate/SDOGreeter.wsdl.vm b/sca-java-1.x/tags/0.99-incubating/itest/databindings/interop/src/main/resources/generate/SDOGreeter.wsdl.vm new file mode 100644 index 0000000000..6f02af4c9d --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/interop/src/main/resources/generate/SDOGreeter.wsdl.vm @@ -0,0 +1,103 @@ + + + + + + + +#foreach($file in $fileList) + +#end + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + + + + + + +#end +#end + + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + + + + + + +#end +#end + + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + + + +#end +#end + + + + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + + + + + + + + +#end +#end + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/interop/src/main/resources/generate/generate.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/interop/src/main/resources/generate/generate.xml new file mode 100644 index 0000000000..8453dd56b4 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/interop/src/main/resources/generate/generate.xml @@ -0,0 +1,159 @@ + + + + + + + + + + Person.xsd + xsd + org.apache.tuscany.sca.itest.databinding.types + TypesFactory + http://apache.org/tuscany/sca/itest/databinding/types + p + + PersonType + + TypesFactory factory = TypesFactory.INSTANCE; + param = factory.createPersonType(); + param.setFirstName("George"); + param.setLastName("Doors"); + + + param.setGreeting("Hello"); + + + assertNotSame("greetedPerson.getGreeting() not set", "", result.getGreeting()); + + + + + Interop.xsd + xsd + org.apache.tuscany.interop + InteropFactory + http://www.apache.org/tuscany/interop + i + + + AttributeComplexType + + InteropFactory factory = InteropFactory.INSTANCE; + org.apache.tuscany.interop.AttributeType attrib = factory.createAttributeType(); + attrib.setAttribute("SomeText"); + param = factory.createAttributeComplexType(); + param.setAttributeElement(attrib); + + + param.getAttributeElement().setAttribute("SomeChangedText");; + + + assertEquals("data not changed corretly", "SomeChangedText", result.getAttributeElement().getAttribute()); + + + + AttributeReferenceComplexType + + InteropFactory factory = InteropFactory.INSTANCE; + param = factory.createAttributeReferenceComplexType(); + + param.setReferencedAttribute("SomeText"); + + + param.setReferencedAttribute("SomeChangedText");; + + + assertEquals("data not changed corretly", "SomeChangedText", result.getReferencedAttribute()); + + + + SimpleTypeWithAbstractComplexType + + InteropFactory factory = InteropFactory.INSTANCE; + param = factory.createSimpleTypeWithAbstractComplexType(); + param.setSimpleTypeWithAbstractExtensionElement("SomeText"); + + + param.setSimpleTypeWithAbstractExtensionElement("SomeChangedText");; + + + assertEquals("data not changed corretly", "SomeChangedText", result.getSimpleTypeWithAbstractExtensionElement()); + + + + SimpleTypeWithNameComplexType + + InteropFactory factory = InteropFactory.INSTANCE; + param = factory.createSimpleTypeWithNameComplexType(); + param.setSimpleTypeWithNameElement("SomeText"); + + + param.setSimpleTypeWithNameElement("SomeChangedText");; + + + assertEquals("data not changed corretly", "SomeChangedText", result.getSimpleTypeWithNameElement()); + + + + ComplexTypeWithContentType + + InteropFactory factory = InteropFactory.INSTANCE; + param = factory.createComplexTypeWithContentType(); + param.setSimpleTypeWithName("SomeText"); + + + param.setSimpleTypeWithName("SomeChangedText");; + + + assertEquals("data not changed corretly", "SomeChangedText", result.getSimpleTypeWithName()); + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/interop/src/main/resources/generate/interopgreeter.composite.vm b/sca-java-1.x/tags/0.99-incubating/itest/databindings/interop/src/main/resources/generate/interopgreeter.composite.vm new file mode 100644 index 0000000000..36797fde57 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/interop/src/main/resources/generate/interopgreeter.composite.vm @@ -0,0 +1,78 @@ + + + + + + #foreach( $file in $fileList ) + + #end + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/jaxbgen/pom.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/jaxbgen/pom.xml new file mode 100644 index 0000000000..8362658f87 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/jaxbgen/pom.xml @@ -0,0 +1,218 @@ + + + + + org.apache.tuscany.sca + itest-databindings + 0.99-incubating + + + 4.0.0 + + itest-databindings-jaxb + 0.99-incubating + jar + Apache Tuscany JAXB Databinding Integration Test + + + + + true + + java.net + java.net Maven 1.x Repository + http://download.java.net/maven/1 + legacy + + + + + + + true + + java.net + java.net Maven 1.x Repository + http://download.java.net/maven/1 + legacy + + + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + ${pom.version} + runtime + + + org.apache.tuscany.sca + tuscany-databinding-jaxb + ${pom.version} + runtime + + + org.apache.tuscany.sca + tuscany-databinding-sdo + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-databinding-axiom + ${pom.version} + compile + + + org.apache.tuscany.sca + itest-databindings-common + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-host-embedded + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-interface-java-xml + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-http-jetty + 0.99-incubating + runtime + + + javax.xml.bind + jaxb-api + 2.1 + compile + + + com.sun.xml.bind + jaxb-impl + 2.1.4 + runtime + + + com.sun.xml.ws + jaxws-rt + 2.1.1 + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + generate-sources + + unpack + + + + + org.apache.tuscany.sca + itest-databindings-common + ${project.version} + true + ${project.build.directory}/classes + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.0 + + + add-test-source + generate-sources + + add-test-source + + + + target/jaxws-source + + + + + + + org.codehaus.mojo + exec-maven-plugin + + + generate-test-source + process-resources + + java + + + + + org.apache.tuscany.sca.itest.generate.Generate + + ${project.build.directory} + + + + + org.codehaus.mojo + jaxws-maven-plugin + + + process-resources + + wsimport + + + + + org.apache.tuscany.sca.itest.jaxbdatabinding.generated + ${project.build.directory}/classes/wsdl + + Greeter.wsdl + + ${project.build.directory}/jaxws-source + true + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/jaxbgen/src/main/resources/generate/generate.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/jaxbgen/src/main/resources/generate/generate.xml new file mode 100644 index 0000000000..8381a164ea --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/jaxbgen/src/main/resources/generate/generate.xml @@ -0,0 +1,172 @@ + + + + + + + + + + + + + Person.xsd + xsd + org.apache.tuscany.sca.itest.jaxbdatabinding.generated + ObjectFactory + http://apache.org/tuscany/sca/itest/databinding/types + p + + PersonType + + ObjectFactory factory = new ObjectFactory(); + param = factory.createPersonType(); + param.setFirstName("George"); + param.setLastName("Doors"); + + + param.setGreeting("Hello"); + + + assertNotSame("greetedPerson.getGreeting() not set", "", result.getGreeting()); + + + + + Interop.xsd + xsd + org.apache.tuscany.sca.itest.jaxbdatabinding.generated + ObjectFactory + http://www.apache.org/tuscany/interop + i + + + AttributeComplexType + + ObjectFactory factory = new ObjectFactory(); + org.apache.tuscany.sca.itest.jaxbdatabinding.generated.AttributeType attrib = factory.createAttributeType(); + attrib.setAttribute("SomeText"); + param = factory.createAttributeComplexType(); + param.setAttributeElement(attrib); + + + param.getAttributeElement().setAttribute("SomeChangedText");; + + + assertEquals("data not changed corretly", "SomeChangedText", result.getAttributeElement().getAttribute()); + + + + AttributeReferenceComplexType + + ObjectFactory factory = new ObjectFactory(); + param = factory.createAttributeReferenceComplexType(); + + param.setReferencedAttribute("SomeText"); + + + param.setReferencedAttribute("SomeChangedText");; + + + assertEquals("data not changed corretly", "SomeChangedText", result.getReferencedAttribute()); + + + + SimpleTypeWithAbstractComplexType + + ObjectFactory factory = new ObjectFactory(); + param = factory.createSimpleTypeWithAbstractComplexType(); + param.setSimpleTypeWithAbstractExtensionElement("SomeText"); + + + param.setSimpleTypeWithAbstractExtensionElement("SomeChangedText");; + + + assertEquals("data not changed corretly", "SomeChangedText", result.getSimpleTypeWithAbstractExtensionElement()); + + + + SimpleTypeWithNameComplexType + + ObjectFactory factory = new ObjectFactory(); + param = factory.createSimpleTypeWithNameComplexType(); + param.setSimpleTypeWithNameElement("SomeText"); + + + param.setSimpleTypeWithNameElement("SomeChangedText");; + + + assertEquals("data not changed corretly", "SomeChangedText", result.getSimpleTypeWithNameElement()); + + + + ComplexTypeWithContentType + + ObjectFactory factory = new ObjectFactory(); + param = factory.createComplexTypeWithContentType(); + param.setSimpleTypeWithName("SomeText"); + + + param.setSimpleTypeWithName("SomeChangedText");; + + + assertEquals("data not changed corretly", "SomeChangedText", result.getSimpleTypeWithName()); + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/jaxbgen/src/main/resources/greeter.composite b/sca-java-1.x/tags/0.99-incubating/itest/databindings/jaxbgen/src/main/resources/greeter.composite new file mode 100644 index 0000000000..ae0740e6fe --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/jaxbgen/src/main/resources/greeter.composite @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/pom.xml b/sca-java-1.x/tags/0.99-incubating/itest/databindings/pom.xml new file mode 100644 index 0000000000..163466c81e --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/pom.xml @@ -0,0 +1,45 @@ + + + + + org.apache.tuscany.sca + tuscany-itest + 0.99-incubating + ../pom.xml + + 4.0.0 + + org.apache.tuscany.sca + itest-databindings + Apache Tuscany SCA Databindings Integration Tests + 0.99-incubating + + + pom + + install + + + common + sdogen + jaxbgen + interop + + diff --git a/sca-java-1.x/tags/0.99-incubating/itest/databindings/readme.html b/sca-java-1.x/tags/0.99-incubating/itest/databindings/readme.html new file mode 100644 index 0000000000..24a44e4ed7 --- /dev/null +++ b/sca-java-1.x/tags/0.99-incubating/itest/databindings/readme.html @@ -0,0 +1,157 @@ + + + + + + + + + Tuscany SCA Integration Test Databindings + + + + + +

Tuscany SCA Integation Test Databindings

+ +

Overview

+ +

+This integration test tests the Tuscany SCA databinding implementation by passing various data structures +across various bindings using the supported databindings. There are tests for the individual databindings +which exercise various bindings with the same databinding at client and server ends of each binding. There +is also an integration test which exercises the transformer chains by specifying different databindings at +client and server ends of the binding. +

+

+In doing this testing it is apparent that there is a lot of repetition in creating client, services, idl and +type for each of the data types for each of the bindings for each of the databindings. To reduce the amount +of effort required to maintain the tests as new types, bindings and databindings are added the test cases +themselves are generated from configuration files. +

+ +

Test Structure

+ +Databindings/Common - hold files common across all tests
+Databindings/Interop - test the transformer chains with combinations of databindings
+Databindings/sdogen and jaxbgen - test each databindings independently
+ +

Test Generation

+

+To reduce the amount of manual effort involved in building and maintaining tests cases the test cases +themselves are generated at run time using a set of velocity templates. Each test module has a generate.xml +file in the resources/generate directory which tells the generator what to do. The file looks like this. +

+ +

+Each