From 3caf8614f25d6b1962e20331fdf423c863bc02f3 Mon Sep 17 00:00:00 2001 From: lresende Date: Wed, 11 Nov 2009 23:13:31 +0000 Subject: Moving 1.x branches git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835144 13f79535-47bb-0310-9956-ffa450edef68 --- .../testing/sca/itest/IntegrationTestHelp.html | 1293 ++++++++++++++++++++ .../sca/itest/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 | 110 ++ .../bindingsclient/src/main/webapp/WEB-INF/web.xml | 10 + .../tuscany/sca/itest/SCATestToolServerTest.java | 27 + .../sca/itest/WSBindingsClientTestCase.java | 80 ++ .../tuscany/sca/util/SCATestUtilityServerTest.java | 28 + .../sca/itest/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 | 28 + .../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 | 27 + .../sca/itest/bindings/bindingsutility/pom.xml | 59 + .../sca/itest/SCATestToolCallbackService.java | 28 + .../tuscany/sca/util/SCATestUtilityServer.java | 28 + .../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 | 27 + .../testing/sca/itest/bindings/pom.xml | 42 + .../testing/sca/itest/callback-api/pom.xml | 35 + .../tuscany/sca/test/CallBackApiCallBack.java | 33 + .../apache/tuscany/sca/test/CallBackApiClient.java | 28 + .../tuscany/sca/test/CallBackApiClientImpl.java | 133 ++ .../tuscany/sca/test/CallBackApiService.java | 37 + .../tuscany/sca/test/CallBackApiServiceImpl.java | 77 ++ .../src/main/resources/CallBackApiTest.composite | 34 + .../apache/tuscany/sca/test/CallBackApiTest.java | 45 + .../testing/sca/itest/callback-basic/pom.xml | 35 + .../tuscany/sca/test/CallBackBasicCallBack.java | 33 + .../tuscany/sca/test/CallBackBasicClient.java | 28 + .../tuscany/sca/test/CallBackBasicClientImpl.java | 134 ++ .../tuscany/sca/test/CallBackBasicService.java | 37 + .../tuscany/sca/test/CallBackBasicServiceImpl.java | 59 + .../src/main/resources/CallBackBasicTest.composite | 34 + .../tuscany/sca/test/CallBackBasicTestCase.java | 28 + .../testing/sca/itest/callback-complexType/pom.xml | 35 + .../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 | 63 + .../main/resources/CallBackCTypeClient.composite | 34 + .../test/CallBackCTypeServiceImpl.componentType | 8 + .../apache/tuscany/sca/test/CallBackCTypeTest.java | 45 + .../testing/sca/itest/callback-id/pom.xml | 35 + .../tuscany/sca/test/CallBackIdCallBack.java | 31 + .../apache/tuscany/sca/test/CallBackIdClient.java | 28 + .../tuscany/sca/test/CallBackIdClientImpl.java | 145 +++ .../apache/tuscany/sca/test/CallBackIdService.java | 33 + .../tuscany/sca/test/CallBackIdServiceImpl.java | 48 + .../src/main/resources/CallBackIdClient.composite | 34 + .../apache/tuscany/sca/test/CallBackIdTest.java | 25 + .../testing/sca/itest/callback-setCallback/pom.xml | 35 + .../sca/test/CallBackSetCalbackService.java | 34 + .../sca/test/CallBackSetCallbackBadCallback.java | 41 + .../sca/test/CallBackSetCallbackCallback.java | 31 + .../sca/test/CallBackSetCallbackCallbackImpl.java | 66 + .../sca/test/CallBackSetCallbackClient.java | 28 + .../sca/test/CallBackSetCallbackClientImpl.java | 193 +++ .../test/CallBackSetCallbackObjectCallback.java | 44 + .../sca/test/CallBackSetCallbackServiceImpl.java | 103 ++ .../resources/CallBackSetCallbackTest.composite | 40 + .../tuscany/sca/test/CallBackSetCallbackTest.java | 46 + .../itest/callback-setCallbackConversation/pom.xml | 35 + .../test/CallBackSetCallbackConvBadCallback.java | 40 + .../sca/test/CallBackSetCallbackConvCallback.java | 31 + .../sca/test/CallBackSetCallbackConvClient.java | 28 + .../test/CallBackSetCallbackConvClientImpl.java | 175 +++ .../CallBackSetCallbackConvNonSerCallback.java | 58 + .../CallBackSetCallbackConvObjectCallback.java | 60 + .../sca/test/CallBackSetCallbackConvService.java | 36 + .../test/CallBackSetCallbackConvServiceImpl.java | 102 ++ .../CallBackSetCallbackConvTest.composite | 34 + .../sca/test/CallBackSetCallbackConvTest.java | 46 + .../testing/sca/itest/contribution/pom.xml | 33 + .../resources/META-INF/sca/application.composite | 24 + .../ContributionDirectoryWatcherTestCase.java | 41 + .../contribution/ContributionServiceTestCase.java | 83 ++ .../resources/deployables/sample-calculator.jar | Bin 0 -> 26901 bytes .../resources/repository/sample-calculator.jar | Bin 0 -> 26901 bytes .../testing/sca/itest/conversations/pom.xml | 35 + .../apache/tuscany/sca/test/AnotherService.java | 18 + .../tuscany/sca/test/AnotherServiceImpl.java | 59 + .../tuscany/sca/test/ConversationsCallback.java | 18 + .../tuscany/sca/test/ConversationsClient.java | 12 + .../tuscany/sca/test/ConversationsClient2.java | 11 + .../tuscany/sca/test/ConversationsClientImpl.java | 466 +++++++ .../sca/test/ConversationsLifeCycleService.java | 20 + .../test/ConversationsLifeCycleServiceImpl.java | 79 ++ .../tuscany/sca/test/ConversationsService.java | 24 + .../tuscany/sca/test/ConversationsServiceImpl.java | 134 ++ .../src/main/resources/ConversationsTest.composite | 48 + .../apache/tuscany/sca/test/ConversationsTest.java | 27 + .../testing/sca/itest/databindings/LICENSE.txt | 202 +++ .../testing/sca/itest/databindings/NOTICE.txt | 14 + .../sca/itest/databindings/common/LICENSE.txt | 202 +++ .../sca/itest/databindings/common/NOTICE.txt | 14 + .../testing/sca/itest/databindings/common/pom.xml | 120 ++ .../tuscany/sca/itest/generate/Generate.java | 130 ++ .../resources/generate/DatabindingTestCase.java.vm | 116 ++ .../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/generate/pom.xml.vm | 181 +++ .../common/src/main/resources/wsdl/Dummy.wsdl | 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 | 38 + .../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 | 133 ++ .../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 | 52 + .../sca/itest/databindings/interop/LICENSE.txt | 202 +++ .../sca/itest/databindings/interop/NOTICE.txt | 14 + .../testing/sca/itest/databindings/interop/pom.xml | 200 +++ .../generate/InteropDatabindingTestCase.java.vm | 119 ++ .../main/resources/generate/JAXBGreeter.wsdl.vm | 103 ++ .../src/main/resources/generate/SDOGreeter.wsdl.vm | 103 ++ .../src/main/resources/generate/generate.xml | 100 ++ .../resources/generate/interopgreeter.composite.vm | 104 ++ .../testing/sca/itest/databindings/jaxb/pom.xml | 152 +++ .../sca/itest/jaxbdatabinding/GreeterService.java | 34 + .../jaxbdatabinding/GreeterServiceClient.java | 34 + .../jaxbdatabinding/GreeterServiceClientImpl.java | 48 + .../itest/jaxbdatabinding/GreeterServiceImpl.java | 44 + .../jaxb/src/main/resources/greeterws.composite | 67 + .../jaxb/src/main/resources/wsdl/Greeter.wsdl | 88 ++ .../jaxb/src/main/resources/xsd/Person.xsd | 30 + .../tuscany/sca/itest/JaxbDatabindingTestCase.java | 85 ++ .../sca/itest/databindings/jaxbgen/LICENSE.txt | 202 +++ .../sca/itest/databindings/jaxbgen/NOTICE.txt | 14 + .../testing/sca/itest/databindings/jaxbgen/pom.xml | 188 +++ .../src/main/resources/generate/generate.xml | 113 ++ .../jaxbgen/src/main/resources/greeter.composite | 68 + .../testing/sca/itest/databindings/pom.xml | 47 + .../testing/sca/itest/databindings/sdo/pom.xml | 148 +++ .../sca/itest/sdodatabinding/GreeterService.java | 34 + .../itest/sdodatabinding/GreeterServiceClient.java | 34 + .../sdodatabinding/GreeterServiceClientImpl.java | 47 + .../itest/sdodatabinding/GreeterServiceImpl.java | 52 + .../sdo/src/main/resources/greetersdo.composite | 70 ++ .../sdo/src/main/resources/wsdl/Greeter.wsdl | 80 ++ .../sdo/src/main/resources/xsd/Person.xsd | 30 + .../tuscany/sca/itest/SdoDatabindingTestCase.java | 88 ++ .../sca/itest/databindings/sdogen/LICENSE.txt | 202 +++ .../sca/itest/databindings/sdogen/NOTICE.txt | 14 + .../testing/sca/itest/databindings/sdogen/pom.xml | 183 +++ .../src/main/resources/generate/generate.xml | 114 ++ .../main/resources/generate/greeter.composite.vm | 75 ++ .../sca/itest/databindings/transformers/.ruleset | 172 +++ .../itest/databindings/transformers/LICENSE.txt | 202 +++ .../sca/itest/databindings/transformers/NOTICE.txt | 14 + .../sca/itest/databindings/transformers/pom.xml | 221 ++++ .../apache/tuscany/databinding/JAXBTestCase.java | 119 ++ .../databinding/TransformationTestCase.java | 249 ++++ .../tuscany/databinding/XmlObjectTestCase.java | 110 ++ .../apache/tuscany/databinding/sample/Client.java | 26 + .../tuscany/databinding/sample/ClientImpl.java | 50 + .../sample/DataBindingBootStrapTestCase.java | 124 ++ .../apache/tuscany/databinding/sample/Echo.java | 42 + .../tuscany/databinding/sample/EchoImpl.java | 43 + .../src/test/resources/DataBindingTest.composite | 34 + .../transformers/src/test/resources/ipo.xml | 33 + .../transformers/src/test/resources/ipo.xsd | 118 ++ .../transformers/src/test/resources/ipo.xsdconfig | 21 + .../itest/exceptions-crossBinding-ws/LICENSE.txt | 202 +++ .../itest/exceptions-crossBinding-ws/NOTICE.txt | 14 + .../sca/itest/exceptions-crossBinding-ws/pom.xml | 189 +++ .../exceptions/impl/StockExceptionTestJAXB.java | 33 + .../test/exceptions/impl/StockExchangeJaxB.java | 76 ++ .../sca/test/exceptions/impl/StockTraderSDO.java | 37 + .../test/exceptions/impl/StockTraderSDOImpl.java | 122 ++ .../sdohandgen/InvalidSymbolSDOException.java | 84 ++ .../sdohandgen/MarketClosedSDOException.java | 76 ++ .../exceptions/sdohandgen/StockExceptionTest.java | 50 + .../src/main/resources/ExceptionTest.composite | 26 + .../src/main/resources/intracomposite.composite | 42 + .../resources/wsdl.sdo/StockExceptionTest.wsdl | 141 +++ .../main/resources/wsdl/StockExceptionTest.wsdl | 148 +++ .../src/main/resources/xsd/StockExceptionTest.xsd | 65 + .../test/exceptions/IntraCompositeTestCase.java | 97 ++ .../sca/itest/exceptions-crossBinding/LICENSE.txt | 202 +++ .../sca/itest/exceptions-crossBinding/NOTICE.txt | 14 + .../sca/itest/exceptions-crossBinding/pom.xml | 161 +++ .../exceptions/impl/StockExceptionTestJAXB.java | 33 + .../test/exceptions/impl/StockExchangeJaxB.java | 76 ++ .../sca/test/exceptions/impl/StockTraderSDO.java | 37 + .../test/exceptions/impl/StockTraderSDOImpl.java | 122 ++ .../sdohandgen/InvalidSymbolSDOException.java | 84 ++ .../sdohandgen/MarketClosedSDOException.java | 76 ++ .../exceptions/sdohandgen/StockExceptionTest.java | 50 + .../src/main/resources/ExceptionTest.composite | 26 + .../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 + .../test/exceptions/IntraCompositeTestCase.java | 97 ++ .../testing/sca/itest/exceptions/LICENSE.txt | 202 +++ .../testing/sca/itest/exceptions/NOTICE.txt | 14 + .../testing/sca/itest/exceptions/pom.xml | 32 + .../tuscany/sca/test/exceptions/Checked.java | 57 + .../sca/test/exceptions/ExceptionHandler.java | 32 + .../sca/test/exceptions/ExceptionThrower.java | 31 + .../tuscany/sca/test/exceptions/UnChecked.java | 56 + .../test/exceptions/impl/ExceptionHandlerImpl.java | 120 ++ .../test/exceptions/impl/ExceptionThrowerImpl.java | 63 + .../src/main/resources/ExceptionTest.composite | 26 + .../src/main/resources/intracomposite.composite | 33 + .../test/exceptions/IntraCompositeTestCase.java | 57 + .../sca/itest/operation-overloading/LICENSE.txt | 202 +++ .../sca/itest/operation-overloading/NOTICE.txt | 14 + .../sca/itest/operation-overloading/pom.xml | 43 + .../sca/test/opoverload/OverloadASourceTarget.java | 43 + .../sca/test/opoverload/impl/OverloadASource.java | 105 ++ .../sca/test/opoverload/impl/OverloadATarget.java | 96 ++ .../opoverload/interceptor/MessageInterceptor.java | 114 ++ .../MessageInterceptorWirePostProcessor.java | 122 ++ .../resources/META-INF/sca/application.composite | 34 + .../opoverload/interceptor/MessageInterceptor.scdl | 27 + .../test/opoverload/impl/OverloadATestCase.java | 78 ++ .../sca-java-integration/testing/sca/itest/pom.xml | 135 ++ .../testing/sca/itest/property/pom.xml | 34 + .../apache/tuscany/sca/itest/ABCDComponent.java | 27 + .../tuscany/sca/itest/ABCDComponentImpl.java | 55 + .../org/apache/tuscany/sca/itest/ABComponent.java | 33 + .../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 | 69 ++ .../apache/tuscany/sca/itest/OverrideService.java | 25 + .../tuscany/sca/itest/OverrideServiceImpl.java | 24 + .../tuscany/sca/itest/PropertyComponent.java | 32 + .../tuscany/sca/itest/PropertyComponentImpl.java | 72 ++ .../apache/tuscany/sca/itest/PropertyService.java | 24 + .../src/main/resources/PropertyTest.composite | 197 +++ .../property/src/main/resources/fileProperty.txt | 1 + .../src/main/resources/manyValuesFileProperty.txt | 6 + .../apache/tuscany/sca/itest/PropertyTestCase.java | 186 +++ .../testing/sca/itest/spec/pom.xml | 34 + .../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 | 28 + .../sca/test/spec/impl/MyListServiceImpl.java | 73 ++ .../tuscany/sca/test/spec/impl/MyServiceImpl.java | 122 ++ .../sca/test/spec/impl/MyTotalServiceImpl.java | 83 ++ .../src/main/resources/CompositeTest.composite | 33 + .../src/main/resources/myListService.composite | 32 + .../main/resources/myServiceInComposite.composite | 53 + .../main/resources/myServiceInRecursive.composite | 53 + .../src/main/resources/mySimpleService.composite | 35 + .../resources/mySimpleServiceInRecursive.composite | 48 + .../mySimpleServiceInRecursive2.composite | 47 + .../src/main/resources/myTotalService.composite | 32 + .../resources/myTotalServiceInComposite.composite | 43 + ...erviceInCompositeForReferenceOverride.composite | 81 ++ .../resources/myTotalServiceInRecursive.composite | 62 + ...erviceInRecursiveForReferenceOverride.composite | 55 + .../spec/src/main/resources/myservice.composite | 51 + .../ComponentServiceReferenceListTestCase.java | 53 + .../spec/ComponentServiceReferenceTestCase.java | 88 ++ .../tuscany/sca/test/spec/ComponentTestCase.java | 110 ++ .../spec/CompositeOneService2LevelTestCase.java | 191 +++ .../sca/test/spec/CompositeOneServiceTestCase.java | 84 ++ ...siteServiceReferenceForRefOverrideTestCase.java | 83 ++ .../spec/CompositeServiceReferenceTestCase.java | 95 ++ .../tuscany/sca/test/spec/CompositeTestCase.java | 96 ++ .../testing/sca/itest/wsdl/pom.xml | 135 ++ .../services/accountdata/AccountDataService.java | 95 ++ .../accountdata/AccountDataServiceImpl.java | 80 ++ .../accountdata/AccountServiceClientImpl.java | 80 ++ .../services/accountdata/Component2aImpl.java | 80 ++ .../services/accountdata/Component2bImpl.java | 80 ++ .../services/accountdata/Component3aImpl.java | 80 ++ .../services/accountdata/Component3bImpl.java | 80 ++ .../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 | 402 ++++++ .../wsdl/src/main/resources/WSDLTest.composite | 412 +++++++ .../accountdata/Component2bImpl.componentType | 10 + .../accountdata/Component3bImpl.componentType | 10 + .../sca/itest/Component2bImpl.componentType | 10 + .../sca/itest/Component3bImpl.componentType | 10 + .../src/main/resources/wsdl/AccountService.wsdl | 467 +++++++ .../resources/wsdl/AccountServiceC1a2a3a4a.wsdl | 467 +++++++ .../resources/wsdl/AccountServiceC1a2a3a4b.wsdl | 467 +++++++ .../resources/wsdl/AccountServiceC1a2a3b4a.wsdl | 467 +++++++ .../resources/wsdl/AccountServiceC1a2a3b4b.wsdl | 467 +++++++ .../resources/wsdl/AccountServiceC1a2b3a4a.wsdl | 467 +++++++ .../resources/wsdl/AccountServiceC1a2b3a4b.wsdl | 467 +++++++ .../resources/wsdl/AccountServiceC1a2b3b4a.wsdl | 467 +++++++ .../resources/wsdl/AccountServiceC1a2b3b4b.wsdl | 467 +++++++ .../resources/wsdl/AccountServiceC1b2a3a4a.wsdl | 467 +++++++ .../resources/wsdl/AccountServiceC1b2a3a4b.wsdl | 467 +++++++ .../resources/wsdl/AccountServiceC1b2a3b4a.wsdl | 467 +++++++ .../resources/wsdl/AccountServiceC1b2a3b4b.wsdl | 467 +++++++ .../resources/wsdl/AccountServiceC1b2b3a4a.wsdl | 467 +++++++ .../resources/wsdl/AccountServiceC1b2b3a4b.wsdl | 467 +++++++ .../resources/wsdl/AccountServiceC1b2b3b4a.wsdl | 467 +++++++ .../resources/wsdl/AccountServiceC1b2b3b4b.wsdl | 467 +++++++ .../wsdl/src/main/resources/wsdl/helloworld.wsdl | 80 ++ .../main/resources/wsdl/helloworldC1a2a3a4a.wsdl | 80 ++ .../main/resources/wsdl/helloworldC1a2a3a4b.wsdl | 80 ++ .../main/resources/wsdl/helloworldC1a2a3b4a.wsdl | 80 ++ .../main/resources/wsdl/helloworldC1a2a3b4b.wsdl | 80 ++ .../main/resources/wsdl/helloworldC1a2b3a4a.wsdl | 80 ++ .../main/resources/wsdl/helloworldC1a2b3a4b.wsdl | 80 ++ .../main/resources/wsdl/helloworldC1a2b3b4a.wsdl | 80 ++ .../main/resources/wsdl/helloworldC1a2b3b4b.wsdl | 80 ++ .../main/resources/wsdl/helloworldC1b2a3a4a.wsdl | 80 ++ .../main/resources/wsdl/helloworldC1b2a3a4b.wsdl | 80 ++ .../main/resources/wsdl/helloworldC1b2a3b4a.wsdl | 80 ++ .../main/resources/wsdl/helloworldC1b2a3b4b.wsdl | 80 ++ .../main/resources/wsdl/helloworldC1b2b3a4a.wsdl | 80 ++ .../main/resources/wsdl/helloworldC1b2b3a4b.wsdl | 80 ++ .../main/resources/wsdl/helloworldC1b2b3b4a.wsdl | 80 ++ .../main/resources/wsdl/helloworldC1b2b3b4b.wsdl | 80 ++ .../apache/tuscany/sca/itest/SDOWSDLTestCase.java | 97 ++ .../org/apache/tuscany/sca/itest/WSDLTestCase.java | 149 +++ 546 files changed, 40799 insertions(+) create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/IntegrationTestHelp.html create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/pom.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/main/java/org/apache/tuscany/sca/itest/SCATestToolService.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/main/resources/bindingsclient.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/main/resources/wsdl/testtool.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/main/webapp/SCATestTool.jsp create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/main/webapp/WEB-INF/web.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTest.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/WSBindingsClientTestCase.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTest.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/pom.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCADataTypeHelper.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCADataTypeHelperException.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolCallbackService.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolServer.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolService.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolServiceImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityService.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/resources/bindingscomposite-system.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/resources/bindingscomposite.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/resources/wsdl/testtool.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/resources/wsdl/testutility.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTestCase.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/pom.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/itest/SCATestToolCallbackService.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityServer.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityService.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityServiceImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/resources/bindingsutility-system.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/resources/bindingsutility.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/resources/wsdl/testutility.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTestCase.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/pom.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-api/pom.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiCallBack.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClient.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClientImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiService.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiServiceImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-api/src/main/resources/CallBackApiTest.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-api/src/test/java/org/apache/tuscany/sca/test/CallBackApiTest.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-basic/pom.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-basic/src/main/resources/CallBackBasicTest.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-basic/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/pom.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeCallBack.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClient.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClientImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeService.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/main/resources/CallBackCTypeClient.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/main/resources/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.componentType create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/test/java/org/apache/tuscany/sca/test/CallBackCTypeTest.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-id/pom.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdCallBack.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdClient.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdClientImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdService.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdServiceImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-id/src/main/resources/CallBackIdClient.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-id/src/test/java/org/apache/tuscany/sca/test/CallBackIdTest.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/pom.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCalbackService.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackBadCallback.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackCallback.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackCallbackImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackClient.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackClientImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackObjectCallback.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackServiceImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/resources/CallBackSetCallbackTest.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/test/java/org/apache/tuscany/sca/test/CallBackSetCallbackTest.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/pom.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvBadCallback.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvCallback.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvClient.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvClientImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvNonSerCallback.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvObjectCallback.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvService.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvServiceImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/resources/CallBackSetCallbackConvTest.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/test/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvTest.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/contribution/pom.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/contribution/src/main/resources/META-INF/sca/application.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/contribution/src/test/java/org/apache/tuscany/sca/test/contribution/ContributionDirectoryWatcherTestCase.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/contribution/src/test/java/org/apache/tuscany/sca/test/contribution/ContributionServiceTestCase.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/contribution/src/test/resources/deployables/sample-calculator.jar create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/contribution/src/test/resources/repository/sample-calculator.jar create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/pom.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/AnotherService.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/AnotherServiceImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsCallback.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClient.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClient2.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClientImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsLifeCycleService.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsLifeCycleServiceImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsService.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsServiceImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/resources/ConversationsTest.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/test/java/org/apache/tuscany/sca/test/ConversationsTest.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/LICENSE.txt create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/NOTICE.txt create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/LICENSE.txt create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/NOTICE.txt create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/pom.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/java/org/apache/tuscany/sca/itest/generate/Generate.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/generate/DatabindingTestCase.java.vm create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/generate/Greeter.wsdl.vm create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/generate/GreeterService.java.vm create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/generate/GreeterServiceClient.java.vm create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/generate/GreeterServiceClientImpl.java.vm create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/generate/GreeterServiceImpl.java.vm create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/generate/generate.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/generate/pom.xml.vm create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/wsdl/Dummy.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Annotation.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Annotation.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Attribute.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Attribute.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeReference.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeReference.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithDefaultValue.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithDefaultValue.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithFixedValue.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithFixedValue.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOAliasName.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOAliasName.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDODataType.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDODataType.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOName.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOName.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertySDOOppositePropertyType.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertySDOOppositePropertyType.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertyType.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertyType.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOString.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOString.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInAnySimpleType.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInAnySimpleType.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInAnyType.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInAnyType.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInAnyURI.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInAnyURI.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInBase64Binary.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInBase64Binary.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInBoolean.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInBoolean.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInByte.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInByte.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDate.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDate.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDateTime.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDateTime.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDecimal.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDecimal.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDouble.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDouble.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDuration.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDuration.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInFloat.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInFloat.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGDay.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGDay.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGMonth.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGMonth.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGMonthDay.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGMonthDay.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGYear.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGYear.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGYearMonth.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGYearMonth.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInHexBinary.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInHexBinary.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInID.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInID.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInIDREF.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInIDREF.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInIDREFS.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInIDREFS.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInInt.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInInt.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInInteger.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInInteger.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInLanguage.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInLanguage.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInLong.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInLong.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNCName.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNCName.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKEN.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKEN.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKENS.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKENS.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNOTATION.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNOTATION.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInName.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInName.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNegativeInteger.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNegativeInteger.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNonNegativeInteger.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNonNegativeInteger.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNonPositiveInteger.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNonPositiveInteger.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNormalizedString.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNormalizedString.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInPositiveInteger.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInPositiveInteger.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInQName.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInQName.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInShort.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInShort.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInString.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInString.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInTime.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInTime.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInToken.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInToken.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedByte.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedByte.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedInt.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedInt.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedLong.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedLong.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedShort.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedShort.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeComplexContentRestrictingComplexType.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeComplexContentRestrictingComplexType.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingComplexType.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingComplexType.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingSimpleType.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingSimpleType.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeSimpleContentRestrictingComplexType.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeSimpleContentRestrictingComplexType.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithAbstract.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithAbstract.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithCDATA.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithCDATA.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithContent.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithContent.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithMixed.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithMixed.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenAttributes.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenAttributes.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenContent.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenContent.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOppositeProperty.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOppositeProperty.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOAliasName.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOAliasName.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOName.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOName.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOSequence.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOSequence.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutContent.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutContent.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutName.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutName.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/DefaultNamespace.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/DefaultNamespace.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementInAll.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementInAll.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementInChoice.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementInChoice.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSDOChangeSummaryType.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSDOChangeSummaryType.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithDefault.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithDefault.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithFixed.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithFixed.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDODataType.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDODataType.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOOppositePropertyType.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOOppositePropertyType.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOPropertyType.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOPropertyType.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOString.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOString.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementSubstitutionGroupBase.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementSubstitutionGroupBase.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithMaxOccurs.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithMaxOccurs.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithNillable.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithNillable.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithSDOAliasName.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithSDOAliasName.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithSDOName.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithSDOName.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/GlobalElementComplexType.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/GlobalElementComplexType.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/GlobalElementSimpleType.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/GlobalElementSimpleType.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Import.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Import.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ImportedSchema.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Include.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Include.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Interop.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Notation.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Notation.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Person.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SDOJavaPackage.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SDOJavaPackage.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithAbstract.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithAbstract.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithExtendedInstanceClass.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithExtendedInstanceClass.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithInstanceClass.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithInstanceClass.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithList.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithList.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithName.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithName.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithSDOName.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithSDOName.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithUnion.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithUnion.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithoutName.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithoutName.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/TargetNamespace.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/TargetNamespace.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/datagraph.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/sdoJava.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/sdoModel.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/test/java/org/apache/tuscany/sca/itest/generate/GenerateTestCase.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/interop/LICENSE.txt create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/interop/NOTICE.txt create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/interop/pom.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/interop/src/main/resources/generate/InteropDatabindingTestCase.java.vm create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/interop/src/main/resources/generate/JAXBGreeter.wsdl.vm create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/interop/src/main/resources/generate/SDOGreeter.wsdl.vm create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/interop/src/main/resources/generate/generate.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/interop/src/main/resources/generate/interopgreeter.composite.vm create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/pom.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterService.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterServiceClient.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterServiceClientImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterServiceImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/resources/greeterws.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/resources/wsdl/Greeter.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/resources/xsd/Person.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/test/java/org/apache/tuscany/sca/itest/JaxbDatabindingTestCase.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxbgen/LICENSE.txt create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxbgen/NOTICE.txt create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxbgen/pom.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxbgen/src/main/resources/generate/generate.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxbgen/src/main/resources/greeter.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/pom.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/pom.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/main/java/org/apache/tuscany/sca/itest/sdodatabinding/GreeterService.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/main/java/org/apache/tuscany/sca/itest/sdodatabinding/GreeterServiceClient.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/main/java/org/apache/tuscany/sca/itest/sdodatabinding/GreeterServiceClientImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/main/java/org/apache/tuscany/sca/itest/sdodatabinding/GreeterServiceImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/main/resources/greetersdo.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/main/resources/wsdl/Greeter.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/main/resources/xsd/Person.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/test/java/org/apache/tuscany/sca/itest/SdoDatabindingTestCase.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdogen/LICENSE.txt create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdogen/NOTICE.txt create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdogen/pom.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdogen/src/main/resources/generate/generate.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdogen/src/main/resources/generate/greeter.composite.vm create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/.ruleset create mode 100755 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/LICENSE.txt create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/NOTICE.txt create mode 100755 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/pom.xml create mode 100755 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/JAXBTestCase.java create mode 100755 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/TransformationTestCase.java create mode 100755 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/XmlObjectTestCase.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/sample/Client.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/sample/ClientImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/sample/DataBindingBootStrapTestCase.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/sample/Echo.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/sample/EchoImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/resources/DataBindingTest.composite create mode 100755 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/resources/ipo.xml create mode 100755 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/resources/ipo.xsd create mode 100755 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/resources/ipo.xsdconfig create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/LICENSE.txt create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/NOTICE.txt create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/pom.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExceptionTestJAXB.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExchangeJaxB.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockTraderSDO.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockTraderSDOImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/InvalidSymbolSDOException.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/MarketClosedSDOException.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/StockExceptionTest.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/resources/ExceptionTest.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/resources/intracomposite.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/resources/wsdl.sdo/StockExceptionTest.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/resources/wsdl/StockExceptionTest.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/resources/xsd/StockExceptionTest.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTestCase.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/LICENSE.txt create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/NOTICE.txt create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/pom.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExceptionTestJAXB.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExchangeJaxB.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockTraderSDO.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockTraderSDOImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/InvalidSymbolSDOException.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/MarketClosedSDOException.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/StockExceptionTest.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/resources/ExceptionTest.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/resources/intracomposite.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/resources/wsdl.sdo/StockExceptionTest.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/resources/wsdl/StockExceptionTest.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/resources/xsd/StockExceptionTest.xsd create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTestCase.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/LICENSE.txt create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/NOTICE.txt create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/pom.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/Checked.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionHandler.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionThrower.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/UnChecked.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionHandlerImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionThrowerImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/resources/ExceptionTest.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/resources/intracomposite.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTestCase.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/LICENSE.txt create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/NOTICE.txt create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/pom.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/OverloadASourceTarget.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadASource.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATarget.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/interceptor/MessageInterceptor.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/interceptor/MessageInterceptorWirePostProcessor.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/main/resources/META-INF/sca/application.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/main/resources/org/apache/tuscany/sca/test/opoverload/interceptor/MessageInterceptor.scdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/test/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATestCase.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/pom.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/pom.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/ABCDComponent.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/ABCDComponentImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/ABComponent.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/ABComponentImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/CDComponent.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/CDComponentImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/ComplexPropertyBean.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/OverrideService.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/OverrideServiceImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/PropertyComponent.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/PropertyComponentImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/PropertyService.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/resources/PropertyTest.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/resources/fileProperty.txt create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/resources/manyValuesFileProperty.txt create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/test/java/org/apache/tuscany/sca/itest/PropertyTestCase.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/pom.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyListService.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyListServiceByYear.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyService.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyServiceByDate.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyTotalService.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/SCAComponentService.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyListServiceImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyServiceImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyTotalServiceImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/CompositeTest.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myListService.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myServiceInComposite.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myServiceInRecursive.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/mySimpleService.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/mySimpleServiceInRecursive.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/mySimpleServiceInRecursive2.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalService.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalServiceInComposite.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalServiceInCompositeForReferenceOverride.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalServiceInRecursive.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalServiceInRecursiveForReferenceOverride.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myservice.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceListTestCase.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceTestCase.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/ComponentTestCase.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/CompositeOneService2LevelTestCase.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/CompositeOneServiceTestCase.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/CompositeServiceReferenceForRefOverrideTestCase.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/CompositeServiceReferenceTestCase.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/CompositeTestCase.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/pom.xml create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/AccountDataService.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/AccountDataServiceImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/AccountServiceClientImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/Component2aImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/Component2bImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/Component3aImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/Component3bImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/CustomerIdService.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/helloworld/HelloWorldImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/helloworld/HelloWorldService.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/helloworld/HelloWorldServiceComponent.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/org/apache/tuscany/sca/itest/Component2aImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/org/apache/tuscany/sca/itest/Component2bImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/org/apache/tuscany/sca/itest/Component3aImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/org/apache/tuscany/sca/itest/Component3bImpl.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/SDOWSDLTest.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/WSDLTest.composite create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/bigbank/account/services/accountdata/Component2bImpl.componentType create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/bigbank/account/services/accountdata/Component3bImpl.componentType create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/org/apache/tuscany/sca/itest/Component2bImpl.componentType create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/org/apache/tuscany/sca/itest/Component3bImpl.componentType create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountService.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2a3a4a.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2a3a4b.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2a3b4a.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2a3b4b.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2b3a4a.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2b3a4b.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2b3b4a.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2b3b4b.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2a3a4a.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2a3a4b.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2a3b4a.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2a3b4b.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2b3a4a.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2b3a4b.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2b3b4a.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2b3b4b.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworld.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2a3a4a.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2a3a4b.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2a3b4a.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2a3b4b.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2b3a4a.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2b3a4b.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2b3b4a.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2b3b4b.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2a3a4a.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2a3a4b.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2a3b4a.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2a3b4b.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2b3a4a.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2b3a4b.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2b3b4a.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2b3b4b.wsdl create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/test/java/org/apache/tuscany/sca/itest/SDOWSDLTestCase.java create mode 100644 sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/test/java/org/apache/tuscany/sca/itest/WSDLTestCase.java (limited to 'sca-java-1.x/branches/sca-java-integration/testing/sca/itest') diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/IntegrationTestHelp.html b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/IntegrationTestHelp.html new file mode 100644 index 0000000000..66f84f52c3 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/IntegrationTestHelp.html @@ -0,0 +1,1293 @@ + + + + + + + + + + + + + IntegrationTestFramework - Getting Started + + + + + + + +
+
+
+

Itegration Test Framework - Getting started

+ +

This page will describe what is the integration test framework +and how it can be used to write test cases.

+ +

The Integration Test Framework gives the ability for users to +write +Function Verification Test Cases, which can then be run on a fully +integrated tuscany runtime. Some of the features of the Itest plugin +are auto start and stop of the tuscany runtime, and running the test +cases within the runtime.

+ +
+ +
+

Writing Test Cases to run on Tuscany StandAlone

+ +You could have a simple test +case as is the example with the propertyTest. Here the application is +simply a jar file that would run on standalone tuscany runtime. In the +pom.xml file, you can specify the following:
+ +
+ +
+ + +
+

<plugin>
+ +                +<groupId>org.apache.tuscany.sca.plugins</groupId>
+ +                +<artifactId>tuscany-itest-plugin</artifactId>
+ +                +<executions>
+ +                    +<execution>
+ +                        +<id>start</id>
+ +                        +<goals>
+ +                            +<goal>start</goal>
+ +                        +</goals>
+ +                    +</execution>
+ +                    +<execution>
+ +                        +<id>test</id>
+ +                        +<goals>
+ +                            +<goal>test</goal>
+ +                        +</goals>
+ +                        +<configuration>
+ +                            +<includes>
+ +                                +<include>**/*ITest.java</include>
+ +                            +</includes>
+ +                        +</configuration>
+ +                    +</execution>
+ +                    +<execution>
+ +                        +<id>stop</id>
+ +                        +<goals>
+ +                            +<goal>stop</goal>
+ +                        +</goals>
+ +                    +</execution>
+ +                +</executions>
+ +   </plugin>

+ +
+ +In the above, the code marked in red starts up the tuscany runtime.
+ +
+ +And similarly, the code marked in blue stops the tuscany +runtime after the tests are run
+ +
+ +The code marked in green runs the actual test cases. Notice that it +does have an <include> filter, to indicate which of the +tests you +want to include. Similarly you can have an <exclude> +filter.
+ +
+ +Also, you should have the following code in order to not run these +testcases as part of the regular unit tests in case you have other unit +testcases.
+ +
+ +
+

    +       +<plugin>
+ +                +<groupId>org.apache.maven.plugins</groupId>
+ +                +<artifactId>maven-surefire-plugin</artifactId>
+ +                +<configuration>
+ +                    +<excludes>
+                        +<exclude>**/*ITest.java</exclude>
+ +                    +</excludes>
+ +                +</configuration>
+ +            +</plugin>

+ +To see the code for the test case, please check the propertyTest module.
+ +
+

Writing Test Cases to test on Apache Tomcat

+ +
+ +You may have your testSuite containing webApps that need to be +deployed on tomcat (For example if you have testcases to test +single or multiple composites). In such a case, you would need to use +the "Maven Cargo Plugin". More information on the plugin itself can be +found here: Maven +Cargo Plugin.
+ +
+ +This plugin can be used to automatically deploy your webApp on a tomcat +server, start the server, run the testcases and stop the server. The +following code illustrates this process.
+ +
+ +The Maven Cargo plugin is defined as such in the pom.xml file:
+ +
+ +

<plugin>
+ +                +<groupId>org.codehaus.cargo</groupId>
+ +                +<artifactId>cargo-maven2-plugin</artifactId>
+ +</plugin>

+ +The following code illustrated starting and stopping the container from +within the cargo plugin. The container is started in a +"pre-integration-test" phase. This ensures that the container is +started well before the actual tests are run which is desired. Also, +the container is stopped in a "post-integration-test" phase, which +ensures that the container is stopped well after the test cases are run.
+ +

    +       +    <executions>
+ +                    +<execution>
+                        +<id>start-container</id>
+                        +<phase>pre-integration-test</phase>
+                        +<goals>
+                            +<goal>start</goal>
+                        +</goals>
+ +                    +</execution>
+ +                    +<execution>
+                        +<id>stop-container</id>
+                        +<phase>post-integration-test</phase>
+                        +<goals>
+                            +<goal>stop</goal>
+                        +</goals>
+ +                    +</execution>
+ +                +</executions>

+ +The following code specifies the configuration for the container. +Firstly the configuration of the container itself is specified, by +specifying the container ID and home, which in this case is wherever +tomcat is installed. Next, the configuration to be used within the +container is specified. This would include the home for the container, +which is where all the container (tomcat) core files are copied and +used for the testcases. Also specified, are the webApps which need to +be deployed on the container during this run.
+ +
+ +

              +<configuration>
+ +                    +<wait>false</wait>
+ +
+ +                    +<!-- Container configuration -->
+ +                    +<container>
+                        +<containerId>tomcat5x</containerId>
+                        +<home>${tomcat.dir}</home>
+ +                    +</container>
+ +
+ +                    +<!-- Configuration to use with the container -->
+ +                    +<configuration>
+                        +<home>${project.build.directory}/tomcat5x</home>
+ +        +    +        +    +    <deployables>
+ +        +    +        +    +      +<deployable>
+ +        +    +        +    +        +<groupId>org.apache.tuscany.testing.bindingstest</groupId>
+ +        +    +        +    +        +<artifactId>bindingscomposite</artifactId>
+ +        +    +        +    +        +<type>war</type>
+ +        +    +        +    +        +<properties>
+ +        +    +        +    +            +<context>/testtool</context>
+ +        +    +        +    +        +</properties>
+ +        +    +        +    +        +<pingURL>http://localhost:8080/testtool/services</pingURL>
+ +        +    +        +    +      +</deployable>
+ +        +    +        +    +      +<deployable>
+ +        +    +        +    +        +<groupId>org.apache.tuscany.testing.bindingstest</groupId>
+ +        +    +        +    +        +<artifactId>bindingsutility</artifactId>
+ +        +    +        +    +        +<type>war</type>
+ +        +    +        +    +        +<properties>
+ +        +    +        +    +            +<context>/testutil</context>
+ +        +    +        +    +        +</properties>
+ +        +    +        +    +        +<pingURL>http://localhost:8080/testutil/services</pingURL>
+ +        +    +        +    +      +</deployable>
+ +        +    +        +    +    </deployables>
+ +                    +</configuration>
+ +
+ +                +</configuration>
+ +

+ +In the above code, for each webApp that is deployed, there is a +<context> property specified, which is the context under +which +the webApp is deployed.
+ +
+ +Now the final part of the code below which illustrates the running of +the testcases using the itest plugin:
+ +
+ +

            + <plugin>
+ +                +<groupId>org.apache.tuscany.sca.plugins</groupId>
+ +                +<artifactId>tuscany-itest-plugin</artifactId>
+ +                +<executions>
+ +                    +<execution>
+                        +<id>start</id>
+                        +<phase>pre-integration-test</phase>
+                        +<goals>
+                            +<goal>start</goal>
+                        +</goals>
+                        +<configuration>
+                            +<applicationScdl>
+                                +file:///C:/SDO2/Tuscany/java/testing/sca/itest/bindingsTest/bindingsclient/src/main/resources/META-INF/sca/default.scdl
+                            +</applicationScdl>
+                            +<extensions>
+                                +<dependency>
+                                    +<groupId>org.apache.tuscany.sca.services.databinding</groupId>
+                                    +<artifactId>databinding-sdo</artifactId>
+                                    +<version>1.0-incubator-SNAPSHOT</version>
+                                +</dependency>
+                                +<dependency>
+                                    +<groupId>org.apache.tuscany.sca.services.bindings</groupId>
+                                    +<artifactId>axis2</artifactId>
+                                    +<version>1.0-incubator-SNAPSHOT</version>
+                                +</dependency>
+                            +</extensions>
+                        +</configuration>
+ +                    +</execution>
+ +                    +<execution>
+                        +<id>test</id>
+                        +<phase>pre-integration-test</phase>
+                        +<goals>
+                            +<goal>test</goal>
+                        +</goals>
+                        +<configuration>
+                            +<includes>
+                                +<include>**/*ITest.java</include>
+                            +</includes>
+                        +</configuration>
+ +                    +</execution>
+ +                    +<execution>
+                        +<id>stop</id>
+                        +<phase>pre-integration-test</phase>
+                        +<goals>
+                            +<goal>stop</goal>
+                        +</goals>
+ +                    +</execution>
+ +                +</executions>
+ +            +</plugin>
+ +

+ +Notice in the above code, how the execution <start> and +<stop> phase for the testcases is defined as +"pre-integration-test". This is the same phase under which the +container was started. Hence this ensures that the testcases are run +after the container is started, and before it is stopped. In the above +example, we have two composites as webApps being deployed on tomcat. +Since we have multiple scdl files, with the same name, we need to +specify the application scdl file which can done using +<applicationScdl> property. Also, if the testcases +require some +extensions, then they can also be specified as indicated above using +the <extensions> property.
+ +
+ +The final pom file for such a test case should be similar to the one +given below: +

  <project +xmlns="http://maven.apache.org/POM/4.0.0" +xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ +      +xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 +http://maven.apache.org/maven-v4_0_0.xsd">
+ +      +<modelVersion>4.0.0</modelVersion>
+ +      +<groupId>org.apache.tuscany.testing.bindingstest</groupId>
+ +      +<artifactId>bindingsclient</artifactId>
+ +      +<packaging>jar</packaging>
+ +      +<version>SNAPSHOT</version>
+ +      <name>SCA FVT +Bindings Test Tool JSP Client</name>
+ +
+ +        +<properties>
+ +        +<tomcat.dir>C:/Apache/Tomcat +5.5</tomcat.dir>
+ +        +</properties>
+ +
+ +      <dependencies>
+ +        +    <dependency>
+ +      +        +    +<groupId>junit</groupId>
+ +      +        +    +<artifactId>junit</artifactId>
+ +      +        +    +<version>3.8.1</version>
+ +      +        +    +<scope>test</scope>
+ +        +    </dependency>
+ +        +    <dependency>
+ +      +        +  <groupId>org.osoa</groupId>
+ +      +        +  <artifactId>sca-api-r0.95</artifactId>
+ +      +        +  <version>1.0-incubator-SNAPSHOT</version>
+ +      +        +  <scope>provided</scope>
+ +        +    </dependency>
+ +   
+ +       +    <dependency>
+ +       +        +<groupId>org.apache.tuscany.sca.services.bindings</groupId>
+ +       +        +<artifactId>axis2</artifactId>
+ +       +        +<version>1.0-incubator-SNAPSHOT</version>
+ +        +   </dependency>
+ +        +   <dependency>
+ +      +        +<groupId>org.apache.tuscany.testing.bindingstest</groupId>
+ +      +        +<artifactId>bindingscomposite</artifactId>
+ +      +        +<version>SNAPSHOT</version>
+ +      +        +<type>war</type>
+ +      +        +<scope>provided</scope>
+ +        +   </dependency>
+ +        +   <dependency>
+ +      +        +<groupId>org.apache.tuscany.testing.bindingstest</groupId>
+ +      +        +<artifactId>bindingsutility</artifactId>
+ +      +        +<version>SNAPSHOT</version>
+ +      +        +<type>war</type>
+ +      +        +<scope>provided</scope>
+ +        +   </dependency>
+ +        +   <dependency>
+ +        +    +    +<groupId>org.apache.tuscany.sca</groupId>
+ +        +        +<artifactId>test</artifactId>
+ +        +    +    +<version>1.0-incubator-SNAPSHOT</version>
+ +        +    </dependency>
+ +    
+ +    
+ +      </dependencies>
+ +
+ +
+ +
+ + 
+ +  <build>
+ +     +<defaultGoal>install</defaultGoal>
+ +     <plugins>
+ +   +       +<plugin>
+ +   +         +<groupId>org.apache.maven.plugins</groupId>
+ +   +         +<artifactId>maven-compiler-plugin</artifactId>
+ +   +         +<configuration>
+ +   +           +<source>1.5</source>
+ +   +           +<target>1.5</target>
+ +   +           +<showDeprecation>true</showDeprecation>
+ +   +           +<compilerArgument>-Xlint:unchecked,deprecation,fallthrough,finally</compilerArgument>
+ +   +         +</configuration>
+ +   +       +</plugin>
+ +   +       +<plugin>
+ +                +<groupId>org.codehaus.cargo</groupId>
+ +                +<artifactId>cargo-maven2-plugin</artifactId>
+ +                +<executions>
+ +                    +<execution>
+                        +<id>start-container</id>
+                        +<phase>pre-integration-test</phase>
+                        +<goals>
+                            +<goal>start</goal>
+                        +</goals>
+ +                    +</execution>
+ +                    +<execution>
+                        +<id>stop-container</id>
+                        +<phase>post-integration-test</phase>
+                        +<goals>
+                            +<goal>stop</goal>
+                        +</goals>
+ +                    +</execution>
+ +                +</executions>
+ +
+ +                +<configuration>
+ +                    +<wait>false</wait>
+ +
+ +                    +<!-- Container configuration -->
+ +                    +<container>
+                        +<containerId>tomcat5x</containerId>
+                        +<home>${tomcat.dir}</home>
+                        +<!--
+                            +<zipUrlInstaller>
+                            +<url>http://www.orionserver.com/distributions/orion2.0.5.zip</url>
+                            +<installDir>${java.io.tmpdir}/cargoinstalls</installDir>
+                            +</zipUrlInstaller>
+                        +-->
+ +
+ +                    +</container>
+ +
+ +                    +<!-- Configuration to use with the container -->
+ +                    +<configuration>
+                        +<home>${project.build.directory}/tomcat5x</home>
+ +        +    +        +    +    <deployables>
+ +        +    +        +    +      +<deployable>
+ +        +    +        +    +        +<groupId>org.apache.tuscany.testing.bindingstest</groupId>
+ +        +    +        +    +        +<artifactId>bindingscomposite</artifactId>
+ +        +    +        +    +        +<type>war</type>
+ +        +    +        +    +        +<properties>
+ +        +    +        +    +            +<context>/testtool</context>
+ +        +    +        +    +        +</properties>
+ +        +    +        +    +        +<pingURL>http://localhost:8080/testtool/services</pingURL>
+ +        +    +        +    +      +</deployable>
+ +        +    +        +    +      +<deployable>
+ +        +    +        +    +        +<groupId>org.apache.tuscany.testing.bindingstest</groupId>
+ +        +    +        +    +        +<artifactId>bindingsutility</artifactId>
+ +        +    +        +    +        +<type>war</type>
+ +        +    +        +    +        +<properties>
+ +        +    +        +    +            +<context>/testutil</context>
+ +        +    +        +    +        +</properties>
+ +        +    +        +    +        +<pingURL>http://localhost:8080/testutil/services</pingURL>
+ +        +    +        +    +      +</deployable>
+ +        +    +        +    +    </deployables>
+ +                    +</configuration>
+ +
+ +                +</configuration>
+ +            +</plugin>   +      
+ +            +<plugin>
+ +                +<groupId>org.apache.tuscany.sca.plugins</groupId>
+ +                +<artifactId>tuscany-itest-plugin</artifactId>
+ +                +<executions>
+ +                    +<execution>
+                        +<id>start</id>
+                        +<phase>pre-integration-test</phase>
+                        +<goals>
+                            +<goal>start</goal>
+                        +</goals>
+                        +<configuration>
+                            +<applicationScdl>
+                                +file:///C:/SDO2/Tuscany/java/testing/sca/itest/bindingsTest/bindingsclient/src/main/resources/META-INF/sca/default.scdl
+                            +</applicationScdl>
+                            +<extensions>
+                                +<dependency>
+                                    +<groupId>org.apache.tuscany.sca.services.databinding</groupId>
+                                    +<artifactId>databinding-sdo</artifactId>
+                                    +<version>1.0-incubator-SNAPSHOT</version>
+                                +</dependency>
+                                +<dependency>
+                                    +<groupId>org.apache.tuscany.sca.services.bindings</groupId>
+                                    +<artifactId>axis2</artifactId>
+                                    +<version>1.0-incubator-SNAPSHOT</version>
+                                +</dependency>
+                            +</extensions>
+                        +</configuration>
+ +                    +</execution>
+ +                    +<execution>
+                        +<id>test</id>
+                        +<phase>pre-integration-test</phase>
+                        +<goals>
+                            +<goal>test</goal>
+                        +</goals>
+                        +<configuration>
+                            +<includes>
+                                +<include>**/*ITest.java</include>
+                            +</includes>
+                        +</configuration>
+ +                    +</execution>
+ +                    +<execution>
+                        +<id>stop</id>
+                        +<phase>pre-integration-test</phase>
+                        +<goals>
+                            +<goal>stop</goal>
+                        +</goals>
+ +                    +</execution>
+ +                +</executions>
+ +            +</plugin>
+ +        +    <plugin>
+ +        +    +    +<groupId>org.apache.maven.plugins</groupId>
+ +        +    +    +<artifactId>maven-surefire-plugin</artifactId>
+ +        +        +<configuration>
+ +        +    +        +<excludes>
+ +        +    +            +<exclude>**/*ITest.java</exclude>
+ +        +    +        +</excludes>
+ +        +        +</configuration>
+ +        +    </plugin>
+ +    </plugins>
+ +  </build>
+ + 
+ +</project>

+ +
+ +
+

Getting Help

+ +

First place to look is at the Tuscany FAQ at http://incubator.apache.org/tuscany/faq.html +

+ +

Any problem with this release can be reported to the Tuscany mailing lists or create a JIRA +issue at http://issues.apache.org/jira/browse/Tuscany.

+ +

+ + + + + + + + + + + + +
+

Thank you for your interest in Tuscany.

+ + -The Tuscany Development Team +

+ +
+ +

+ +
+ +
+ +
+ + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/pom.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/pom.xml new file mode 100644 index 0000000000..f9a72ae54b --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/pom.xml @@ -0,0 +1,64 @@ + + + + + + org.apache.tuscany.testing + sca-itest + 0.1-integration-incubating-SNAPSHOT + ../../pom.xml + + + 4.0.0 + org.apache.tuscany.testing.bindingstest + tuscany-itest-bindings-bindingsclient + jar + SCA FVT Bindings Test Tool JSP Client + + + + + org.apache.tuscany.testing.bindingstest + tuscany-itest-bindings-bindingscomposite + 0.1-integration-incubating-SNAPSHOT + + + + org.apache.tuscany.testing.bindingstest + tuscany-itest-bindings-bindingsutility + 0.1-integration-incubating-SNAPSHOT + + + + org.apache.tuscany.sca.services.databinding + databinding-sdo + 0.1-integration-incubating-SNAPSHOT + + + + commonj + sdo-api-r2.1 + 1.0-incubator-SNAPSHOT + runtime + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/main/java/org/apache/tuscany/sca/itest/SCATestToolService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/main/java/org/apache/tuscany/sca/itest/SCATestToolService.java new file mode 100644 index 0000000000..44801846f6 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/main/java/org/apache/tuscany/sca/itest/SCATestToolService.java @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest; + +import org.osoa.sca.annotations.Remotable; + +/** + * SCA Test Tool Service + */ + +@Remotable +public interface SCATestToolService { + + public String doOneHopPing(String input); + + public String doTwoHopPing(String input); + + public String doDataTypeTest(String input); + + public String getCallbackBuffer(); + + public void clearCallbackBuffer(); +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/main/resources/bindingsclient.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/main/resources/bindingsclient.composite new file mode 100644 index 0000000000..ca3ff6494e --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/main/resources/bindingsclient.composite @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/main/resources/wsdl/testtool.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/main/resources/wsdl/testtool.wsdl new file mode 100644 index 0000000000..22d7070ec3 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/main/resources/wsdl/testtool.wsdl @@ -0,0 +1,272 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/main/webapp/SCATestTool.jsp b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/main/webapp/SCATestTool.jsp new file mode 100644 index 0000000000..8c63a8b6eb --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/main/webapp/SCATestTool.jsp @@ -0,0 +1,110 @@ + +<%-- + * SCATestService.java + * written by Chris Ortiz + * interface class for basic test service + * version .1 9/22/2006 + * + * + --%> + + + + + <%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1" session="true" autoFlush="true" + isThreadSafe="true" isErrorPage="false" + import="org.apache.tuscany.sca.itest.SCATestToolService" + import="java.io.PrintWriter" + import="java.io.StringWriter" + import="org.osoa.sca.CurrentCompositeContext" + import="org.osoa.sca.CompositeContext" + %> + + + SCA FVT Test Service Driver + + + +

SCA FVT Test Tool Client

+ +


Choose Binding type:

+      WS Binding +      EJB Binding +      Default Binding


+
Check Tests to run:

+      Ping First Composite +      Ping Second Composite

+      Data Type Test

+      Async One Way        +      Async Call Back

+ + +
+
+
+ + <% + + String bindingchoice = request.getParameter("bind"); + String[] selected = request.getParameterValues("test"); + + try { + SCATestToolService scaTestTool; + if (bindingchoice.equals("WS")) { + CompositeContext compositeContext = CurrentCompositeContext.getContext(); + scaTestTool = (SCATestToolService) compositeContext.locateService(SCATestToolService.class, "SCATestToolWSReference"); + } else if (bindingchoice.equals("EJB")) { + CompositeContext compositeContext = CurrentCompositeContext.getContext(); + scaTestTool = (SCATestToolService) compositeContext.locateService(SCATestToolService.class, "SCATestToolEJBReference"); + } else { + // assume default binding + CompositeContext compositeContext = CurrentCompositeContext.getContext(); + scaTestTool = (SCATestToolService) compositeContext.locateService(SCATestToolService.class, "SCATestToolSCAReference"); + } + if (selected != null && selected.length != 0) { + for (int i = 0; i < selected.length; i++) { + String value = null; + if (null != selected[i] && selected[i].equals("Ping First Composite")) { + value = scaTestTool.doOneHopPing("brio"); + } else if (null != selected[i] && selected[i].equals("Ping Second Composite")){ + value = scaTestTool.doTwoHopPing("brio"); + } else if (null != selected[i] && selected[i].equals("Data Type Test")){ + value = scaTestTool.doDataTypeTest("brio"); + } else if (null != selected[i] && selected[i].equals("Async One Way")){ + value = "Ut Oh! Test tool not complete for oneway testing"; + } else if (null != selected[i] && selected[i].equals("Async Callback")){ + value = "Ut Oh! Test tool not complete for async testing"; + } else { + value = "Ut Oh! unknown test"; + } + +%> + +
+Results from <%=selected[i]%> test with <%=bindingchoice%> binding: +

<%=value%> + <% + } //for + } //if + + }catch(Exception e){ + e.printStackTrace(); + StringWriter sw= new StringWriter(); + PrintWriter pw= new PrintWriter(sw); + + e.printStackTrace(pw); + pw.flush(); + +%> + Whoops!
+

+    Exception "<%=e.getClass().getName()%>" Exception message: "<%=e.getMessage()%>"
+ <%=sw.toString() %> +
+<% } //catch + +%> + + + \ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/main/webapp/WEB-INF/web.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..b25586f096 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,10 @@ + + + + SCA Test Service Driver + + SCATestTool.jsp + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTest.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTest.java new file mode 100644 index 0000000000..7429b25dfc --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTest.java @@ -0,0 +1,27 @@ +package org.apache.tuscany.sca.itest; + + +import java.io.IOException; +import java.net.Socket; + +import junit.framework.TestCase; + +import org.apache.tuscany.api.SCARuntime; + +public class SCATestToolServerTest extends TestCase { + + @Override + protected void setUp() throws Exception { + SCARuntime.start("bindingscomposite-system.composite", "bindingscomposite.composite"); + } + + public void testPing() throws IOException { + new Socket("127.0.0.1", 8080); + } + + @Override + protected void tearDown() throws Exception { + SCARuntime.stop(); + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/WSBindingsClientTestCase.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/WSBindingsClientTestCase.java new file mode 100644 index 0000000000..d14a438ee4 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/WSBindingsClientTestCase.java @@ -0,0 +1,80 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest; + +import java.lang.reflect.UndeclaredThrowableException; + +import junit.framework.TestCase; + +import org.apache.tuscany.api.SCARuntime; +import org.apache.tuscany.core.test.SCATestCaseRunner; +import org.apache.tuscany.sca.util.SCATestUtilityServerTest; +import org.osoa.sca.CompositeContext; +import org.osoa.sca.CurrentCompositeContext; + +public class WSBindingsClientTestCase extends TestCase { + private SCATestToolService scaTestTool; + + private SCATestCaseRunner toolServer; + private SCATestCaseRunner utilityServer; + + // Hops over one composite + /*public void testOneHopPing() throws Throwable { + try { + assertTrue(scaTestTool.doOneHopPing("brio").contains("brio")); + } catch (UndeclaredThrowableException e) { + throw (e.getCause()); + } + }*/ + + // Hops over two composites + public void testTwoHopPing() { + assertTrue(scaTestTool.doTwoHopPing("brio").contains("brio")); + } + + protected void setUp() throws Exception { + SCARuntime.start("bindingsclient.composite"); + + toolServer = new SCATestCaseRunner(SCATestToolServerTest.class); + toolServer.setUp(); + utilityServer = new SCATestCaseRunner(SCATestUtilityServerTest.class); + utilityServer.setUp(); + + CompositeContext cc = CurrentCompositeContext.getContext(); + System.out.println("Composite Name = " + cc.getName()); + System.out.println(CurrentCompositeContext.getContext()); + scaTestTool = + (SCATestToolService)CurrentCompositeContext.getContext().locateService(SCATestToolService.class, + "SCATestToolWSReference"); + if (scaTestTool == null) { + System.out.println("Yo Yo It is null"); + } else { + System.out.println("Yo Yo It is not null: " + scaTestTool); + } + + } + + @Override + protected void tearDown() throws Exception { + SCARuntime.stop(); + toolServer.tearDown(); + utilityServer.tearDown(); + } +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTest.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTest.java new file mode 100644 index 0000000000..286ff0f4a1 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTest.java @@ -0,0 +1,28 @@ +package org.apache.tuscany.sca.util; + + + +import java.io.IOException; +import java.net.Socket; + +import org.apache.tuscany.api.SCARuntime; + +import junit.framework.TestCase; + +public class SCATestUtilityServerTest extends TestCase { + + @Override + protected void setUp() throws Exception { + SCARuntime.start("bindingsutility-system.composite", "bindingsutility.composite"); + } + + public void testPing() throws IOException { + new Socket("127.0.0.1", 8081); + } + + @Override + protected void tearDown() throws Exception { + SCARuntime.stop(); + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/pom.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/pom.xml new file mode 100644 index 0000000000..3cde0a2f80 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/pom.xml @@ -0,0 +1,58 @@ + + + + + org.apache.tuscany.testing + sca-itest + 0.1-integration-incubating-SNAPSHOT + ../../pom.xml + + 4.0.0 + org.apache.tuscany.testing.bindingstest + tuscany-itest-bindings-bindingscomposite + jar + SCA FVT Bindings Test Tool Service Composite + + + + org.apache.tuscany.sca.services.databinding + databinding-sdo + 0.1-integration-incubating-SNAPSHOT + + + + commonj + sdo-api-r2.1 + 1.0-incubator-SNAPSHOT + runtime + + + + + org.apache.tuscany.sdo + tuscany-sdo-impl + 1.0-incubator-SNAPSHOT + runtime + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCADataTypeHelper.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCADataTypeHelper.java new file mode 100644 index 0000000000..efe30c4f4e --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCADataTypeHelper.java @@ -0,0 +1,341 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest; + +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.Random; +import java.util.Vector; + +import org.apache.tuscany.sca.util.SCATestUtilityService; + +public class SCADataTypeHelper { + + Date date; + Random ran; + SCATestUtilityService scaUtil; // change this to be the service provider + + public SCADataTypeHelper(SCATestUtilityService util) { + date = new Date(); + ran = new Random(date.getTime()); + scaUtil = util; + } + + public StringBuffer test_char() throws SCADataTypeHelperException { + + char x = 'a'; + x += ran.nextInt(26); // get a char a-z + StringBuffer rc = new StringBuffer("\nchar datatype test sending ==> " + x); + try { + char y = scaUtil.echo_char(x); + if (x == y) { + rc.append("\nchar successfully received ==> " + y); + } else { + throw new SCADataTypeHelperException(rc + "\nDatatype exception: char ==> " + y); + } + } catch (Exception e) { + throw new SCADataTypeHelperException("\nRemote exception from scaUtil.echo_char\n" + e.toString()); + } + return rc; + } + + public StringBuffer test_String() throws SCADataTypeHelperException { + + String x = date.toString(); + StringBuffer rc = new StringBuffer("\nString datatype test sending ==> " + x); + try { + String y = scaUtil.echo_String(x); + if (x.equals(y)) { + rc.append("\nString successfully received ==> " + y); + } else { + throw new SCADataTypeHelperException(rc + "\nDatatype exception: String ==> " + y); + } + } catch (Exception e) { + throw new SCADataTypeHelperException("\nRemote exception from scaUtil.echo_String\n" + e.toString()); + } + return rc; + } + + public StringBuffer test_int() throws SCADataTypeHelperException { + + int x = ran.nextInt(); + StringBuffer rc = new StringBuffer("\nint datatype test sending ==> " + x); + try { + int y = scaUtil.echo_int(x); + if (x == y) { + rc.append("\nint successfully received ==> " + y); + } else { + throw new SCADataTypeHelperException(rc + "\nDatatype exception: int ==> " + y); + } + } catch (Exception e) { + throw new SCADataTypeHelperException("\nRemote exception from scaUtil.echo_int\n" + e.toString()); + } + return rc; + } + + public StringBuffer test_boolean() throws SCADataTypeHelperException { + + boolean x = ran.nextBoolean(); + StringBuffer rc = new StringBuffer("\nboolean datatype test sending ==> " + x); + try { + boolean y = scaUtil.echo_boolean(x); + if (x == y) { + rc.append("\nboolean successfully received ==> " + y); + } else { + throw new SCADataTypeHelperException(rc + "\nDatatype exception: boolean ==> " + y); + } + } catch (Exception e) { + throw new SCADataTypeHelperException("\nRemote exception from scaUtil.echo_boolean\n" + e.toString()); + } + return rc; + } + + public StringBuffer test_long() throws SCADataTypeHelperException { + + long x = ran.nextLong(); + StringBuffer rc = new StringBuffer("\nlong datatype test sending ==> " + x); + try { + long y = scaUtil.echo_long(x); + if (x == y) { + rc.append("\nlong successfully received ==> " + y); + } else { + throw new SCADataTypeHelperException(rc + "\nDatatype exception: long ==> " + y); + } + } catch (Exception e) { + throw new SCADataTypeHelperException("\nRemote exception from scaUtil.echo_long\n" + e.toString()); + } + return rc; + } + + public StringBuffer test_short() throws SCADataTypeHelperException { + + short x = (short)ran.nextInt(); + StringBuffer rc = new StringBuffer("\nshort datatype test sending ==> " + x); + try { + short y = scaUtil.echo_short(x); + if (x == y) { + rc.append("\nshort successfully received ==> " + y); + } else { + throw new SCADataTypeHelperException(rc + "\nDatatype exception: short ==> " + y); + } + } catch (Exception e) { + throw new SCADataTypeHelperException("\nRemote exception from scaUtil.echo_short\n" + e.toString()); + } + return rc; + } + + public StringBuffer test_float() throws SCADataTypeHelperException { + + float x = ran.nextFloat(); + StringBuffer rc = new StringBuffer("\nfloat datatype test sending ==> " + x); + try { + float y = scaUtil.echo_float(x); + if (x == y) { + rc.append("\nfloat successfully received ==> " + y); + } else { + throw new SCADataTypeHelperException(rc + "\nDatatype exception: float ==> " + y); + } + } catch (Exception e) { + throw new SCADataTypeHelperException("\nRemote exception from scaUtil.echo_float " + e.toString()); + } + return rc; + } + + public StringBuffer test_double() throws SCADataTypeHelperException { + + double x = ran.nextDouble(); + StringBuffer rc = new StringBuffer("\ndouble datatype test sending ==> " + x); + try { + double y = scaUtil.echo_double(x); + if (x == y) { + rc.append("\ndouble successfully received ==> " + y); + } else { + throw new SCADataTypeHelperException(rc + "\nDatatype exception: double ==> " + y); + } + } catch (Exception e) { + throw new SCADataTypeHelperException("\nRemote exception from scaUtil.echo_double\n" + e.toString()); + } + return rc; + } + + public StringBuffer test_BigInteger() throws SCADataTypeHelperException { + + BigInteger x = new BigInteger(ran.nextInt(32) + 32, ran); // between + // 32 - 64 + // bitLength + StringBuffer rc = new StringBuffer("\nBigInteger datatype test sending ==> " + x); + try { + BigInteger y = scaUtil.echo_BigInteger(x); + if (x.equals(y)) { + rc.append("\nBigInteger successfully received ==> " + y); + } else { + throw new SCADataTypeHelperException("\n" + rc + "\nDatatype exception: BigInteger ==> " + y); + } + } catch (Exception e) { + throw new SCADataTypeHelperException("\nRemote exception from scaUtil.echo_BigInteger\n" + e.toString()); + } + return rc; + } + + public StringBuffer test_BigDecimal() throws SCADataTypeHelperException { + + BigDecimal x = new BigDecimal(ran.nextDouble()); + StringBuffer rc = new StringBuffer("\nBigDecimal datatype test sending ==> " + x); + try { + BigDecimal y = scaUtil.echo_BigDecimal(x); + if (x.equals(y)) { + rc.append("\nBigDecimal successfully received ==> " + y); + } else { + throw new SCADataTypeHelperException("\n" + rc + "\nDatatype exception: BigDecimal ==> " + y); + } + } catch (Exception e) { + throw new SCADataTypeHelperException("\nRemote exception from scaUtil.echo_BigDecimal\n" + e.toString()); + } + return rc; + } + + private StringBuffer test_Vector() throws SCADataTypeHelperException { + + Vector vector = new Vector(); + vector.addElement("DanW"); + vector.addElement(new Float(2000F)); + vector.addElement(new Short((short)11)); + StringBuffer rc = new StringBuffer("\nVector datatype test sending ==> " + vector.toString()); + boolean passed = true; + try { + Vector y = scaUtil.echo_Vector(vector); + if (((String)y.elementAt(0)).equals("DanW")) { + rc.append("\nVector element 0 string " + y.elementAt(0) + " successfully recieved"); + } else { + passed = false; + } + if ((((Float)y.elementAt(1)).equals((Float)vector.elementAt(1)))) { + rc.append("\nVector element 1 Float " + y.elementAt(1) + " successfully recieved"); + } else { + passed = false; + } + if (y.elementAt(2).equals(vector.elementAt(2))) { + rc.append("\nVector element 2 (Short) " + y.elementAt(2) + " successfully received"); + } else { + passed = false; + } + if (!passed) { + // + // one of the tests failed + // + rc.append("\nVector element 0 (String) " + y.elementAt(0) + " should be \"DanW\""); + rc.append("\nVector element 1 (Float) " + y.elementAt(1) + " should be \"2000F\""); + rc.append("\nVector element 2 (Short) " + y.elementAt(2) + " should be \"11\""); + throw new SCADataTypeHelperException("\n" + rc + "\nDataType exception: Vector ==> " + y); + } + } catch (Exception e) { + throw new SCADataTypeHelperException("\nRemote exception from scaUtil.echo_Vector\n" + e.toString()); + } + return rc; + } + + public StringBuffer test_GregorianCalendar() throws SCADataTypeHelperException { + + GregorianCalendar x = new GregorianCalendar(); + StringBuffer rc = new StringBuffer("\nGregorianCalendar datatype test sending ==> " + x.toString()); + try { + GregorianCalendar y = scaUtil.echo_GregorianCalendar(x); + if (x.equals(y)) { + rc.append("\nGregorianCalendar successfully received ==> " + y); + } else { + throw new SCADataTypeHelperException("\n" + rc + "\nDatatype exception: GregorianCalendar ==> " + y); + } + } catch (Exception e) { + throw new SCADataTypeHelperException("\nRemote exception from scaUtil.echo_GregorianCalendar\n" + e + .toString()); + } + return rc; + } + + public StringBuffer doDataType() { + + StringBuffer rc = new StringBuffer(); + try { + rc.append(test_boolean()); + } catch (SCADataTypeHelperException e) { + rc.append("\n" + e.toString() + "\n"); + } + try { + rc.append(test_char()); + } catch (SCADataTypeHelperException e) { + rc.append("\n" + e.toString() + "\n"); + } + try { + rc.append(test_String()); + } catch (SCADataTypeHelperException e) { + rc.append("\n" + e.toString() + "\n"); + } + try { + rc.append(test_int()); + } catch (SCADataTypeHelperException e) { + rc.append("\n" + e.toString()); + } + try { + rc.append(test_long()); + } catch (SCADataTypeHelperException e) { + rc.append("\n" + e.toString() + "\n"); + } + try { + rc.append(test_short()); + } catch (SCADataTypeHelperException e) { + rc.append("\n" + e.toString() + "\n"); + } + try { + rc.append(test_float()); + } catch (SCADataTypeHelperException e) { + rc.append("\n" + e.toString() + "\n"); + } + try { + rc.append(test_double()); + } catch (SCADataTypeHelperException e) { + rc.append("\n" + e.toString() + "\n"); + } + try { + rc.append(test_BigInteger()); + } catch (SCADataTypeHelperException e) { + rc.append("\n" + e.toString() + "\n"); + } + try { + rc.append(test_BigDecimal()); + } catch (SCADataTypeHelperException e) { + rc.append("\n" + e.toString() + "\n"); + } + try { + rc.append(test_Vector()); + } catch (SCADataTypeHelperException e) { + rc.append("\n" + e.toString() + "\n"); + } + try { + rc.append(test_GregorianCalendar()); + } catch (SCADataTypeHelperException e) { + rc.append("\n" + e.toString() + "\n"); + } catch (Exception e) { + rc.append("\n" + e.toString() + "\n"); + } + + return rc; + } +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCADataTypeHelperException.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCADataTypeHelperException.java new file mode 100644 index 0000000000..074fba8057 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCADataTypeHelperException.java @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest; + +public class SCADataTypeHelperException extends Exception { + + public SCADataTypeHelperException() { + } + + public SCADataTypeHelperException(String msg) { + super(msg); + } +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolCallbackService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolCallbackService.java new file mode 100644 index 0000000000..c55e22c905 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolCallbackService.java @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest; + +/** + * SCA Test Tool Callback Service + */ +public interface SCATestToolCallbackService { + + public void pingCallBack(String reply); +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolServer.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolServer.java new file mode 100644 index 0000000000..290d9a0897 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolServer.java @@ -0,0 +1,28 @@ +package org.apache.tuscany.sca.itest; + + +import java.io.IOException; + +import org.apache.tuscany.api.SCARuntime; + +public class SCATestToolServer { + + /** + * @param args + */ + public static void main(String[] args) { + + SCARuntime.start("bindingscomposite-system.composite", "bindingscomposite.composite"); + + try { + System.out.println("SCATestTool server started"); + System.in.read(); + } catch (IOException e) { + e.printStackTrace(); + } + + SCARuntime.stop(); + System.out.println("SCATestTool server stopped"); + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolService.java new file mode 100644 index 0000000000..67b7e8eb64 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolService.java @@ -0,0 +1,39 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest; + +import org.osoa.sca.annotations.Remotable; + +/** + * SCA Test Tool Service + */ + +@Remotable +public interface SCATestToolService { + + public String doOneHopPing(String input); + + public String doTwoHopPing(String input); + + public String doDataTypeTest(String input); + + public String getCallbackBuffer(); + + public void clearCallbackBuffer(); +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolServiceImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolServiceImpl.java new file mode 100644 index 0000000000..e207a23927 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/itest/SCATestToolServiceImpl.java @@ -0,0 +1,76 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest; + +import org.apache.tuscany.sca.util.SCATestUtilityService; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +/** + * SCA Test Service Implementation + */ + +@Service(SCATestToolService.class) +public class SCATestToolServiceImpl implements SCATestToolService, SCATestToolCallbackService { + @Reference + public SCATestUtilityService scaTestUtil; + + private String callbackBuffer = null; + + public String doOneHopPing(String input) { + System.out.println("Invoking SCATestToolServiceImpl.doOneHopPing()"); + StringBuffer rc = new StringBuffer(); + rc.append("doOneHopPing(): "); + rc.append(input); + return rc.toString(); + } + + public String doTwoHopPing(String input) { + System.out.println("Invoking SCATestToolServiceImpl.doTwoHopPing()"); + StringBuffer rc = new StringBuffer(); + rc.append("doTwoHopPing(): "); + rc.append(input); + rc.append(" --> "); + rc.append(scaTestUtil.ping(input)); + return rc.toString(); + } + + public String doDataTypeTest(String input) { + StringBuffer rc = new StringBuffer(); + rc.append("doDataTypeTest(): "); + rc.append(input); + rc.append(" --> "); + SCADataTypeHelper dataHelper = new SCADataTypeHelper(scaTestUtil); + rc.append(dataHelper.doDataType()); + return rc.toString(); + } + + public void pingCallBack(String reply) { + callbackBuffer = reply; + } + + public String getCallbackBuffer() { + return callbackBuffer; + } + + public void clearCallbackBuffer() { + callbackBuffer = null; + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityService.java new file mode 100644 index 0000000000..0ceb553727 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityService.java @@ -0,0 +1,64 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.util; + +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Vector; +import java.util.GregorianCalendar; + +import org.apache.tuscany.sca.itest.SCATestToolCallbackService; +import org.osoa.sca.annotations.Callback; +import org.osoa.sca.annotations.Remotable; + +/** + * SCA Test Utility Service + */ + +@Remotable +public interface SCATestUtilityService { + public String ping(String input); + + @Callback(SCATestToolCallbackService.class) + public void asyncping(); + + public int echo_int(int input); + + public short echo_short(short input); + + public long echo_long(long input); + + public float echo_float(float input); + + public double echo_double(double input); + + public boolean echo_boolean(boolean input); + + public char echo_char(char input); + + public String echo_String(String input); + + public BigDecimal echo_BigDecimal(BigDecimal input); + + public BigInteger echo_BigInteger(BigInteger input); + + public Vector echo_Vector(Vector input); + + public GregorianCalendar echo_GregorianCalendar(GregorianCalendar input); +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/resources/bindingscomposite-system.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/resources/bindingscomposite-system.composite new file mode 100644 index 0000000000..c288471c14 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/resources/bindingscomposite-system.composite @@ -0,0 +1,36 @@ + + + + + + + + + + 8080 + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/resources/bindingscomposite.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/resources/bindingscomposite.composite new file mode 100644 index 0000000000..b2f1e57e15 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/resources/bindingscomposite.composite @@ -0,0 +1,49 @@ + + + + + + + + + + + SCATestToolWSServiceComponent + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/resources/wsdl/testtool.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/resources/wsdl/testtool.wsdl new file mode 100644 index 0000000000..729593518d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/resources/wsdl/testtool.wsdl @@ -0,0 +1,272 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/resources/wsdl/testutility.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/resources/wsdl/testutility.wsdl new file mode 100644 index 0000000000..32d9050a61 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/main/resources/wsdl/testutility.wsdl @@ -0,0 +1,704 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTestCase.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTestCase.java new file mode 100644 index 0000000000..53f6c04544 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingscomposite/src/test/java/org/apache/tuscany/sca/itest/SCATestToolServerTestCase.java @@ -0,0 +1,27 @@ +package org.apache.tuscany.sca.itest; + + +import java.io.IOException; +import java.net.Socket; + +import junit.framework.TestCase; + +import org.apache.tuscany.api.SCARuntime; + +public class SCATestToolServerTestCase extends TestCase { + + @Override + protected void setUp() throws Exception { + SCARuntime.start("bindingscomposite-system.composite", "bindingscomposite.composite"); + } + + public void testPing() throws IOException { + new Socket("127.0.0.1", 8080); + } + + @Override + protected void tearDown() throws Exception { + SCARuntime.stop(); + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/pom.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/pom.xml new file mode 100644 index 0000000000..567d90e8ae --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/pom.xml @@ -0,0 +1,59 @@ + + + + + org.apache.tuscany.testing + sca-itest + 0.1-integration-incubating-SNAPSHOT + ../../pom.xml + + + 4.0.0 + org.apache.tuscany.testing.bindingstest + tuscany-itest-bindings-bindingsutility + jar + SCA FVT Bindings Test Tool Utility Composite + + + + org.apache.tuscany.sca.services.databinding + databinding-sdo + 0.1-integration-incubating-SNAPSHOT + + + + commonj + sdo-api-r2.1 + 1.0-incubator-SNAPSHOT + runtime + + + + + org.apache.tuscany.sdo + tuscany-sdo-impl + 1.0-incubator-SNAPSHOT + runtime + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/itest/SCATestToolCallbackService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/itest/SCATestToolCallbackService.java new file mode 100644 index 0000000000..664fb06930 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/itest/SCATestToolCallbackService.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; + +/** + * SCA Test Tool Callback Service + */ + +public interface SCATestToolCallbackService { + + public void pingCallBack(String reply); +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityServer.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityServer.java new file mode 100644 index 0000000000..552454c968 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityServer.java @@ -0,0 +1,28 @@ +package org.apache.tuscany.sca.util; + + +import java.io.IOException; + +import org.apache.tuscany.api.SCARuntime; + +public class SCATestUtilityServer { + + /** + * @param args + */ + public static void main(String[] args) { + + SCARuntime.start("bindingsutility-system.composite", "bindingsutility.composite"); + + try { + System.out.println("SCATestUtility server started"); + System.in.read(); + } catch (IOException e) { + e.printStackTrace(); + } + + SCARuntime.stop(); + System.out.println("SCATestUtility server stopped"); + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityService.java new file mode 100644 index 0000000000..0ceb553727 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityService.java @@ -0,0 +1,64 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.util; + +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Vector; +import java.util.GregorianCalendar; + +import org.apache.tuscany.sca.itest.SCATestToolCallbackService; +import org.osoa.sca.annotations.Callback; +import org.osoa.sca.annotations.Remotable; + +/** + * SCA Test Utility Service + */ + +@Remotable +public interface SCATestUtilityService { + public String ping(String input); + + @Callback(SCATestToolCallbackService.class) + public void asyncping(); + + public int echo_int(int input); + + public short echo_short(short input); + + public long echo_long(long input); + + public float echo_float(float input); + + public double echo_double(double input); + + public boolean echo_boolean(boolean input); + + public char echo_char(char input); + + public String echo_String(String input); + + public BigDecimal echo_BigDecimal(BigDecimal input); + + public BigInteger echo_BigInteger(BigInteger input); + + public Vector echo_Vector(Vector input); + + public GregorianCalendar echo_GregorianCalendar(GregorianCalendar input); +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityServiceImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityServiceImpl.java new file mode 100644 index 0000000000..e752e4d6e6 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/java/org/apache/tuscany/sca/util/SCATestUtilityServiceImpl.java @@ -0,0 +1,157 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.util; + +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.InetAddress; +import java.util.GregorianCalendar; +import java.util.Properties; +import java.util.Vector; + +import org.osoa.sca.annotations.Service; + +@Service(SCATestUtilityService.class) +public class SCATestUtilityServiceImpl implements SCATestUtilityService { + + // private SCATestToolCallbackService utilCallBack; + + /** + * The setter used by the runtime to set the callback reference + * + * @param myServiceCallback + */ + + // @Callback + // public void setCallback(SCATestToolCallbackService utilCallBack) { + // this.utilCallBack = utilCallBack; + // } + public String ping(String input) { + System.out.println("Invoking SCATestUtilityServiceImpl.ping()"); + StringBuffer rc = new StringBuffer(); + + try { + // get a systems property object + Properties sp = System.getProperties(); + rc.append("Pinged SCA Test Utility Service on: "); + // get operating system info + rc.append(sp.getProperty("os.name")); + rc.append(", " + sp.getProperty("os.version")); + // get network info + rc.append(" - " + InetAddress.getLocalHost().toString()); + } catch (Exception e) { + System.out.println("\nException preparing system infomation for ping service reply\n" + e.toString()); + e.printStackTrace(); + } + return rc.toString(); + } + + public void asyncping() { + + StringBuffer rc = new StringBuffer(); + + try { + // get a systems property object + Properties sp = System.getProperties(); + rc.append("Pinged SCA Test Utility Service on: "); + // get operating system info + rc.append(sp.getProperty("os.name")); + rc.append(", " + sp.getProperty("os.version")); + // get network info + rc.append(" - " + InetAddress.getLocalHost().toString()); + } catch (Exception e) { + System.out.println("\nException preparing system infomation for ping service reply\n" + e.toString()); + e.printStackTrace(); + } + // utilCallBack.pingCallBack(rc.toString()); + } + + public int echo_int(int input) { + int local; + local = input; + return local; + } + + public short echo_short(short input) { + short local; + local = input; + return local; + } + + public long echo_long(long input) { + long local; + local = input; + return local; + } + + public float echo_float(float input) { + float local; + local = input; + return local; + } + + public double echo_double(double input) { + double local; + local = input; + return local; + } + + public boolean echo_boolean(boolean input) { + boolean local; + local = input; + return local; + } + + public char echo_char(char input) { + char local; + local = input; + return local; + } + + public String echo_String(String input) { + String local; + local = input; + return local; + } + + public BigDecimal echo_BigDecimal(BigDecimal input) { + BigDecimal local; + local = input; + return local; + } + + public BigInteger echo_BigInteger(BigInteger input) { + BigInteger local; + local = input; + return local; + } + + public Vector echo_Vector(Vector input) { + Vector local; + local = input; + return local; + } + + public GregorianCalendar echo_GregorianCalendar(GregorianCalendar input) { + GregorianCalendar local; + local = input; + return local; + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/resources/bindingsutility-system.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/resources/bindingsutility-system.composite new file mode 100644 index 0000000000..7126b78572 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/resources/bindingsutility-system.composite @@ -0,0 +1,36 @@ + + + + + + + + + + 8081 + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/resources/bindingsutility.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/resources/bindingsutility.composite new file mode 100644 index 0000000000..6771b72442 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/resources/bindingsutility.composite @@ -0,0 +1,39 @@ + + + + + + + + + SCATestUtilityWSServiceComponent + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/resources/wsdl/testutility.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/resources/wsdl/testutility.wsdl new file mode 100644 index 0000000000..32d9050a61 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/main/resources/wsdl/testutility.wsdl @@ -0,0 +1,704 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTestCase.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTestCase.java new file mode 100644 index 0000000000..4f1b0bfc3b --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/bindingsutility/src/test/java/org/apache/tuscany/sca/util/SCATestUtilityServerTestCase.java @@ -0,0 +1,27 @@ +package org.apache.tuscany.sca.util; + + +import java.io.IOException; +import java.net.Socket; + +import org.apache.tuscany.api.SCARuntime; + +import junit.framework.TestCase; + +public class SCATestUtilityServerTestCase extends TestCase { + + @Override + protected void setUp() throws Exception { + SCARuntime.start("bindingsutility-system.composite", "bindingsutility.composite"); + } + + public void testPing() throws IOException { + new Socket("127.0.0.1", 8081); + } + + @Override + protected void tearDown() throws Exception { + SCARuntime.stop(); + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/pom.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/pom.xml new file mode 100644 index 0000000000..6d78f23c0d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/bindings/pom.xml @@ -0,0 +1,42 @@ + + + + + org.apache.tuscany.testing + sca-itest + 0.1-integration-incubating-SNAPSHOT + ../pom.xml + + + 4.0.0 + org.apache.tuscany.testing + ${testing.version} + bindingstest + pom + SCA FVT Test Tool Suite + + + + bindingscomposite + bindingsutility + bindingsclient + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-api/pom.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-api/pom.xml new file mode 100644 index 0000000000..f556aec1e8 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-api/pom.xml @@ -0,0 +1,35 @@ + + + + + org.apache.tuscany.testing + sca-itest + 0.1-integration-incubating-SNAPSHOT + ../pom.xml + + + 4.0.0 + org.apache.tuscany.testing + iTest-callback-api + ${testing.version} + jar + Test Suite for SCA Callback API + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiCallBack.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiCallBack.java new file mode 100644 index 0000000000..56e7ba7b3f --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/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 +/** + * @author lamodeo + */ +public interface CallBackApiCallBack { + + public void callBackMessage(String aString); + + public void callBackIncrement(String aString); + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClient.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/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/branches/sca-java-integration/testing/sca/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/branches/sca-java-integration/testing/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClientImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClientImpl.java new file mode 100644 index 0000000000..72b56bafea --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiClientImpl.java @@ -0,0 +1,133 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.test; + +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; +import junit.framework.Assert; + +@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/branches/sca-java-integration/testing/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/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/branches/sca-java-integration/testing/sca/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/branches/sca-java-integration/testing/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiServiceImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiServiceImpl.java new file mode 100644 index 0000000000..7cb0f1553e --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-api/src/main/java/org/apache/tuscany/sca/test/CallBackApiServiceImpl.java @@ -0,0 +1,77 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.test; + +import org.osoa.sca.annotations.Service; +import org.osoa.sca.annotations.Context; +import org.osoa.sca.CompositeContext; +import org.osoa.sca.RequestContext; +import org.osoa.sca.ServiceReference; + +@Service(CallBackApiService.class) +public class CallBackApiServiceImpl implements CallBackApiService { + + @Context + protected CompositeContext compositeContext; + protected 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 = compositeContext.getRequestContext(); + System.out.println("CallBackApiServiceImpl getting callback from request context"); + callback = (CallBackApiCallBack) ((ServiceReference) rc.getServiceReference()).getCallback(); + System.out.println("CallBackApiServiceImpl returning callback"); + return callback; + + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-api/src/main/resources/CallBackApiTest.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-api/src/main/resources/CallBackApiTest.composite new file mode 100644 index 0000000000..c6956eb860 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-api/src/main/resources/CallBackApiTest.composite @@ -0,0 +1,34 @@ + + + + + + + + CallBackApiService + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-api/src/test/java/org/apache/tuscany/sca/test/CallBackApiTest.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-api/src/test/java/org/apache/tuscany/sca/test/CallBackApiTest.java new file mode 100644 index 0000000000..d28c67fcf2 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-api/src/test/java/org/apache/tuscany/sca/test/CallBackApiTest.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.api.SCARuntime; +import org.osoa.sca.CurrentCompositeContext; + +public class CallBackApiTest extends TestCase { + + private CallBackApiClient aCallBackClient; + + public void testCallBackBasic() { + aCallBackClient.run(); + } + + protected void setUp() throws Exception { + SCARuntime.start("CallBackApiTest.composite"); + + aCallBackClient = + CurrentCompositeContext.getContext().locateService(CallBackApiClient.class, "CallBackApiClient"); + } + + protected void tearDown() throws Exception { + SCARuntime.stop(); + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-basic/pom.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-basic/pom.xml new file mode 100644 index 0000000000..70c6bf62ac --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-basic/pom.xml @@ -0,0 +1,35 @@ + + + + + org.apache.tuscany.testing + sca-itest + 0.1-integration-incubating-SNAPSHOT + ../pom.xml + + + 4.0.0 + org.apache.tuscany.testing + iTest-Callback-Basic + ${testing.version} + jar + Test Suite for SCA Callback Basic + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicCallBack.java new file mode 100644 index 0000000000..ab1f39c057 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/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 +/** + * @author lamodeo + */ +public interface CallBackBasicCallBack { + + public void callBackMessage(String aString); + + public void callBackIncrement(String aString); + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClient.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/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/branches/sca-java-integration/testing/sca/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/branches/sca-java-integration/testing/sca/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java new file mode 100644 index 0000000000..73a5320faa --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicClientImpl.java @@ -0,0 +1,134 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.test; + +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; +import junit.framework.Assert; + +@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/branches/sca-java-integration/testing/sca/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/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/branches/sca-java-integration/testing/sca/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/branches/sca-java-integration/testing/sca/itest/callback-basic/src/main/java/org/apache/tuscany/sca/test/CallBackBasicServiceImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/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/branches/sca-java-integration/testing/sca/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/branches/sca-java-integration/testing/sca/itest/callback-basic/src/main/resources/CallBackBasicTest.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-basic/src/main/resources/CallBackBasicTest.composite new file mode 100644 index 0000000000..19263b2dac --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-basic/src/main/resources/CallBackBasicTest.composite @@ -0,0 +1,34 @@ + + + + + + + + CallBackBasicService + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-basic/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-basic/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java new file mode 100644 index 0000000000..73da73b6d0 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-basic/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java @@ -0,0 +1,28 @@ +package org.apache.tuscany.sca.test; + +import junit.framework.TestCase; + +import org.apache.tuscany.api.SCARuntime; +import org.osoa.sca.CurrentCompositeContext; + +public class CallBackBasicTestCase extends TestCase { + + private CallBackBasicClient aCallBackClient; + + public void testCallBackBasic() { + aCallBackClient.run(); + } + + protected void setUp() throws Exception { + SCARuntime.start("CallBackBasicTest.composite"); + + aCallBackClient = CurrentCompositeContext.getContext().locateService(CallBackBasicClient.class, "CallBackBasicClient"); + } + + @Override + protected void tearDown() throws Exception { + SCARuntime.stop(); + } + + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/pom.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/pom.xml new file mode 100644 index 0000000000..d61a83a85c --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/pom.xml @@ -0,0 +1,35 @@ + + + + + org.apache.tuscany.testing + sca-itest + 0.1-integration-incubating-SNAPSHOT + ../pom.xml + + + 4.0.0 + org.apache.tuscany.testing + iTest-callback-complexType + ${testing.version} + jar + Test Suite for SCA Callback CType + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeCallBack.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeCallBack.java new file mode 100644 index 0000000000..70e22f4ef2 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/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 +/** + * @author lamodeo + */ +public interface CallBackCTypeCallBack { + + public void callBackMessage(String aString); + + public void callBackIncrement(String aString); + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClient.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClient.java new file mode 100644 index 0000000000..739983c277 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/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/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClientImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeClientImpl.java new file mode 100644 index 0000000000..a9781a3bde --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/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 org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; +import junit.framework.Assert; + +@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() { + // TODO Auto-generated constructor stub + } + + 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/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeService.java new file mode 100644 index 0000000000..ffbf4f35fa --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/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/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.java new file mode 100644 index 0000000000..60abf841b1 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/main/java/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.java @@ -0,0 +1,63 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.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() { + // TODO Auto-generated constructor stub + } + + 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/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/main/resources/CallBackCTypeClient.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/main/resources/CallBackCTypeClient.composite new file mode 100644 index 0000000000..0b771ae874 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/main/resources/CallBackCTypeClient.composite @@ -0,0 +1,34 @@ + + + + + + + + CallBackCTypeService + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/main/resources/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.componentType b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/main/resources/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.componentType new file mode 100644 index 0000000000..aca84e8537 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/main/resources/org/apache/tuscany/sca/test/CallBackCTypeServiceImpl.componentType @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/test/java/org/apache/tuscany/sca/test/CallBackCTypeTest.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/test/java/org/apache/tuscany/sca/test/CallBackCTypeTest.java new file mode 100644 index 0000000000..d9e0dea7bb --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-complexType/src/test/java/org/apache/tuscany/sca/test/CallBackCTypeTest.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.api.SCARuntime; +import org.osoa.sca.CurrentCompositeContext; + +public class CallBackCTypeTest extends TestCase { + + private CallBackCTypeClient aCallBackClient; + + public void testCallBackBasic() { + aCallBackClient.run(); + } + + protected void setUp() throws Exception { + SCARuntime.start("CallBackCTypeClient.composite"); + + aCallBackClient = + CurrentCompositeContext.getContext().locateService(CallBackCTypeClient.class, "CallBackCTypeClient"); + } + + protected void tearDown() throws Exception { + SCARuntime.stop(); + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-id/pom.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-id/pom.xml new file mode 100644 index 0000000000..e647136da8 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-id/pom.xml @@ -0,0 +1,35 @@ + + + + + org.apache.tuscany.testing + sca-itest + 0.1-integration-incubating-SNAPSHOT + ../pom.xml + + + 4.0.0 + org.apache.tuscany.testing + iTest-Callback-ID + ${testing.version} + jar + Test Suite for SCA Callback ID + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdCallBack.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdCallBack.java new file mode 100644 index 0000000000..e86c7e9ed7 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/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 +/** + * @author lamodeo + */ +public interface CallBackIdCallBack { + + public void callBackMessage(String aString); + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdClient.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/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/branches/sca-java-integration/testing/sca/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/branches/sca-java-integration/testing/sca/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdClientImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdClientImpl.java new file mode 100644 index 0000000000..702e27775b --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdClientImpl.java @@ -0,0 +1,145 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * 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.Reference; +import org.osoa.sca.annotations.Service; +import org.osoa.sca.annotations.Context; +import org.osoa.sca.CompositeContext; +import org.osoa.sca.RequestContext; +import org.osoa.sca.ServiceReference; +import junit.framework.Assert; + +@Service(CallBackIdClient.class) +public class CallBackIdClientImpl implements CallBackIdClient, CallBackIdCallBack { + + @Context + private CompositeContext compositeContext; + @Reference + protected CallBackIdService 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 = ((ServiceReference)aCallBackService).getCallbackID(); + aCallBackService.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"; + ((ServiceReference)aCallBackService).setCallbackID(origCallBackId); + + aCallBackService.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 = compositeContext.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/branches/sca-java-integration/testing/sca/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/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/branches/sca-java-integration/testing/sca/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/branches/sca-java-integration/testing/sca/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdServiceImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-id/src/main/java/org/apache/tuscany/sca/test/CallBackIdServiceImpl.java new file mode 100644 index 0000000000..cf0270c407 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/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.CompositeContext; +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 CompositeContext 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.toString()); + + callback.callBackMessage("Who's There"); + System.out.println("CallBackIdServiceImpl response sent"); + return; + + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-id/src/main/resources/CallBackIdClient.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-id/src/main/resources/CallBackIdClient.composite new file mode 100644 index 0000000000..014a604003 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-id/src/main/resources/CallBackIdClient.composite @@ -0,0 +1,34 @@ + + + + + + + + CallBackIdService + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-id/src/test/java/org/apache/tuscany/sca/test/CallBackIdTest.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-id/src/test/java/org/apache/tuscany/sca/test/CallBackIdTest.java new file mode 100644 index 0000000000..f7cf33fdca --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-id/src/test/java/org/apache/tuscany/sca/test/CallBackIdTest.java @@ -0,0 +1,25 @@ +package org.apache.tuscany.sca.test; + +import junit.framework.TestCase; + +import org.apache.tuscany.api.SCARuntime; +import org.osoa.sca.CurrentCompositeContext; + +public class CallBackIdTest extends TestCase { + + private CallBackIdClient aCallBackClient; + + public void testCallBackBasic() { + aCallBackClient.run(); + } + + protected void setUp() throws Exception { + SCARuntime.start("CallBackIdClient.composite"); + + aCallBackClient = CurrentCompositeContext.getContext().locateService(CallBackIdClient.class, "CallBackIdClient"); + } + + protected void tearDown() throws Exception { + SCARuntime.stop(); + } +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/pom.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/pom.xml new file mode 100644 index 0000000000..6daf2271e9 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/pom.xml @@ -0,0 +1,35 @@ + + + + + org.apache.tuscany.testing + sca-itest + 0.1-integration-incubating-SNAPSHOT + ../pom.xml + + + 4.0.0 + org.apache.tuscany.testing + iTest-callback-setCallback + ${testing.version} + jar + Test Suite for SCA Callback SetCallback + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCalbackService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCalbackService.java new file mode 100644 index 0000000000..b352a2f1f7 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/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/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackBadCallback.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackBadCallback.java new file mode 100644 index 0000000000..766d47c654 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackBadCallback.java @@ -0,0 +1,41 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.test; + +import junit.framework.Assert; + +public class CallBackSetCallbackBadCallback { + + private String anAttribure = null; + private int anIntAttribute = 0; + + 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/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackCallback.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackCallback.java new file mode 100644 index 0000000000..26a6ecc879 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/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 +/** + * @author lamodeo + */ +public interface CallBackSetCallbackCallback { + + public void callBackMessage(String aString); + + public void callBackIncrement(String aString); + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackCallbackImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackCallbackImpl.java new file mode 100644 index 0000000000..0a22b0e01f --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/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/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackClient.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackClient.java new file mode 100644 index 0000000000..94cb6aa73b --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/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/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackClientImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackClientImpl.java new file mode 100644 index 0000000000..9fafb05835 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackClientImpl.java @@ -0,0 +1,193 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * 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 CallBackSetCalbackService aCallBackService; + @Reference + protected CallBackSetCallbackCallback 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. + */ + + 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(); + + ((ServiceReference)aCallBackService).setCallback(callBack); + + aCallBackService.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()); + + } + + 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.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 impliment + // the callback interface. However because this callback service is + // stateless the expected + // result is an appropriate exception. + // + + try { + ((ServiceReference)aCallBackService).setCallback(new CallBackSetCallbackObjectCallback()); + aCallBackService.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); + + } + + 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.setCallbackIllegally("Try to set callback on your own service reference"); + + Assert.assertEquals("CallBackSetCallback - Test10", true, aFile.exists()); + + return; + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackObjectCallback.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackObjectCallback.java new file mode 100644 index 0000000000..afedcdf7f1 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/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/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackServiceImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackServiceImpl.java new file mode 100644 index 0000000000..6fb13f81b2 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackServiceImpl.java @@ -0,0 +1,103 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.test; + +import java.io.File; + +import org.osoa.sca.CompositeContext; +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 + private CallBackSetCallbackCallback callback; + @Context + private CompositeContext 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 needs to be removed once + // appropriate exception is + // identified. + { + // 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/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/resources/CallBackSetCallbackTest.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/resources/CallBackSetCallbackTest.composite new file mode 100644 index 0000000000..06910dba27 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/main/resources/CallBackSetCallbackTest.composite @@ -0,0 +1,40 @@ + + + + + + + + CallBackSetCallbackService + + + CallBackSetCallbackCallback + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/test/java/org/apache/tuscany/sca/test/CallBackSetCallbackTest.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/test/java/org/apache/tuscany/sca/test/CallBackSetCallbackTest.java new file mode 100644 index 0000000000..1df80b5d34 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallback/src/test/java/org/apache/tuscany/sca/test/CallBackSetCallbackTest.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.api.SCARuntime; +import org.osoa.sca.CurrentCompositeContext; + +public class CallBackSetCallbackTest extends TestCase { + + private CallBackSetCallbackClient aCallBackClient; + + public void testCallBackSetCallback() { + aCallBackClient.run(); + } + + protected void setUp() throws Exception { + SCARuntime.start("CallBackSetCallbackTest.composite"); + + aCallBackClient = + CurrentCompositeContext.getContext().locateService(CallBackSetCallbackClient.class, + "CallBackSetCallbackClient"); + } + + protected void tearDown() throws Exception { + SCARuntime.stop(); + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/pom.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/pom.xml new file mode 100644 index 0000000000..453c70aa3d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/pom.xml @@ -0,0 +1,35 @@ + + + + + org.apache.tuscany.testing + sca-itest + 0.1-integration-incubating-SNAPSHOT + ../pom.xml + + + 4.0.0 + org.apache.tuscany.testing + iTest-callback-setCallbackConversation + ${testing.version} + jar + Test Suite for SCA Callback SetCallback Conversation + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvBadCallback.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvBadCallback.java new file mode 100644 index 0000000000..685dd83c62 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvBadCallback.java @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.test; + +import java.io.Serializable; + +import junit.framework.Assert; + +public class CallBackSetCallbackConvBadCallback implements Serializable { + + 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/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvCallback.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvCallback.java new file mode 100644 index 0000000000..7483e834b4 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/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 +/** + * @author lamodeo + */ +public interface CallBackSetCallbackConvCallback { + + public void callBackMessage(String aString); + + public void callBackIncrement(String aString); + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvClient.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvClient.java new file mode 100644 index 0000000000..013424bf5e --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/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/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvClientImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvClientImpl.java new file mode 100644 index 0000000000..a62ed43c91 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvClientImpl.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; + +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; + @Reference + protected CallBackSetCallbackConvCallback callBack; + 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/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvNonSerCallback.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvNonSerCallback.java new file mode 100644 index 0000000000..789e04e907 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/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/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvObjectCallback.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvObjectCallback.java new file mode 100644 index 0000000000..fead6705fd --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvObjectCallback.java @@ -0,0 +1,60 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.test; + +import java.io.Serializable; + +public class CallBackSetCallbackConvObjectCallback implements CallBackSetCallbackConvCallback, Serializable { + + 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/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvService.java new file mode 100644 index 0000000000..d8e8b8ccb6 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvService.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.Callback; +import org.osoa.sca.annotations.Remotable; +import org.osoa.sca.annotations.Scope; + +// @Remotable +@Callback(CallBackSetCallbackConvCallback.class) +/** + * + */ +public interface CallBackSetCallbackConvService { + + public void knockKnock(String aString); + + public void setCallbackIllegally(String aString); + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvServiceImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvServiceImpl.java new file mode 100644 index 0000000000..a051277b2a --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/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.CompositeContext; +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 + private CompositeContext 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/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/resources/CallBackSetCallbackConvTest.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/resources/CallBackSetCallbackConvTest.composite new file mode 100644 index 0000000000..cfac7d11d7 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/main/resources/CallBackSetCallbackConvTest.composite @@ -0,0 +1,34 @@ + + + + + + + + CallBackSetCallbackConvService + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/test/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvTest.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/test/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvTest.java new file mode 100644 index 0000000000..3e62ea5e8d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/callback-setCallbackConversation/src/test/java/org/apache/tuscany/sca/test/CallBackSetCallbackConvTest.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.api.SCARuntime; +import org.osoa.sca.CurrentCompositeContext; + +public class CallBackSetCallbackConvTest extends TestCase { + + private CallBackSetCallbackConvClient aCallBackClient; + + public void testCallBackSetCallback() { + aCallBackClient.run(); + } + + protected void setUp() throws Exception { + SCARuntime.start("CallBackSetCallbackConvTest.composite"); + + aCallBackClient = + CurrentCompositeContext.getContext().locateService(CallBackSetCallbackConvClient.class, + "CallBackSetCallbackConvClient"); + } + + protected void tearDown() throws Exception { + SCARuntime.stop(); + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/contribution/pom.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/contribution/pom.xml new file mode 100644 index 0000000000..5da30f99d8 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/contribution/pom.xml @@ -0,0 +1,33 @@ + + + + + org.apache.tuscany.testing + sca-itest + 0.1-integration-incubating-SNAPSHOT + ../pom.xml + + 4.0.0 + iTest-Contribution + SNAPSHOT + jar + Test Suite for SCA Contribution + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/contribution/src/main/resources/META-INF/sca/application.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/contribution/src/main/resources/META-INF/sca/application.composite new file mode 100644 index 0000000000..2b5153a28a --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/contribution/src/main/resources/META-INF/sca/application.composite @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/contribution/src/test/java/org/apache/tuscany/sca/test/contribution/ContributionDirectoryWatcherTestCase.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/contribution/src/test/java/org/apache/tuscany/sca/test/contribution/ContributionDirectoryWatcherTestCase.java new file mode 100644 index 0000000000..466ba18c78 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/contribution/src/test/java/org/apache/tuscany/sca/test/contribution/ContributionDirectoryWatcherTestCase.java @@ -0,0 +1,41 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.test.contribution; + +import org.apache.tuscany.core.services.deployment.ContributionDirectoryWatcher; +import org.apache.tuscany.spi.annotation.Autowire; +import org.apache.tuscany.test.SCATestCase; + +/** + * This is more intended to be a integration test then a unit test. * + */ +public class ContributionDirectoryWatcherTestCase extends SCATestCase { + @Autowire + private ContributionDirectoryWatcher contributionDirectoryWatcher; // NOPMD + + protected void setUp() throws Exception { + super.setUp(); + } + + public void testContributeURL() throws Exception { + + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/contribution/src/test/java/org/apache/tuscany/sca/test/contribution/ContributionServiceTestCase.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/contribution/src/test/java/org/apache/tuscany/sca/test/contribution/ContributionServiceTestCase.java new file mode 100644 index 0000000000..2bd9de672a --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/contribution/src/test/java/org/apache/tuscany/sca/test/contribution/ContributionServiceTestCase.java @@ -0,0 +1,83 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.test.contribution; + +import java.io.File; +import java.net.URI; +import java.net.URL; + +import org.apache.tuscany.api.SCARuntime; +import org.apache.tuscany.core.bootstrap.DefaultSCARuntime; +import org.apache.tuscany.core.util.FileHelper; +import org.apache.tuscany.host.deployment.ContributionService; +import org.apache.tuscany.spi.bootstrap.ComponentNames; +import org.apache.tuscany.spi.model.Contribution; +import org.apache.tuscany.test.SCATestCase; + +/** + * This is more intended to be a integration test then a unit test. * + */ +public class ContributionServiceTestCase extends SCATestCase { + private static final String JAR_CONTRIBUTION = "/repository/sample-calculator.jar"; + private static final String FOLDER_CONTRIBUTION = "/repository/calculator/"; + + private ContributionService contributionService; + + protected void setUp() throws Exception { + super.setUp(); + + this.contributionService = (ContributionService) ((DefaultSCARuntime)SCARuntime.getInstance()).getSystemService(ComponentNames.TUSCANY_CONTRIBUTION_SERVICE); + } + + public void testContributeJAR() throws Exception { + URL contributionLocation = getClass().getResource(JAR_CONTRIBUTION); + URI contributionId = contributionService.contribute(contributionLocation, false); + assertNotNull(contributionId); + } + + public void testStoreContributionInRepository() throws Exception { + URL contributionLocation = getClass().getResource(JAR_CONTRIBUTION); + URI contributionId = contributionService.contribute(contributionLocation, true); + + assertNotNull(contributionId); + + Contribution contributionModel = (Contribution) contributionService.getContribution(contributionId); + + File contributionFile = FileHelper.toFile(contributionModel.getLocation()); + assertTrue(contributionFile.exists()); + } + + public void testStoreDuplicatedContributionInRepository() throws Exception { + URL contributionLocation = getClass().getResource(JAR_CONTRIBUTION); + URI contributionId1 = contributionService.contribute(contributionLocation, true); + assertNotNull(contributionId1); + URI contributionId2 = contributionService.contribute(contributionLocation, true); + assertNotNull(contributionId2); + } + + +// public void testContributeFolder() throws Exception { +// File rootContributionFolder = new File(FOLDER_CONTRIBUTION); +// +// URI contributionURI = contributionService.contribute(rootContributionFolder.toURL(), false); +// assertNotNull(contributionURI); +// } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/contribution/src/test/resources/deployables/sample-calculator.jar b/sca-java-1.x/branches/sca-java-integration/testing/sca/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/branches/sca-java-integration/testing/sca/itest/contribution/src/test/resources/deployables/sample-calculator.jar differ diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/contribution/src/test/resources/repository/sample-calculator.jar b/sca-java-1.x/branches/sca-java-integration/testing/sca/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/branches/sca-java-integration/testing/sca/itest/contribution/src/test/resources/repository/sample-calculator.jar differ diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/pom.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/pom.xml new file mode 100644 index 0000000000..0fa482dcae --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/pom.xml @@ -0,0 +1,35 @@ + + + + + org.apache.tuscany.testing + sca-itest + 0.1-integration-incubating-SNAPSHOT + ../pom.xml + + + 4.0.0 + org.apache.tuscany.testing + iTest-conversations + ${testing.version} + jar + Test Suite for SCA conversations + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/AnotherService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/AnotherService.java new file mode 100644 index 0000000000..f8256e6446 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/AnotherService.java @@ -0,0 +1,18 @@ +package org.apache.tuscany.sca.test; + +import org.osoa.sca.annotations.Remotable; +import org.osoa.sca.annotations.Scope; +import org.osoa.sca.ServiceReference; + +@Remotable + +/** + * + */ +public interface AnotherService { + + public void setService(ServiceReference aServiceReference); + public void add(int anInt); + public int getCount(); + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/AnotherServiceImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/AnotherServiceImpl.java new file mode 100644 index 0000000000..184ff20727 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/AnotherServiceImpl.java @@ -0,0 +1,59 @@ +package org.apache.tuscany.sca.test; + +import junit.framework.Assert; + +import org.osoa.sca.CompositeContext; +import org.osoa.sca.CurrentCompositeContext; +import org.osoa.sca.RequestContext; +import org.osoa.sca.ServiceReference; +import org.osoa.sca.annotations.Callback; +import org.osoa.sca.annotations.Remotable; +import org.osoa.sca.annotations.Service; +import org.osoa.sca.annotations.Context; +import org.osoa.sca.annotations.Scope; +import java.io.File; +import org.apache.tuscany.sca.test.ConversationsClient; + +@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/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsCallback.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsCallback.java new file mode 100644 index 0000000000..1aa4089805 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsCallback.java @@ -0,0 +1,18 @@ +/** + * + */ +package org.apache.tuscany.sca.test; + +import org.osoa.sca.annotations.Remotable; + +/** + * @author lamodeo + * + */ +public interface ConversationsCallback { + + public void callBackMessage(String aString); + public void callBackIncrement(String aString); + public void callBackEndSession(); + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClient.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClient.java new file mode 100644 index 0000000000..1d2ecb4903 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClient.java @@ -0,0 +1,12 @@ +package org.apache.tuscany.sca.test; + +import org.osoa.sca.annotations.Remotable; +import org.osoa.sca.annotations.Scope; + +@Remotable +public interface ConversationsClient { + + public void run(); + public int count(); + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClient2.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClient2.java new file mode 100644 index 0000000000..b464899922 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClient2.java @@ -0,0 +1,11 @@ +package org.apache.tuscany.sca.test; + +import org.osoa.sca.annotations.Remotable; +import org.osoa.sca.annotations.Scope; + +@Remotable +public interface ConversationsClient2 { + public String getDateTime(); + + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClientImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClientImpl.java new file mode 100644 index 0000000000..5b7165de34 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsClientImpl.java @@ -0,0 +1,466 @@ +package org.apache.tuscany.sca.test; + +import java.io.File; +import java.text.DateFormat; + +import junit.framework.Assert; + +import org.osoa.sca.CompositeContext; +import org.osoa.sca.ConversationEndedException; +import org.osoa.sca.CurrentCompositeContext; +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 CompositeContext myContext; // This is broken Tuscany-965 defect has been opened. + @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 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. + // + //FIXME Port to the 1.0 spec API + //Object aServicesSessionID =((ServiceReference)aService).getSessionID(); + //Assert.assertNotNull("test0 - ConversationID from service reference", aServicesSessionID); + + //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(20000L); + } + 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. + + myContext = CurrentCompositeContext.getContext(); + Assert.assertNotNull("current composite context",myContext); + + // This tests creating a conversational session. And that @Init is run prior to business method. + ServiceReference aServRef; + 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. + 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; + Object aConversationID; + myContext = CurrentCompositeContext.getContext(); + Assert.assertNotNull("current composite context",myContext); + ServiceReference aServRef; + this.removeMarkerFile(); + + // + // test3 variation #1 - Cannot be done annotation not implimented yet. 12/15/2006 + // + + aServRef = myContext.newSession("ConversationsLifeCycleService"); + 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 + // + + 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() + // + + aServRef = myContext.newSession("ConversationsLifeCycleService"); + 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. + // + + myContext = CurrentCompositeContext.getContext(); + 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; + ServiceReference myServiceReference = myContext.createServiceReferenceForSession(this,"ConversationsClient2"); + 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. + // + + myContext = CurrentCompositeContext.getContext(); + Assert.assertNotNull("current composite context",myContext); + + // This tests creating a conversational session. This service has a maxAge="5 seconds". + ServiceReference aServRef; + aServRef = myContext.newSession("ConversationsLifeCycleService"); + 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/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsLifeCycleService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsLifeCycleService.java new file mode 100644 index 0000000000..744737dacd --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsLifeCycleService.java @@ -0,0 +1,20 @@ +package org.apache.tuscany.sca.test; + +import org.osoa.sca.annotations.Callback; +import org.osoa.sca.annotations.Remotable; +import org.osoa.sca.annotations.Scope; +import org.osoa.sca.ServiceReference; + +@Remotable +@Callback(ConversationsCallback.class) + +/** + * + */ +public interface ConversationsLifeCycleService { + + public String knockKnock(String aString); + public void endThisSession(); + public void endThisSessionUsingCallback(); + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsLifeCycleServiceImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsLifeCycleServiceImpl.java new file mode 100644 index 0000000000..61e349abed --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsLifeCycleServiceImpl.java @@ -0,0 +1,79 @@ +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/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsService.java new file mode 100644 index 0000000000..d631cf91b4 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsService.java @@ -0,0 +1,24 @@ +package org.apache.tuscany.sca.test; + +import org.osoa.sca.annotations.Callback; +import org.osoa.sca.annotations.Remotable; +import org.osoa.sca.annotations.Scope; +import org.osoa.sca.ServiceReference; + +@Remotable +@Callback(ConversationsCallback.class) + +/** + * + */ +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/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsServiceImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsServiceImpl.java new file mode 100644 index 0000000000..d764e79330 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/java/org/apache/tuscany/sca/test/ConversationsServiceImpl.java @@ -0,0 +1,134 @@ +package org.apache.tuscany.sca.test; + +import junit.framework.Assert; + +import org.osoa.sca.CompositeContext; +import org.osoa.sca.CurrentCompositeContext; +import org.osoa.sca.RequestContext; +import org.osoa.sca.ServiceReference; +import org.osoa.sca.annotations.Callback; +import org.osoa.sca.annotations.Remotable; +import org.osoa.sca.annotations.Service; +import org.osoa.sca.annotations.Context; +import org.osoa.sca.annotations.Scope; +import java.io.File; +import org.apache.tuscany.sca.test.ConversationsClient; + +@Service(ConversationsService.class) +@Scope("CONVERSATION") + +public class ConversationsServiceImpl implements ConversationsService { + + @Callback + // Note injection is not working with a private access modifier. + 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; + CompositeContext ctx = CurrentCompositeContext.getContext(); + + try + { + myServiceReference = ctx.createServiceReferenceForSession(this); + 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/branches/sca-java-integration/testing/sca/itest/conversations/src/main/resources/ConversationsTest.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/resources/ConversationsTest.composite new file mode 100644 index 0000000000..266cd8b386 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/main/resources/ConversationsTest.composite @@ -0,0 +1,48 @@ + + + + + + + + ConversationsService + + + AnotherService + + + ConversationLifeCycleService + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/test/java/org/apache/tuscany/sca/test/ConversationsTest.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/test/java/org/apache/tuscany/sca/test/ConversationsTest.java new file mode 100644 index 0000000000..3fb753cbf7 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/conversations/src/test/java/org/apache/tuscany/sca/test/ConversationsTest.java @@ -0,0 +1,27 @@ +package org.apache.tuscany.sca.test; + +import junit.framework.TestCase; + +import org.apache.tuscany.api.SCARuntime; +import org.osoa.sca.CurrentCompositeContext; + +public class ConversationsTest extends TestCase { + + private ConversationsClient aConversationsClient; + + public void testConversations() { + aConversationsClient.run(); + } + + protected void setUp() throws Exception { + SCARuntime.start("ConversationsTest.composite"); + + aConversationsClient = CurrentCompositeContext.getContext().locateService(ConversationsClient.class, "ConversationsClient/org.apache.tuscany.sca.test.ConversationsClient"); + + } + + protected void tearDown() throws Exception { + SCARuntime.stop(); + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/LICENSE.txt b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/LICENSE.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/NOTICE.txt b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/NOTICE.txt new file mode 100644 index 0000000000..d83ebbe236 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/NOTICE.txt @@ -0,0 +1,14 @@ +${pom.name} +Copyright (c) 2005 - 2006 The Apache Software Foundation + +Apache Tuscany is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the Apache Web Services PMC. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/LICENSE.txt b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/LICENSE.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/NOTICE.txt b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/NOTICE.txt new file mode 100644 index 0000000000..92ca715fbe --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/NOTICE.txt @@ -0,0 +1,14 @@ +${pom.name} +Copyright (c) 2005 - 2007 The Apache Software Foundation + +Apache Tuscany is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the Apache Web Services PMC. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/pom.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/pom.xml new file mode 100644 index 0000000000..6680aafb2b --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/pom.xml @@ -0,0 +1,120 @@ + + + + + org.apache.tuscany.testing + databindings + 0.1-integration-incubating-SNAPSHOT + + + 4.0.0 + + iTest-common + ${testing.version} + jar + Common elements of Databindings Integration Tests + + + + + true + + java.net + java.net Maven 1.x Repository + https://maven-repository.dev.java.net/nonav/repository + legacy + + + + + + + true + + java.net + java.net Maven 1.x Repository + https://maven-repository.dev.java.net/repository + legacy + + + + + + org.apache.tuscany.sca.services.databinding + 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-incubator-SNAPSHOT + + + generate-sdo + generate-sources + + + + ${basedir}/src/main/resources/generate/generate.xsd + + + true + true + true + + + generate + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/java/org/apache/tuscany/sca/itest/generate/Generate.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/java/org/apache/tuscany/sca/itest/generate/Generate.java new file mode 100644 index 0000000000..31dfdcfebb --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/java/org/apache/tuscany/sca/itest/generate/Generate.java @@ -0,0 +1,130 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest.generate; + +import java.io.FileInputStream; +import java.io.FileWriter; +import java.io.InputStream; +import java.io.StringWriter; +import java.util.Iterator; +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.InputFileType; +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.DataObject; +import commonj.sdo.helper.HelperContext; +import commonj.sdo.helper.XMLDocument; +import commonj.sdo.helper.XMLHelper; +import commonj.sdo.helper.XSDHelper; + +/** + * 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/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/generate/DatabindingTestCase.java.vm b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/generate/DatabindingTestCase.java.vm new file mode 100644 index 0000000000..742929ec86 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/generate/DatabindingTestCase.java.vm @@ -0,0 +1,116 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package $template.getJavaPackage(); + +import junit.framework.TestCase; + +import org.osoa.sca.CompositeContext; +import org.osoa.sca.CurrentCompositeContext; + +import org.apache.tuscany.api.SCARuntime; +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 static boolean initalised = false; + private GreeterService greeterClient; + + /** + * Runs before each test method + */ + protected void setUp() throws Exception { + if (!initalised) { + SCARuntime.start("greeter.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 { + CompositeContext ctx = CurrentCompositeContext.getContext(); + greeterClient = ctx.locateService(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/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/generate/Greeter.wsdl.vm b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/generate/Greeter.wsdl.vm new file mode 100644 index 0000000000..f08d56c55a --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/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/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/generate/GreeterService.java.vm b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/generate/GreeterService.java.vm new file mode 100644 index 0000000000..b0e298b823 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/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/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/generate/GreeterServiceClient.java.vm b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/generate/GreeterServiceClient.java.vm new file mode 100644 index 0000000000..ee73db6152 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/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/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/generate/GreeterServiceClientImpl.java.vm b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/generate/GreeterServiceClientImpl.java.vm new file mode 100644 index 0000000000..57827d27b9 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/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/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/generate/GreeterServiceImpl.java.vm b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/generate/GreeterServiceImpl.java.vm new file mode 100644 index 0000000000..1fd7509667 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/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/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/generate/generate.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/generate/generate.xsd new file mode 100644 index 0000000000..1fabedf55f --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/generate/generate.xsd @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/generate/pom.xml.vm b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/generate/pom.xml.vm new file mode 100644 index 0000000000..01267a1d38 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/generate/pom.xml.vm @@ -0,0 +1,181 @@ + + + + + org.apache.tuscany.testing + databindings + 0.1-integration-incubating-SNAPSHOT + + + 4.0.0 + + iTest-sdoDatabinding + ${testing.version} + jar + Test Suite for SDO Databindings + + + + + true + + java.net + java.net Maven 1.x Repository + https://maven-repository.dev.java.net/nonav/repository + legacy + + + + + + + true + + java.net + java.net Maven 1.x Repository + https://maven-repository.dev.java.net/repository + legacy + + + + + + org.apache.tuscany.sca.services.databinding + databinding-jaxb + 0.1-integration-incubating-SNAPSHOT + runtime + + + org.apache.tuscany.sca.services.databinding + databinding-sdo + ${pom.version} + compile + + + org.apache.tuscany.sca.extensions.axis2 + databinding-axiom + ${pom.version} + compile + + + org.apache.tuscany.testing + itest-common + ${pom.version} + compile + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + generate-sources + + unpack + + + + + org.apache.tuscany.testing + itest-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/sdo-source + + + + + + + org.codehaus.mojo + exec-maven-plugin + + + generate-test-source + process-resources + + java + + + + + org.apache.tuscany.sca.itest.generate.Generate + + ${project.build.directory} + + + + + org.apache.tuscany.sdo + tuscany-sdo-plugin + 1.0-incubator-SNAPSHOT + + + generate-sdo + process-resources + + + + ${project.build.directory}/classes/wsdl/Greeter.wsdl + org.apache.tuscany.sca.itest.databinding.services + + #foreach( $file in $fileList ) + + ${project.build.directory}/classes/$file.getFilePath()/$file.getFileName() + $file.getJavaPackage() + + #end + + true + true + true + + + generate + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/wsdl/Dummy.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/wsdl/Dummy.wsdl new file mode 100644 index 0000000000..5aa7faaa16 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/wsdl/Dummy.wsdl @@ -0,0 +1,4 @@ +A dummy WSDL 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 overwritten. diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Annotation.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Annotation.xml new file mode 100644 index 0000000000..fd84119c93 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Annotation.xml @@ -0,0 +1,24 @@ + + + + SimpleTypeWithName + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Annotation.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Annotation.xsd new file mode 100644 index 0000000000..911e386f68 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/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/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Attribute.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Attribute.xml new file mode 100644 index 0000000000..c20c80b658 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Attribute.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Attribute.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Attribute.xsd new file mode 100644 index 0000000000..458b38647f --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Attribute.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeReference.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeReference.xml new file mode 100644 index 0000000000..30e4979dca --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeReference.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeReference.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeReference.xsd new file mode 100644 index 0000000000..5842a8d629 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeReference.xsd @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithDefaultValue.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithDefaultValue.xml new file mode 100644 index 0000000000..9552421e2d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithDefaultValue.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithDefaultValue.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithDefaultValue.xsd new file mode 100644 index 0000000000..c7b9655749 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithDefaultValue.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithFixedValue.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithFixedValue.xml new file mode 100644 index 0000000000..5e5e7fbd55 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithFixedValue.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithFixedValue.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithFixedValue.xsd new file mode 100644 index 0000000000..5c455c2ab5 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithFixedValue.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOAliasName.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOAliasName.xml new file mode 100644 index 0000000000..635e851632 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOAliasName.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOAliasName.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOAliasName.xsd new file mode 100644 index 0000000000..004dab4fbb --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOAliasName.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDODataType.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDODataType.xml new file mode 100644 index 0000000000..136092951b --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDODataType.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDODataType.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDODataType.xsd new file mode 100644 index 0000000000..796f08e1cf --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDODataType.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOName.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOName.xml new file mode 100644 index 0000000000..927b94885c --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOName.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOName.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOName.xsd new file mode 100644 index 0000000000..93f83cd0a1 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOName.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertySDOOppositePropertyType.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertySDOOppositePropertyType.xml new file mode 100644 index 0000000000..ea7db70595 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertySDOOppositePropertyType.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertySDOOppositePropertyType.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertySDOOppositePropertyType.xsd new file mode 100644 index 0000000000..c64323e7e1 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertySDOOppositePropertyType.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertyType.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertyType.xml new file mode 100644 index 0000000000..85c7d85fd4 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertyType.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertyType.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertyType.xsd new file mode 100644 index 0000000000..543f276c50 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertyType.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOString.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOString.xml new file mode 100644 index 0000000000..fcd281539b --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOString.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOString.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOString.xsd new file mode 100644 index 0000000000..1610c2b861 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOString.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInAnySimpleType.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInAnySimpleType.xml new file mode 100644 index 0000000000..36a0760a61 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInAnySimpleType.xml @@ -0,0 +1,24 @@ + + + + anySimpleType + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInAnySimpleType.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInAnySimpleType.xsd new file mode 100644 index 0000000000..999b72bb35 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInAnySimpleType.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInAnyType.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInAnyType.xml new file mode 100644 index 0000000000..5849165fe0 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInAnyType.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInAnyType.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInAnyType.xsd new file mode 100644 index 0000000000..71dad561ca --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInAnyType.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInAnyURI.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInAnyURI.xml new file mode 100644 index 0000000000..8acf9376d7 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInAnyURI.xml @@ -0,0 +1,24 @@ + + + + http://tempuri.org + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInAnyURI.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInAnyURI.xsd new file mode 100644 index 0000000000..a49987c352 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInAnyURI.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInBase64Binary.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInBase64Binary.xml new file mode 100644 index 0000000000..a35b6e174a --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInBase64Binary.xml @@ -0,0 +1,24 @@ + + + + ABCDEF + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInBase64Binary.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInBase64Binary.xsd new file mode 100644 index 0000000000..e1995890f9 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInBase64Binary.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInBoolean.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInBoolean.xml new file mode 100644 index 0000000000..91cfce51b8 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInBoolean.xml @@ -0,0 +1,27 @@ + + + + true + false + 1 + 0 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInBoolean.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInBoolean.xsd new file mode 100644 index 0000000000..a2f86ba8c5 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInBoolean.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInByte.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInByte.xml new file mode 100644 index 0000000000..907474cd1b --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInByte.xml @@ -0,0 +1,25 @@ + + + + 127 + -127 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInByte.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInByte.xsd new file mode 100644 index 0000000000..a2f6bcfa77 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInByte.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDate.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDate.xml new file mode 100644 index 0000000000..c5820e1a2e --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDate.xml @@ -0,0 +1,24 @@ + + + + 2001-01-01 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDate.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDate.xsd new file mode 100644 index 0000000000..f4d596bfe3 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDate.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDateTime.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDateTime.xml new file mode 100644 index 0000000000..0debe2fec5 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/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/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDateTime.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDateTime.xsd new file mode 100644 index 0000000000..b5bcfdcfd4 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDateTime.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDecimal.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDecimal.xml new file mode 100644 index 0000000000..7f001254cc --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDecimal.xml @@ -0,0 +1,23 @@ + + + + -1.23456789 + 1.23456789 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDecimal.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDecimal.xsd new file mode 100644 index 0000000000..8d4d106f59 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDecimal.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDouble.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDouble.xml new file mode 100644 index 0000000000..f875b9f94d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/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/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDouble.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDouble.xsd new file mode 100644 index 0000000000..4c8a39b06c --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDouble.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDuration.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDuration.xml new file mode 100644 index 0000000000..7d343d6dda --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDuration.xml @@ -0,0 +1,24 @@ + + + + P1D + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDuration.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDuration.xsd new file mode 100644 index 0000000000..bb12bc04a9 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInDuration.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInFloat.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInFloat.xml new file mode 100644 index 0000000000..7a81f3b0dd --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInFloat.xml @@ -0,0 +1,24 @@ + + + + 0.0 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInFloat.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInFloat.xsd new file mode 100644 index 0000000000..f0e1c21233 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInFloat.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGDay.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGDay.xml new file mode 100644 index 0000000000..d35568b3c9 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGDay.xml @@ -0,0 +1,24 @@ + + + + ---01 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGDay.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGDay.xsd new file mode 100644 index 0000000000..92bd9a4b66 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGDay.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGMonth.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGMonth.xml new file mode 100644 index 0000000000..52cdfa8c4e --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGMonth.xml @@ -0,0 +1,24 @@ + + + + --01-- + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGMonth.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGMonth.xsd new file mode 100644 index 0000000000..78d001a585 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGMonth.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGMonthDay.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGMonthDay.xml new file mode 100644 index 0000000000..2609a858f7 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGMonthDay.xml @@ -0,0 +1,24 @@ + + + + --01-01 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGMonthDay.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGMonthDay.xsd new file mode 100644 index 0000000000..38f6c55059 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGMonthDay.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGYear.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGYear.xml new file mode 100644 index 0000000000..7868a47ca3 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGYear.xml @@ -0,0 +1,24 @@ + + + + 2001 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGYear.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGYear.xsd new file mode 100644 index 0000000000..0d65b124ff --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGYear.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGYearMonth.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGYearMonth.xml new file mode 100644 index 0000000000..3f5080d49f --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGYearMonth.xml @@ -0,0 +1,24 @@ + + + + 2001-01 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGYearMonth.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGYearMonth.xsd new file mode 100644 index 0000000000..340555dc5f --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInGYearMonth.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInHexBinary.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInHexBinary.xml new file mode 100644 index 0000000000..0deb7af980 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInHexBinary.xml @@ -0,0 +1,24 @@ + + + + 0F00 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInHexBinary.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInHexBinary.xsd new file mode 100644 index 0000000000..8059fe6da0 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInHexBinary.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInID.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInID.xml new file mode 100644 index 0000000000..06c92ce19b --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInID.xml @@ -0,0 +1,24 @@ + + + + idvalue0 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInID.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInID.xsd new file mode 100644 index 0000000000..7b1f02d1d4 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInID.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInIDREF.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInIDREF.xml new file mode 100644 index 0000000000..9bc0cefd0f --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInIDREF.xml @@ -0,0 +1,24 @@ + + + + idvalue0 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInIDREF.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInIDREF.xsd new file mode 100644 index 0000000000..0c207983bc --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInIDREF.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInIDREFS.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInIDREFS.xml new file mode 100644 index 0000000000..f91b602f99 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInIDREFS.xml @@ -0,0 +1,24 @@ + + + + idvalue0 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInIDREFS.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInIDREFS.xsd new file mode 100644 index 0000000000..b99bf01b73 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInIDREFS.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInInt.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInInt.xml new file mode 100644 index 0000000000..c99698e175 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInInt.xml @@ -0,0 +1,25 @@ + + + + -2147483648 + 2147483647 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInInt.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInInt.xsd new file mode 100644 index 0000000000..b5b9b0d1eb --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInInt.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInInteger.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInInteger.xml new file mode 100644 index 0000000000..80d22ce057 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInInteger.xml @@ -0,0 +1,25 @@ + + + + -2147483648 + 2147483647 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInInteger.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInInteger.xsd new file mode 100644 index 0000000000..4902935db5 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInInteger.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInLanguage.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInLanguage.xml new file mode 100644 index 0000000000..664bf824b4 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInLanguage.xml @@ -0,0 +1,24 @@ + + + + EN + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInLanguage.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInLanguage.xsd new file mode 100644 index 0000000000..5d3658d224 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInLanguage.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInLong.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInLong.xml new file mode 100644 index 0000000000..c5861fa92a --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInLong.xml @@ -0,0 +1,25 @@ + + + + -9223372036854775808 + 9223372036854775807 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInLong.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInLong.xsd new file mode 100644 index 0000000000..0aa4710057 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInLong.xsd @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNCName.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNCName.xml new file mode 100644 index 0000000000..1f95950394 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNCName.xml @@ -0,0 +1,24 @@ + + + + NCName + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNCName.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNCName.xsd new file mode 100644 index 0000000000..6ee9c435db --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNCName.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKEN.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKEN.xml new file mode 100644 index 0000000000..0297f1aeb4 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKEN.xml @@ -0,0 +1,24 @@ + + + + NMTOKEN + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKEN.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKEN.xsd new file mode 100644 index 0000000000..56d027bdbb --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKEN.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKENS.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKENS.xml new file mode 100644 index 0000000000..81ba1069bd --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKENS.xml @@ -0,0 +1,24 @@ + + + + NMTOKENS + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKENS.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKENS.xsd new file mode 100644 index 0000000000..866ab73024 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKENS.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNOTATION.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNOTATION.xml new file mode 100644 index 0000000000..8bb3a08b94 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNOTATION.xml @@ -0,0 +1,24 @@ + + + + tns:BuiltInNotationNotation + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNOTATION.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNOTATION.xsd new file mode 100644 index 0000000000..c7c62f812b --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNOTATION.xsd @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInName.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInName.xml new file mode 100644 index 0000000000..8235718c5e --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInName.xml @@ -0,0 +1,24 @@ + + + + Name + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInName.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInName.xsd new file mode 100644 index 0000000000..36caba2f16 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInName.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNegativeInteger.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNegativeInteger.xml new file mode 100644 index 0000000000..599c428a44 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNegativeInteger.xml @@ -0,0 +1,24 @@ + + + + -1 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNegativeInteger.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNegativeInteger.xsd new file mode 100644 index 0000000000..389d5a99f0 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNegativeInteger.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNonNegativeInteger.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNonNegativeInteger.xml new file mode 100644 index 0000000000..919c4a20ee --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNonNegativeInteger.xml @@ -0,0 +1,24 @@ + + + + 0 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNonNegativeInteger.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNonNegativeInteger.xsd new file mode 100644 index 0000000000..59887078b5 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNonNegativeInteger.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNonPositiveInteger.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNonPositiveInteger.xml new file mode 100644 index 0000000000..79011f26ab --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNonPositiveInteger.xml @@ -0,0 +1,24 @@ + + + + -1 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNonPositiveInteger.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNonPositiveInteger.xsd new file mode 100644 index 0000000000..5de7d64d7b --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNonPositiveInteger.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNormalizedString.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNormalizedString.xml new file mode 100644 index 0000000000..c40be9e18b --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNormalizedString.xml @@ -0,0 +1,24 @@ + + + + normalizedString + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNormalizedString.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNormalizedString.xsd new file mode 100644 index 0000000000..d4a78787b8 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInNormalizedString.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInPositiveInteger.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInPositiveInteger.xml new file mode 100644 index 0000000000..c30434de66 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInPositiveInteger.xml @@ -0,0 +1,24 @@ + + + + 1 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInPositiveInteger.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInPositiveInteger.xsd new file mode 100644 index 0000000000..5381590cd1 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInPositiveInteger.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInQName.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInQName.xml new file mode 100644 index 0000000000..4cd6ea7e72 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInQName.xml @@ -0,0 +1,24 @@ + + + + QName + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInQName.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInQName.xsd new file mode 100644 index 0000000000..e8faf6225b --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInQName.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInShort.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInShort.xml new file mode 100644 index 0000000000..b4375467c4 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInShort.xml @@ -0,0 +1,25 @@ + + + + -32768 + 32767 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInShort.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInShort.xsd new file mode 100644 index 0000000000..a4f564d9b7 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInShort.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInString.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInString.xml new file mode 100644 index 0000000000..d30ab85530 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInString.xml @@ -0,0 +1,24 @@ + + + + string + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInString.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInString.xsd new file mode 100644 index 0000000000..8abb34b5a5 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInString.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInTime.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInTime.xml new file mode 100644 index 0000000000..7fd9a061ae --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInTime.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInTime.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInTime.xsd new file mode 100644 index 0000000000..1615976813 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInTime.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInToken.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInToken.xml new file mode 100644 index 0000000000..cd567ba528 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInToken.xml @@ -0,0 +1,24 @@ + + + + token + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInToken.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInToken.xsd new file mode 100644 index 0000000000..0beaac571f --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInToken.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedByte.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedByte.xml new file mode 100644 index 0000000000..025362defb --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedByte.xml @@ -0,0 +1,25 @@ + + + + 0 + 255 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedByte.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedByte.xsd new file mode 100644 index 0000000000..d6d951fe5d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedByte.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedInt.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedInt.xml new file mode 100644 index 0000000000..5736a8c121 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedInt.xml @@ -0,0 +1,25 @@ + + + + 0 + 4294967295 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedInt.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedInt.xsd new file mode 100644 index 0000000000..242be1d53b --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedInt.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedLong.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedLong.xml new file mode 100644 index 0000000000..d728115a77 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedLong.xml @@ -0,0 +1,25 @@ + + + + 0 + 18446744073709551615 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedLong.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedLong.xsd new file mode 100644 index 0000000000..108e3a8619 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedLong.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedShort.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedShort.xml new file mode 100644 index 0000000000..d4ffae5e17 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedShort.xml @@ -0,0 +1,25 @@ + + + + 0 + 65535 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedShort.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedShort.xsd new file mode 100644 index 0000000000..5ee5e0229e --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedShort.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeComplexContentRestrictingComplexType.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeComplexContentRestrictingComplexType.xml new file mode 100644 index 0000000000..3d5aed5aa8 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeComplexContentRestrictingComplexType.xml @@ -0,0 +1,26 @@ + + + + + SimpleTypeWithName + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeComplexContentRestrictingComplexType.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeComplexContentRestrictingComplexType.xsd new file mode 100644 index 0000000000..e7b80ab11c --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeComplexContentRestrictingComplexType.xsd @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingComplexType.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingComplexType.xml new file mode 100644 index 0000000000..2b4fe5594e --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingComplexType.xml @@ -0,0 +1,27 @@ + + + + + SimpleTypeWithName + SimpleTypeWithNameExtended + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingComplexType.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingComplexType.xsd new file mode 100644 index 0000000000..fc4deb63c2 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingComplexType.xsd @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingSimpleType.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingSimpleType.xml new file mode 100644 index 0000000000..03570f41d9 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingSimpleType.xml @@ -0,0 +1,24 @@ + + + + ComplexTypeExtendingSimpeTypeElement + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingSimpleType.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingSimpleType.xsd new file mode 100644 index 0000000000..c754502645 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingSimpleType.xsd @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeSimpleContentRestrictingComplexType.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeSimpleContentRestrictingComplexType.xml new file mode 100644 index 0000000000..4603793bfc --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeSimpleContentRestrictingComplexType.xml @@ -0,0 +1,24 @@ + + + + ComplexTypeSimpleContentRestrictingComplexTypeElement + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeSimpleContentRestrictingComplexType.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeSimpleContentRestrictingComplexType.xsd new file mode 100644 index 0000000000..4bcd2f8c46 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeSimpleContentRestrictingComplexType.xsd @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithAbstract.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithAbstract.xml new file mode 100644 index 0000000000..a6861f803a --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithAbstract.xml @@ -0,0 +1,27 @@ + + + + + BaseElement + ExtensionElement + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithAbstract.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithAbstract.xsd new file mode 100644 index 0000000000..8bb251cab2 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithAbstract.xsd @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithCDATA.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithCDATA.xml new file mode 100644 index 0000000000..467ec007ed --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/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/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithCDATA.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithCDATA.xsd new file mode 100644 index 0000000000..8d00646678 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithCDATA.xsd @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithContent.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithContent.xml new file mode 100644 index 0000000000..7deafd798a --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithContent.xml @@ -0,0 +1,26 @@ + + + + + SimpleTypeWithName + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithContent.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithContent.xsd new file mode 100644 index 0000000000..72ac75fee0 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithContent.xsd @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithMixed.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithMixed.xml new file mode 100644 index 0000000000..f6208f81b3 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithMixed.xml @@ -0,0 +1,29 @@ + + + + + Some + Mixed + SimpleTypeWithName + Content + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithMixed.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithMixed.xsd new file mode 100644 index 0000000000..1f26e13673 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithMixed.xsd @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenAttributes.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenAttributes.xml new file mode 100644 index 0000000000..97de7b98eb --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenAttributes.xml @@ -0,0 +1,24 @@ + + + + + SimpleTypeWithName + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenAttributes.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenAttributes.xsd new file mode 100644 index 0000000000..67716553d8 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenAttributes.xsd @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenContent.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenContent.xml new file mode 100644 index 0000000000..5941348921 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenContent.xml @@ -0,0 +1,31 @@ + + + + + + + Some + Mixed + SimpleTypeWithName + Content + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenContent.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenContent.xsd new file mode 100644 index 0000000000..24d5d09054 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenContent.xsd @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOppositeProperty.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOppositeProperty.xml new file mode 100644 index 0000000000..f684d06a4d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOppositeProperty.xml @@ -0,0 +1,30 @@ + + + + + SomeData + + + idvalue2 + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOppositeProperty.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOppositeProperty.xsd new file mode 100644 index 0000000000..de4a8a666d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOppositeProperty.xsd @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOAliasName.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOAliasName.xml new file mode 100644 index 0000000000..242908bd27 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOAliasName.xml @@ -0,0 +1,26 @@ + + + + + SimpleTypeWithName + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOAliasName.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOAliasName.xsd new file mode 100644 index 0000000000..4c00fbe295 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOAliasName.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOName.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOName.xml new file mode 100644 index 0000000000..925e8625d5 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOName.xml @@ -0,0 +1,26 @@ + + + + + SimpleTypeWithName + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOName.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOName.xsd new file mode 100644 index 0000000000..b12bec040b --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOName.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOSequence.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOSequence.xml new file mode 100644 index 0000000000..c73708ce46 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOSequence.xml @@ -0,0 +1,26 @@ + + + + + SimpleTypeWithName + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOSequence.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOSequence.xsd new file mode 100644 index 0000000000..795c3ea7d9 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOSequence.xsd @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutContent.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutContent.xml new file mode 100644 index 0000000000..3ebdc89ae0 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutContent.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutContent.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutContent.xsd new file mode 100644 index 0000000000..21546d0f67 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutContent.xsd @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutName.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutName.xml new file mode 100644 index 0000000000..89657e42ca --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutName.xml @@ -0,0 +1,26 @@ + + + + + SimpleTypeWithName + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutName.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutName.xsd new file mode 100644 index 0000000000..d01b4172e4 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutName.xsd @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/DefaultNamespace.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/DefaultNamespace.xml new file mode 100644 index 0000000000..82fd1eedaf --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/DefaultNamespace.xml @@ -0,0 +1,23 @@ + + + + SimpleTypeWithName + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/DefaultNamespace.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/DefaultNamespace.xsd new file mode 100644 index 0000000000..e1dcf06194 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/DefaultNamespace.xsd @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementInAll.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementInAll.xml new file mode 100644 index 0000000000..ebf03c9d5d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementInAll.xml @@ -0,0 +1,27 @@ + + + + + ElementInAllOne + ElementInAllTwo + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementInAll.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementInAll.xsd new file mode 100644 index 0000000000..8b9ba5b4b8 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementInAll.xsd @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementInChoice.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementInChoice.xml new file mode 100644 index 0000000000..26466b1b39 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementInChoice.xml @@ -0,0 +1,25 @@ + + + + Element1InChoice + Element2InChoice + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementInChoice.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementInChoice.xsd new file mode 100644 index 0000000000..ff418c56ab --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementInChoice.xsd @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSDOChangeSummaryType.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSDOChangeSummaryType.xml new file mode 100644 index 0000000000..27bb1ce9cc --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSDOChangeSummaryType.xml @@ -0,0 +1,29 @@ + + + + + + ChangeSummaryText + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSDOChangeSummaryType.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSDOChangeSummaryType.xsd new file mode 100644 index 0000000000..2bf1df8c99 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSDOChangeSummaryType.xsd @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithDefault.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithDefault.xml new file mode 100644 index 0000000000..9b5561ed43 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithDefault.xml @@ -0,0 +1,24 @@ + + + + ElementOfSimpleTypeWithDefaultDefault + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithDefault.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithDefault.xsd new file mode 100644 index 0000000000..0b4e7bdf45 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithDefault.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithFixed.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithFixed.xml new file mode 100644 index 0000000000..f1b7cd264c --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithFixed.xml @@ -0,0 +1,24 @@ + + + + ElementOfSimpleTypeWithFixedFixed + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithFixed.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithFixed.xsd new file mode 100644 index 0000000000..a2c8456257 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithFixed.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDODataType.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDODataType.xml new file mode 100644 index 0000000000..1f60b0423f --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDODataType.xml @@ -0,0 +1,24 @@ + + + + ElementOfSimpleTypeWithSDODataTypeElement + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDODataType.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDODataType.xsd new file mode 100644 index 0000000000..21e55ab8c1 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDODataType.xsd @@ -0,0 +1,33 @@ + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOOppositePropertyType.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOOppositePropertyType.xml new file mode 100644 index 0000000000..30762f4912 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOOppositePropertyType.xml @@ -0,0 +1,24 @@ + + + + idvalue0 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOOppositePropertyType.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOOppositePropertyType.xsd new file mode 100644 index 0000000000..5bf35d0d70 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOOppositePropertyType.xsd @@ -0,0 +1,33 @@ + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOPropertyType.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOPropertyType.xml new file mode 100644 index 0000000000..2dd01e4090 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOPropertyType.xml @@ -0,0 +1,24 @@ + + + + idvalue0 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOPropertyType.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOPropertyType.xsd new file mode 100644 index 0000000000..6920cd8dd0 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOPropertyType.xsd @@ -0,0 +1,32 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOString.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOString.xml new file mode 100644 index 0000000000..6a526bdc47 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOString.xml @@ -0,0 +1,24 @@ + + + + ElementOfSimpleTypeWithSDOStringElement + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOString.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOString.xsd new file mode 100644 index 0000000000..1117a95eb8 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOString.xsd @@ -0,0 +1,32 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementSubstitutionGroupBase.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementSubstitutionGroupBase.xml new file mode 100644 index 0000000000..ab91458bff --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/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/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementSubstitutionGroupBase.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementSubstitutionGroupBase.xsd new file mode 100644 index 0000000000..3e015843b5 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementSubstitutionGroupBase.xsd @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithMaxOccurs.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithMaxOccurs.xml new file mode 100644 index 0000000000..b6d68fd08a --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithMaxOccurs.xml @@ -0,0 +1,25 @@ + + + + ElementWithMaxOccursElement1 + ElementWithMaxOccursElement2 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithMaxOccurs.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithMaxOccurs.xsd new file mode 100644 index 0000000000..d4453a4477 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithMaxOccurs.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithNillable.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithNillable.xml new file mode 100644 index 0000000000..6de3adc937 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithNillable.xml @@ -0,0 +1,24 @@ + + + + ElementWithNillableElement + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithNillable.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithNillable.xsd new file mode 100644 index 0000000000..786ab226da --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithNillable.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithSDOAliasName.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithSDOAliasName.xml new file mode 100644 index 0000000000..64093aa803 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithSDOAliasName.xml @@ -0,0 +1,24 @@ + + + + ElementWithSDOAliasName + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithSDOAliasName.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithSDOAliasName.xsd new file mode 100644 index 0000000000..01f4c2b1ef --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithSDOAliasName.xsd @@ -0,0 +1,32 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithSDOName.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithSDOName.xml new file mode 100644 index 0000000000..774646f682 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithSDOName.xml @@ -0,0 +1,24 @@ + + + + ElementWithSDONameElement + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithSDOName.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithSDOName.xsd new file mode 100644 index 0000000000..34da37564c --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ElementWithSDOName.xsd @@ -0,0 +1,32 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/GlobalElementComplexType.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/GlobalElementComplexType.xml new file mode 100644 index 0000000000..a1fb3aa803 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/GlobalElementComplexType.xml @@ -0,0 +1,24 @@ + + + + SimpleTypeWithName + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/GlobalElementComplexType.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/GlobalElementComplexType.xsd new file mode 100644 index 0000000000..8eb7a4fce4 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/GlobalElementComplexType.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/GlobalElementSimpleType.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/GlobalElementSimpleType.xml new file mode 100644 index 0000000000..f68eb1939d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/GlobalElementSimpleType.xml @@ -0,0 +1,24 @@ + + + + GlobalElementSimpleType + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/GlobalElementSimpleType.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/GlobalElementSimpleType.xsd new file mode 100644 index 0000000000..b9f77e6658 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/GlobalElementSimpleType.xsd @@ -0,0 +1,26 @@ + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Import.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Import.xml new file mode 100644 index 0000000000..fd28850050 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Import.xml @@ -0,0 +1,30 @@ + + + + + SimpleTypeWithName + + SomeString + SomeString + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Import.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Import.xsd new file mode 100644 index 0000000000..eae93fd44a --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Import.xsd @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ImportedSchema.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ImportedSchema.xsd new file mode 100644 index 0000000000..a7e568decf --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/ImportedSchema.xsd @@ -0,0 +1,33 @@ + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Include.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Include.xml new file mode 100644 index 0000000000..d4b9e24fa6 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Include.xml @@ -0,0 +1,24 @@ + + + + SimpleTypeWithName + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Include.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Include.xsd new file mode 100644 index 0000000000..9087ebc74d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Include.xsd @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Interop.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Interop.xsd new file mode 100644 index 0000000000..8138413b9a --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Interop.xsd @@ -0,0 +1,133 @@ + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Notation.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Notation.xml new file mode 100644 index 0000000000..b75ac6500a --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Notation.xml @@ -0,0 +1,24 @@ + + + +tns:Tuscany + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Notation.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Notation.xsd new file mode 100644 index 0000000000..6ad019cb81 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Notation.xsd @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Person.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Person.xsd new file mode 100644 index 0000000000..5f5021b15e --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/Person.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SDOJavaPackage.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SDOJavaPackage.xml new file mode 100644 index 0000000000..6c5ad88ff4 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SDOJavaPackage.xml @@ -0,0 +1,25 @@ + + + + SimpleTypeWithName + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SDOJavaPackage.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SDOJavaPackage.xsd new file mode 100644 index 0000000000..6b7e39b334 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SDOJavaPackage.xsd @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithAbstract.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithAbstract.xml new file mode 100644 index 0000000000..f9d4a24a49 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithAbstract.xml @@ -0,0 +1,24 @@ + + + + SimpleTypeWithAbstractExtensionElement + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithAbstract.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithAbstract.xsd new file mode 100644 index 0000000000..4bf0f0f4af --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithAbstract.xsd @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithExtendedInstanceClass.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithExtendedInstanceClass.xml new file mode 100644 index 0000000000..410df4b7e4 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithExtendedInstanceClass.xml @@ -0,0 +1,24 @@ + + + + SimpleTypeWithExtendedInstanceClassElement + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithExtendedInstanceClass.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithExtendedInstanceClass.xsd new file mode 100644 index 0000000000..36629e8295 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithExtendedInstanceClass.xsd @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithInstanceClass.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithInstanceClass.xml new file mode 100644 index 0000000000..7b74867c03 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithInstanceClass.xml @@ -0,0 +1,24 @@ + + + + SimpleTypeWithInstanceClassElement + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithInstanceClass.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithInstanceClass.xsd new file mode 100644 index 0000000000..7a08de84be --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithInstanceClass.xsd @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithList.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithList.xml new file mode 100644 index 0000000000..708d526f44 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithList.xml @@ -0,0 +1,24 @@ + + + + listmember1 listmember2 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithList.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithList.xsd new file mode 100644 index 0000000000..681cf7d5af --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithList.xsd @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithName.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithName.xml new file mode 100644 index 0000000000..e404ac86b7 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithName.xml @@ -0,0 +1,24 @@ + + + + SimpleTypeWithNameElement + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithName.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithName.xsd new file mode 100644 index 0000000000..af0431f048 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithName.xsd @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithSDOName.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithSDOName.xml new file mode 100644 index 0000000000..c86a0f6bcb --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithSDOName.xml @@ -0,0 +1,24 @@ + + + + SimpleTypeWithSDONameElement + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithSDOName.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithSDOName.xsd new file mode 100644 index 0000000000..889b819e3c --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithSDOName.xsd @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithUnion.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithUnion.xml new file mode 100644 index 0000000000..399b0d8175 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithUnion.xml @@ -0,0 +1,25 @@ + + + + EN + 01:02:03 + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithUnion.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithUnion.xsd new file mode 100644 index 0000000000..fee04b9f24 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithUnion.xsd @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithoutName.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithoutName.xml new file mode 100644 index 0000000000..bc8cf35368 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithoutName.xml @@ -0,0 +1,26 @@ + + + + + SimpleTypeWithoutName + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithoutName.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithoutName.xsd new file mode 100644 index 0000000000..536aa822de --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithoutName.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/TargetNamespace.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/TargetNamespace.xml new file mode 100644 index 0000000000..da2929776e --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/TargetNamespace.xml @@ -0,0 +1,24 @@ + + + + SimpleTypeWithName + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/TargetNamespace.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/TargetNamespace.xsd new file mode 100644 index 0000000000..ace5427786 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/TargetNamespace.xsd @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/datagraph.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/datagraph.xsd new file mode 100644 index 0000000000..e6b9697a8d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/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/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/sdoJava.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/sdoJava.xsd new file mode 100644 index 0000000000..7387568942 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/sdoJava.xsd @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/sdoModel.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/sdoModel.xsd new file mode 100644 index 0000000000..c5aabc9cc8 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/main/resources/xsd/sdoModel.xsd @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/test/java/org/apache/tuscany/sca/itest/generate/GenerateTestCase.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/test/java/org/apache/tuscany/sca/itest/generate/GenerateTestCase.java new file mode 100644 index 0000000000..131e11012a --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/common/src/test/java/org/apache/tuscany/sca/itest/generate/GenerateTestCase.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.generate; + +import junit.framework.TestCase; + + +/** + * + */ +public class GenerateTestCase extends TestCase { + + private Generate generator = null; + private static boolean initalised = false; + + protected void setUp() throws Exception { + if (!initalised) { + generator = new Generate(); + initalised = true; + } + } + + 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/branches/sca-java-integration/testing/sca/itest/databindings/interop/LICENSE.txt b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/interop/LICENSE.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/interop/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/interop/NOTICE.txt b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/interop/NOTICE.txt new file mode 100644 index 0000000000..92ca715fbe --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/interop/NOTICE.txt @@ -0,0 +1,14 @@ +${pom.name} +Copyright (c) 2005 - 2007 The Apache Software Foundation + +Apache Tuscany is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the Apache Web Services PMC. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/interop/pom.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/interop/pom.xml new file mode 100644 index 0000000000..fd3796fa36 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/interop/pom.xml @@ -0,0 +1,200 @@ + + + + + org.apache.tuscany.testing + databindings + 0.1-integration-incubating-SNAPSHOT + + + 4.0.0 + + iTest-interopDatabinding + ${testing.version} + jar + Interoperability Databindings Integration Test + + + + + true + + java.net + java.net Maven 1.x Repository + https://maven-repository.dev.java.net/nonav/repository + legacy + + + + + + + true + + java.net + java.net Maven 1.x Repository + https://maven-repository.dev.java.net/repository + legacy + + + + + + org.apache.tuscany.sca.services.databinding + databinding-jaxb + 0.1-integration-incubating-SNAPSHOT + runtime + + + org.apache.tuscany.sca.services.databinding + databinding-sdo + ${pom.version} + compile + + + org.apache.tuscany.sca.extensions.axis2 + databinding-axiom + ${pom.version} + compile + + + javax.xml.bind + jaxb-api + 2.1 + compile + + + com.sun.xml.bind + jaxb-impl + 2.1 + runtime + + + com.sun.xml.ws + jaxws-rt + 2.1 + + + org.apache.tuscany.testing + itest-common + ${pom.version} + compile + + + org.apache.tuscany.testing + iTest-sdoDatabinding + ${pom.version} + compile + + + org.apache.tuscany.testing + iTest-jaxbDatabinding + ${pom.version} + compile + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + generate-sources + + unpack + + + + + org.apache.tuscany.testing + itest-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/jaxb-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 + + JAXBGreeter.wsdl + + ${project.build.directory}/jaxws-source + true + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/interop/src/main/resources/generate/InteropDatabindingTestCase.java.vm b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/interop/src/main/resources/generate/InteropDatabindingTestCase.java.vm new file mode 100644 index 0000000000..e6c2cd0f94 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/interop/src/main/resources/generate/InteropDatabindingTestCase.java.vm @@ -0,0 +1,119 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package $template.getJavaPackage(); + +import junit.framework.TestCase; + +import org.osoa.sca.CompositeContext; +import org.osoa.sca.CurrentCompositeContext; + +import org.apache.tuscany.api.SCARuntime; +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; + + /** + * Runs before each test method + */ + protected void setUp() throws Exception { + if (!initalised) { + SCARuntime.start("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 { + CompositeContext ctx = CurrentCompositeContext.getContext(); + greeterClient = ctx.locateService(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 + */ +// Not sure that transformations should work with +// local connections because the interface type will +// be incorrect when specified in the SCDL +// 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/branches/sca-java-integration/testing/sca/itest/databindings/interop/src/main/resources/generate/JAXBGreeter.wsdl.vm b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/interop/src/main/resources/generate/JAXBGreeter.wsdl.vm new file mode 100644 index 0000000000..00cfea5e9f --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/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/branches/sca-java-integration/testing/sca/itest/databindings/interop/src/main/resources/generate/SDOGreeter.wsdl.vm b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/interop/src/main/resources/generate/SDOGreeter.wsdl.vm new file mode 100644 index 0000000000..00cfea5e9f --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/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/branches/sca-java-integration/testing/sca/itest/databindings/interop/src/main/resources/generate/generate.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/interop/src/main/resources/generate/generate.xml new file mode 100644 index 0000000000..6d6da4d366 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/interop/src/main/resources/generate/generate.xml @@ -0,0 +1,100 @@ + + + + + + + + + + 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 + + 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/branches/sca-java-integration/testing/sca/itest/databindings/interop/src/main/resources/generate/interopgreeter.composite.vm b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/interop/src/main/resources/generate/interopgreeter.composite.vm new file mode 100644 index 0000000000..4d41e3de19 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/interop/src/main/resources/generate/interopgreeter.composite.vm @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + SDODefaultGreeterServiceClient + + + + + JAXBGreeterService + + + + + + + + + + SDOGreeterServiceWSRef + + + + + + + + + + + SDOWSGreeterServiceClient + + + + + JAXBGreeterServiceWSRef + + + + + + + + + + + JAXBWSGreeterService + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/pom.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/pom.xml new file mode 100644 index 0000000000..3f8eeaed17 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/pom.xml @@ -0,0 +1,152 @@ + + + + + org.apache.tuscany.testing + databindings + 0.1-integration-incubating-SNAPSHOT + + + 4.0.0 + + iTest-jaxbDatabinding + ${testing.version} + jar + Test Suite for JAXB Databindings + + + + + true + + java.net + java.net Maven 1.x Repository + https://maven-repository.dev.java.net/nonav/repository + legacy + + + + + + + true + + java.net + java.net Maven 1.x Repository + https://maven-repository.dev.java.net/repository + legacy + + + + + + org.apache.tuscany.sca.services.databinding + databinding-jaxb + 0.1-integration-incubating-SNAPSHOT + runtime + + + org.apache.tuscany.sca.extensions.axis2 + databinding-axiom + ${pom.version} + compile + + + javax.xml.bind + jaxb-api + 2.1 + compile + + + com.sun.xml.bind + jaxb-impl + 2.1 + runtime + + + com.sun.xml.ws + jaxws-rt + 2.1 + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.0 + + + add-test-source + generate-sources + + add-test-source + + + + target/jaxb-source + + + + + + + org.codehaus.mojo + jaxws-maven-plugin + + + + wsimport + + + + + org.apache.tuscany.sca.itest.jaxbdatabinding.generated + ${basedir}/src/main/resources/wsdl + ${project.build.directory}/jaxws-source + true + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterService.java new file mode 100644 index 0000000000..cb508dd109 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterService.java @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.jaxbdatabinding; + +import org.apache.tuscany.sca.itest.jaxbdatabinding.generated.PersonType; +import org.osoa.sca.annotations.Remotable; + +/** + * + */ +@Remotable +public interface GreeterService { + + // @DataType(name = "javax.xml.bind.JAXBElement") + PersonType greet(PersonType who); + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterServiceClient.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterServiceClient.java new file mode 100644 index 0000000000..c47d5143ba --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterServiceClient.java @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.jaxbdatabinding; + +import org.apache.tuscany.sca.itest.jaxbdatabinding.generated.PersonType; +import org.osoa.sca.annotations.AllowsPassByReference; + +/** + * + */ +@AllowsPassByReference +public interface GreeterServiceClient { + + // @DataType(name = "javax.xml.bind.JAXBElement") + PersonType greet(PersonType who); + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterServiceClientImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterServiceClientImpl.java new file mode 100644 index 0000000000..fbad08f5ac --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterServiceClientImpl.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.jaxbdatabinding; + +import org.apache.tuscany.sca.itest.jaxbdatabinding.generated.PersonType; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +/** + * + */ +@Service(GreeterServiceClient.class) +public class GreeterServiceClientImpl implements GreeterServiceClient { + + private GreeterService service; + + @Reference + public void setGreeterService(GreeterService service) { + this.service = service; + } + + /* + * (non-Javadoc) + * + * @see org.apache.tuscany.sca.itest.jaxbdatabinding.GreeterServiceClient#greet(org.apache.tuscany.sca.itest.jaxbdatabinding.generated.PersonType) + */ + public PersonType greet(PersonType who) { + return service.greet(who); + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterServiceImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterServiceImpl.java new file mode 100644 index 0000000000..0d6c0f01e1 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterServiceImpl.java @@ -0,0 +1,44 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.jaxbdatabinding; + +import org.osoa.sca.annotations.Service; + +import org.apache.tuscany.sca.itest.jaxbdatabinding.generated.PersonType; + +/** + * + */ +@Service(GreeterService.class) +public class GreeterServiceImpl implements GreeterService { + + /* + * (non-Javadoc) + * + * @see org.apache.tuscany.sca.itest.jaxbdatabinding.GreeterService#greet(javax.xml.bind.JAXBElement) + */ + public PersonType greet(PersonType who) { + // System.out.println(who.toString()); + who.setGreeting("Hello"); + // System.out.println(who.toString()); + return who; + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/resources/greeterws.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/resources/greeterws.composite new file mode 100644 index 0000000000..4a27a8ba5d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/resources/greeterws.composite @@ -0,0 +1,67 @@ + + + + + + + + JAXBGreeterServiceComponent + + + + + + JAXBGreeterServiceComponent + + + + + + + + + + + + JAXBGreeterServiceDefaultRef + + + + + + + + + JAXBGreeterServiceWSRef + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/resources/wsdl/Greeter.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/resources/wsdl/Greeter.wsdl new file mode 100644 index 0000000000..4977cfc274 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/resources/wsdl/Greeter.wsdl @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/resources/xsd/Person.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/resources/xsd/Person.xsd new file mode 100644 index 0000000000..5f5021b15e --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/resources/xsd/Person.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/test/java/org/apache/tuscany/sca/itest/JaxbDatabindingTestCase.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/test/java/org/apache/tuscany/sca/itest/JaxbDatabindingTestCase.java new file mode 100644 index 0000000000..da65bea4b3 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/test/java/org/apache/tuscany/sca/itest/JaxbDatabindingTestCase.java @@ -0,0 +1,85 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest; + +import junit.framework.Assert; +import junit.framework.TestCase; + +import org.apache.tuscany.api.SCARuntime; +import org.apache.tuscany.sca.itest.jaxbdatabinding.GreeterServiceClient; +import org.apache.tuscany.sca.itest.jaxbdatabinding.generated.ObjectFactory; +import org.apache.tuscany.sca.itest.jaxbdatabinding.generated.PersonType; +import org.junit.BeforeClass; +import org.junit.Test; +import org.osoa.sca.CompositeContext; +import org.osoa.sca.CurrentCompositeContext; + +/** + * + */ +public class JaxbDatabindingTestCase { + private GreeterServiceClient greeterClient; + + @BeforeClass + public static void init() { + SCARuntime.start("greeterws.composite"); + } + + private void setUpClient(String binding) throws Exception { + CompositeContext ctx = CurrentCompositeContext.getContext(); + greeterClient = ctx.locateService(GreeterServiceClient.class, binding + "JAXBGreeterServiceClient"); + } + + /** + * Invokes the JAXB Greet service using web service bindings with JAXB payload + * + * @throws Exception + */ + @Test + public void testWSGreet() throws Exception { + setUpClient("WS"); + greet(); + } + + /** + * Invokes the JAXB Greet service using default with JAXB payload + * + * @throws Exception + */ + @Test + public void testDefaultGreet() throws Exception { + setUpClient("Default"); + greet(); + } + + public void greet() { + ObjectFactory factory = new ObjectFactory(); + PersonType person = factory.createPersonType(); + person.setFirstName("George"); + person.setLastName("Doors"); + // System.out.println("Client side: " + person.getFirstName() + " " + person.getLastName() + " " + + // person.getGreeting()); + PersonType greetedPerson = greeterClient.greet(person); + // System.out.println("Client side: " + greetedPerson.getFirstName() + " " + greetedPerson.getLastName() + " " + + // greetedPerson.getGreeting()); + Assert.assertNotSame("greetedPerson.getGreeting() not set", "", greetedPerson.getGreeting()); + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxbgen/LICENSE.txt b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxbgen/LICENSE.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxbgen/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxbgen/NOTICE.txt b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxbgen/NOTICE.txt new file mode 100644 index 0000000000..d83ebbe236 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxbgen/NOTICE.txt @@ -0,0 +1,14 @@ +${pom.name} +Copyright (c) 2005 - 2006 The Apache Software Foundation + +Apache Tuscany is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the Apache Web Services PMC. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxbgen/pom.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxbgen/pom.xml new file mode 100644 index 0000000000..13a65b7961 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxbgen/pom.xml @@ -0,0 +1,188 @@ + + + + + org.apache.tuscany.testing + databindings + 0.1-integration-incubating-SNAPSHOT + + + 4.0.0 + + iTest-jaxbDatabinding + ${testing.version} + jar + JAXB Databinding Integration Test + + + + + true + + java.net + java.net Maven 1.x Repository + https://maven-repository.dev.java.net/nonav/repository + legacy + + + + + + + true + + java.net + java.net Maven 1.x Repository + https://maven-repository.dev.java.net/repository + legacy + + + + + + org.apache.tuscany.sca.services.databinding + databinding-jaxb + 0.1-integration-incubating-SNAPSHOT + runtime + + + org.apache.tuscany.sca.services.databinding + databinding-sdo + ${pom.version} + compile + + + org.apache.tuscany.sca.extensions.axis2 + databinding-axiom + ${pom.version} + compile + + + org.apache.tuscany.testing + itest-common + ${pom.version} + compile + + + javax.xml.bind + jaxb-api + 2.1 + compile + + + com.sun.xml.bind + jaxb-impl + 2.1 + runtime + + + com.sun.xml.ws + jaxws-rt + 2.1 + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + generate-sources + + unpack + + + + + org.apache.tuscany.testing + itest-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/jaxb-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/branches/sca-java-integration/testing/sca/itest/databindings/jaxbgen/src/main/resources/generate/generate.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxbgen/src/main/resources/generate/generate.xml new file mode 100644 index 0000000000..0a148a40c8 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxbgen/src/main/resources/generate/generate.xml @@ -0,0 +1,113 @@ + + + + + + + + + + + + + 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 + + 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/branches/sca-java-integration/testing/sca/itest/databindings/jaxbgen/src/main/resources/greeter.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxbgen/src/main/resources/greeter.composite new file mode 100644 index 0000000000..867829c1b6 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/jaxbgen/src/main/resources/greeter.composite @@ -0,0 +1,68 @@ + + + + + + + + JAXBGreeterServiceComponent + + + + + + JAXBGreeterServiceComponent + + + + + + + + + + + + + JAXBGreeterServiceComponent + + + + + + + + + JAXBGreeterServiceWSRef + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/pom.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/pom.xml new file mode 100644 index 0000000000..f1be232286 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/pom.xml @@ -0,0 +1,47 @@ + + + + + org.apache.tuscany.testing + sca-itest + 0.1-integration-incubating-SNAPSHOT + ../pom.xml + + 4.0.0 + + org.apache.tuscany.testing + databindings + SCA Databindings Integration Tests + 0.1-integration-incubating-SNAPSHOT + + + pom + + install + + + jaxb + sdo + transformers + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/pom.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/pom.xml new file mode 100644 index 0000000000..25de0f25d6 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/pom.xml @@ -0,0 +1,148 @@ + + + + + org.apache.tuscany.testing + databindings + 0.1-integration-incubating-SNAPSHOT + + + 4.0.0 + + iTest-sdoDatabinding + ${testing.version} + jar + Test Suite for SDO Databindings + + + + + true + + java.net + java.net Maven 1.x Repository + https://maven-repository.dev.java.net/nonav/repository + legacy + + + + + + + true + + java.net + java.net Maven 1.x Repository + https://maven-repository.dev.java.net/repository + legacy + + + + + + org.apache.tuscany.sca.services.databinding + databinding-jaxb + 0.1-integration-incubating-SNAPSHOT + runtime + + + org.apache.tuscany.sca.services.databinding + databinding-sdo + ${pom.version} + compile + + + org.apache.tuscany.sca.extensions.axis2 + databinding-axiom + ${pom.version} + 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-incubator-SNAPSHOT + + + generate-sdo + generate-sources + + + + ${basedir}/src/main/resources/wsdl/Greeter.wsdl + org.apache.tuscany.sca.itest.databinding.services + + + ${basedir}/src/main/resources/xsd/Person.xsd + org.apache.tuscany.sca.itest.databinding.types + + + true + true + true + + + generate + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/main/java/org/apache/tuscany/sca/itest/sdodatabinding/GreeterService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/main/java/org/apache/tuscany/sca/itest/sdodatabinding/GreeterService.java new file mode 100644 index 0000000000..61def7f9f6 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/main/java/org/apache/tuscany/sca/itest/sdodatabinding/GreeterService.java @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.sdodatabinding; + +import org.apache.tuscany.sca.itest.databinding.types.PersonType; +import org.osoa.sca.annotations.Remotable; + +/** + * + */ +@Remotable +public interface GreeterService { + + // @DataType(name = "commonj.sdo.DataObject") + PersonType greet(PersonType who); + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/main/java/org/apache/tuscany/sca/itest/sdodatabinding/GreeterServiceClient.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/main/java/org/apache/tuscany/sca/itest/sdodatabinding/GreeterServiceClient.java new file mode 100644 index 0000000000..87de5f5d3b --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/main/java/org/apache/tuscany/sca/itest/sdodatabinding/GreeterServiceClient.java @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.sdodatabinding; + +import org.apache.tuscany.sca.itest.databinding.types.PersonType; +import org.osoa.sca.annotations.AllowsPassByReference; + +/** + * + */ +@AllowsPassByReference +public interface GreeterServiceClient { + + // @DataType(name = "commonj.sdo.DataObject") + PersonType greet(PersonType who); + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/main/java/org/apache/tuscany/sca/itest/sdodatabinding/GreeterServiceClientImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/main/java/org/apache/tuscany/sca/itest/sdodatabinding/GreeterServiceClientImpl.java new file mode 100644 index 0000000000..3dcf34bb59 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/main/java/org/apache/tuscany/sca/itest/sdodatabinding/GreeterServiceClientImpl.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.sdodatabinding; + +import org.apache.tuscany.sca.itest.databinding.types.PersonType; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +/** + * + */ +@Service(GreeterServiceClient.class) +public class GreeterServiceClientImpl implements GreeterServiceClient { + private GreeterService service; + + @Reference + public void setGreeterService(GreeterService service) { + this.service = service; + } + + /* + * (non-Javadoc) + * + * @see org.apache.tuscany.sca.itest.sdodatabinding.GreeterServiceClient#greet(org.apache.tuscany.sca.itest.sdodatabinding.generated.PersonType) + */ + public PersonType greet(PersonType who) { + return service.greet(who); + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/main/java/org/apache/tuscany/sca/itest/sdodatabinding/GreeterServiceImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/main/java/org/apache/tuscany/sca/itest/sdodatabinding/GreeterServiceImpl.java new file mode 100644 index 0000000000..6bbc957a0b --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/main/java/org/apache/tuscany/sca/itest/sdodatabinding/GreeterServiceImpl.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.sdodatabinding; + +import org.apache.tuscany.sca.itest.databinding.types.PersonType; +import org.apache.tuscany.spi.annotation.Autowire; +import org.osoa.sca.annotations.Service; + +import commonj.sdo.DataObject; +import commonj.sdo.helper.HelperContext; + +/** + * + */ +@Service(GreeterService.class) +public class GreeterServiceImpl implements GreeterService { + /** + * It will be injected with a HelperContext for the composite + */ + @Autowire + protected HelperContext helperContext; + /* + * (non-Javadoc) + * + * @see org.apache.tuscany.sca.itest.sdodatabinding.GreeterService#greet(org.apache.tuscany.sca.itest.sdodatabinding.generated.PersonType) + */ + public PersonType greet(PersonType who) { + System.out.println(helperContext.getXMLHelper().save((DataObject) who, "http://person/", "person")); + PersonType copy = (PersonType) helperContext.getCopyHelper().copy((DataObject) who); + copy.setGreeting("Hello"); + System.out.println(who.toString()); + return copy; + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/main/resources/greetersdo.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/main/resources/greetersdo.composite new file mode 100644 index 0000000000..e419e1487a --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/main/resources/greetersdo.composite @@ -0,0 +1,70 @@ + + + + + + + + + + + + SDOGreeterServiceComponent + + + + + + SDOGreeterServiceComponent + + + + + + + + + + + + SDOGreeterServiceComponent + + + + + + SDOGreeterServiceWSRef + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/main/resources/wsdl/Greeter.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/main/resources/wsdl/Greeter.wsdl new file mode 100644 index 0000000000..6960178f2a --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/main/resources/wsdl/Greeter.wsdl @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/main/resources/xsd/Person.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/main/resources/xsd/Person.xsd new file mode 100644 index 0000000000..5f5021b15e --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/main/resources/xsd/Person.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/test/java/org/apache/tuscany/sca/itest/SdoDatabindingTestCase.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/test/java/org/apache/tuscany/sca/itest/SdoDatabindingTestCase.java new file mode 100644 index 0000000000..c2df998f4b --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdo/src/test/java/org/apache/tuscany/sca/itest/SdoDatabindingTestCase.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; + +import junit.framework.TestCase; + +import org.apache.tuscany.api.SCARuntime; +import org.apache.tuscany.sca.itest.databinding.types.PersonType; +import org.apache.tuscany.sca.itest.databinding.types.TypesFactory; +import org.apache.tuscany.sca.itest.sdodatabinding.GreeterServiceClient; +import org.osoa.sca.CompositeContext; +import org.osoa.sca.CurrentCompositeContext; + +/** + * + */ +public class SdoDatabindingTestCase extends TestCase { + + GreeterServiceClient greeterClient; + private static boolean initalised = false; + + protected void setUp() throws Exception { + if (!initalised) { + SCARuntime.start("greetersdo.composite"); + initalised = true; + } + } + + protected void tearDown() { + + } + + private void setUpClient(String ext) throws Exception { + CompositeContext ctx = CurrentCompositeContext.getContext(); + greeterClient = ctx.locateService(GreeterServiceClient.class, ext + "SDOGreeterServiceClient"); + } + + /** + * Invokes the SDO Greet service using web service bindings with SDO payload + * + * @throws Exception + */ + public void testWSGreet() throws Exception { + setUpClient("WS"); + greet(); + } + + /** + * Invokes the SDO Greet service using default bindings with SDO payload + * + * @throws Exception + */ + public void testDefaultGreet() throws Exception { + setUpClient("Default"); + greet(); + } + + public void greet() { + TypesFactory factory = TypesFactory.INSTANCE; + PersonType person = factory.createPersonType(); + person.setFirstName("George"); + person.setLastName("Doors"); + // System.out.println("Client side: " + person.getFirstName() + " " + + // person.getLastName() + " " + person.getGreeting()); + PersonType greetedPerson = greeterClient.greet(person); + // System.out.println("Client side: " + greetedPerson.getFirstName() + " + // " + greetedPerson.getLastName() + " " + greetedPerson.getGreeting()); + assertNotSame("greetedPerson.getGreeting() not set", "", greetedPerson.getGreeting()); + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdogen/LICENSE.txt b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdogen/LICENSE.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdogen/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdogen/NOTICE.txt b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdogen/NOTICE.txt new file mode 100644 index 0000000000..92ca715fbe --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdogen/NOTICE.txt @@ -0,0 +1,14 @@ +${pom.name} +Copyright (c) 2005 - 2007 The Apache Software Foundation + +Apache Tuscany is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the Apache Web Services PMC. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdogen/pom.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdogen/pom.xml new file mode 100644 index 0000000000..6b16fa2205 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdogen/pom.xml @@ -0,0 +1,183 @@ + + + + + org.apache.tuscany.testing + databindings + 0.1-integration-incubating-SNAPSHOT + + + 4.0.0 + + iTest-sdoDatabinding + ${testing.version} + jar + Test Suite for SDO Databindings + + + + + true + + java.net + java.net Maven 1.x Repository + https://maven-repository.dev.java.net/nonav/repository + legacy + + + + + + + true + + java.net + java.net Maven 1.x Repository + https://maven-repository.dev.java.net/repository + legacy + + + + + + org.apache.tuscany.sca.services.databinding + databinding-jaxb + 0.1-integration-incubating-SNAPSHOT + runtime + + + org.apache.tuscany.sca.services.databinding + databinding-sdo + ${pom.version} + compile + + + org.apache.tuscany.sca.extensions.axis2 + databinding-axiom + ${pom.version} + compile + + + org.apache.tuscany.testing + itest-common + ${pom.version} + compile + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + generate-sources + + unpack + + + + + org.apache.tuscany.testing + itest-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/sdo-source + + + + + + + org.codehaus.mojo + exec-maven-plugin + + + generate-test-source + process-resources + + java + + + + + org.apache.tuscany.sca.itest.generate.Generate + + ${project.build.directory} + + + + + org.apache.tuscany.sdo + tuscany-sdo-plugin + 1.0-incubator-SNAPSHOT + + + generate-sdo + process-resources + + + + ${project.build.directory}/classes/wsdl/Greeter.wsdl + org.apache.tuscany.sca.itest.databinding.services + + + ${project.build.directory}/classes/xsd/Person.xsd + org.apache.tuscany.sca.itest.databinding.types + + + ${project.build.directory}/classes/xsd/Interop.xsd + org.apache.tuscany.interop + + + true + true + true + + + generate + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdogen/src/main/resources/generate/generate.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdogen/src/main/resources/generate/generate.xml new file mode 100644 index 0000000000..b87ddc8f02 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdogen/src/main/resources/generate/generate.xml @@ -0,0 +1,114 @@ + + + + + + + + + + + + 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 + + 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/branches/sca-java-integration/testing/sca/itest/databindings/sdogen/src/main/resources/generate/greeter.composite.vm b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdogen/src/main/resources/generate/greeter.composite.vm new file mode 100644 index 0000000000..301c3de322 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/sdogen/src/main/resources/generate/greeter.composite.vm @@ -0,0 +1,75 @@ + + + + + + + #foreach( $file in $fileList ) + + #end + + + + + SDOGreeterServiceComponent + + + + + + SDOGreeterServiceComponent + + + + + + + + + + + + + SDOGreeterServiceComponent + + + + + + + + + SDOGreeterServiceWSRef + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/.ruleset b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/.ruleset new file mode 100644 index 0000000000..e615e93a4b --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/.ruleset @@ -0,0 +1,172 @@ + + + PMD Plugin preferences rule set + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/LICENSE.txt b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/LICENSE.txt new file mode 100755 index 0000000000..d645695673 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/NOTICE.txt b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/NOTICE.txt new file mode 100644 index 0000000000..d83ebbe236 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/NOTICE.txt @@ -0,0 +1,14 @@ +${pom.name} +Copyright (c) 2005 - 2006 The Apache Software Foundation + +Apache Tuscany is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the Apache Web Services PMC. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/pom.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/pom.xml new file mode 100755 index 0000000000..688a7e464d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/pom.xml @@ -0,0 +1,221 @@ + + + + + org.apache.tuscany.testing + databindings + 0.1-integration-incubating-SNAPSHOT + ../pom.xml + + 4.0.0 + iTest-databinding-transformers + jar + Apache Tuscany DataBinding Transformers Integration Test + Apache Tuscany DataBinding Transformers Integration Test + + + + + true + + java.net + java.net Maven 1.x Repository + https://maven-repository.dev.java.net/nonav/repository + legacy + + + + + + org.apache.tuscany.sca.kernel + tuscany-spi + 0.1-integration-incubating-SNAPSHOT + compile + + + org.apache.tuscany.sca.services.databinding + databinding-jaxb + ${pom.version} + compile + + + org.apache.tuscany.sca.services.databinding + databinding-xmlbeans + ${pom.version} + compile + + + org.apache.tuscany.sca.extensions.axis2 + databinding-axiom + ${pom.version} + compile + + + org.apache.tuscany.sca.services.databinding + databinding-sdo + ${pom.version} + compile + + + org.apache.tuscany.sca.services.idl + tuscany-wsdl + ${pom.version} + compile + + + + org.easymock + easymock + 2.2 + test + + + + com.sun.xml.bind + jaxb-impl + 2.0.4 + test + + + + javax.xml.bind + jsr173_api + + + + + + junit + junit + 4.2 + test + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.0 + + + add-test-source + generate-sources + + add-test-source + + + + target/jaxb-source + target/sdo-source + target/xmlbeans-source + + + + + + + org.apache.tuscany.sdo + tuscany-sdo-plugin + 1.0-incubator-SNAPSHOT + + + generate-sdo + generate-sources + + ${basedir}/src/test/resources/ipo.xsd + com.example.ipo.sdo + true + true + true + + + generate + + + + + + + com.sun.tools.xjc.maven2 + maven-jaxb-plugin + 1.1 + + + generate-jaxb + generate-sources + + generate + + + + + com.example.ipo.jaxb + ${project.build.directory}/jaxb-source + ${basedir}/src/test/resources + + ipo.xsd + + + + + + maven-antrun-plugin + + + xmlbeans + xbean + 2.1.0 + + + stax + stax-api + 1.0.1 + + + + + + + generate-xmlbeans + generate-sources + + + + + + + + + run + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/JAXBTestCase.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/JAXBTestCase.java new file mode 100755 index 0000000000..894bee16e4 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/JAXBTestCase.java @@ -0,0 +1,119 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.databinding; + +import static org.easymock.EasyMock.createMock; +import static org.easymock.EasyMock.expect; +import static org.easymock.EasyMock.replay; + +import java.io.StringReader; + +import javax.xml.stream.XMLStreamReader; + +import junit.framework.Assert; +import junit.framework.TestCase; + +import org.apache.tuscany.databinding.jaxb.JAXB2Node; +import org.apache.tuscany.databinding.jaxb.JAXBContextHelper; +import org.apache.tuscany.databinding.jaxb.XMLStreamReader2JAXB; +import org.apache.tuscany.databinding.xmlbeans.Node2XmlObject; +import org.apache.tuscany.databinding.xmlbeans.XmlObject2XMLStreamReader; +import org.apache.tuscany.spi.databinding.TransformationContext; +import org.apache.tuscany.spi.model.DataType; +import org.apache.xmlbeans.XmlObject; +import org.w3c.dom.Node; + +public class JAXBTestCase extends TestCase { + private static final String IPO_XML = + "" + "" + + " " + + " Helen Zoe" + + " 47 Eden Street" + + " Cambridge" + + " CB1 1JR" + + " " + + " " + + " Robert Smith" + + " 8 Oak Avenue" + + " Old Town" + + " PA" + + " 95819" + + " " + + " " + + " " + + " Lapis necklace" + + " 1" + + " 99.95" + + " Want this for the holidays" + + " 1999-12-05" + + " " + + " " + + ""; + + private String contextPath = "com.example.ipo.jaxb"; + + protected void setUp() throws Exception { + super.setUp(); + } + + public void testTransform() throws Exception { + // URL/Stream/Reader to XmlObject + XmlObject object = XmlObject.Factory.parse(new StringReader(IPO_XML)); + + // XmlObject to XMLStreamReader + XmlObject2XMLStreamReader t1 = new XmlObject2XMLStreamReader(); + XMLStreamReader reader = t1.transform(object, null); + + DataType targetDataType = new DataType(Object.class, null); + targetDataType.setMetadata(JAXBContextHelper.JAXB_CONTEXT_PATH, contextPath); + + TransformationContext tContext = createMock(TransformationContext.class); + expect(tContext.getTargetDataType()).andReturn(targetDataType).anyTimes(); + replay(tContext); + + // XMLStreamReader to JAXB + XMLStreamReader2JAXB t2 = new XMLStreamReader2JAXB(); + Object object2 = t2.transform(reader, tContext); + + DataType sourceDataType = new DataType(Object.class, null); + sourceDataType.setMetadata(JAXBContextHelper.JAXB_CONTEXT_PATH, contextPath); + + TransformationContext tContext1 = createMock(TransformationContext.class); + expect(tContext1.getSourceDataType()).andReturn(sourceDataType).anyTimes(); + replay(tContext1); + + JAXB2Node t3 = new JAXB2Node(); + Node node = t3.transform(object2, tContext1); + + Node2XmlObject t4 = new Node2XmlObject(); + XmlObject object3 = t4.transform(node, null); + + Assert.assertNotNull(object3); + + } + + protected void tearDown() throws Exception { + super.tearDown(); + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/TransformationTestCase.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/TransformationTestCase.java new file mode 100755 index 0000000000..62183bd09d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/TransformationTestCase.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.databinding; + +import static org.easymock.EasyMock.createMock; +import static org.easymock.EasyMock.expect; +import static org.easymock.EasyMock.replay; + +import java.io.StringReader; +import java.net.URL; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.xml.bind.JAXBElement; + +import junit.framework.Assert; +import junit.framework.TestCase; + +import org.apache.tuscany.core.databinding.impl.TransformerRegistryImpl; +import org.apache.tuscany.core.databinding.xml.Node2String; +import org.apache.tuscany.core.databinding.xml.String2Node; +import org.apache.tuscany.core.databinding.xml.String2XMLStreamReader; +import org.apache.tuscany.core.databinding.xml.XMLStreamReader2String; +import org.apache.tuscany.databinding.axiom.OMElement2String; +import org.apache.tuscany.databinding.axiom.OMElement2XMLStreamReader; +import org.apache.tuscany.databinding.axiom.String2OMElement; +import org.apache.tuscany.databinding.axiom.XMLStreamReader2OMElement; +import org.apache.tuscany.databinding.jaxb.JAXB2Node; +import org.apache.tuscany.databinding.jaxb.JAXBContextHelper; +import org.apache.tuscany.databinding.jaxb.Node2JAXB; +import org.apache.tuscany.databinding.jaxb.XMLStreamReader2JAXB; +import org.apache.tuscany.databinding.sdo.DataObject2XMLStreamReader; +import org.apache.tuscany.databinding.sdo.XMLDocument2XMLStreamReader; +import org.apache.tuscany.databinding.sdo.XMLStreamReader2DataObject; +import org.apache.tuscany.databinding.sdo.XMLStreamReader2XMLDocument; +import org.apache.tuscany.databinding.xmlbeans.Node2XmlObject; +import org.apache.tuscany.databinding.xmlbeans.XMLStreamReader2XmlObject; +import org.apache.tuscany.databinding.xmlbeans.XmlObject2Node; +import org.apache.tuscany.databinding.xmlbeans.XmlObject2XMLStreamReader; +import org.apache.tuscany.sdo.util.SDOUtil; +import org.apache.tuscany.spi.databinding.PullTransformer; +import org.apache.tuscany.spi.databinding.TransformationContext; +import org.apache.tuscany.spi.databinding.Transformer; +import org.apache.tuscany.spi.databinding.TransformerRegistry; +import org.apache.tuscany.spi.model.DataType; +import org.apache.xmlbeans.XmlObject; +import org.w3c.dom.Node; + +import commonj.sdo.DataObject; +import commonj.sdo.helper.HelperContext; +import commonj.sdo.helper.XMLDocument; +import commonj.sdo.helper.XMLHelper; +import commonj.sdo.helper.XSDHelper; + +public class TransformationTestCase extends TestCase { + private static final String IPO_XML = + "" + "" + + " " + + " Helen Zoe" + + " 47 Eden Street" + + " Cambridge" + + " CB1 1JR" + + " " + + " " + + " Robert Smith" + + " 8 Oak Avenue" + + " Old Town" + + " PA" + + " 95819" + + " " + + " " + + " " + + " Lapis necklace" + + " 1" + + " 99.95" + + " Want this for the holidays" + + " 1999-12-05" + + " " + + " " + + ""; + + private TransformerRegistry registry; + + private String contextPath = "com.example.ipo.jaxb"; + + protected void setUp() throws Exception { + super.setUp(); + registry = new TransformerRegistryImpl(); + + List transformers = new ArrayList(); + + // Adding JAXB transformers + transformers.add(new JAXB2Node()); + transformers.add(new Node2JAXB()); + transformers.add(new XMLStreamReader2JAXB()); + + // Adding XMLBeans transformers + transformers.add(new XmlObject2Node()); + transformers.add(new XmlObject2XMLStreamReader()); + transformers.add(new Node2XmlObject()); + transformers.add(new XMLStreamReader2XmlObject()); + + transformers.add(new DataObject2XMLStreamReader()); + transformers.add(new XMLStreamReader2DataObject()); + + transformers.add(new XMLDocument2XMLStreamReader()); + transformers.add(new XMLStreamReader2XMLDocument()); + + transformers.add(new String2XMLStreamReader()); + transformers.add(new XMLStreamReader2String()); + + transformers.add(new String2Node()); + transformers.add(new Node2String()); + + transformers.add(new OMElement2String()); + transformers.add(new String2OMElement()); + + transformers.add(new XMLStreamReader2OMElement()); + transformers.add(new OMElement2XMLStreamReader()); + + for (Transformer transformer : transformers) { + registry.registerTransformer(transformer); + } + + // System.out.println(registry); + + URL xsdFile = getClass().getClassLoader().getResource("ipo.xsd"); + XSDHelper.INSTANCE.define(xsdFile.openStream(), null); + } + + @SuppressWarnings("unchecked") + // XMLBeans --> SDO + public void testTransformation1() throws Exception { + URL xsdFile = getClass().getClassLoader().getResource("ipo.xsd"); + HelperContext helperContext = SDOUtil.createHelperContext(); + XSDHelper xsdHelper = helperContext.getXSDHelper(); + xsdHelper.define(xsdFile.openStream(), xsdFile.toExternalForm()); + + // URL/Stream/Reader to XmlObject + XmlObject object = XmlObject.Factory.parse(new StringReader(IPO_XML)); + + List path = + registry.getTransformerChain(XmlObject.class.getName(), DataObject.class.getName()); + System.out.println("Path: " + path); + + TransformationContext tContext = createTransformationContext(); + // tContext.getMetadata().put(ImportSDO.class, new ImportSDO(helperContext)); + + Object result = object; + for (Transformer transformer : path) { + result = ((PullTransformer)transformer).transform(result, tContext); + } + System.out.println("Result: " + result); + Assert.assertNotNull(result); + Assert.assertTrue(result instanceof DataObject); + + } + + @SuppressWarnings("unchecked") + // SDO --> DOM + public void testTransformation2() throws Exception { + // System.out.println(registry); + + URL xmlFile = getClass().getClassLoader().getResource("ipo.xml"); + // URL/Stream/Reader to XmlObject + XMLDocument object = XMLHelper.INSTANCE.load(xmlFile.openStream()); + + List path = + registry.getTransformerChain(XMLDocument.class.getName(), Node.class.getName()); + System.out.println("Path: " + path); + + TransformationContext tContext = createTransformationContext(); + + Object result = object; + for (Transformer transformer : path) { + result = ((PullTransformer)transformer).transform(result, tContext); + } + System.out.println("Result: " + result); + Assert.assertNotNull(result); + Assert.assertTrue(result instanceof Node); + + } + + @SuppressWarnings("unchecked") + // SDO --> JAXB + public void testTransformation3() throws Exception { + // System.out.println(registry); + + URL xmlFile = getClass().getClassLoader().getResource("ipo.xml"); + // URL/Stream/Reader to XmlObject + XMLDocument object = XMLHelper.INSTANCE.load(xmlFile.openStream()); + + List path = + registry.getTransformerChain(XMLDocument.class.getName(), JAXBElement.class.getName()); + System.out.println("Path: " + path); + + TransformationContext tContext = createTransformationContext(); + + Object result = object; + for (Transformer transformer : path) { + result = ((PullTransformer)transformer).transform(result, tContext); + } + System.out.println("Result: " + result); + Assert.assertNotNull(result); + Assert.assertTrue(result instanceof Object); + + } + + private TransformationContext createTransformationContext() { + DataType dataType = new DataType(Object.class, null); + dataType.setMetadata(JAXBContextHelper.JAXB_CONTEXT_PATH, contextPath); + + TransformationContext tContext = createMock(TransformationContext.class); + expect(tContext.getTargetDataType()).andReturn(dataType).anyTimes(); + + expect(tContext.getSourceDataType()).andReturn(dataType).anyTimes(); + Map, Object> metadata = new HashMap, Object>(); + expect(tContext.getMetadata()).andReturn(metadata).anyTimes(); + replay(tContext); + return tContext; + } + + protected void tearDown() throws Exception { + super.tearDown(); + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/XmlObjectTestCase.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/XmlObjectTestCase.java new file mode 100755 index 0000000000..78d51352cb --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/XmlObjectTestCase.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.databinding; + +import java.io.StringReader; + +import javax.xml.stream.XMLStreamReader; + +import junit.framework.Assert; +import junit.framework.TestCase; + +import org.apache.tuscany.databinding.xmlbeans.Node2XmlObject; +import org.apache.tuscany.databinding.xmlbeans.XMLStreamReader2XmlObject; +import org.apache.tuscany.databinding.xmlbeans.XmlObject2Node; +import org.apache.tuscany.databinding.xmlbeans.XmlObject2XMLStreamReader; +import org.apache.xmlbeans.XmlObject; +import org.w3c.dom.Node; + +public class XmlObjectTestCase extends TestCase { + private static final String IPO_XML = + "" + "" + + " " + + " Helen Zoe" + + " 47 Eden Street" + + " Cambridge" + + " CB1 1JR" + + " " + + " " + + " Robert Smith" + + " 8 Oak Avenue" + + " Old Town" + + " PA" + + " 95819" + + " " + + " " + + " " + + " Lapis necklace" + + " 1" + + " 99.95" + + " Want this for the holidays" + + " 1999-12-05" + + " " + + " " + + ""; + + protected void setUp() throws Exception { + super.setUp(); + } + + public void testTransform() throws Exception { + XmlObject object = XmlObject.Factory.parse(new StringReader(IPO_XML)); + + // XmlObject to XMLStreamReader + XmlObject2XMLStreamReader t1 = new XmlObject2XMLStreamReader(); + XMLStreamReader reader = t1.transform(object, null); + + // XMLStreamReader to XmlObject + XMLStreamReader2XmlObject t2 = new XMLStreamReader2XmlObject(); + XmlObject object2 = t2.transform(reader, null); + + // XmlObject to Node + XmlObject2Node t3 = new XmlObject2Node(); + Node node = t3.transform(object2, null); + + // Node to XmlObject + Node2XmlObject t4 = new Node2XmlObject(); + XmlObject object3 = t4.transform(node, null); + Assert.assertNotNull(object3); + } + + /* + * public void testGeneratedXmlObject() throws Exception { URL xmlFile = + * getClass().getClassLoader().getResource("ipo.xml"); // URL/Stream/Reader + * to XmlObject PurchaseOrderDocument object = + * PurchaseOrderDocument.Factory.parse(xmlFile); // XmlObject to + * XMLStreamReader XmlObject2XMLStreamReader t1 = new + * XmlObject2XMLStreamReader(); XMLStreamReader reader = + * t1.transform(object, null); // XMLStreamReader to XmlObject + * XMLStreamReader2XmlObject t2 = new XMLStreamReader2XmlObject(); XmlObject + * object2 = t2.transform(reader, null); // XmlObject to Node XmlObject2Node + * t3 = new XmlObject2Node(); Node node = t3.transform(object2, null); // + * Node to XmlObject Node2XmlObject t4 = new Node2XmlObject(); XmlObject + * object3 = t4.transform(node, null); Assert.assertNotNull(object3); } + */ + + protected void tearDown() throws Exception { + super.tearDown(); + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/sample/Client.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/sample/Client.java new file mode 100644 index 0000000000..8ddc625d66 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/sample/Client.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.databinding.sample; + +/** + * @version $Rev$ $Date$ + */ +public interface Client { + void call(Object po); +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/sample/ClientImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/sample/ClientImpl.java new file mode 100644 index 0000000000..2d33a8666b --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/sample/ClientImpl.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.databinding.sample; + +import org.osoa.sca.annotations.Constructor; +import org.osoa.sca.annotations.Reference; + +import com.example.ipo.jaxb.PurchaseOrderType; + +/** + * @version $Rev$ $Date$ + */ +public class ClientImpl implements Client { + + private Echo echoReference; + + @Constructor + public ClientImpl(@Reference(name = "echoReference", required = true) + Echo echoReference) { + this.echoReference = echoReference; + } + + public void call(Object po) { + Object ret = null; + if (po instanceof PurchaseOrderType) { + ret = echoReference.echoJAXB((PurchaseOrderType)po); + } else if (po instanceof com.example.ipo.sdo.PurchaseOrderType) { + ret = echoReference.echoSDO((com.example.ipo.sdo.PurchaseOrderType)po); + } else if (po instanceof com.example.ipo.xmlbeans.PurchaseOrderType) { + ret = echoReference.echoXMLBeans((com.example.ipo.xmlbeans.PurchaseOrderType)po); + } + System.out.println("Returned message: " + ret); + } +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/sample/DataBindingBootStrapTestCase.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/sample/DataBindingBootStrapTestCase.java new file mode 100644 index 0000000000..f74b3558e9 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/sample/DataBindingBootStrapTestCase.java @@ -0,0 +1,124 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.databinding.sample; + +import static org.easymock.EasyMock.createMock; +import static org.easymock.EasyMock.expect; +import static org.easymock.EasyMock.replay; + +import java.io.StringReader; + +import javax.xml.namespace.QName; +import javax.xml.stream.XMLInputFactory; +import javax.xml.stream.XMLStreamReader; + +import junit.framework.TestCase; + +import org.apache.tuscany.api.SCARuntime; +import org.apache.tuscany.databinding.jaxb.JAXBContextHelper; +import org.apache.tuscany.databinding.jaxb.Reader2JAXB; +import org.apache.tuscany.databinding.sdo.String2DataObject; +import org.apache.tuscany.databinding.xmlbeans.XMLStreamReader2XmlObject; +import org.apache.tuscany.spi.databinding.TransformationContext; +import org.apache.tuscany.spi.idl.XMLType; +import org.apache.tuscany.spi.model.DataType; +import org.osoa.sca.CompositeContext; +import org.osoa.sca.CurrentCompositeContext; + +import com.example.ipo.jaxb.PurchaseOrderType; +import com.example.ipo.xmlbeans.PurchaseOrderDocument; +import commonj.sdo.DataObject; + +/** + * @version $Rev$ $Date$ + */ +public class DataBindingBootStrapTestCase extends TestCase { + private static final String IPO_XML = + "" + "" + + " " + + " Helen Zoe" + + " 47 Eden Street" + + " Cambridge" + + " CB1 1JR" + + " " + + " " + + " Robert Smith" + + " 8 Oak Avenue" + + " Old Town" + + " PA" + + " 95819" + + " " + + " " + + " " + + " Lapis necklace" + + " 1" + + " 99.95" + + " Want this for the holidays" + + " 1999-12-05" + + " " + + " " + + ""; + + private Client client; + private String contextPath = "com.example.ipo.jaxb"; + + @SuppressWarnings("unchecked") + public void testDataBindingBootstrap() throws Exception { + DataType targetDataType = new DataType(Object.class, XMLType.UNKNOWN); + targetDataType.setMetadata(JAXBContextHelper.JAXB_CONTEXT_PATH, contextPath); + TransformationContext tContext = createMock(TransformationContext.class); + expect(tContext.getTargetDataType()).andReturn(targetDataType).anyTimes(); + replay(tContext); + + String2DataObject t1 = new String2DataObject(); + DataObject po1 = t1.transform(IPO_XML, null); + client.call(po1); + + PurchaseOrderDocument.Factory.newInstance(); + + XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader(new StringReader(IPO_XML)); + XMLStreamReader2XmlObject t2 = new XMLStreamReader2XmlObject(); + PurchaseOrderDocument po2 = (PurchaseOrderDocument)t2.transform(reader, null); + client.call(po2.getPurchaseOrder()); + + QName root = new QName("http://www.example.com/IPO", "purchaseOrder"); + DataType targetDataType1 = new DataType(PurchaseOrderType.class, new XMLType(root, null)); + TransformationContext tContext1 = createMock(TransformationContext.class); + expect(tContext1.getTargetDataType()).andReturn(targetDataType1).anyTimes(); + replay(tContext1); + Reader2JAXB t3 = new Reader2JAXB(); + PurchaseOrderType po3 = (PurchaseOrderType)t3.transform(new StringReader(IPO_XML), tContext1); + client.call(po3); + + } + + protected void setUp() throws Exception { + SCARuntime.start("DataBindingTest.composite"); + CompositeContext context = CurrentCompositeContext.getContext(); + client = context.locateService(Client.class, "Client"); + } + + protected void tearDown() throws Exception { + SCARuntime.stop(); + } +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/sample/Echo.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/sample/Echo.java new file mode 100644 index 0000000000..c44e575e26 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/sample/Echo.java @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.databinding.sample; + +import org.apache.tuscany.api.annotation.DataType; +import org.osoa.sca.annotations.Remotable; +import org.osoa.sca.annotations.Service; + +import com.example.ipo.jaxb.PurchaseOrderType; + + +/** + * @version $Rev$ $Date$ + */ +@Remotable +@Service +public interface Echo { + @DataType(name="javax.xml.bind.JAXBElement") + PurchaseOrderType echoJAXB(PurchaseOrderType po); + + @DataType(name="commonj.sdo.DataObject") + com.example.ipo.sdo.PurchaseOrderType echoSDO(com.example.ipo.sdo.PurchaseOrderType po); + + @DataType(name="org.apache.xmlbeans.XmlObject") + com.example.ipo.xmlbeans.PurchaseOrderType echoXMLBeans(com.example.ipo.xmlbeans.PurchaseOrderType po); +} \ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/sample/EchoImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/sample/EchoImpl.java new file mode 100644 index 0000000000..775c0317a4 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/java/org/apache/tuscany/databinding/sample/EchoImpl.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.databinding.sample; + +import com.example.ipo.jaxb.PurchaseOrderType; + +/** + * @version $Rev$ $Date$ + */ +public class EchoImpl implements Echo { + + public PurchaseOrderType echoJAXB(PurchaseOrderType po) { + System.out.println("JAXB: " + po); + return po; + } + + public com.example.ipo.sdo.PurchaseOrderType echoSDO(com.example.ipo.sdo.PurchaseOrderType po) { + System.out.println("SDO: " + po); + return po; + } + + public com.example.ipo.xmlbeans.PurchaseOrderType echoXMLBeans(com.example.ipo.xmlbeans.PurchaseOrderType po) { + System.out.println("XMLBeans: " + po); + return po; + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/resources/DataBindingTest.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/resources/DataBindingTest.composite new file mode 100644 index 0000000000..9f9d0467a4 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/resources/DataBindingTest.composite @@ -0,0 +1,34 @@ + + + + + + + + + Echo + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/resources/ipo.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/resources/ipo.xml new file mode 100755 index 0000000000..58058dbe1a --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/resources/ipo.xml @@ -0,0 +1,33 @@ + + + + + Helen Zoe + 47 Eden Street + Cambridge + CB1 1JR + + + + Robert Smith + 8 Oak Avenue + Old Town + PA + 95819 + + + + + Lapis necklace + 1 + 99.95 + Want this for the holidays + 1999-12-05 + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/resources/ipo.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/resources/ipo.xsd new file mode 100755 index 0000000000..5468542693 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/resources/ipo.xsd @@ -0,0 +1,118 @@ + + + + + International Purchase order schema for Example.com + Copyright 2000 Example.com. All rights reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/resources/ipo.xsdconfig b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/resources/ipo.xsdconfig new file mode 100755 index 0000000000..a397182672 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/databindings/transformers/src/test/resources/ipo.xsdconfig @@ -0,0 +1,21 @@ + + + + + com.example.ipo.xmlbeans + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/LICENSE.txt b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/LICENSE.txt new file mode 100644 index 0000000000..0084319535 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, serviceDefinition marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/NOTICE.txt b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/NOTICE.txt new file mode 100644 index 0000000000..d83ebbe236 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/NOTICE.txt @@ -0,0 +1,14 @@ +${pom.name} +Copyright (c) 2005 - 2006 The Apache Software Foundation + +Apache Tuscany is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the Apache Web Services PMC. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/pom.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/pom.xml new file mode 100644 index 0000000000..c27a6c62a2 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/pom.xml @@ -0,0 +1,189 @@ + + + + + org.apache.tuscany.testing + sca-itest + 0.1-integration-incubating-SNAPSHOT + ../pom.xml + + 4.0.0 + iTest-exceptions-crossBinding-ws + jar + Test Suite Exception Handling cross bindings WS + + + + java.net + https://maven-repository.dev.java.net/nonav/repository/ + legacy + + + + + + org.apache.tuscany.sca.services.databinding + databinding-sdo + ${scaKernelVersion} + + + org.apache.tuscany.sca.services.idl + tuscany-wsdl + ${scaKernelVersion} + runtime + + + + org.apache.tuscany.sca.extensions.axis2 + tuscany-axis2 + runtime + ${scaKernelVersion} + + + + + junit + junit + 4.2 + test + + + org.apache.tuscany.sca.services + tuscany-http-jetty + runtime + ${scaKernelVersion} + + + + org.apache.tuscany.sca.services.databinding + databinding-jaxb + ${scaKernelVersion} + + + org.apache.tuscany.sca.extensions.axis2 + databinding-axiom + ${scaKernelVersion} + + + + + com.sun.xml.ws + jaxws-rt + 2.1 + + + + + javax.jws + jsr181-api + 1.0-MR1 + + + javax.xml.bind + jaxb-api + 2.1 + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + org.codehaus.mojo + jaxws-maven-plugin + + + generate-jaxb + generate-resources + + wsimport + + + + + ${basedir}/src/main/resources/wsdl + true + org.apache.tuscany.sca.test.exceptions.impl.jaxb + true + + + + javax.jws + jsr181-api + 1.0-MR1 + + + + + + org.apache.tuscany.sdo + tuscany-sdo-plugin + ${sdo.version} + + + + ${basedir}/src/main/resources/wsdl.sdo/StockExceptionTest.wsdl + true + true + true + + + generate + + + + + + org.apache.tuscany.sca.extensions.axis2.plugins + tuscany-plugin-wsdl2java + ${scaKernelVersion} + + + + ${basedir}/src/main/resources/wsdl.sdo/StockExceptionTest.wsdl + + + generate + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExceptionTestJAXB.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExceptionTestJAXB.java new file mode 100644 index 0000000000..2c9b2d25cb --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExceptionTestJAXB.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.exceptions.impl; + +import org.apache.tuscany.api.annotation.DataType; +import org.apache.tuscany.sca.test.exceptions.impl.jaxb.StockExceptionTest; +import org.osoa.sca.annotations.Remotable; + +/** + * + */ +@Remotable +@DataType(name = "javax.xml.bind.JAXBElement") +public interface StockExceptionTestJAXB extends StockExceptionTest { + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExchangeJaxB.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExchangeJaxB.java new file mode 100644 index 0000000000..65751175fb --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExchangeJaxB.java @@ -0,0 +1,76 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.test.exceptions.impl; + +import org.apache.tuscany.sca.test.exceptions.impl.jaxb.InvalidSymbolFault; +import org.apache.tuscany.sca.test.exceptions.impl.jaxb.InvalidSymbolFault_Exception; +import org.apache.tuscany.sca.test.exceptions.impl.jaxb.MarketClosedFault; +import org.apache.tuscany.sca.test.exceptions.impl.jaxb.ObjectFactory; +import org.apache.tuscany.sca.test.exceptions.impl.jaxb.StockOffer; +import org.apache.tuscany.sca.test.exceptions.impl.jaxb.TestNotDeclaredAtSourceFault; +import org.osoa.sca.annotations.Service; + +/** + * + */ +@Service(StockExceptionTestJAXB.class) +public class StockExchangeJaxB implements StockExceptionTestJAXB { + + /** + * + */ + public StockExchangeJaxB() { + + } + + /* + * (non-Javadoc) + * + * @see org.apache.tuscany.sca.test.exceptions.impl.jaxb.StockExceptionTest#stockQuoteOffer(org.apache.tuscany.sca.test.exceptions.impl.jaxb.StockOffer) + */ + public StockOffer stockQuoteOffer(StockOffer input) throws InvalidSymbolFault_Exception, MarketClosedFault, TestNotDeclaredAtSourceFault{ + + System.out.println("stockQuoteOffer '" + input + "'"); + + String symbol = input.getSymbol(); + if ("IBM".equals(symbol)) { + input.setPrice(99.00F); + return input; + + } + else if ("CLOSED".equals(input.getName())) { + throw new MarketClosedFault("TO LATE!", 3); + + } else if( "testNotDeclaredAtSourceTest".equals(input.getName())){ + + throw new TestNotDeclaredAtSourceFault("not declared", "fault info"); + + } + ObjectFactory jaxbOjectFactory = new ObjectFactory(); + + InvalidSymbolFault faultinfo = jaxbOjectFactory.createInvalidSymbolFault(); + + faultinfo.setOffer(input); + + throw new InvalidSymbolFault_Exception("bad symbol", faultinfo); + + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockTraderSDO.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockTraderSDO.java new file mode 100644 index 0000000000..5f65d293ea --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockTraderSDO.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.exceptions.impl; + +import java.rmi.RemoteException; + +import org.apache.tuscany.sca.test.exceptions.sdohandgen.InvalidSymbolSDOException; +import org.apache.tuscany.sca.test.exceptions.sdohandgen.MarketClosedSDOException; + +import stockexceptiontestservice.scatesttool.StockOffer; + +public interface StockTraderSDO { + + StockOffer testTrading() throws RemoteException, InvalidSymbolSDOException, MarketClosedSDOException; + + void testInvalidSymbolSDOException() throws RemoteException, InvalidSymbolSDOException, MarketClosedSDOException; + + Object testNotDeclaredAtSourceTest(); + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockTraderSDOImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockTraderSDOImpl.java new file mode 100644 index 0000000000..7d303887e7 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockTraderSDOImpl.java @@ -0,0 +1,122 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.test.exceptions.impl; + +import java.rmi.RemoteException; + +import org.apache.tuscany.sca.test.exceptions.sdohandgen.InvalidSymbolSDOException; +import org.apache.tuscany.sca.test.exceptions.sdohandgen.MarketClosedSDOException; +import org.apache.tuscany.sca.test.exceptions.sdohandgen.StockExceptionTest; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +import stockexceptiontestservice.scatesttool.ScatesttoolFactory; +import stockexceptiontestservice.scatesttool.StockOffer; + +/** + * + */ +@Service(StockTraderSDO.class) +public class StockTraderSDOImpl implements StockTraderSDO { + + private StockExceptionTest exchangeJaxb; + + /** + * + */ + + public StockTraderSDOImpl() { + // TODO Auto-generated constructor stub + } + + @Reference + public void setExchangeJaxb(StockExceptionTest exchangeJaxb) { + this.exchangeJaxb = exchangeJaxb; + } + + /* + * (non-Javadoc) + * + * @see org.apache.tuscany.sca.test.exceptions.impl.StockTraderSDO#tradingTest() + */ + public StockOffer testTrading() throws RemoteException, InvalidSymbolSDOException, MarketClosedSDOException { + StockOffer stockOffer = ScatesttoolFactory.INSTANCE.createStockOffer(); + stockOffer.setName("IBM"); + stockOffer.setSymbol("IBM"); + stockOffer.setPrice(100.00F); // offer to buy at max $100.00 + + StockOffer stockOfferAccepted = exchangeJaxb.stockQuoteOffer(stockOffer); + + return stockOfferAccepted; + + } + + public void testInvalidSymbolSDOException() throws RemoteException, InvalidSymbolSDOException, + MarketClosedSDOException { + StockOffer stockOffer = ScatesttoolFactory.INSTANCE.createStockOffer(); + // set up for a InvalidSymbolSDOException + stockOffer.setName(""); + stockOffer.setSymbol("IBM0"); + + stockOffer.setPrice(11.0F); // offer to buy at max $100.00 + exchangeJaxb.stockQuoteOffer(stockOffer); + + } + + public void marketClosedSDOExceptionTest() { + StockOffer stockOffer = ScatesttoolFactory.INSTANCE.createStockOffer(); + + // set up for a MarketClosedSDOException + stockOffer.setName("CLOSED"); + stockOffer.setSymbol("MBI"); + stockOffer.setPrice(Float.NaN); // offer to buy at max $100.00 + try { + StockOffer stockOfferAccepted = exchangeJaxb.stockQuoteOffer(stockOffer); + stockOfferAccepted.getPrice(); // the price actually bought. + } catch (RemoteException e) { + + e.printStackTrace(); + } catch (InvalidSymbolSDOException e) { + + e.printStackTrace(); + } catch (MarketClosedSDOException e) { + + e.printStackTrace(); + } + } + + public Object testNotDeclaredAtSourceTest() { + StockOffer stockOffer = ScatesttoolFactory.INSTANCE.createStockOffer(); + + // set up for a MarketClosedSDOException + stockOffer.setName("testNotDeclaredAtSourceTest"); + stockOffer.setSymbol("TNDAS"); + stockOffer.setPrice(Float.NaN); // offer to buy at max $100.00 + try { + return exchangeJaxb.stockQuoteOffer(stockOffer); + + } catch (Exception e) { + return e; + + } + + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/InvalidSymbolSDOException.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/InvalidSymbolSDOException.java new file mode 100644 index 0000000000..e9df6ba473 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/InvalidSymbolSDOException.java @@ -0,0 +1,84 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.test.exceptions.sdohandgen; + +import javax.xml.namespace.QName; + +import stockexceptiontestservice.scatesttool.InvalidSymbolFault; + +/** + * + */ +public class InvalidSymbolSDOException extends Exception { + + public static final QName FAULT_ELEMENT = new QName("http://scatesttool.stockexceptiontestservice", "InvalidSymbolFault"); + + /** + * + */ + public InvalidSymbolSDOException() { + + } + + /** + * @param message + * @param faultInfo + */ + public InvalidSymbolSDOException(String message, InvalidSymbolFault faultInfo) { + super(message); + this.faultInfo = faultInfo; + + } + + /** + * @param cause + */ + public InvalidSymbolSDOException(InvalidSymbolFault faultInfo, Throwable cause) { + super(cause); + this.faultInfo = faultInfo; + + } + + /** + * @param message + * @param cause + */ + public InvalidSymbolSDOException(String message, InvalidSymbolFault faultInfo, Throwable cause) { + super(message, cause); + this.faultInfo = faultInfo; + + } + + // *** Below was hand added ... tooling needs to do this ***/ + + /** + * Java type that goes as soapenv:Fault detail element. + */ + private InvalidSymbolFault faultInfo; + + /** + * @return returns fault bean: + * org.apache.tuscany.sca.test.exceptions.impl.jaxb.InvalidSymbolFault + */ + public InvalidSymbolFault getFaultInfo() { + return faultInfo; + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/MarketClosedSDOException.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/MarketClosedSDOException.java new file mode 100644 index 0000000000..39b702afe3 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/MarketClosedSDOException.java @@ -0,0 +1,76 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.test.exceptions.sdohandgen; + +import javax.xml.namespace.QName; + +/** + * + */ +public class MarketClosedSDOException extends Exception { + public static final QName FAULT_ELEMENT = + new QName("http://scatesttool.stockexceptiontestservice", "MarketClosedFault"); + + + /** + * Java type that goes as soapenv:Fault detail element. + */ + private int faultInfo; + + /** + * + */ + public MarketClosedSDOException() { + + } + + /** + * @param message + */ + public MarketClosedSDOException(String message, int faultInfo) { + super(message); + this.faultInfo = faultInfo; + } + + /** + * @param cause + */ + public MarketClosedSDOException(int faultInfo, Throwable cause) { + super(cause); + this.faultInfo = faultInfo; + } + + /** + * @param message + * @param cause + */ + public MarketClosedSDOException(String message, int faultInfo, Throwable cause) { + super(message, cause); + this.faultInfo = faultInfo; + } + + /** + * @return returns fault bean: int + */ + public int getFaultInfo() { + return faultInfo; + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/StockExceptionTest.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/StockExceptionTest.java new file mode 100644 index 0000000000..7b4b3a0f29 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/StockExceptionTest.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. + */ +/** + * StockExceptionTest.java + * + * This file was auto-generated from WSDL + * by the Apache Axis2 version: #axisVersion# #today# + */ +package org.apache.tuscany.sca.test.exceptions.sdohandgen; + +import org.apache.tuscany.api.annotation.DataType; +import org.osoa.sca.annotations.Remotable; + +import stockexceptiontestservice.scatesttool.StockOffer; + +import org.apache.tuscany.sca.test.exceptions.sdohandgen.MarketClosedSDOException; + +/* + * StockExceptionTest java interface + */ + +@Remotable +@DataType(name = "commonj.sdo.DataObject") +public interface StockExceptionTest { + + /** + * Auto generated method signatures + * + * @param param0 + */ + StockOffer stockQuoteOffer(StockOffer param0) + throws java.rmi.RemoteException, InvalidSymbolSDOException, MarketClosedSDOException; + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/resources/ExceptionTest.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/resources/ExceptionTest.composite new file mode 100644 index 0000000000..f955ba093c --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/resources/ExceptionTest.composite @@ -0,0 +1,26 @@ + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/resources/intracomposite.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/resources/intracomposite.composite new file mode 100644 index 0000000000..4dc2464c33 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/resources/intracomposite.composite @@ -0,0 +1,42 @@ + + + + + + + + + exchangeJaxbComponent + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/resources/wsdl.sdo/StockExceptionTest.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/resources/wsdl.sdo/StockExceptionTest.wsdl new file mode 100644 index 0000000000..f5e716de94 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/resources/wsdl.sdo/StockExceptionTest.wsdl @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/resources/wsdl/StockExceptionTest.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/resources/wsdl/StockExceptionTest.wsdl new file mode 100644 index 0000000000..b4ed2b90cf --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/resources/wsdl/StockExceptionTest.wsdl @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/resources/xsd/StockExceptionTest.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/resources/xsd/StockExceptionTest.xsd new file mode 100644 index 0000000000..9759647cfe --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/main/resources/xsd/StockExceptionTest.xsd @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTestCase.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTestCase.java new file mode 100644 index 0000000000..e8efe86945 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding-ws/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTestCase.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.exceptions; + +import junit.framework.TestCase; + +import org.apache.tuscany.api.SCARuntime; +import org.apache.tuscany.sca.test.exceptions.impl.StockTraderSDO; +import org.apache.tuscany.sca.test.exceptions.sdohandgen.InvalidSymbolSDOException; +import org.apache.tuscany.spi.databinding.TransformationException; +import org.osoa.sca.CompositeContext; +import org.osoa.sca.CurrentCompositeContext; + +import stockexceptiontestservice.scatesttool.InvalidSymbolFault; +import stockexceptiontestservice.scatesttool.StockOffer; + +public class IntraCompositeTestCase extends TestCase { + private StockTraderSDO stockTrader; + + private CompositeContext context; + + public void testTrading() { + try { + StockOffer sp = stockTrader.testTrading(); + assertNotNull(sp); + assertEquals(99.00F, sp.getPrice()); + assertEquals("IBM", sp.getSymbol()); + } catch (Exception e) { + + e.printStackTrace(); + fail(e + ""); + + } + + } + + public void testInvalidSymbolSDOException() { + try { + stockTrader.testInvalidSymbolSDOException(); + fail("Expected InvalidSymbolSDOException"); + } catch (InvalidSymbolSDOException e) { + InvalidSymbolFault isf = e.getFaultInfo(); + + assertNotNull(isf); + StockOffer sp = isf.getOffer(); + assertEquals(11.00F, sp.getPrice()); + assertEquals("IBM0", sp.getSymbol()); + + } catch (Exception e) { + e.printStackTrace(); + fail("Expected InvalidSymbolSDOException" + e); + + } + } + + public void _testNotDeclaredAtSourceException() { + + Object ret = stockTrader.testNotDeclaredAtSourceTest(); + + assertNotNull(ret); + + assertEquals(TransformationException.class, ret.getClass()); + + } + + @Override + protected void setUp() throws Exception { + SCARuntime.start("ExceptionTest.composite"); + + context = CurrentCompositeContext.getContext(); + assertNotNull(context); + stockTrader = context.locateService(StockTraderSDO.class, "stockTraderSDOComponent"); + + assertNotNull(context); + } + + @Override + protected void tearDown() throws Exception { + SCARuntime.stop(); + } +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/LICENSE.txt b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/LICENSE.txt new file mode 100644 index 0000000000..0084319535 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, serviceDefinition marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/NOTICE.txt b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/NOTICE.txt new file mode 100644 index 0000000000..d83ebbe236 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/NOTICE.txt @@ -0,0 +1,14 @@ +${pom.name} +Copyright (c) 2005 - 2006 The Apache Software Foundation + +Apache Tuscany is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the Apache Web Services PMC. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/pom.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/pom.xml new file mode 100644 index 0000000000..6b6d981a97 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/pom.xml @@ -0,0 +1,161 @@ + + + + + org.apache.tuscany.testing + sca-itest + 0.1-integration-incubating-SNAPSHOT + ../pom.xml + + 4.0.0 + iTest-exceptions-crossBinding + jar + Test Suite Exception Handling cross bindings + + + + java.net + https://maven-repository.dev.java.net/nonav/repository/ + legacy + + + + + + org.apache.tuscany.sca.services.databinding + databinding-sdo + ${scaKernelVersion} + + + org.apache.tuscany.sca.services.databinding + databinding-jaxb + ${scaKernelVersion} + + + org.apache.tuscany.sca.extensions.axis2 + databinding-axiom + ${scaKernelVersion} + + + + + com.sun.xml.ws + jaxws-rt + 2.1 + + + + + javax.jws + jsr181-api + 1.0-MR1 + + + javax.xml.bind + jaxb-api + 2.1 + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + org.codehaus.mojo + jaxws-maven-plugin + + + generate-jaxb + generate-resources + + wsimport + + + + + ${basedir}/src/main/resources/wsdl + true + org.apache.tuscany.sca.test.exceptions.impl.jaxb + true + + + + javax.jws + jsr181-api + 1.0-MR1 + + + + + + org.apache.tuscany.sdo + tuscany-sdo-plugin + ${sdo.version} + + + + ${basedir}/src/main/resources/wsdl.sdo/StockExceptionTest.wsdl + true + true + true + + + generate + + + + + + org.apache.tuscany.sca.extensions.axis2.plugins + tuscany-plugin-wsdl2java + ${scaKernelVersion} + + + + ${basedir}/src/main/resources/wsdl.sdo/StockExceptionTest.wsdl + + + generate + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExceptionTestJAXB.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExceptionTestJAXB.java new file mode 100644 index 0000000000..2c9b2d25cb --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExceptionTestJAXB.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.exceptions.impl; + +import org.apache.tuscany.api.annotation.DataType; +import org.apache.tuscany.sca.test.exceptions.impl.jaxb.StockExceptionTest; +import org.osoa.sca.annotations.Remotable; + +/** + * + */ +@Remotable +@DataType(name = "javax.xml.bind.JAXBElement") +public interface StockExceptionTestJAXB extends StockExceptionTest { + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExchangeJaxB.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExchangeJaxB.java new file mode 100644 index 0000000000..65751175fb --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockExchangeJaxB.java @@ -0,0 +1,76 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.test.exceptions.impl; + +import org.apache.tuscany.sca.test.exceptions.impl.jaxb.InvalidSymbolFault; +import org.apache.tuscany.sca.test.exceptions.impl.jaxb.InvalidSymbolFault_Exception; +import org.apache.tuscany.sca.test.exceptions.impl.jaxb.MarketClosedFault; +import org.apache.tuscany.sca.test.exceptions.impl.jaxb.ObjectFactory; +import org.apache.tuscany.sca.test.exceptions.impl.jaxb.StockOffer; +import org.apache.tuscany.sca.test.exceptions.impl.jaxb.TestNotDeclaredAtSourceFault; +import org.osoa.sca.annotations.Service; + +/** + * + */ +@Service(StockExceptionTestJAXB.class) +public class StockExchangeJaxB implements StockExceptionTestJAXB { + + /** + * + */ + public StockExchangeJaxB() { + + } + + /* + * (non-Javadoc) + * + * @see org.apache.tuscany.sca.test.exceptions.impl.jaxb.StockExceptionTest#stockQuoteOffer(org.apache.tuscany.sca.test.exceptions.impl.jaxb.StockOffer) + */ + public StockOffer stockQuoteOffer(StockOffer input) throws InvalidSymbolFault_Exception, MarketClosedFault, TestNotDeclaredAtSourceFault{ + + System.out.println("stockQuoteOffer '" + input + "'"); + + String symbol = input.getSymbol(); + if ("IBM".equals(symbol)) { + input.setPrice(99.00F); + return input; + + } + else if ("CLOSED".equals(input.getName())) { + throw new MarketClosedFault("TO LATE!", 3); + + } else if( "testNotDeclaredAtSourceTest".equals(input.getName())){ + + throw new TestNotDeclaredAtSourceFault("not declared", "fault info"); + + } + ObjectFactory jaxbOjectFactory = new ObjectFactory(); + + InvalidSymbolFault faultinfo = jaxbOjectFactory.createInvalidSymbolFault(); + + faultinfo.setOffer(input); + + throw new InvalidSymbolFault_Exception("bad symbol", faultinfo); + + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockTraderSDO.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockTraderSDO.java new file mode 100644 index 0000000000..5f65d293ea --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockTraderSDO.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.exceptions.impl; + +import java.rmi.RemoteException; + +import org.apache.tuscany.sca.test.exceptions.sdohandgen.InvalidSymbolSDOException; +import org.apache.tuscany.sca.test.exceptions.sdohandgen.MarketClosedSDOException; + +import stockexceptiontestservice.scatesttool.StockOffer; + +public interface StockTraderSDO { + + StockOffer testTrading() throws RemoteException, InvalidSymbolSDOException, MarketClosedSDOException; + + void testInvalidSymbolSDOException() throws RemoteException, InvalidSymbolSDOException, MarketClosedSDOException; + + Object testNotDeclaredAtSourceTest(); + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockTraderSDOImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockTraderSDOImpl.java new file mode 100644 index 0000000000..7d303887e7 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/StockTraderSDOImpl.java @@ -0,0 +1,122 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.test.exceptions.impl; + +import java.rmi.RemoteException; + +import org.apache.tuscany.sca.test.exceptions.sdohandgen.InvalidSymbolSDOException; +import org.apache.tuscany.sca.test.exceptions.sdohandgen.MarketClosedSDOException; +import org.apache.tuscany.sca.test.exceptions.sdohandgen.StockExceptionTest; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +import stockexceptiontestservice.scatesttool.ScatesttoolFactory; +import stockexceptiontestservice.scatesttool.StockOffer; + +/** + * + */ +@Service(StockTraderSDO.class) +public class StockTraderSDOImpl implements StockTraderSDO { + + private StockExceptionTest exchangeJaxb; + + /** + * + */ + + public StockTraderSDOImpl() { + // TODO Auto-generated constructor stub + } + + @Reference + public void setExchangeJaxb(StockExceptionTest exchangeJaxb) { + this.exchangeJaxb = exchangeJaxb; + } + + /* + * (non-Javadoc) + * + * @see org.apache.tuscany.sca.test.exceptions.impl.StockTraderSDO#tradingTest() + */ + public StockOffer testTrading() throws RemoteException, InvalidSymbolSDOException, MarketClosedSDOException { + StockOffer stockOffer = ScatesttoolFactory.INSTANCE.createStockOffer(); + stockOffer.setName("IBM"); + stockOffer.setSymbol("IBM"); + stockOffer.setPrice(100.00F); // offer to buy at max $100.00 + + StockOffer stockOfferAccepted = exchangeJaxb.stockQuoteOffer(stockOffer); + + return stockOfferAccepted; + + } + + public void testInvalidSymbolSDOException() throws RemoteException, InvalidSymbolSDOException, + MarketClosedSDOException { + StockOffer stockOffer = ScatesttoolFactory.INSTANCE.createStockOffer(); + // set up for a InvalidSymbolSDOException + stockOffer.setName(""); + stockOffer.setSymbol("IBM0"); + + stockOffer.setPrice(11.0F); // offer to buy at max $100.00 + exchangeJaxb.stockQuoteOffer(stockOffer); + + } + + public void marketClosedSDOExceptionTest() { + StockOffer stockOffer = ScatesttoolFactory.INSTANCE.createStockOffer(); + + // set up for a MarketClosedSDOException + stockOffer.setName("CLOSED"); + stockOffer.setSymbol("MBI"); + stockOffer.setPrice(Float.NaN); // offer to buy at max $100.00 + try { + StockOffer stockOfferAccepted = exchangeJaxb.stockQuoteOffer(stockOffer); + stockOfferAccepted.getPrice(); // the price actually bought. + } catch (RemoteException e) { + + e.printStackTrace(); + } catch (InvalidSymbolSDOException e) { + + e.printStackTrace(); + } catch (MarketClosedSDOException e) { + + e.printStackTrace(); + } + } + + public Object testNotDeclaredAtSourceTest() { + StockOffer stockOffer = ScatesttoolFactory.INSTANCE.createStockOffer(); + + // set up for a MarketClosedSDOException + stockOffer.setName("testNotDeclaredAtSourceTest"); + stockOffer.setSymbol("TNDAS"); + stockOffer.setPrice(Float.NaN); // offer to buy at max $100.00 + try { + return exchangeJaxb.stockQuoteOffer(stockOffer); + + } catch (Exception e) { + return e; + + } + + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/InvalidSymbolSDOException.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/InvalidSymbolSDOException.java new file mode 100644 index 0000000000..e9df6ba473 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/InvalidSymbolSDOException.java @@ -0,0 +1,84 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.test.exceptions.sdohandgen; + +import javax.xml.namespace.QName; + +import stockexceptiontestservice.scatesttool.InvalidSymbolFault; + +/** + * + */ +public class InvalidSymbolSDOException extends Exception { + + public static final QName FAULT_ELEMENT = new QName("http://scatesttool.stockexceptiontestservice", "InvalidSymbolFault"); + + /** + * + */ + public InvalidSymbolSDOException() { + + } + + /** + * @param message + * @param faultInfo + */ + public InvalidSymbolSDOException(String message, InvalidSymbolFault faultInfo) { + super(message); + this.faultInfo = faultInfo; + + } + + /** + * @param cause + */ + public InvalidSymbolSDOException(InvalidSymbolFault faultInfo, Throwable cause) { + super(cause); + this.faultInfo = faultInfo; + + } + + /** + * @param message + * @param cause + */ + public InvalidSymbolSDOException(String message, InvalidSymbolFault faultInfo, Throwable cause) { + super(message, cause); + this.faultInfo = faultInfo; + + } + + // *** Below was hand added ... tooling needs to do this ***/ + + /** + * Java type that goes as soapenv:Fault detail element. + */ + private InvalidSymbolFault faultInfo; + + /** + * @return returns fault bean: + * org.apache.tuscany.sca.test.exceptions.impl.jaxb.InvalidSymbolFault + */ + public InvalidSymbolFault getFaultInfo() { + return faultInfo; + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/MarketClosedSDOException.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/MarketClosedSDOException.java new file mode 100644 index 0000000000..39b702afe3 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/MarketClosedSDOException.java @@ -0,0 +1,76 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.test.exceptions.sdohandgen; + +import javax.xml.namespace.QName; + +/** + * + */ +public class MarketClosedSDOException extends Exception { + public static final QName FAULT_ELEMENT = + new QName("http://scatesttool.stockexceptiontestservice", "MarketClosedFault"); + + + /** + * Java type that goes as soapenv:Fault detail element. + */ + private int faultInfo; + + /** + * + */ + public MarketClosedSDOException() { + + } + + /** + * @param message + */ + public MarketClosedSDOException(String message, int faultInfo) { + super(message); + this.faultInfo = faultInfo; + } + + /** + * @param cause + */ + public MarketClosedSDOException(int faultInfo, Throwable cause) { + super(cause); + this.faultInfo = faultInfo; + } + + /** + * @param message + * @param cause + */ + public MarketClosedSDOException(String message, int faultInfo, Throwable cause) { + super(message, cause); + this.faultInfo = faultInfo; + } + + /** + * @return returns fault bean: int + */ + public int getFaultInfo() { + return faultInfo; + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/StockExceptionTest.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/StockExceptionTest.java new file mode 100644 index 0000000000..7b4b3a0f29 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/java/org/apache/tuscany/sca/test/exceptions/sdohandgen/StockExceptionTest.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. + */ +/** + * StockExceptionTest.java + * + * This file was auto-generated from WSDL + * by the Apache Axis2 version: #axisVersion# #today# + */ +package org.apache.tuscany.sca.test.exceptions.sdohandgen; + +import org.apache.tuscany.api.annotation.DataType; +import org.osoa.sca.annotations.Remotable; + +import stockexceptiontestservice.scatesttool.StockOffer; + +import org.apache.tuscany.sca.test.exceptions.sdohandgen.MarketClosedSDOException; + +/* + * StockExceptionTest java interface + */ + +@Remotable +@DataType(name = "commonj.sdo.DataObject") +public interface StockExceptionTest { + + /** + * Auto generated method signatures + * + * @param param0 + */ + StockOffer stockQuoteOffer(StockOffer param0) + throws java.rmi.RemoteException, InvalidSymbolSDOException, MarketClosedSDOException; + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/resources/ExceptionTest.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/resources/ExceptionTest.composite new file mode 100644 index 0000000000..f955ba093c --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/resources/ExceptionTest.composite @@ -0,0 +1,26 @@ + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/resources/intracomposite.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/resources/intracomposite.composite new file mode 100644 index 0000000000..ffdc22e934 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/resources/intracomposite.composite @@ -0,0 +1,35 @@ + + + + + + + exchangeJaxbComponent + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/resources/wsdl.sdo/StockExceptionTest.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/resources/wsdl.sdo/StockExceptionTest.wsdl new file mode 100644 index 0000000000..f5e716de94 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/resources/wsdl.sdo/StockExceptionTest.wsdl @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/resources/wsdl/StockExceptionTest.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/resources/wsdl/StockExceptionTest.wsdl new file mode 100644 index 0000000000..58367acac1 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/resources/wsdl/StockExceptionTest.wsdl @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/resources/xsd/StockExceptionTest.xsd b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/resources/xsd/StockExceptionTest.xsd new file mode 100644 index 0000000000..9759647cfe --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/main/resources/xsd/StockExceptionTest.xsd @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTestCase.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTestCase.java new file mode 100644 index 0000000000..c589c5611c --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions-crossBinding/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTestCase.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.exceptions; + +import junit.framework.TestCase; + +import org.apache.tuscany.api.SCARuntime; +import org.apache.tuscany.sca.test.exceptions.impl.StockTraderSDO; +import org.apache.tuscany.sca.test.exceptions.sdohandgen.InvalidSymbolSDOException; +import org.apache.tuscany.spi.databinding.TransformationException; +import org.osoa.sca.CompositeContext; +import org.osoa.sca.CurrentCompositeContext; + +import stockexceptiontestservice.scatesttool.InvalidSymbolFault; +import stockexceptiontestservice.scatesttool.StockOffer; + +public class IntraCompositeTestCase extends TestCase { + private StockTraderSDO stockTrader; + + private CompositeContext context; + + public void testTrading() { + try { + StockOffer sp = stockTrader.testTrading(); + assertNotNull(sp); + assertEquals(99.00F, sp.getPrice()); + assertEquals("IBM", sp.getSymbol()); + } catch (Exception e) { + + e.printStackTrace(); + fail(e + ""); + + } + + } + + public void testInvalidSymbolSDOException() { + try { + stockTrader.testInvalidSymbolSDOException(); + fail("Expected InvalidSymbolSDOException"); + } catch (InvalidSymbolSDOException e) { + InvalidSymbolFault isf = e.getFaultInfo(); + + assertNotNull(isf); + StockOffer sp = isf.getOffer(); + assertEquals(11.00F, sp.getPrice()); + assertEquals("IBM0", sp.getSymbol()); + + } catch (Exception e) { + e.printStackTrace(); + fail("Expected InvalidSymbolSDOException" + e); + + } + } + + public void testNotDeclaredAtSourceException() { + + Object ret = stockTrader.testNotDeclaredAtSourceTest(); + + assertNotNull(ret); + + assertEquals(TransformationException.class, ret.getClass()); + + } + + @Override + protected void setUp() throws Exception { + SCARuntime.start("ExceptionTest.composite"); + + context = CurrentCompositeContext.getContext(); + assertNotNull(context); + stockTrader = context.locateService(StockTraderSDO.class, "stockTraderSDOComponent"); + + assertNotNull(context); + } + + @Override + protected void tearDown() throws Exception { + SCARuntime.stop(); + } +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/LICENSE.txt b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/LICENSE.txt new file mode 100644 index 0000000000..0084319535 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, serviceDefinition marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/NOTICE.txt b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/NOTICE.txt new file mode 100644 index 0000000000..d83ebbe236 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/NOTICE.txt @@ -0,0 +1,14 @@ +${pom.name} +Copyright (c) 2005 - 2006 The Apache Software Foundation + +Apache Tuscany is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the Apache Web Services PMC. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/pom.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/pom.xml new file mode 100644 index 0000000000..154f1748e3 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/pom.xml @@ -0,0 +1,32 @@ + + + + + org.apache.tuscany.testing + sca-itest + 0.1-integration-incubating-SNAPSHOT + ../pom.xml + + 4.0.0 + iTest-exceptions + jar + Test Suite Exception Handling + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/Checked.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/Checked.java new file mode 100644 index 0000000000..e90289a07d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/Checked.java @@ -0,0 +1,57 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.test.exceptions; + + +public class Checked extends Exception { + + /** + * + */ + public Checked() { + + } + + /** + * @param message + */ + public Checked(String message) { + super(message); + + } + + /** + * @param cause + */ + public Checked(Throwable cause) { + super(cause); + + } + + /** + * @param message + * @param cause + */ + public Checked(String message, Throwable cause) { + super(message, cause); + + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionHandler.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionHandler.java new file mode 100644 index 0000000000..0d14240513 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionHandler.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.exceptions; + +public interface ExceptionHandler { + + public abstract void testing(); + + public abstract Checked getTheBad(); + + public abstract String getTheGood(); + + public abstract UnChecked getTheUgly(); + +} \ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionThrower.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionThrower.java new file mode 100644 index 0000000000..80073e7679 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/ExceptionThrower.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.exceptions; + +public interface ExceptionThrower { + public static final String SO_THEY_SAY = "All is good that ends good."; + + public String theGood() throws org.apache.tuscany.sca.test.exceptions.Checked; + + public String theBad() throws org.apache.tuscany.sca.test.exceptions.Checked; + + public String theUgly() throws org.apache.tuscany.sca.test.exceptions.Checked; + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/UnChecked.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/UnChecked.java new file mode 100644 index 0000000000..1a439711dd --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/UnChecked.java @@ -0,0 +1,56 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.test.exceptions; + +public class UnChecked extends RuntimeException { + + /** + * + */ + public UnChecked() { + + } + + /** + * @param message + */ + public UnChecked(String message) { + super(message); + + } + + /** + * @param cause + */ + public UnChecked(Throwable cause) { + super(cause); + + } + + /** + * @param message + * @param cause + */ + public UnChecked(String message, Throwable cause) { + super(message, cause); + + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionHandlerImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionHandlerImpl.java new file mode 100644 index 0000000000..32a23c5e7d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionHandlerImpl.java @@ -0,0 +1,120 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.test.exceptions.impl; + +import org.apache.tuscany.sca.test.exceptions.Checked; +import org.apache.tuscany.sca.test.exceptions.ExceptionHandler; +import org.apache.tuscany.sca.test.exceptions.ExceptionThrower; +import org.apache.tuscany.sca.test.exceptions.UnChecked; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Scope; + +@Scope("COMPOSITE") +public class ExceptionHandlerImpl implements ExceptionHandler { + static final String INIT = "INIT"; + + private ExceptionThrower exceptionThrower; + + private String theGood; + + private Checked theBad; + + private UnChecked theUgly; + + /* + * (non-Javadoc) + * + * @see org.apache.tuscany.sca.test.exceptions.impl.ExceptionHandler#testing() + */ + public void testing() { + + assert exceptionThrower != null : "'exceptionThrower' never wired"; + String result = INIT; + try { + theGood = result = exceptionThrower.theGood(); + assert result == ExceptionThrower.SO_THEY_SAY; + } catch (Throwable e) { + assert result == INIT; + assert false; + e.printStackTrace(); + } + + result = INIT; + try { + result = exceptionThrower.theBad(); + // incredible + assert false : "Expected 'Check' Exception"; + + } catch (Checked e) { + // This is good... + assert result == INIT; + theBad = e; + } catch (Throwable t) { + // This is not so good. + t.printStackTrace(); + assert result == INIT; + assert false : "Got wrong exception '" + t.getClass().getName(); + } + + result = INIT; + try { + result = exceptionThrower.theUgly(); + // incredible + assert false : "Expected 'UnCheck' Exception"; + + } catch (Checked e) { + // This is not so good... + assert false : "Got wrong exception '" + e.getClass().getName(); + assert result == INIT; + } catch (UnChecked e) { + theUgly = e; + + } catch (Throwable t) { + // This is not good. + assert false; + assert result == INIT; + + System.out.println(ExceptionThrower.SO_THEY_SAY + " " + INIT); + } + + } + + @Reference + public void setExceptionThrower(ExceptionThrower exceptionThrower) { + this.exceptionThrower = exceptionThrower; + } + + public String getTheGood() { + return theGood; + } + + public Checked getTheBad() { + return theBad; + } + + public UnChecked getTheUgly() { + return theUgly; + } + + public ExceptionThrower getExceptionThrower() { + return exceptionThrower; + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionThrowerImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionThrowerImpl.java new file mode 100644 index 0000000000..c1b7c23d5d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/java/org/apache/tuscany/sca/test/exceptions/impl/ExceptionThrowerImpl.java @@ -0,0 +1,63 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.test.exceptions.impl; + +import org.apache.tuscany.sca.test.exceptions.Checked; +import org.apache.tuscany.sca.test.exceptions.ExceptionThrower; +import org.apache.tuscany.sca.test.exceptions.UnChecked; + +/** + * @author rineholt + * + */ +public class ExceptionThrowerImpl implements ExceptionThrower { + + /* + * (non-Javadoc) + * + * @see org.apache.tuscany.sca.test.exceptions.ExceptionThrower#theBad() + */ + public String theBad() throws Checked { + + throw new Checked("theBad"); + + } + + /* + * (non-Javadoc) + * + * @see org.apache.tuscany.sca.test.exceptions.ExceptionThrower#theGood() + */ + public String theGood() throws Checked { + + return SO_THEY_SAY; + } + + /* + * (non-Javadoc) + * + * @see org.apache.tuscany.sca.test.exceptions.ExceptionThrower#theUgly() + */ + public String theUgly() throws Checked { + + throw new UnChecked("theUgly"); + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/resources/ExceptionTest.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/resources/ExceptionTest.composite new file mode 100644 index 0000000000..f955ba093c --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/resources/ExceptionTest.composite @@ -0,0 +1,26 @@ + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/resources/intracomposite.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/resources/intracomposite.composite new file mode 100644 index 0000000000..0211e1f490 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/main/resources/intracomposite.composite @@ -0,0 +1,33 @@ + + + + + + + exceptionThrower + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTestCase.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTestCase.java new file mode 100644 index 0000000000..da0803ed91 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/exceptions/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTestCase.java @@ -0,0 +1,57 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.test.exceptions; + +import junit.framework.TestCase; + +import org.apache.tuscany.api.SCARuntime; +import org.osoa.sca.CompositeContext; +import org.osoa.sca.CurrentCompositeContext; + +public class IntraCompositeTestCase extends TestCase { + private ExceptionHandler exceptionHandler; + + private CompositeContext context; + + public void testALL() { + exceptionHandler.testing(); + assertEquals(ExceptionThrower.SO_THEY_SAY, exceptionHandler.getTheGood() ); + assertNotNull(exceptionHandler.getTheBad()); + assertEquals( Checked.class, exceptionHandler.getTheBad().getClass()); + assertNotNull(exceptionHandler.getTheUgly()); + assertEquals( UnChecked.class, exceptionHandler.getTheUgly().getClass()); + + } + + @Override + protected void setUp() throws Exception { + SCARuntime.start("ExceptionTest.composite"); + + context = CurrentCompositeContext.getContext(); + assertNotNull(context); + exceptionHandler = context.locateService(ExceptionHandler.class, "main"); + assertNotNull(context); + } + + @Override + protected void tearDown() throws Exception { + SCARuntime.stop(); + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/LICENSE.txt b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/LICENSE.txt new file mode 100644 index 0000000000..0084319535 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, serviceDefinition marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/NOTICE.txt b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/NOTICE.txt new file mode 100644 index 0000000000..d83ebbe236 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/NOTICE.txt @@ -0,0 +1,14 @@ +${pom.name} +Copyright (c) 2005 - 2006 The Apache Software Foundation + +Apache Tuscany is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the Apache Web Services PMC. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/pom.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/pom.xml new file mode 100644 index 0000000000..4b92e62197 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/pom.xml @@ -0,0 +1,43 @@ + + + + + org.apache.tuscany.testing + sca-itest + 0.1-integration-incubating-SNAPSHOT + ../pom.xml + + 4.0.0 + iTest-operation-overloading + jar + Test Suite Operator over loading. + + + + + + org.apache.tuscany.sca.kernel + tuscany-core + 0.1-integration-incubating-SNAPSHOT + compile + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/OverloadASourceTarget.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/OverloadASourceTarget.java new file mode 100644 index 0000000000..fd6d9038eb --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/OverloadASourceTarget.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.opoverload; + +import org.osoa.sca.annotations.AllowsPassByReference; + +/** + * + */ +//@AllowsPassByReference +public interface OverloadASourceTarget { + final String opName = "operationA:"; + + String operationA(); + + String operationA(int parm1); + + String operationA(int parm1, String parm2); + + String operationA(String parm1, int parm2); + + String operationA(String string); + + String[] operationAall(); + +} \ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadASource.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadASource.java new file mode 100644 index 0000000000..30687f9c78 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadASource.java @@ -0,0 +1,105 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.test.opoverload.impl; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +/** + * + */ +@Service(OverloadASourceTarget.class) +public class OverloadASource implements OverloadASourceTarget{ + public OverloadASourceTarget overloadASourceTarget; + /** + * + */ + public OverloadASource() { + + } + /** + * @return + * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA() + */ + public String[] operationAall() { + assert overloadASourceTarget != null : "reference overloadASourceTarget is null"; + ArrayList ret = new ArrayList(); + ret.add(overloadASourceTarget.operationA()); + ret.add(overloadASourceTarget.operationA(11)); + ret.add(overloadASourceTarget.operationA("eleven")); + ret.add(overloadASourceTarget.operationA(3,"three")); + ret.add(overloadASourceTarget.operationA("four",4)); + return (String[]) ret.toArray(new String[ret.size()]); + } + + + /** + * @return + * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA() + */ + public String operationA() { + assert overloadASourceTarget != null : "reference overloadASourceTarget is null"; + return overloadASourceTarget.operationA(); + } + /** + * @param parm1 + * @return + * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA(int) + */ + public String operationA(int parm1) { + assert overloadASourceTarget != null : "reference overloadASourceTarget is null"; + return overloadASourceTarget.operationA(parm1); + } + /** + * @param parm1 + * @param parm2 + * @return + * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA(int, java.lang.String) + */ + public String operationA(int parm1, String parm2) { + assert overloadASourceTarget != null : "reference overloadASourceTarget is null"; + return overloadASourceTarget.operationA(parm1, parm2); + } + public String operationA(String string) { + assert overloadASourceTarget != null : "reference overloadASourceTarget is null"; + return overloadASourceTarget.operationA(string); + } + /** + * @param parm1 + * @param parm2 + * @return + * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA(java.lang.String, int) + */ + public String operationA(String parm1, int parm2) { + assert overloadASourceTarget != null : "reference overloadASourceTarget is null"; + return overloadASourceTarget.operationA(parm1, parm2); + } + + @Reference + public void setOverloadASourceTarget(OverloadASourceTarget overloadASourceTarget) { + assert overloadASourceTarget != null : "reference overloadASourceTarget is set tonull"; + this.overloadASourceTarget = overloadASourceTarget; + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATarget.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATarget.java new file mode 100644 index 0000000000..e83952e573 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATarget.java @@ -0,0 +1,96 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.test.opoverload.impl; + +import org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget; +import org.osoa.sca.annotations.Service; + +/** + * + */ +@Service(OverloadASourceTarget.class) +public class OverloadATarget implements OverloadASourceTarget { + + /** + * + */ + public OverloadATarget() { + + } + + /* + * (non-Javadoc) + * + * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA(int) + */ + public String operationA(int parm1) { + final String ret = opName + parm1; + out(ret); + return ret; + + } + + /* + * (non-Javadoc) + * + * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA(int, + * java.lang.String) + */ + public String operationA(int parm1, String parm2) { + final String ret = opName + parm1 + parm2; + out(ret); + return ret; + + } + + /* + * (non-Javadoc) + * + * @see org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget#operationA() + */ + public String operationA() { + out(opName); + return opName; + + } + + public String operationA(String parm1, int parm2) { + final String ret = opName + parm1 + parm2; + out(ret); + return ret; + } + + public String operationA(String parm1) { + final String ret = opName + parm1; + out(ret); + return ret; + } + + private void out(String msg) { + + java.lang.System.out.println(msg); + } + + public String[] operationAall() { + throw new IllegalArgumentException("not supported"); + + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/interceptor/MessageInterceptor.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/interceptor/MessageInterceptor.java new file mode 100644 index 0000000000..8d2447a66b --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/interceptor/MessageInterceptor.java @@ -0,0 +1,114 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.test.opoverload.interceptor; + +import java.io.FileWriter; +import java.io.IOException; + +import org.apache.tuscany.spi.component.CompositeComponent; +import org.apache.tuscany.spi.model.Operation; +import org.apache.tuscany.spi.wire.Interceptor; +import org.apache.tuscany.spi.wire.Message; +import org.apache.tuscany.spi.wire.Wire; + +/** + * An interceptor to transform data accross databindings on the wire + * + * @version $Rev$ $Date$ + */ +public class MessageInterceptor implements Interceptor { + private Interceptor next; + + private CompositeComponent compositeComponent; + + private Operation sourceOperation; + + private Operation targetOperation; + + protected FileWriter fw= null; + + + public MessageInterceptor(Wire sourceWire, Operation sourceOperation, Operation targetOperation) { + super(); + // this.sourceWire = sourceWire; + this.sourceOperation = sourceOperation; + // this.targetWire = targetWire; + this.targetOperation = targetOperation; + this.compositeComponent = sourceWire.getContainer().getParent(); + + + try { + fw = new FileWriter("MessageInterceptor.log", true); + } catch (IOException e) { + fw= null; + e.printStackTrace(); + } + } + + /** + * @see org.apache.tuscany.spi.wire.Interceptor#getNext() + */ + public Interceptor getNext() { + return next; + } + + /** + * @see org.apache.tuscany.spi.wire.Interceptor#invoke(org.apache.tuscany.spi.wire.Message) + */ + /* + * (non-Javadoc) + * + * @see org.apache.tuscany.spi.wire.Interceptor#invoke(org.apache.tuscany.spi.wire.Message) + */ + public Message invoke(Message msg) { + out(msg.toString()); + return msg; + } + + + + private void out(String string) { + if( null != fw){ + try { + fw.write(string); + fw.flush(); + } catch (IOException e) { + + } + } + + } + + /** + * @see org.apache.tuscany.spi.wire.Interceptor#isOptimizable() + */ + public boolean isOptimizable() { + return false; + } + + /** + * @see org.apache.tuscany.spi.wire.Interceptor#setNext(org.apache.tuscany.spi.wire.Interceptor) + */ + public void setNext(Interceptor next) { + this.next = next; + } + + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/interceptor/MessageInterceptorWirePostProcessor.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/interceptor/MessageInterceptorWirePostProcessor.java new file mode 100644 index 0000000000..5c258e2307 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/main/java/org/apache/tuscany/sca/test/opoverload/interceptor/MessageInterceptorWirePostProcessor.java @@ -0,0 +1,122 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.test.opoverload.interceptor; + +import java.util.Map; +import java.util.Set; + +import org.apache.tuscany.spi.component.ReferenceBinding; +import org.apache.tuscany.spi.component.SCAObject; +import org.apache.tuscany.spi.model.Operation; +import org.apache.tuscany.spi.wire.InboundInvocationChain; +import org.apache.tuscany.spi.wire.InboundWire; +import org.apache.tuscany.spi.wire.Interceptor; +import org.apache.tuscany.spi.wire.OutboundInvocationChain; +import org.apache.tuscany.spi.wire.OutboundWire; +import org.apache.tuscany.spi.wire.WirePostProcessorExtension; + +/** + * This processor is responsible to add an interceptor to invocation chain if + * the source and target operations have different databinding requirements + * + * @version $Rev$ $Date$ + */ +public class MessageInterceptorWirePostProcessor extends WirePostProcessorExtension { + + + public MessageInterceptorWirePostProcessor() { + super(); + + } + + public void process(OutboundWire source, InboundWire target) { + Map, OutboundInvocationChain> chains = source.getInvocationChains(); + for (Map.Entry, OutboundInvocationChain> entry : chains.entrySet()) { + Operation sourceOperation = entry.getKey(); + Operation targetOperation = + getTargetOperation(target.getInvocationChains().keySet(), sourceOperation.getName()); + + MessageInterceptor interceptor = new MessageInterceptor(source, sourceOperation, targetOperation); + + entry.getValue().addInterceptor(0, interceptor); + + } + + // Check if there's a callback + Map callbackOperations = source.getServiceContract().getCallbackOperations(); + if (callbackOperations == null || callbackOperations.isEmpty()) { + return; + } + Object targetAddress = source.getContainer().getName(); + Map, OutboundInvocationChain> callbackChains = + target.getSourceCallbackInvocationChains(targetAddress); + if (callbackChains == null) { + // callback chains could be null + return; + } + for (Map.Entry, OutboundInvocationChain> entry : callbackChains.entrySet()) { + Operation sourceOperation = entry.getKey(); + Operation targetOperation = + getTargetOperation(source.getTargetCallbackInvocationChains().keySet(), sourceOperation.getName()); + MessageInterceptor interceptor = new MessageInterceptor(source, sourceOperation, targetOperation); + entry.getValue().addInterceptor(0, interceptor); + + } + } + + public void process(InboundWire source, OutboundWire target) { + SCAObject container = source.getContainer(); + // Either Service or Reference + boolean isReference = container instanceof ReferenceBinding; + + Map, InboundInvocationChain> chains = source.getInvocationChains(); + for (Map.Entry, InboundInvocationChain> entry : chains.entrySet()) { + Operation sourceOperation = entry.getKey(); + Operation targetOperation = + getTargetOperation(target.getInvocationChains().keySet(), sourceOperation.getName()); + + // Add the interceptor to the source side + MessageInterceptor interceptor = new MessageInterceptor(source, sourceOperation, targetOperation); + + if (isReference) { + + target.getInvocationChains().get(targetOperation).addInterceptor(0, interceptor); + Interceptor tail = entry.getValue().getTailInterceptor(); + if (tail != null) { + // HACK to relink the bridging interceptor + tail.setNext(interceptor); + } + } else { + entry.getValue().addInterceptor(0, interceptor); + } + + } + } + + private Operation getTargetOperation(Set> operations, String operationName) { + for (Operation op : operations) { + if (op.getName().equals(operationName)) { + return op; + } + } + return null; + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/main/resources/META-INF/sca/application.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/main/resources/META-INF/sca/application.composite new file mode 100644 index 0000000000..d92e8372fd --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/main/resources/META-INF/sca/application.composite @@ -0,0 +1,34 @@ + + + + + + + OverloadATargetComponent + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/main/resources/org/apache/tuscany/sca/test/opoverload/interceptor/MessageInterceptor.scdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/main/resources/org/apache/tuscany/sca/test/opoverload/interceptor/MessageInterceptor.scdl new file mode 100644 index 0000000000..87387d8e49 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/main/resources/org/apache/tuscany/sca/test/opoverload/interceptor/MessageInterceptor.scdl @@ -0,0 +1,27 @@ + + + + + + + + + \ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/test/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATestCase.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/test/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATestCase.java new file mode 100644 index 0000000000..74c1b3cf12 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/operation-overloading/src/test/java/org/apache/tuscany/sca/test/opoverload/impl/OverloadATestCase.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.opoverload.impl; + +import java.io.File; +import java.net.URL; + +import org.apache.tuscany.sca.test.opoverload.OverloadASourceTarget; +import org.apache.tuscany.test.SCATestCase; +import org.osoa.sca.CompositeContext; +import org.osoa.sca.CurrentCompositeContext; + +public class OverloadATestCase extends SCATestCase { + private OverloadASourceTarget overloadA; + + private CompositeContext context; + + + public void testOperationAall() { + String[] result= overloadA.operationAall(); + assertEquals(5, result.length); + assertEquals(OverloadASourceTarget.opName , result[0]); + assertEquals(OverloadASourceTarget.opName + 11, result[1]); + assertEquals(OverloadASourceTarget.opName + "eleven", result[2]); + assertEquals(OverloadASourceTarget.opName + 3 + "three", result[3]); + assertEquals(OverloadASourceTarget.opName + "four" + 4, result[4]); + } + +// public void testOperationAInt() { +// String result= overloadA.operationA(29); +// assertEquals(OverloadASourceTarget.opName + 29, result); +// } +// +// public void testOperationAString() { +// String result= overloadA.operationA("rick:-)"); +// assertEquals(OverloadASourceTarget.opName + "rick:-)", result); +// } +// +// public void testOperationAIntString() { +// String result= overloadA.operationA(123, "Tuscany"); +// assertEquals(OverloadASourceTarget.opName +123+ "Tuscany", result); +// } +// +// public void testOperationStringInt() { +// String result= overloadA.operationA("StringInt", 77); +// assertEquals(OverloadASourceTarget.opName + "StringInt" + 77, result); +// } +// + + @Override + protected void setUp() throws Exception { + File cdf = new File ("."); + String currentdir= cdf.getCanonicalPath(); + addExtension("org.apache.tuscany.sca.test.opoverload.interceptor", new URL("file:///" + currentdir + "/src/main/resources/org/apache/tuscany/sca/test/opoverload/interceptor/MessageInterceptor.scdl")); + super.setUp(); + context = CurrentCompositeContext.getContext(); + assertNotNull(context); + overloadA = context.locateService(OverloadASourceTarget.class, "OverloadASourceComponent"); + + assertNotNull(context); + } +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/pom.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/pom.xml new file mode 100644 index 0000000000..63a370d19d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/pom.xml @@ -0,0 +1,135 @@ + + + + + org.apache.tuscany.testing + tuscany-testing-sca + 0.1-integration-incubating-SNAPSHOT + + 4.0.0 + org.apache.tuscany.testing + sca-itest + 0.1-integration-incubating-SNAPSHOT + pom + Apache Tuscany SCA Integration Test Suite + + + + + stable + + true + + + + property + exceptions + exceptions-crossBinding + exceptions-crossBinding-ws + callback-api + callback-basic + callback-complexType + callback-id + callback-setCallback + callback-setCallbackConversation + wsdl + conversations + bindings + + + + + integration + + spec + property + exceptions + exceptions-crossBinding + exceptions-crossBinding-ws + callback-api + callback-basic + callback-complexType + callback-id + callback-setCallback + callback-setCallbackConversation + conversations + wsdl + bindings + databindings + operation-overloading + + + + + unstable + + spec + property + exceptions + exceptions-crossBinding + exceptions-crossBinding-ws + callback-api + callback-basic + callback-complexType + callback-id + callback-setCallback + callback-setCallbackConversation + conversations + wsdl + bindings + databindings + operation-overloading + + + + + + + + org.apache.tuscany.sca.kernel + tuscany-api + 0.1-integration-incubating-SNAPSHOT + + + org.apache.tuscany.sca.kernel + tuscany-core + 0.1-integration-incubating-SNAPSHOT + runtime + + + org.apache.tuscany.sca.extensions.axis2 + tuscany-axis2 + runtime + 0.1-integration-incubating-SNAPSHOT + + + org.apache.tuscany.sca.services + tuscany-http-jetty + runtime + 0.1-integration-incubating-SNAPSHOT + + + junit + junit + 4.2 + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/pom.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/pom.xml new file mode 100644 index 0000000000..40391d6c07 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/pom.xml @@ -0,0 +1,34 @@ + + + + + org.apache.tuscany.testing + sca-itest + 0.1-integration-incubating-SNAPSHOT + ../pom.xml + + + 4.0.0 + iTest-propertyTest + ${testing.version} + jar + Test Suite for SCA properties + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/ABCDComponent.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/ABCDComponent.java new file mode 100644 index 0000000000..667b854c10 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/ABCDComponent.java @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest; + +public interface ABCDComponent { + String getA(); + String getB(); + String getC(); + String getD(); +} + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/ABCDComponentImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/ABCDComponentImpl.java new file mode 100644 index 0000000000..51d4d9b3cb --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/ABCDComponentImpl.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; + +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Scope; + +@Scope("COMPOSITE") +public class ABCDComponentImpl implements ABCDComponent { + private ABComponent abComponent; + private CDComponent cdComponent; + + @Reference + public void setAb(ABComponent component) { + this.abComponent = component; + } + + @Reference + public void setCd(CDComponent component) { + this.cdComponent = component; + } + + public String getA() { + return this.abComponent.getA(); + } + + public String getB() { + return this.abComponent.getB(); + } + + public String getC() { + return this.cdComponent.getC(); + } + + public String getD() { + return this.cdComponent.getD(); + } +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/ABComponent.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/ABComponent.java new file mode 100644 index 0000000000..4058ce92bd --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/ABComponent.java @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest; + +import java.util.Collection; + +public interface ABComponent { + + String getA(); + String getB(); + String getZ(); + int getIntValue(); + String getF(); + Collection getManyStringValues(); + Collection getManyIntegers(); +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/ABComponentImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/ABComponentImpl.java new file mode 100644 index 0000000000..b78d6380ef --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/ABComponentImpl.java @@ -0,0 +1,98 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest; + +import java.util.Collection; + +import org.osoa.sca.annotations.Property; + +public class ABComponentImpl implements ABComponent { + + private String aProperty; + private String bProperty; + private int intValue; + private Collection manyStringValues; + private Collection manyIntegerValues; + private String zProperty; + private String fProperty; + + @Property(name="xpath") + public void setZProperty(final String value) { + this.zProperty = value; + } + + @Property(name="foobar") + public void setManyStringValues(final Collection value) { + this.manyStringValues = value; + } + + @Property(name="fooInts") + public void setManyIntegers(final Collection value) { + this.manyIntegerValues = value; + } + + @Property + public void setA(final String A) { + this.aProperty = A; + } + + @Property + public void setB(final String B) { + this.bProperty = B; + } + + @Property + public void setF(final String F) { + this.fProperty = F; + } + + @Property + public void setOne(final int value) { + this.intValue = value; + } + + public String getA() { + return this.aProperty; + } + + public String getB() { + return this.bProperty; + } + + public int getIntValue() { + return this.intValue; + } + + public String getZ() { + return this.zProperty; + } + + public String getF() { + return this.fProperty; + } + + public Collection getManyStringValues() { + return manyStringValues; + } + + public Collection getManyIntegers() { + return manyIntegerValues; + } +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/CDComponent.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/CDComponent.java new file mode 100644 index 0000000000..cd3046c62c --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/CDComponent.java @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest; + +import java.util.Collection; + +public interface CDComponent { + + String getC(); + String getC2(); + String getD(); + String getNoSource(); + String getFileProperty(); + Collection getManyValuesFileProperty(); + int getOverrideValue(); +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/CDComponentImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/CDComponentImpl.java new file mode 100644 index 0000000000..aec71d30f9 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/CDComponentImpl.java @@ -0,0 +1,97 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest; + +import java.util.Collection; + +import org.osoa.sca.annotations.Property; + +public class CDComponentImpl implements CDComponent { + + private String cProperty; + private String dProperty; + private String nosource; + private String fileProperty; + private Collection manyValuesFileProperty; + private int overrideNumber; + private String cProperty2; + + @Property(name="nonFileProperty") + public void setC2(final String value) { + this.cProperty2 = value; + } + @Property(name="two") + public void setOverrideNumber(final int value) { + this.overrideNumber = value; + } + + @Property(name="fileProperty") + public void setFileProp(final String value) { + this.fileProperty = value; + } + + @Property(name="manyValuesFileProperty") + public void setFileManyValueProp(final Collection values) { + this.manyValuesFileProperty = values; + } + + @Property + public void setC(final String C) { + this.cProperty = C; + } + + @Property + public void setD(final String D) { + this.dProperty = D; + } + + @Property + public void setNosource(final String value) { + this.nosource = value; + } + + public String getFileProperty() { + return this.fileProperty; + } + + public String getC() { + return this.cProperty; + } + + public String getC2() { + return this.cProperty2; + } + + public String getD() { + return this.dProperty; + } + + public String getNoSource() { + return this.nosource; + } + + public int getOverrideValue() { + return this.overrideNumber; + } + public Collection getManyValuesFileProperty() { + return this.manyValuesFileProperty; + } +} + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/ComplexPropertyBean.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/ComplexPropertyBean.java new file mode 100644 index 0000000000..1f3e4a0a41 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/ComplexPropertyBean.java @@ -0,0 +1,69 @@ +package org.apache.tuscany.sca.itest; + +public class ComplexPropertyBean { + + protected int integerNumber = 25; + public float floatNumber = 50; + public double doubleNumber = 75; + public int[] intArray = null; + public double[] doubleArray = null; + protected String[] stringArray = null; + + ComplexPropertyBean numberSet; + public ComplexPropertyBean[] numberSetArray = null; + + public ComplexPropertyBean() { + + } + + public double getDoubleNumber() { + return doubleNumber; + } + + public void setDoubleNumber(double doubleNumber) { + this.doubleNumber = doubleNumber; + } + + public float getFloatNumber() { + return floatNumber; + } + + public void setFloatNumber(float floatNumber) { + this.floatNumber = floatNumber; + } + + public int getIntegerNumber() { + return integerNumber; + } + + public void setIntegerNumber(int integerNumber) { + this.integerNumber = integerNumber; + } + + public ComplexPropertyBean getNumberSet() { + return numberSet; + } + + public void setNumberSet(ComplexPropertyBean numberSet) { + this.numberSet = numberSet; + } + + public String toString() { + return Double.toString(integerNumber) + " - " + + Double.toString(floatNumber) + " - " + + Double.toString(doubleNumber) + " \n" + + ((intArray == null ) ? "no int array" : intArray[0] + " - " + intArray[1] + " \n " ) + + ((doubleArray == null ) ? "no double array" : doubleArray[0] + " - " + doubleArray[1] + " \n " ) + + ((stringArray == null ) ? "no string array" : stringArray[0] + " - " + stringArray[1] + " \n " ) + + ((numberSetArray == null ) ? "no numberset array" : numberSetArray[0] + " - " + numberSetArray[1] + " \n " ) + + ((numberSet == null ) ? "" : numberSet.toString()); + } + + public String[] getStringArray() { + return stringArray; + } + + public void setStringArray(String[] stringArray) { + this.stringArray = stringArray; + } +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/OverrideService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/OverrideService.java new file mode 100644 index 0000000000..116cdef48f --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/OverrideService.java @@ -0,0 +1,25 @@ + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest; + +public interface OverrideService { + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/OverrideServiceImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/OverrideServiceImpl.java new file mode 100644 index 0000000000..a36bb5e419 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/OverrideServiceImpl.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; + +public class OverrideServiceImpl implements OverrideService { + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/PropertyComponent.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/PropertyComponent.java new file mode 100644 index 0000000000..a76f17bcad --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/PropertyComponent.java @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest; + +import java.util.Collection; + + +public interface PropertyComponent { + public String getLocation(); + public String getYear(); + public ComplexPropertyBean getComplexPropertyOne(); + public ComplexPropertyBean getComplexPropertyTwo(); + public ComplexPropertyBean getComplexPropertyThree(); + public Collection getComplexPropertyFour(); +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/PropertyComponentImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/PropertyComponentImpl.java new file mode 100644 index 0000000000..be99611dfa --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/PropertyComponentImpl.java @@ -0,0 +1,72 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest; + +import java.util.Collection; + +import org.osoa.sca.annotations.Property; + +public class PropertyComponentImpl implements PropertyComponent { + @Property + protected ComplexPropertyBean complexPropertyOne; + + @Property + protected ComplexPropertyBean complexPropertyTwo; + + @Property + protected ComplexPropertyBean complexPropertyThree; + + @Property + protected Collection complexPropertyFour; + + @Property(name = "location") + protected String location = "RTP"; + + @Property(name = "year") + protected String year = "2006"; + + public String getLocation(){ + return location; + } + + public String getYear(){ + return year; + } + + public ComplexPropertyBean getComplexPropertyOne() { + //System.out.println(complexPropertyOne); + return complexPropertyOne; + } + + public ComplexPropertyBean getComplexPropertyTwo() { + //System.out.println(complexPropertyTwo); + return complexPropertyTwo; + } + + public ComplexPropertyBean getComplexPropertyThree() { + //System.out.println(complexPropertyThree); + return complexPropertyThree; + } + + public Collection getComplexPropertyFour() { + //System.out.println(complexPropertyThree); + return complexPropertyFour; + } +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/PropertyService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/PropertyService.java new file mode 100644 index 0000000000..f20d295a06 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/java/org/apache/tuscany/sca/itest/PropertyService.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; + +public interface PropertyService { + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/resources/PropertyTest.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/resources/PropertyTest.composite new file mode 100644 index 0000000000..e48a8cc606 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/resources/PropertyTest.composite @@ -0,0 +1,197 @@ + + + + + 1 + + + a + b + c + d + + y + z + + + + + + + TestString_1 + TestString_2 + 10 + 27 + 79.34 + 25.52 + 184.52 + 50.05 + 20 + + 1 + 11 + 111 + + + 2 + 22 + 222 + + + 54 + 158.68 + 369.04 + + + + + + + + + + + + + + + f + + + + Apache + Tuscany + Java SCA + + + 123 + 456 + 789 + + + + + + + + + aValue + + + + 2 + + + + + + + + TestString_1 + TestString_2 + 10 + 27 + 79.34 + 25.52 + 184.52 + 50.05 + 20 + + 1 + 11 + 111 + + + 2 + 22 + 222 + + + 54 + 158.68 + 369.04 + + + + + + TestElementString_1 + TestElementString_2 + 10 + 27 + 79.34 + 25.52 + 184.52 + 50.05 + 20 + + 1 + 11 + 111 + + + 2 + 22 + 222 + + + 54 + 158.68 + 369.04 + + + + + + 1 + 11.11 + 111.111 + + 11 + 1111.1111 + 11111.11111 + + + + 2 + 22.22 + 222.222 + + 22 + 2222.2222 + 22222.22222 + + + + 3 + 33.33 + 333.333 + + 33 + 3333.3333 + 33333.33333 + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/resources/fileProperty.txt b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/resources/fileProperty.txt new file mode 100644 index 0000000000..c530ae892d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/resources/fileProperty.txt @@ -0,0 +1 @@ +fileValue diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/resources/manyValuesFileProperty.txt b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/resources/manyValuesFileProperty.txt new file mode 100644 index 0000000000..328b9b3767 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/main/resources/manyValuesFileProperty.txt @@ -0,0 +1,6 @@ + + fileValueOne + fileValueTwo + fileValueThree + fileValueFour + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/test/java/org/apache/tuscany/sca/itest/PropertyTestCase.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/test/java/org/apache/tuscany/sca/itest/PropertyTestCase.java new file mode 100644 index 0000000000..e72cdd24bf --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/property/src/test/java/org/apache/tuscany/sca/itest/PropertyTestCase.java @@ -0,0 +1,186 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest; + +import static junit.framework.Assert.assertEquals; +import static junit.framework.Assert.assertNotNull; + +import java.util.Iterator; + +import org.apache.tuscany.api.SCARuntime; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; +import org.osoa.sca.CurrentCompositeContext; + +public class PropertyTestCase { + private static ABComponent abService; + private static CDComponent cdService; + private static ABCDComponent abcdService; + private static PropertyComponent propertyService; + + @Test + public void testA() { + assertEquals("a", abService.getA()); + } + + @Test + public void testB() { + assertEquals("b", abService.getB()); + } + + @Test + public void testC() { + assertEquals("c", cdService.getC()); + } + + @Test + public void testC2() { + assertEquals("c", cdService.getC2()); + } + + @Test + public void testD() { + assertEquals("d", cdService.getD()); + } + + @Test + public void testF() { + assertEquals("a", abService.getF()); + } + + @Test + public void testZ() { + assertEquals("z", abService.getZ()); + } + + @Test + public void testIntValue() { + assertEquals(1, abService.getIntValue()); + } + + @Test + public void testDefaultValue() { + assertEquals(1, abService.getIntValue()); + } + + @Test + public void testDefaultValueOverride() { + assertEquals(1, cdService.getOverrideValue()); + } + + @Test + public void testNoSource() { + assertEquals("aValue", cdService.getNoSource()); + } + + @Test + public void testFileProperty() { + assertEquals("fileValue", cdService.getFileProperty()); + } + + @Test + public void testManyValuesFileProperty() { + Iterator iterator = cdService.getManyValuesFileProperty().iterator(); + iterator.next(); + String secondValue = iterator.next(); + assertEquals(4, cdService.getManyValuesFileProperty().size()); + assertEquals("fileValueTwo", secondValue); + } + + @Test + public void testABCD() { + assertEquals("a", abcdService.getA()); + assertEquals("b", abcdService.getB()); + assertEquals("c", abcdService.getC()); + assertEquals("d", abcdService.getD()); + } + + @Test + public void testDefaultProperty() { + assertEquals("RTP", propertyService.getLocation()); + assertEquals("2006", propertyService.getYear()); + + } + + @Test + public void testManySimpleStringValues() { + Iterator iterator = abService.getManyStringValues().iterator(); + assertEquals("Apache", iterator.next()); + assertEquals("Tuscany", iterator.next()); + assertEquals("Java SCA", iterator.next()); + } + + @Test + public void testManySimpleIntegerValues() { + Iterator iterator = abService.getManyIntegers().iterator(); + assertEquals(123, iterator.next().intValue()); + assertEquals(456, iterator.next().intValue()); + assertEquals(789, iterator.next().intValue()); + } + + @Test + public void testComplexPropertyOne() { + ComplexPropertyBean propBean = propertyService.getComplexPropertyOne(); + assertNotNull(propBean); + assertEquals("TestString_1", propBean.getStringArray()[0]); + assertEquals(2, propBean.numberSetArray[1].integerNumber); + } + + @Test + public void testComplexPropertyTwo() { + ComplexPropertyBean propBean = propertyService.getComplexPropertyTwo(); + assertNotNull(propBean); + assertEquals(10, propBean.intArray[0]); + assertEquals((float)22, propBean.numberSetArray[1].floatNumber); + } + + @Test + public void testComplexPropertyThree() { + ComplexPropertyBean propBean = propertyService.getComplexPropertyThree(); + assertNotNull(propBean); + assertEquals("TestElementString_1", propBean.stringArray[0]); + assertEquals((float)22, propBean.numberSetArray[1].floatNumber); + } + + @Test + public void testComplexPropertyFour() { + Object[] propBeanCollection = propertyService.getComplexPropertyFour().toArray(); + assertNotNull(propBeanCollection); + assertEquals(1, ((ComplexPropertyBean)propBeanCollection[0]).getIntegerNumber()); + assertEquals(222.222, ((ComplexPropertyBean)propBeanCollection[1]).getDoubleNumber()); + assertEquals(33, ((ComplexPropertyBean)propBeanCollection[2]).getNumberSet().getIntegerNumber()); + } + + @BeforeClass + public static void init() throws Exception { + SCARuntime.start("PropertyTest.composite"); + abService = CurrentCompositeContext.getContext().locateService(ABComponent.class, "ABComponent"); + cdService = CurrentCompositeContext.getContext().locateService(CDComponent.class, "CDComponent"); + abcdService = CurrentCompositeContext.getContext().locateService(ABCDComponent.class, "ABCDComponent"); + propertyService = + CurrentCompositeContext.getContext().locateService(PropertyComponent.class, "PropertyComponent"); + } + + @AfterClass + public static void destroy() throws Exception { + SCARuntime.stop(); + } +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/pom.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/pom.xml new file mode 100644 index 0000000000..74f389f743 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/pom.xml @@ -0,0 +1,34 @@ + + + + + org.apache.tuscany.testing + sca-itest + 0.1-integration-incubating-SNAPSHOT + ../pom.xml + + + 4.0.0 + iTest-spec + ${testing.version} + jar + Test Suite for SCA Spec APIs + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyListService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyListService.java new file mode 100644 index 0000000000..7fe9fa4909 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyListService.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.spec; + +import org.osoa.sca.annotations.Remotable; + +@Remotable +public interface MyListService { + String[] getHolidays(); + + String getYear(); +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyListServiceByYear.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyListServiceByYear.java new file mode 100644 index 0000000000..a381fc62dc --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyListServiceByYear.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.spec; + +import org.osoa.sca.annotations.Remotable; + +@Remotable +public interface MyListServiceByYear { + //FIXME renaming method due to TUSCANY-1173. Original name getHolidays + String[] getHolidaysByYear(int year); +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyService.java new file mode 100644 index 0000000000..fbb2161df3 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyService.java @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.test.spec; + +import java.util.Date; + +public interface MyService extends SCAComponentService { + Date nextHoliday(); + + String getLocation(); + + String getYear(); +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyServiceByDate.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyServiceByDate.java new file mode 100644 index 0000000000..98490c4e3d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyServiceByDate.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.test.spec; + +import java.util.Date; + +import org.osoa.sca.annotations.Remotable; + +@Remotable +public interface MyServiceByDate { + //FIXME renaming method due to TUSCANY-1173. Original name nextHoliday + Date nextHolidayByDate(Date date); +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyTotalService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyTotalService.java new file mode 100644 index 0000000000..6a4cfc1f79 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/MyTotalService.java @@ -0,0 +1,23 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.test.spec; + +public interface MyTotalService extends MyListService, MyListServiceByYear, MyService, MyServiceByDate { + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/SCAComponentService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/SCAComponentService.java new file mode 100644 index 0000000000..2b54ce2740 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/SCAComponentService.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.spec; + +import org.osoa.sca.CompositeContext; + +public interface SCAComponentService { + String getComponentName(); + + CompositeContext getContext(); + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyListServiceImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyListServiceImpl.java new file mode 100644 index 0000000000..5170c32cd2 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyListServiceImpl.java @@ -0,0 +1,73 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.test.spec.impl; + +import java.util.List; + +import org.apache.tuscany.sca.test.spec.MyListService; +import org.apache.tuscany.sca.test.spec.MyListServiceByYear; +import org.osoa.sca.annotations.Property; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + + +@Service(interfaces = {MyListService.class, MyListServiceByYear.class}) +public class MyListServiceImpl implements MyListService, MyListServiceByYear { + + // This is multiplicity=1:n + @Reference(name = "myListServiceList", required = false) + public List myListServicesList; + + // This is multiplicity=0:n + @Reference(name = "myListServiceArray", required = false) + public MyListService[] myListServicesArray; + + @Property(name = "serviceYear") + protected String year = "2006"; + + public String[] getHolidays() { + return getHolidaysByYear(new Integer(year).intValue()); + } + + public String[] getHolidaysByYear(int year) { + MyListService myService; + if (myListServicesList != null) { + for (int i = 0; i < myListServicesList.size(); i++) { + myService = myListServicesList.get(i); + if (new Integer(myService.getYear()).intValue() == year) { + return myService.getHolidays(); + } + } + } + if (myListServicesArray != null) { + for (int i = 0; i < myListServicesArray.length; i++) { + myService = myListServicesArray[i]; + if (new Integer(myService.getYear()).intValue() == year) { + return myService.getHolidays(); + } + } + } + return null; + } + + public String getYear() { + return year; + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyServiceImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyServiceImpl.java new file mode 100644 index 0000000000..7e8575a0a7 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyServiceImpl.java @@ -0,0 +1,122 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.test.spec.impl; + +import java.util.Date; + +import org.apache.tuscany.sca.test.spec.MyListService; +import org.apache.tuscany.sca.test.spec.MyListServiceByYear; +import org.apache.tuscany.sca.test.spec.MyService; +import org.apache.tuscany.sca.test.spec.MyServiceByDate; +import org.osoa.sca.CompositeContext; +import org.osoa.sca.annotations.ComponentName; +import org.osoa.sca.annotations.Context; +import org.osoa.sca.annotations.Destroy; +import org.osoa.sca.annotations.Init; +import org.osoa.sca.annotations.Property; +import org.osoa.sca.annotations.Service; + + +@Service(interfaces = {MyService.class, MyServiceByDate.class, MyListService.class, MyListServiceByYear.class}) +public class MyServiceImpl implements MyService, MyServiceByDate, MyListService, MyListServiceByYear { + static String[][] holidays = + { + {"2006/01/02", "2006/05/29", "2006/07/03", "2006/07/04", "2006/09/04", "2006/11/23", "2006/11/23", + "2006/11/24", "2006/12/25"}, + {"2007/01/01", "2007/05/28", "2007/07/04", "2007/09/03", "2007/11/22", "2007/11/23", "2007/12/25"}}; + + @Property(name = "location") + protected String location = "RTP"; + + @Property(name = "year") + protected String year = "2006"; + + @ComponentName + private String componentName; + + @Context + private CompositeContext context; + + public MyServiceImpl() { + // System.out.println("creating service instance..."); + } + + public Date nextHoliday() { + + return nextHolidayByDate(new Date()); + } + + @SuppressWarnings("deprecation") + public Date nextHolidayByDate(Date today) { + Date d1; + String[] days = getHolidays(); + for (int j = 0; j < days.length; j++) { + d1 = new Date(days[j]); + if (d1.after(today)) + return d1; + } + return null; + } + + public String[] getHolidaysByYear(int year) { + int index = year - 2006; + if (index >= 0 && index < holidays.length) + return holidays[index]; + return null; + } + + public String[] getHolidays() { + + Integer theYear; + if (year == null || year.length() == 0) + theYear = new Integer("2006"); + else + theYear = new Integer(year); + + return getHolidaysByYear(theYear.intValue()); + } + + @Init + public void start() { + // System.out.println("Start service.."); + } + + @Destroy + public void stop() { + // System.out.println("Stop service.."); + + } + + public String getComponentName() { + return componentName; + } + + public CompositeContext getContext() { + return context; + } + + public String getLocation() { + return location; + } + + public String getYear() { + return year; + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyTotalServiceImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyTotalServiceImpl.java new file mode 100644 index 0000000000..9d382341e7 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/java/org/apache/tuscany/sca/test/spec/impl/MyTotalServiceImpl.java @@ -0,0 +1,83 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.test.spec.impl; + +import java.util.Date; + +import org.apache.tuscany.sca.test.spec.MyListService; +import org.apache.tuscany.sca.test.spec.MyListServiceByYear; +import org.apache.tuscany.sca.test.spec.MyService; +import org.apache.tuscany.sca.test.spec.MyServiceByDate; +import org.apache.tuscany.sca.test.spec.MyTotalService; +import org.osoa.sca.CompositeContext; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + + +@Service(MyTotalService.class) +public class MyTotalServiceImpl implements MyTotalService { + + // This is multiplicity=1:1 + @Reference(required = true) + public MyListService myListService; + + // default required==true so it is 1:1 + @Reference + public MyListServiceByYear myListServiceByYear = new MyServiceImpl(); + + // default required==true so it is 1:1 + @Reference + public MyService myService; + + // This is multiplicity=0:1 + @Reference(required = false) + public MyServiceByDate myServiceByDate = new MyServiceImpl(); + + public String[] getHolidays() { + return myListService.getHolidays(); + } + + public String[] getHolidaysByYear(int year) { + return myListServiceByYear.getHolidaysByYear(year); + } + + public String getComponentName() { + return myService.getComponentName(); + } + + public CompositeContext getContext() { + return myService.getContext(); + } + + public Date nextHolidayByDate(Date date) { + return myServiceByDate.nextHolidayByDate(date); + } + + public String getLocation() { + return myService.getLocation(); + } + + public String getYear() { + return myService.getYear(); + } + + public Date nextHoliday() { + return myService.nextHoliday(); + } +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/CompositeTest.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/CompositeTest.composite new file mode 100644 index 0000000000..fdaa23379c --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/CompositeTest.composite @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myListService.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myListService.composite new file mode 100644 index 0000000000..0094d119e7 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myListService.composite @@ -0,0 +1,32 @@ + + + + + + + + + 2007 + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myServiceInComposite.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myServiceInComposite.composite new file mode 100644 index 0000000000..0d689e2c9c --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myServiceInComposite.composite @@ -0,0 +1,53 @@ + + + + + + + MyServiceComponent/MyService + + + + + + MyServiceComponent/MyListService + + + + + + MyServiceComponent/MyListServiceByYear + + + + + + MyServiceComponent/MyServiceByDate + + + + + CARY + 2007 + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myServiceInRecursive.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myServiceInRecursive.composite new file mode 100644 index 0000000000..59341c9f8a --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myServiceInRecursive.composite @@ -0,0 +1,53 @@ + + + + + + + MyServiceInRecursive/MyService + + + + + + MyServiceInRecursive/MyListService + + + + + + MyServiceInRecursive/MyListServiceByYear + + + + + + MyServiceInRecursive/MyServiceByDate + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/mySimpleService.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/mySimpleService.composite new file mode 100644 index 0000000000..65140fced8 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/mySimpleService.composite @@ -0,0 +1,35 @@ + + + + + + + MyServiceComponent/MyService + + + + + CARY + 2007 + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/mySimpleServiceInRecursive.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/mySimpleServiceInRecursive.composite new file mode 100644 index 0000000000..e6925ee7f8 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/mySimpleServiceInRecursive.composite @@ -0,0 +1,48 @@ + + + + + + + MySimpleServiceInRecursive/MyService + + + + + + MySimpleServiceInRecursive/MyService + + + + + MySimpleServiceInRecursive/MyService + + + + + MySimpleServiceInRecursive/MyService + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/mySimpleServiceInRecursive2.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/mySimpleServiceInRecursive2.composite new file mode 100644 index 0000000000..4895691c00 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/mySimpleServiceInRecursive2.composite @@ -0,0 +1,47 @@ + + + + + + + MySimpleServiceInRecursiveComponent/MySimpleService + + + + + MySimpleServiceInRecursiveComponent/MySimpleServiceNo + + + + + MySimpleServiceInRecursiveComponent/MySimpleServiceMay + + + + + MySimpleServiceInRecursiveComponent/MySimpleServiceMust + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalService.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalService.composite new file mode 100644 index 0000000000..d01558cdfe --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalService.composite @@ -0,0 +1,32 @@ + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalServiceInComposite.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalServiceInComposite.composite new file mode 100644 index 0000000000..2359323058 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalServiceInComposite.composite @@ -0,0 +1,43 @@ + + + + + + + MyTotalServiceComponent + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalServiceInCompositeForReferenceOverride.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalServiceInCompositeForReferenceOverride.composite new file mode 100644 index 0000000000..96a8f00740 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalServiceInCompositeForReferenceOverride.composite @@ -0,0 +1,81 @@ + + + + + + + MyTotalServiceComponentNo + + + + + + + + + + + + + + + + + + + MyTotalServiceComponentMay + + + + + + + + + + + + + + + + + + + MyTotalServiceComponentMust + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalServiceInRecursive.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalServiceInRecursive.composite new file mode 100644 index 0000000000..36802c75a6 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalServiceInRecursive.composite @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + MyTotalServiceInCompositeWithRecursive + + + + + MyTotalServiceInCompositeWithComponentService + + + + + + + + + + + + + + + + + CARY + 2007 + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalServiceInRecursiveForReferenceOverride.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalServiceInRecursiveForReferenceOverride.composite new file mode 100644 index 0000000000..4eccde41f4 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myTotalServiceInRecursiveForReferenceOverride.composite @@ -0,0 +1,55 @@ + + + + + + + MyTotalServiceForReferenceComponent/MyTotalServiceNo + + + + + MyTotalServiceForReferenceComponent/MyTotalServiceMay + + + + + MyTotalServiceForReferenceComponent/MyTotalServiceMust + + + + + + + + + + + + + + + CARY + 2007 + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myservice.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myservice.composite new file mode 100644 index 0000000000..1e5f9edbd7 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/main/resources/myservice.composite @@ -0,0 +1,51 @@ + + + + + + + + + + + NC + 2007 + + + + + + + + + + + + + 2006 + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceListTestCase.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceListTestCase.java new file mode 100644 index 0000000000..fe2780ed9d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceListTestCase.java @@ -0,0 +1,53 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.test.spec; + +import junit.framework.TestCase; + +import org.apache.tuscany.api.SCARuntime; +import org.osoa.sca.CompositeContext; +import org.osoa.sca.CurrentCompositeContext; + +public class ComponentServiceReferenceListTestCase extends TestCase { + private MyListService myListService; + private MyListServiceByYear myListServiceByYear; + + private CompositeContext context; + + public void testDefaultProperty() { + assertEquals("2007", myListService.getYear()); + + } + + public void testDefaultService() { + assertEquals(myListService.getHolidays()[0], myListServiceByYear.getHolidaysByYear(2007)[0]); + + } + + protected void setUp() throws Exception { + SCARuntime.start("CompositeTest.composite"); + context = CurrentCompositeContext.getContext(); + myListService = context.locateService(MyListService.class, "MyNewListService"); + myListServiceByYear = context.locateService(MyListServiceByYear.class, "MyNewListService"); + } + + protected void tearDown() throws Exception { + SCARuntime.stop(); + } +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceTestCase.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceTestCase.java new file mode 100644 index 0000000000..087f77c950 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/ComponentServiceReferenceTestCase.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.test.spec; + +import java.util.Date; + +import junit.framework.TestCase; + +import org.apache.tuscany.api.SCARuntime; +import org.osoa.sca.CompositeContext; +import org.osoa.sca.CurrentCompositeContext; +import org.osoa.sca.RequestContext; + +public class ComponentServiceReferenceTestCase extends TestCase { + private MyTotalService myService; + private CompositeContext context; + + public void testDefaultProperty() { + assertEquals("NC", myService.getLocation()); + assertEquals("2007", myService.getYear()); + + } + + public void testDefaultService() { + assertNotSame(myService.nextHoliday(), myService.nextHolidayByDate(new Date())); + assertEquals(myService.getHolidays()[0], myService.getHolidaysByYear(2007)[0]); + + } + + public void testContext() { + //FIXME TUSCANY-1174 - Need support for @ComponentName + /* + assertNotNull("Service component name is null", myService.getComponentName()); + assertNotNull("service context is null", myService.getContext()); + + System.out.println("Service component name :" + myService.getComponentName()); + System.out.println("service context :" + myService.getContext()); + + test(context); + */ + } + + private void test(CompositeContext context) { + assertNotNull("composite name is null", context.getName()); + assertNotNull("composite URI is null", context.getURI()); + + System.out.println("composite name :" + context.getName()); + System.out.println("composite URI:" + context.getURI()); + + if (context.getRequestContext() == null) + System.out.println("Request context:" + context.getRequestContext()); + else + display(context.getRequestContext()); + } + + private void display(RequestContext context) { + System.out.println("\tService name:" + context.getServiceName()); + System.out.println("\tSecurity subject:" + context.getSecuritySubject()); + //System.out.println("\tService reference:" + context.getServiceReference()); + + } + + protected void setUp() throws Exception { + SCARuntime.start("CompositeTest.composite"); + context = CurrentCompositeContext.getContext(); + myService = context.locateService(MyTotalService.class, "MyTotalService"); + } + + protected void tearDown() throws Exception { + SCARuntime.stop(); + } +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/ComponentTestCase.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/ComponentTestCase.java new file mode 100644 index 0000000000..ca3ed8051d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/ComponentTestCase.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.spec; + +import java.util.Date; + +import junit.framework.TestCase; + +import org.apache.tuscany.api.SCARuntime; +import org.osoa.sca.CompositeContext; +import org.osoa.sca.CurrentCompositeContext; +import org.osoa.sca.RequestContext; + +public class ComponentTestCase extends TestCase { + private MyService myService; + private MyServiceByDate myServiceByDate; + private MyListService myListService; + private MyListServiceByYear myListServiceByYear; + private MyService myNCService; + private MyListService myListServiceFor2006; + + private CompositeContext context; + + public void testDefaultProperty() { + assertEquals("RTP", myService.getLocation()); + assertEquals("2006", myService.getYear()); + + } + + public void testDefaultService() { + assertEquals(myService.nextHoliday(), myServiceByDate.nextHolidayByDate(new Date())); + assertEquals(myListService.getHolidays()[0], myListServiceByYear.getHolidaysByYear(2006)[0]); + + } + + public void testOverrideProperty() { + assertEquals("NC", myNCService.getLocation()); + assertEquals("2007", myNCService.getYear()); + } + + public void testServiceWithOverrideProperty() { + assertFalse(myNCService.nextHoliday() == myService.nextHoliday()); + assertEquals(myListServiceFor2006.getHolidays()[0], myListServiceByYear.getHolidaysByYear(2006)[0]); + + } + + public void testContext() { + //FIXME TUSCANY-1174 - Need support for @ComponentName + /* + assertNotNull("Service component name is null", myService.getComponentName()); + assertNotNull("service context is null", myService.getContext()); + + System.out.println("Service component name :" + myService.getComponentName()); + System.out.println("service context :" + myService.getContext()); + + test(context); + */ + } + + private void test(CompositeContext context) { + assertNotNull("composite name is null", context.getName()); + assertNotNull("composite URI is null", context.getURI()); + + System.out.println("composite name :" + context.getName()); + System.out.println("composite URI:" + context.getURI()); + + if (context.getRequestContext() == null) + System.out.println("Request context:" + context.getRequestContext()); + else + display(context.getRequestContext()); + } + + private void display(RequestContext context) { + System.out.println("\tService name:" + context.getServiceName()); + System.out.println("\tSecurity subject:" + context.getSecuritySubject()); + //System.out.println("\tService reference:" + (Object)context.getServiceReference()); + + } + + protected void setUp() throws Exception { + SCARuntime.start("CompositeTest.composite"); + context = CurrentCompositeContext.getContext(); + myService = context.locateService(MyService.class, "MyService"); + myServiceByDate = context.locateService(MyServiceByDate.class, "MyServiceByDate"); + myListService = context.locateService(MyListService.class, "MyListService"); + myListServiceByYear = context.locateService(MyListServiceByYear.class, "MyListServiceByYear"); + myNCService = context.locateService(MyService.class, "MyNCService"); + myListServiceFor2006 = context.locateService(MyListService.class, "MyListServiceFor2006"); + } + + protected void tearDown() throws Exception { + SCARuntime.stop(); + } +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/CompositeOneService2LevelTestCase.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/CompositeOneService2LevelTestCase.java new file mode 100644 index 0000000000..ad89590600 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/CompositeOneService2LevelTestCase.java @@ -0,0 +1,191 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * 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.spec; + +import junit.extensions.TestSetup; +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +import org.apache.tuscany.api.SCARuntime; +import org.osoa.sca.CompositeContext; +import org.osoa.sca.CurrentCompositeContext; +import org.osoa.sca.RequestContext; + +@SuppressWarnings("deprecation") +public class CompositeOneService2LevelTestCase extends TestCase { + private static MyService myService; + private static MyService myServiceDefault; + private static MyService myServiceNo; + private static MyService myServiceMay; + private static MyService myServiceMust; + + static private CompositeContext context; + + public static Test suite() { + + TestSuite suite = new TestSuite(); + + suite.addTestSuite(CompositeOneService2LevelTestCase.class); + TestSetup wrapper = new TestSetup(suite) { + public void setUp() { + setupStatic(); + } + + public void tearDown() { + tearDownStatic(); + } + + }; + return wrapper; + } + + public static void setupStatic() { + if (null != context) + return; + SCARuntime.start("CompositeTest.composite"); + context = CurrentCompositeContext.getContext(); + assertNotNull(context); + myService = context.locateService(MyService.class, "MySimpleServiceInRecursiveComponent/MySimpleService"); + myServiceDefault = context.locateService(MyService.class, "MySimpleServiceDefault"); + myServiceNo = context.locateService(MyService.class, "MySimpleServiceNo"); + myServiceMay = context.locateService(MyService.class, "MySimpleServiceMay"); + myServiceMust = context.locateService(MyService.class, "MySimpleServiceMust"); + + } + + public static void tearDownStatic() { + if (context != null) { + + context = null; + SCARuntime.stop(); + } + } + + public void setUp() { + setupStatic(); + } + + static Object foo = new Object() { + public void finalize() throws Throwable { + foo = null; + tearDownStatic(); + } + + }; + + public void testPropertyFromComponent() { + + assertNotNull(myService); + assertEquals("CARY", myService.getLocation()); + assertEquals("2007", myService.getYear()); + + } + + public void testPropertyFromServiceDefault() { + + assertNotNull(myServiceDefault); + assertEquals("CARY", myServiceDefault.getLocation()); + assertEquals("2007", myServiceDefault.getYear()); + + } + + public void testServiceDefault() { + + assertNotNull(myService); + assertEquals(myService.nextHoliday(), myServiceDefault.nextHoliday()); + } + + public void testPropertyFromServiceNo() { + + assertNotNull(myServiceNo); + assertEquals("CARY", myServiceNo.getLocation()); + assertEquals("2007", myServiceNo.getYear()); + + } + + public void testServiceNo() { + + assertNotNull(myService); + assertEquals(myService.nextHoliday(), myServiceNo.nextHoliday()); + } + + public void testPropertyFromServiceMay() { + + assertNotNull(myServiceMay); + assertEquals("CARY", myServiceMay.getLocation()); + assertEquals("2007", myServiceMay.getYear()); + + } + + public void testServiceMay() { + + assertNotNull(myService); + assertEquals(myService.nextHoliday(), myServiceMay.nextHoliday()); + } + + public void testPropertyFromServiceMust() { + + assertNotNull(myServiceMust); + assertEquals("CARY", myServiceMust.getLocation()); + assertEquals("2007", myServiceMust.getYear()); + + } + + public void testServiceMust() { + + assertNotNull(myService); + assertEquals(myService.nextHoliday(), myServiceMust.nextHoliday()); + } + + public void testContext() { + // FIXME TUSCANY-1174 - Need support for @ComponentName + /* + * assertNotNull("Service component name is null", + * myService.getComponentName()); assertNotNull("service context is + * null", myService.getContext()); System.out.println("Service component + * name :" + myService.getComponentName()); System.out.println("service + * context :" + myService.getContext()); test(context); + */ + } + + private void test(CompositeContext context) { + + assertNotNull("composite name is null", context.getName()); + assertNotNull("composite URI is null", context.getURI()); + + System.out.println("composite name :" + context.getName()); + System.out.println("composite URI:" + context.getURI()); + + if (context.getRequestContext() == null) + System.out.println("Request context:" + context.getRequestContext()); + else + display(context.getRequestContext()); + } + + private void display(RequestContext context) { + System.out.println("\tService name:" + context.getServiceName()); + System.out.println("\tSecurity subject:" + context.getSecuritySubject()); + // System.out.println("\tService reference:" + + // (Object)context.getServiceReference()); + + } + + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/CompositeOneServiceTestCase.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/CompositeOneServiceTestCase.java new file mode 100644 index 0000000000..1b41672700 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/CompositeOneServiceTestCase.java @@ -0,0 +1,84 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.test.spec; + +import junit.framework.TestCase; + +import org.apache.tuscany.api.SCARuntime; +import org.osoa.sca.CompositeContext; +import org.osoa.sca.CurrentCompositeContext; +import org.osoa.sca.RequestContext; + +public class CompositeOneServiceTestCase extends TestCase { + private MyService myService; + private CompositeContext context; + + public void testOverrideProperty() { + assertEquals("CARY", myService.getLocation()); + assertEquals("2007", myService.getYear()); + + } + + public void testDefaultService() { + assertNotNull(myService.nextHoliday()); + } + + public void testContext() { + //FIXME TUSCANY-1174 - Need support for @ComponentName + /* + assertNotNull("Service component name is null", myService.getComponentName()); + assertNotNull("service context is null", myService.getContext()); + + System.out.println("Service component name :" + myService.getComponentName()); + System.out.println("service context :" + myService.getContext()); + + test(context); + */ + } + + private void test(CompositeContext context) { + assertNotNull("composite name is null", context.getName()); + assertNotNull("composite URI is null", context.getURI()); + + System.out.println("composite name :" + context.getName()); + System.out.println("composite URI:" + context.getURI()); + + if (context.getRequestContext() == null) + System.out.println("Request context:" + context.getRequestContext()); + else + display(context.getRequestContext()); + } + + private void display(RequestContext context) { + System.out.println("\tService name:" + context.getServiceName()); + System.out.println("\tSecurity subject:" + context.getSecuritySubject()); + //System.out.println("\tService reference:" + context.getServiceReference()); + + } + + protected void setUp() throws Exception { + SCARuntime.start("CompositeTest.composite"); + context = CurrentCompositeContext.getContext(); + myService = context.locateService(MyService.class, "MySimpleServiceInRecursive"); + } + + protected void tearDown() throws Exception { + SCARuntime.stop(); + } +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/CompositeServiceReferenceForRefOverrideTestCase.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/CompositeServiceReferenceForRefOverrideTestCase.java new file mode 100644 index 0000000000..7023d7981c --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/CompositeServiceReferenceForRefOverrideTestCase.java @@ -0,0 +1,83 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.test.spec; + +import java.util.Date; + +import junit.framework.TestCase; + +import org.apache.tuscany.api.SCARuntime; +import org.osoa.sca.CompositeContext; +import org.osoa.sca.CurrentCompositeContext; + +public class CompositeServiceReferenceForRefOverrideTestCase extends TestCase { + private MyTotalService myService1; + private MyTotalService myService2; + private MyTotalService myService3; + private CompositeContext context; + + public void testPropertyWithServiceFromReferenceNo() { + assertEquals("CARY", myService1.getLocation()); + assertEquals("2007", myService1.getYear()); + } + + public void testPropertyWithServiceFromReferenceMay() { + assertEquals("CARY", myService2.getLocation()); + assertEquals("2007", myService2.getYear()); + + } + + public void testPropertyWithServiceFromReferenceMust() { + assertEquals("CARY", myService3.getLocation()); + assertEquals("2007", myService3.getYear()); + } + + public void testServiceFromReferenceNo() { + System.out.println("nextHolday()" + myService1.nextHoliday()); + System.out.println("nextHolday(Date)" + myService1.nextHolidayByDate(new Date())); + System.out.println("myService1.getHolidays()[0]" + myService1.getHolidays()[0]); + System.out.println("myService1.getHolidays(2007)[0]" + myService1.getHolidaysByYear(2007)[0]); + assertNotSame(myService1.nextHoliday(), myService1.nextHolidayByDate(new Date())); + assertEquals(myService1.getHolidays()[0], myService1.getHolidaysByYear(2007)[0]); + } + + public void testServiceFromReferenceMay() { + assertEquals(myService2.getHolidays()[0], myService2.getHolidaysByYear(2007)[0]); + assertNotSame(myService2.nextHoliday(), myService2.nextHolidayByDate(new Date())); + + } + + public void testServiceFromReferenceMust() { + assertEquals(myService3.getHolidays()[0], myService3.getHolidaysByYear(2007)[0]); + assertNotSame(myService3.nextHoliday(), myService3.nextHolidayByDate(new Date())); + + } + + protected void setUp() throws Exception { + SCARuntime.start("CompositeTest.composite"); + context = CurrentCompositeContext.getContext(); + myService1 = context.locateService(MyTotalService.class, "MyTotalServiceNo"); + myService2 = context.locateService(MyTotalService.class, "MyTotalServiceMay"); + myService3 = context.locateService(MyTotalService.class, "MyTotalServiceMust"); + } + + protected void tearDown() throws Exception { + SCARuntime.stop(); + } +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/CompositeServiceReferenceTestCase.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/CompositeServiceReferenceTestCase.java new file mode 100644 index 0000000000..6128d108ba --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/CompositeServiceReferenceTestCase.java @@ -0,0 +1,95 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.test.spec; + +import java.util.Date; + +import junit.framework.TestCase; + +import org.apache.tuscany.api.SCARuntime; +import org.osoa.sca.CompositeContext; +import org.osoa.sca.CurrentCompositeContext; + +public class CompositeServiceReferenceTestCase extends TestCase { + private MyTotalService myService1; + private MyTotalService myService2; + private MyTotalService myService3; + private MyTotalService myService4; + private MyTotalService myService5; + private CompositeContext context; + + public void testPropertyWithServiceFromRecursive() { + assertEquals("CARY", myService1.getLocation()); + assertEquals("2007", myService1.getYear()); + } + + public void testPropertyWithServiceInCompositeFromRecursive() { + assertEquals("CARY", myService2.getLocation()); + assertEquals("2007", myService2.getYear()); + + } + + public void testPropertyWithServiceInCompositeFromComponent() { + assertEquals("CARY", myService3.getLocation()); + assertEquals("2007", myService3.getYear()); + } + + public void testServiceFromRecursive() { + assertNotSame(myService1.nextHoliday(), myService1.nextHolidayByDate(new Date())); + assertEquals(myService1.getHolidays()[0], myService1.getHolidaysByYear(2007)[0]); + + } + + public void testServiceReferenceFromRecursive() { + assertEquals(myService2.getHolidays()[0], myService2.getHolidaysByYear(2007)[0]); + assertNotSame(myService2.nextHoliday(), myService2.nextHolidayByDate(new Date())); + + } + + public void testServiceReferenceFromRecursiveUseService() { + assertNotSame(myService4.nextHoliday(), myService4.nextHolidayByDate(new Date())); + assertEquals(myService4.getHolidays()[0], myService4.getHolidaysByYear(2007)[0]); + } + + public void testServiceReferenceFromComponent() { + assertEquals(myService3.getHolidays()[0], myService3.getHolidaysByYear(2007)[0]); + assertNotSame(myService3.nextHoliday(), myService3.nextHolidayByDate(new Date())); + + } + + public void testServiceReferenceFromComponentUseService() { + assertNotSame(myService5.nextHoliday(), myService5.nextHolidayByDate(new Date())); + assertEquals(myService5.getHolidays()[0], myService5.getHolidaysByYear(2007)[0]); + } + + protected void setUp() throws Exception { + SCARuntime.start("CompositeTest.composite"); + context = CurrentCompositeContext.getContext(); + myService1 = context.locateService(MyTotalService.class, "MyTotalServiceFromRecursive"); + myService2 = context.locateService(MyTotalService.class, "MyTotalServiceInCompositeWithRecursive"); + myService3 = context.locateService(MyTotalService.class, "MyTotalServiceInCompositeWithComponentService"); + myService4 = context.locateService(MyTotalService.class, "MyTotalServiceInCompositeWithRecursiveUseService"); + myService5 = + context.locateService(MyTotalService.class, "MyTotalServiceInCompositeWithComponentServiceUseService"); + } + + protected void tearDown() throws Exception { + SCARuntime.stop(); + } +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/CompositeTestCase.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/CompositeTestCase.java new file mode 100644 index 0000000000..7c50a90e60 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/spec/src/test/java/org/apache/tuscany/sca/test/spec/CompositeTestCase.java @@ -0,0 +1,96 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.test.spec; + +import java.util.Date; + +import junit.framework.TestCase; + +import org.apache.tuscany.api.SCARuntime; +import org.osoa.sca.CompositeContext; +import org.osoa.sca.CurrentCompositeContext; +import org.osoa.sca.RequestContext; + +public class CompositeTestCase extends TestCase { + private MyService myService; + private MyServiceByDate myServiceByDate; + private MyListService myListService; + private MyListServiceByYear myListServiceByYear; + + private CompositeContext context; + + public void testOverrideProperty() { + assertEquals("CARY", myService.getLocation()); + assertEquals("2007", myService.getYear()); + + } + + public void testDefaultService() { + assertEquals(myService.nextHoliday(), myServiceByDate.nextHolidayByDate(new Date())); + assertEquals(myListService.getHolidays()[0], myListServiceByYear.getHolidaysByYear(2007)[0]); + + } + + public void testContext() { + //FIXME TUSCANY-1174 - Need support for @ComponentName + /* + assertNotNull("Service component name is null", myService.getComponentName()); + assertNotNull("service context is null", myService.getContext()); + + System.out.println("Service component name :" + myService.getComponentName()); + System.out.println("service context :" + myService.getContext()); + + test(context); + */ + } + + private void test(CompositeContext context) { + assertNotNull("composite name is null", context.getName()); + assertNotNull("composite URI is null", context.getURI()); + + System.out.println("composite name :" + context.getName()); + System.out.println("composite URI:" + context.getURI()); + + if (context.getRequestContext() == null) + System.out.println("Request context:" + context.getRequestContext()); + else + display(context.getRequestContext()); + } + + private void display(RequestContext context) { + System.out.println("\tService name:" + context.getServiceName()); + System.out.println("\tSecurity subject:" + context.getSecuritySubject()); + //System.out.println("\tService reference:" + (Object)context.getServiceReference()); + + } + + protected void setUp() throws Exception { + SCARuntime.start("CompositeTest.composite"); + context = CurrentCompositeContext.getContext(); + myService = context.locateService(MyService.class, "MyServiceInRecursiveMyService"); + myServiceByDate = context.locateService(MyServiceByDate.class, "MyServiceInRecursiveMyServiceByDate"); + myListService = context.locateService(MyListService.class, "MyServiceInRecursiveMyListService"); + myListServiceByYear = + context.locateService(MyListServiceByYear.class, "MyServiceInRecursiveMyListServiceByYear"); + } + + protected void tearDown() throws Exception { + SCARuntime.stop(); + } +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/pom.xml b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/pom.xml new file mode 100644 index 0000000000..49e697a0c2 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/pom.xml @@ -0,0 +1,135 @@ + + + + + org.apache.tuscany.testing + sca-itest + 0.1-integration-incubating-SNAPSHOT + ../pom.xml + + + 4.0.0 + org.apache.tuscany.testing + iTest-wsdl + ${testing.version} + jar + Test Suite for SCA WSDL IDL + + + + org.apache.tuscany.sca.kernel + tuscany-api + compile + 0.1-integration-incubating-SNAPSHOT + + + org.apache.tuscany.sca.kernel + tuscany-core + 0.1-integration-incubating-SNAPSHOT + runtime + + + org.apache.tuscany.sca.services.idl + tuscany-wsdl + 0.1-integration-incubating-SNAPSHOT + runtime + + + org.apache.tuscany.sca.extensions.axis2 + tuscany-axis2 + runtime + 0.1-integration-incubating-SNAPSHOT + + + org.apache.tuscany.sca.services + tuscany-http-jetty + runtime + 0.1-integration-incubating-SNAPSHOT + + + org.apache.tuscany.sdo + tuscany-sdo-impl + ${sdo.version} + compile + + + org.apache.tuscany.sca.services.databinding + databinding-sdo + ${scaKernelVersion} + + + org.apache.tuscany.sca.extensions.axis2 + databinding-axiom + ${scaKernelVersion} + + + junit + junit + 4.2 + test + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.0 + + + add-source + generate-sources + + add-source + + + + target/sdo-source + + + + + + + org.apache.tuscany.sdo + tuscany-sdo-plugin + 1.0-incubator-SNAPSHOT + + + generate-sdo + generate-sources + + ${basedir}/src/main/resources/wsdl/AccountService.wsdl + com.bigbank.account + Account + true + true + true + + + generate + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/AccountDataService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/AccountDataService.java new file mode 100644 index 0000000000..501d43734c --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/AccountDataService.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 bigbank.account.services.accountdata; + +import org.apache.tuscany.api.annotation.DataType; +import org.osoa.sca.annotations.AllowsPassByReference; +import org.osoa.sca.annotations.Remotable; + +@Remotable +@DataType(name="commonj.sdo.DataObject") +@AllowsPassByReference +public interface AccountDataService { + + /** + * Auto generated method signatures + * + * @param param0* + * @param param1* + * @param param2 + */ + public com.bigbank.account.StockSummary purchaseStock(int param0, com.bigbank.account.StockSummary parm1) throws java.rmi.RemoteException; + + /** + * Auto generated method signatures + * + * @param param4 + */ + public com.bigbank.account.CustomerProfileData getCustomerProfile(java.lang.String param4) throws java.rmi.RemoteException; + + /** + * Auto generated method signatures + * + * @param param6* + * @param param7 + */ + public float deposit(java.lang.String param6, float param7) throws java.rmi.RemoteException; + + /** + * Auto generated method signatures + * + * @param param9* + * @param param10* + * @param param11 + */ + @DataType(name = "commonj.sdo.DataObject") + public com.bigbank.account.CustomerProfileData createAccount(com.bigbank.account.CustomerProfileData param9, boolean param10, boolean param11) + throws java.rmi.RemoteException; + + /** + * Auto generated method signatures + * + * @param param13* + * @param param14 + */ + public com.bigbank.account.StockSummary sellStock(int param13, int param14) throws java.rmi.RemoteException; + + /** + * Auto generated method signatures + * + * @param param16* + * @param param17 + */ + public float withdraw(java.lang.String param16, float param17) throws java.rmi.RemoteException; + + /** + * Auto generated method signatures + * + * @param param19 + */ + public com.bigbank.account.AccountReport getAccountReport(int param19) throws java.rmi.RemoteException; + + /** + * Auto generated method signatures + * + * @param param0 + */ + public com.bigbank.account.AccountLog getAccountLog(int param0) throws java.rmi.RemoteException; + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/AccountDataServiceImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/AccountDataServiceImpl.java new file mode 100644 index 0000000000..32f77eb61a --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/AccountDataServiceImpl.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 bigbank.account.services.accountdata; + +import java.rmi.RemoteException; + +import org.osoa.sca.annotations.Service; + +import com.bigbank.account.AccountFactory; +import com.bigbank.account.AccountLog; +import com.bigbank.account.AccountReport; +import com.bigbank.account.CustomerProfileData; +import com.bigbank.account.StockSummary; + +@Service(AccountDataService.class) +public class AccountDataServiceImpl implements AccountDataService { + + public CustomerProfileData getCustomerProfile(String logonID) throws RemoteException { + // TODO Auto-generated method stub + return null; + } + + public AccountReport getAccountReport(int customerID) { + // TODO Auto-generated method stub + return null; + } + + public CustomerProfileData createAccount(CustomerProfileData customerProfile, boolean createSavings, boolean createCheckings) + throws RemoteException { + CustomerProfileData data = AccountFactory.INSTANCE.createCustomerProfileData(); + data.setLoginID(customerProfile.getLoginID()); + data.setAddress(customerProfile.getAddress()); + data.setEmail(customerProfile.getEmail()); + data.setFirstName(customerProfile.getFirstName()); + data.setId(customerProfile.getId()); + data.setLastName(customerProfile.getLastName()); + data.setPassword(customerProfile.getPassword()); + return data; + } + + public float deposit(String param6, float param7) throws RemoteException { + // TODO Auto-generated method stub + return 0; + } + + public StockSummary purchaseStock(int param0, StockSummary stock) throws RemoteException { + // TODO Auto-generated method stub + return null; + } + + public StockSummary sellStock(int param13, int param14) throws RemoteException { + // TODO Auto-generated method stub + return null; + } + + public float withdraw(String param16, float param17) throws RemoteException { + // TODO Auto-generated method stub + return 0; + } + + public AccountLog getAccountLog(final int customerID) throws RemoteException { + throw new RemoteException("This method should not be called"); + } +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/AccountServiceClientImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/AccountServiceClientImpl.java new file mode 100644 index 0000000000..d53b26cd04 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/AccountServiceClientImpl.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 bigbank.account.services.accountdata; + +import java.rmi.RemoteException; + +import org.apache.tuscany.api.annotation.DataType; +import org.osoa.sca.annotations.Reference; + +import com.bigbank.account.AccountLog; +import com.bigbank.account.AccountReport; +import com.bigbank.account.CustomerProfileData; +import com.bigbank.account.StockSummary; + +public class AccountServiceClientImpl implements AccountDataService { + + AccountDataService accountService; + + @Reference + public void setAccountService(AccountDataService accountService) { + this.accountService = accountService; + } + + public CustomerProfileData createAccount(CustomerProfileData param9, boolean param10, boolean param11) throws RemoteException { + return accountService.createAccount(param9, param10, param11); + } + + public float deposit(String param6, float param7) throws RemoteException { + // TODO Auto-generated method stub + return 0; + } + + public AccountLog getAccountLog(int param0) throws RemoteException { + // TODO Auto-generated method stub + return null; + } + + public AccountReport getAccountReport(int param19) throws RemoteException { + // TODO Auto-generated method stub + return null; + } + + public CustomerProfileData getCustomerProfile(String param4) throws RemoteException { + // TODO Auto-generated method stub + return null; + } + + public StockSummary purchaseStock(int param0, StockSummary parm1) throws RemoteException { + // TODO Auto-generated method stub + return null; + } + + public StockSummary sellStock(int param13, int param14) throws RemoteException { + // TODO Auto-generated method stub + return null; + } + + public float withdraw(String param16, float param17) throws RemoteException { + // TODO Auto-generated method stub + return 0; + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/Component2aImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/Component2aImpl.java new file mode 100644 index 0000000000..b60b2b9b7b --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/Component2aImpl.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 bigbank.account.services.accountdata; + +import java.rmi.RemoteException; + +import org.apache.tuscany.api.annotation.DataType; +import org.osoa.sca.annotations.Reference; + +import com.bigbank.account.AccountLog; +import com.bigbank.account.AccountReport; +import com.bigbank.account.CustomerProfileData; +import com.bigbank.account.StockSummary; + +public class Component2aImpl implements AccountDataService { + + AccountDataService accountService; + + @Reference + public void setAccountService(AccountDataService accountService) { + this.accountService = accountService; + } + + public CustomerProfileData createAccount(CustomerProfileData param9, boolean param10, boolean param11) throws RemoteException { + return accountService.createAccount(param9, param10, param11); + } + + public float deposit(String param6, float param7) throws RemoteException { + // TODO Auto-generated method stub + return 0; + } + + public AccountLog getAccountLog(int param0) throws RemoteException { + // TODO Auto-generated method stub + return null; + } + + public AccountReport getAccountReport(int param19) throws RemoteException { + // TODO Auto-generated method stub + return null; + } + + public CustomerProfileData getCustomerProfile(String param4) throws RemoteException { + // TODO Auto-generated method stub + return null; + } + + public StockSummary purchaseStock(int param0, StockSummary parm1) throws RemoteException { + // TODO Auto-generated method stub + return null; + } + + public StockSummary sellStock(int param13, int param14) throws RemoteException { + // TODO Auto-generated method stub + return null; + } + + public float withdraw(String param16, float param17) throws RemoteException { + // TODO Auto-generated method stub + return 0; + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/Component2bImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/Component2bImpl.java new file mode 100644 index 0000000000..0898bbf7a5 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/Component2bImpl.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 bigbank.account.services.accountdata; + +import java.rmi.RemoteException; + +import org.apache.tuscany.api.annotation.DataType; +import org.osoa.sca.annotations.Reference; + +import com.bigbank.account.AccountLog; +import com.bigbank.account.AccountReport; +import com.bigbank.account.CustomerProfileData; +import com.bigbank.account.StockSummary; + +public class Component2bImpl implements AccountDataService { + + AccountDataService accountService; + + @Reference + public void setAccountService(AccountDataService accountService) { + this.accountService = accountService; + } + + public CustomerProfileData createAccount(CustomerProfileData param9, boolean param10, boolean param11) throws RemoteException { + return accountService.createAccount(param9, param10, param11); + } + + public float deposit(String param6, float param7) throws RemoteException { + // TODO Auto-generated method stub + return 0; + } + + public AccountLog getAccountLog(int param0) throws RemoteException { + // TODO Auto-generated method stub + return null; + } + + public AccountReport getAccountReport(int param19) throws RemoteException { + // TODO Auto-generated method stub + return null; + } + + public CustomerProfileData getCustomerProfile(String param4) throws RemoteException { + // TODO Auto-generated method stub + return null; + } + + public StockSummary purchaseStock(int param0, StockSummary parm1) throws RemoteException { + // TODO Auto-generated method stub + return null; + } + + public StockSummary sellStock(int param13, int param14) throws RemoteException { + // TODO Auto-generated method stub + return null; + } + + public float withdraw(String param16, float param17) throws RemoteException { + // TODO Auto-generated method stub + return 0; + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/Component3aImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/Component3aImpl.java new file mode 100644 index 0000000000..6073ce75b1 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/Component3aImpl.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 bigbank.account.services.accountdata; + +import java.rmi.RemoteException; + +import org.apache.tuscany.api.annotation.DataType; +import org.osoa.sca.annotations.Reference; + +import com.bigbank.account.AccountLog; +import com.bigbank.account.AccountReport; +import com.bigbank.account.CustomerProfileData; +import com.bigbank.account.StockSummary; + +public class Component3aImpl implements AccountDataService { + + AccountDataService accountService; + + @Reference + public void setAccountService(AccountDataService accountService) { + this.accountService = accountService; + } + + public CustomerProfileData createAccount(CustomerProfileData param9, boolean param10, boolean param11) throws RemoteException { + return accountService.createAccount(param9, param10, param11); + } + + public float deposit(String param6, float param7) throws RemoteException { + // TODO Auto-generated method stub + return 0; + } + + public AccountLog getAccountLog(int param0) throws RemoteException { + // TODO Auto-generated method stub + return null; + } + + public AccountReport getAccountReport(int param19) throws RemoteException { + // TODO Auto-generated method stub + return null; + } + + public CustomerProfileData getCustomerProfile(String param4) throws RemoteException { + // TODO Auto-generated method stub + return null; + } + + public StockSummary purchaseStock(int param0, StockSummary parm1) throws RemoteException { + // TODO Auto-generated method stub + return null; + } + + public StockSummary sellStock(int param13, int param14) throws RemoteException { + // TODO Auto-generated method stub + return null; + } + + public float withdraw(String param16, float param17) throws RemoteException { + // TODO Auto-generated method stub + return 0; + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/Component3bImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/Component3bImpl.java new file mode 100644 index 0000000000..81d6e0a5f6 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/Component3bImpl.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 bigbank.account.services.accountdata; + +import java.rmi.RemoteException; + +import org.apache.tuscany.api.annotation.DataType; +import org.osoa.sca.annotations.Reference; + +import com.bigbank.account.AccountLog; +import com.bigbank.account.AccountReport; +import com.bigbank.account.CustomerProfileData; +import com.bigbank.account.StockSummary; + +public class Component3bImpl implements AccountDataService { + + AccountDataService accountService; + + @Reference + public void setAccountService(AccountDataService accountService) { + this.accountService = accountService; + } + + public CustomerProfileData createAccount(CustomerProfileData param9, boolean param10, boolean param11) throws RemoteException { + return accountService.createAccount(param9, param10, param11); + } + + public float deposit(String param6, float param7) throws RemoteException { + // TODO Auto-generated method stub + return 0; + } + + public AccountLog getAccountLog(int param0) throws RemoteException { + // TODO Auto-generated method stub + return null; + } + + public AccountReport getAccountReport(int param19) throws RemoteException { + // TODO Auto-generated method stub + return null; + } + + public CustomerProfileData getCustomerProfile(String param4) throws RemoteException { + // TODO Auto-generated method stub + return null; + } + + public StockSummary purchaseStock(int param0, StockSummary parm1) throws RemoteException { + // TODO Auto-generated method stub + return null; + } + + public StockSummary sellStock(int param13, int param14) throws RemoteException { + // TODO Auto-generated method stub + return null; + } + + public float withdraw(String param16, float param17) throws RemoteException { + // TODO Auto-generated method stub + return 0; + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/CustomerIdService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/CustomerIdService.java new file mode 100644 index 0000000000..e747eb041f --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/bigbank/account/services/accountdata/CustomerIdService.java @@ -0,0 +1,98 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package bigbank.account.services.accountdata; + +import java.rmi.RemoteException; + +/** + * This interface allows access to a customer's id from the data service. + */ +public interface CustomerIdService { + + /* + * Return -1 if purchaseLotNumber not found + */ + public int getCustomerIdByPurchaseLotNumber(int purchaseLotNumber) throws RemoteException; + + /* + * Return -1 if account not found + */ + public int getCustomerIdByAccount(String account) throws RemoteException; + + // TODO (isilval) Fix this !!! + // Apparently, configuration can't deal with extends so I am adding the contents of AccountDataService here + + /** + * Auto generated method signatures + * + * @param param0* + * @param param1* + * @param param2 + */ + public com.bigbank.account.StockSummary purchaseStock(int param0, com.bigbank.account.StockSummary parm1) throws java.rmi.RemoteException; + + /** + * Auto generated method signatures + * + * @param param4 + */ + public com.bigbank.account.CustomerProfileData getCustomerProfile(java.lang.String param4) throws java.rmi.RemoteException; + + /** + * Auto generated method signatures + * + * @param param6* + * @param param7 + */ + public float deposit(java.lang.String param6, float param7) throws java.rmi.RemoteException; + + /** + * Auto generated method signatures + * + * @param param9* + * @param param10* + * @param param11 + */ + public com.bigbank.account.CustomerProfileData createAccount(com.bigbank.account.CustomerProfileData param9, boolean param10, boolean param11) + throws java.rmi.RemoteException; + + /** + * Auto generated method signatures + * + * @param param13* + * @param param14 + */ + public com.bigbank.account.StockSummary sellStock(int param13, int param14) throws java.rmi.RemoteException; + + /** + * Auto generated method signatures + * + * @param param16* + * @param param17 + */ + public float withdraw(java.lang.String param16, float param17) throws java.rmi.RemoteException; + + /** + * Auto generated method signatures + * + * @param param19 + */ + public com.bigbank.account.AccountReport getAccountReport(int param19) throws java.rmi.RemoteException; + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/helloworld/HelloWorldImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/helloworld/HelloWorldImpl.java new file mode 100644 index 0000000000..c9076ebba6 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/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 "Hi " + name; + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/helloworld/HelloWorldService.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/helloworld/HelloWorldService.java new file mode 100644 index 0000000000..bd527ff8e2 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/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/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/helloworld/HelloWorldServiceComponent.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/helloworld/HelloWorldServiceComponent.java new file mode 100644 index 0000000000..d706517b76 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/helloworld/HelloWorldServiceComponent.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 helloworld; + +import org.osoa.sca.annotations.Scope; + +/** + * This client program shows how to create an SCA runtime, start it, + * locate the HelloWorld service and invoke it. + */ +@Scope("COMPOSITE") +public class HelloWorldServiceComponent implements HelloWorldService { + + HelloWorldService helloWorldService; + + public String getGreetings(String name) { + return helloWorldService.getGreetings(name); + } + + public HelloWorldService getHelloWorldService() { + return helloWorldService; + } + + public void setHelloWorldService(HelloWorldService helloWorldService) { + this.helloWorldService = helloWorldService; + } +} \ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/org/apache/tuscany/sca/itest/Component2aImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/org/apache/tuscany/sca/itest/Component2aImpl.java new file mode 100644 index 0000000000..9d147dc013 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/org/apache/tuscany/sca/itest/Component2aImpl.java @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest; + +import helloworld.HelloWorldService; + +import org.osoa.sca.annotations.Reference; + +public class Component2aImpl implements HelloWorldService { + + private HelloWorldService comp; + + @Reference + public void setComp(HelloWorldService comp) { + this.comp = comp; + } + public String getGreetings(String s) { + return comp.getGreetings(s); + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/org/apache/tuscany/sca/itest/Component2bImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/org/apache/tuscany/sca/itest/Component2bImpl.java new file mode 100644 index 0000000000..7556e02b36 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/org/apache/tuscany/sca/itest/Component2bImpl.java @@ -0,0 +1,39 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest; + +import helloworld.HelloWorldService; + +import org.osoa.sca.annotations.Reference; + +public class Component2bImpl implements HelloWorldService { + + private HelloWorldService comp; + + @Reference + public void setComp(HelloWorldService comp) { + this.comp = comp; + } + + public String getGreetings(String s) { + return comp.getGreetings(s); + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/org/apache/tuscany/sca/itest/Component3aImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/org/apache/tuscany/sca/itest/Component3aImpl.java new file mode 100644 index 0000000000..e7031ff41c --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/org/apache/tuscany/sca/itest/Component3aImpl.java @@ -0,0 +1,39 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest; + +import helloworld.HelloWorldService; + +import org.osoa.sca.annotations.Reference; + +public class Component3aImpl implements HelloWorldService { + + private HelloWorldService comp; + + @Reference + public void setComp(HelloWorldService comp) { + this.comp = comp; + } + + public String getGreetings(String s) { + return comp.getGreetings(s); + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/org/apache/tuscany/sca/itest/Component3bImpl.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/org/apache/tuscany/sca/itest/Component3bImpl.java new file mode 100644 index 0000000000..7a049ed7b0 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/java/org/apache/tuscany/sca/itest/Component3bImpl.java @@ -0,0 +1,39 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest; + +import helloworld.HelloWorldService; + +import org.osoa.sca.annotations.Reference; + +public class Component3bImpl implements HelloWorldService { + + private HelloWorldService comp; + + @Reference + public void setComp(HelloWorldService comp) { + this.comp = comp; + } + + public String getGreetings(String s) { + return comp.getGreetings(s); + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/SDOWSDLTest.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/SDOWSDLTest.composite new file mode 100644 index 0000000000..b56d120acf --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/SDOWSDLTest.composite @@ -0,0 +1,402 @@ + + + + + + + + + + Component2a3a4a + + + + + Component2a3a4b + + + + + Component2a3b4a + + + + + Component2a3b4b + + + + + Component2b3a4a + + + + + Component2b3a4b + + + + + Component2b3b4a + + + + + Component2b3b4b + + + + + Component2a3a4a + + + + + Component2a3a4b + + + + + Component2a3b4a + + + + + Component2a3b4b + + + + + Component2b3a4a + + + + + Component2b3a4b + + + + + Component2b3b4a + + + + + Component2b3b4b + + + + + Component3a4a + + + + Component3a4b + + + + Component3b4a + + + + Component3b4b + + + + + Component3a4a + + + + Component3a4b + + + + Component3b4a + + + + Component3b4b + + + + + Ref4a + + + + Ref4b + + + + Ref4a + + + + Ref4b + + + + + + + + + + + + + + + + + + + + AccountServiceComponent + + + + + + + + + + + AccountServiceRef + + + + + + + + + + + + + ClientRef1a2a3a4a + + + + + + + + + + ClientRef1a2a3a4b + + + + + + + + + + ClientRef1a2a3b4a + + + + + + + + + + ClientRef1a2a3b4b + + + + + + + + + + ClientRef1a2b3a4a + + + + + + + + + + ClientRef1a2b3a4b + + + + + + + + + + ClientRef1a2b3b4a + + + + + + + + + + ClientRef1a2b3b4b + + + + + + + + + + ClientRef1b2a3a4a + + + + + + + + + + ClientRef1b2a3a4b + + + + + + + + + + ClientRef1b2a3b4a + + + + + + + + + + ClientRef1b2a3b4b + + + + + + + + + + ClientRef1b2b3a4a + + + + + + + + + + ClientRef1b2b3a4b + + + + + + + + + + ClientRef1b2b3b4a + + + + + + + + + + ClientRef1b2b3b4b + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/WSDLTest.composite b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/WSDLTest.composite new file mode 100644 index 0000000000..61499b94e4 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/WSDLTest.composite @@ -0,0 +1,412 @@ + + + + + + + + Component2a3a4a + + + + + Component2a3a4b + + + + + Component2a3b4a + + + + + Component2a3b4b + + + + + Component2b3a4a + + + + + Component2b3a4b + + + + + Component2b3b4a + + + + + Component2b3b4b + + + + + + Component2a3a4a + + + + + Component2a3a4b + + + + + Component2a3b4a + + + + + Component2a3b4b + + + + + Component2b3a4a + + + + + Component2b3a4b + + + + + Component2b3b4a + + + + + Component2b3b4b + + + + + Component3a4a + + + + Component3a4b + + + + Component3b4a + + + + Component3b4b + + + + + Component3a4a + + + + Component3a4b + + + + Component3b4a + + + + Component3b4b + + + + + Ref4a + + + + Ref4b + + + + Ref4a + + + + Ref4b + + + + + + + + + + + + + + + + + + + + HelloWorldServiceComponent + + + + + + + + + + + ClientRef1a2a3a4a + + + + + + + + + + + ClientRef1a2a3a4b + + + + + + + + + + + ClientRef1a2a3b4a + + + + + + + + + + + ClientRef1a2a3b4b + + + + + + + + + + + ClientRef1a2b3a4a + + + + + + + + + + + ClientRef1a2b3a4b + + + + + + + + + + + ClientRef1a2b3b4a + + + + + + + + + + + ClientRef1a2b3b4b + + + + + + + + + + + ClientRef1b2a3a4a + + + + + + + + + + + ClientRef1b2a3a4b + + + + + + + + + + + ClientRef1b2a3b4a + + + + + + + + + + + ClientRef1b2a3b4b + + + + + + + + + + + ClientRef1b2b3a4a + + + + + + + + + + + ClientRef1b2b3a4b + + + + + + + + + + + ClientRef1b2b3b4a + + + + + + + + + + + ClientRef1b2b3b4b + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/bigbank/account/services/accountdata/Component2bImpl.componentType b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/bigbank/account/services/accountdata/Component2bImpl.componentType new file mode 100644 index 0000000000..2f346a2b0e --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/bigbank/account/services/accountdata/Component2bImpl.componentType @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/bigbank/account/services/accountdata/Component3bImpl.componentType b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/bigbank/account/services/accountdata/Component3bImpl.componentType new file mode 100644 index 0000000000..fbce84f82f --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/bigbank/account/services/accountdata/Component3bImpl.componentType @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/org/apache/tuscany/sca/itest/Component2bImpl.componentType b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/org/apache/tuscany/sca/itest/Component2bImpl.componentType new file mode 100644 index 0000000000..44d2acbd05 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/org/apache/tuscany/sca/itest/Component2bImpl.componentType @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/org/apache/tuscany/sca/itest/Component3bImpl.componentType b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/org/apache/tuscany/sca/itest/Component3bImpl.componentType new file mode 100644 index 0000000000..44d2acbd05 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/org/apache/tuscany/sca/itest/Component3bImpl.componentType @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountService.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountService.wsdl new file mode 100644 index 0000000000..8802f91b9d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountService.wsdl @@ -0,0 +1,467 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2a3a4a.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2a3a4a.wsdl new file mode 100644 index 0000000000..c0e798b0be --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2a3a4a.wsdl @@ -0,0 +1,467 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2a3a4b.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2a3a4b.wsdl new file mode 100644 index 0000000000..02de68d566 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2a3a4b.wsdl @@ -0,0 +1,467 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2a3b4a.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2a3b4a.wsdl new file mode 100644 index 0000000000..02de68d566 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2a3b4a.wsdl @@ -0,0 +1,467 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2a3b4b.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2a3b4b.wsdl new file mode 100644 index 0000000000..b576af290d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2a3b4b.wsdl @@ -0,0 +1,467 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2b3a4a.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2b3a4a.wsdl new file mode 100644 index 0000000000..009fb9a7a1 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2b3a4a.wsdl @@ -0,0 +1,467 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2b3a4b.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2b3a4b.wsdl new file mode 100644 index 0000000000..359114437a --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2b3a4b.wsdl @@ -0,0 +1,467 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2b3b4a.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2b3b4a.wsdl new file mode 100644 index 0000000000..ac0ef22f9e --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2b3b4a.wsdl @@ -0,0 +1,467 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2b3b4b.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2b3b4b.wsdl new file mode 100644 index 0000000000..dd2a8497e0 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1a2b3b4b.wsdl @@ -0,0 +1,467 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2a3a4a.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2a3a4a.wsdl new file mode 100644 index 0000000000..a8d211230d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2a3a4a.wsdl @@ -0,0 +1,467 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2a3a4b.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2a3a4b.wsdl new file mode 100644 index 0000000000..9622d55219 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2a3a4b.wsdl @@ -0,0 +1,467 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2a3b4a.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2a3b4a.wsdl new file mode 100644 index 0000000000..2b5bf5d1a6 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2a3b4a.wsdl @@ -0,0 +1,467 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2a3b4b.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2a3b4b.wsdl new file mode 100644 index 0000000000..1ea8cd7453 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2a3b4b.wsdl @@ -0,0 +1,467 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2b3a4a.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2b3a4a.wsdl new file mode 100644 index 0000000000..af4a50551b --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2b3a4a.wsdl @@ -0,0 +1,467 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2b3a4b.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2b3a4b.wsdl new file mode 100644 index 0000000000..a9efab3bd9 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2b3a4b.wsdl @@ -0,0 +1,467 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2b3b4a.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2b3b4a.wsdl new file mode 100644 index 0000000000..8d4b924406 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2b3b4a.wsdl @@ -0,0 +1,467 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2b3b4b.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2b3b4b.wsdl new file mode 100644 index 0000000000..b792d414c1 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/AccountServiceC1b2b3b4b.wsdl @@ -0,0 +1,467 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworld.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworld.wsdl new file mode 100644 index 0000000000..68174d1ecd --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworld.wsdl @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2a3a4a.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2a3a4a.wsdl new file mode 100644 index 0000000000..84a5ae6c23 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2a3a4a.wsdl @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2a3a4b.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2a3a4b.wsdl new file mode 100644 index 0000000000..9951878f5c --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2a3a4b.wsdl @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2a3b4a.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2a3b4a.wsdl new file mode 100644 index 0000000000..cfc9c4815c --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2a3b4a.wsdl @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2a3b4b.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2a3b4b.wsdl new file mode 100644 index 0000000000..9b293ebbae --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2a3b4b.wsdl @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2b3a4a.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2b3a4a.wsdl new file mode 100644 index 0000000000..c8a7e3305f --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2b3a4a.wsdl @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2b3a4b.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2b3a4b.wsdl new file mode 100644 index 0000000000..95e8af69fa --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2b3a4b.wsdl @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2b3b4a.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2b3b4a.wsdl new file mode 100644 index 0000000000..a51c36f2bf --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2b3b4a.wsdl @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2b3b4b.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2b3b4b.wsdl new file mode 100644 index 0000000000..d1e9a11251 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1a2b3b4b.wsdl @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2a3a4a.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2a3a4a.wsdl new file mode 100644 index 0000000000..cb0a7db5d8 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2a3a4a.wsdl @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2a3a4b.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2a3a4b.wsdl new file mode 100644 index 0000000000..b7b85fc83e --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2a3a4b.wsdl @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2a3b4a.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2a3b4a.wsdl new file mode 100644 index 0000000000..dd7c687c35 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2a3b4a.wsdl @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2a3b4b.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2a3b4b.wsdl new file mode 100644 index 0000000000..13c0f36c8b --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2a3b4b.wsdl @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2b3a4a.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2b3a4a.wsdl new file mode 100644 index 0000000000..00cc052ac4 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2b3a4a.wsdl @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2b3a4b.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2b3a4b.wsdl new file mode 100644 index 0000000000..00cc052ac4 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2b3a4b.wsdl @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2b3b4a.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2b3b4a.wsdl new file mode 100644 index 0000000000..7579552aba --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2b3b4a.wsdl @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2b3b4b.wsdl b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2b3b4b.wsdl new file mode 100644 index 0000000000..8bff3de3fd --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/main/resources/wsdl/helloworldC1b2b3b4b.wsdl @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/test/java/org/apache/tuscany/sca/itest/SDOWSDLTestCase.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/test/java/org/apache/tuscany/sca/itest/SDOWSDLTestCase.java new file mode 100644 index 0000000000..c74abc7223 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/test/java/org/apache/tuscany/sca/itest/SDOWSDLTestCase.java @@ -0,0 +1,97 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest; + +import java.rmi.RemoteException; + +import junit.framework.TestCase; + +import org.apache.tuscany.api.SCARuntime; +import org.osoa.sca.CurrentCompositeContext; + +import bigbank.account.services.accountdata.AccountDataService; + +import com.bigbank.account.AccountFactory; +import com.bigbank.account.CustomerProfileData; + +/** + * Tests all the combinations of wiring services, components, and references + * which use either interface.java or interface.wsdl. + * + * The tests use a service (1) wired to a components (2) wired to another + * component (3) wired to a reference (4). Each of those uses either + * interface.java (a) or interface.wsdl (b). This results in 16 different + * combinations 1a2a3a4a thru 1b2b3b4b. + */ +public class SDOWSDLTestCase extends TestCase { + + public void testClient1a2a3a4a() throws RemoteException { + + doit("Client1a2a3a4a"); + doit("Client1a2a3a4b"); + doit("Client1a2a3b4a"); + doit("Client1a2a3b4b"); + doit("Client1a2b3a4a"); + doit("Client1a2b3a4b"); + doit("Client1a2b3b4a"); + doit("Client1a2b3b4b"); + doit("Client1b2a3a4a"); + doit("Client1b2a3a4b"); + doit("Client1b2a3b4a"); + doit("Client1b2a3b4b"); + +// TODO: TUSCANY-1135, service using wsdl wired to component using wsdl fails +// doit("Client1b2b3a4a"); +// doit("Client1b2b3a4b"); +// doit("Client1b2b3b4a"); +// doit("Client1b2b3b4b"); + } + + private void doit(String compName) throws RemoteException { + AccountDataService client = CurrentCompositeContext.getContext().locateService(AccountDataService.class, compName); + CustomerProfileData dataIn = AccountFactory.INSTANCE.createCustomerProfileData(); + dataIn.setAddress("home"); + dataIn.setEmail("petra@home"); + dataIn.setFirstName("petra"); + dataIn.setId(1); + dataIn.setLastName("A"); + dataIn.setLoginID("petra"); + dataIn.setPassword("ant"); + + CustomerProfileData dataOut = client.createAccount(dataIn , false, false); + + assertEquals(dataIn.getAddress(), dataOut.getAddress()); + assertEquals(dataIn.getEmail(), dataOut.getEmail()); + assertEquals(dataIn.getFirstName(), dataOut.getFirstName()); + assertEquals(dataIn.getId(), dataOut.getId()); + assertEquals(dataIn.getLastName(), dataOut.getLastName()); + assertEquals(dataIn.getLoginID(), dataOut.getLoginID()); + assertEquals(dataIn.getPassword(), dataOut.getPassword()); + } + + protected void setUp() throws Exception { + SCARuntime.start("SDOWSDLTest.composite"); + } + + protected void tearDown() throws Exception { + SCARuntime.stop(); + } + +} diff --git a/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/test/java/org/apache/tuscany/sca/itest/WSDLTestCase.java b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/test/java/org/apache/tuscany/sca/itest/WSDLTestCase.java new file mode 100644 index 0000000000..59c4c17b1c --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/testing/sca/itest/wsdl/src/test/java/org/apache/tuscany/sca/itest/WSDLTestCase.java @@ -0,0 +1,149 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest; + +import helloworld.HelloWorldService; +import junit.framework.TestCase; + +import org.apache.tuscany.api.SCARuntime; +import org.osoa.sca.CurrentCompositeContext; + +/** + * Tests all the combinations of wiring services, components, and references + * which use either interface.java or interface.wsdl. + * + * The tests use a service (1) wired to a components (2) wired to another + * component (3) wired to a reference (4). Each of those uses either + * interface.java (a) or interface.wsdl (b). This results in 16 different + * combinations 1a2a3a4a thru 1b2b3b4b. + */ +public class WSDLTestCase extends TestCase { + + public void testClient1a2a3a4a() { + HelloWorldService client = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1a2a3a4a"); + assertEquals("Hi petra", client.getGreetings("petra")); + HelloWorldService client1 = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1a2a3a4b"); + assertEquals("Hi petra", client1.getGreetings("petra")); + HelloWorldService client2 = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1a2a3b4a"); + assertEquals("Hi petra", client2.getGreetings("petra")); + HelloWorldService client3 = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1a2a3b4b"); + assertEquals("Hi petra", client3.getGreetings("petra")); + HelloWorldService client4 = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1a2b3a4a"); + assertEquals("Hi petra", client4.getGreetings("petra")); + HelloWorldService client5 = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1a2b3a4b"); + assertEquals("Hi petra", client5.getGreetings("petra")); + HelloWorldService client6 = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1a2b3b4a"); + assertEquals("Hi petra", client6.getGreetings("petra")); + HelloWorldService client7 = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1a2b3b4b"); + assertEquals("Hi petra", client7.getGreetings("petra")); + HelloWorldService client8 = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1b2a3a4a"); + assertEquals("Hi petra", client8.getGreetings("petra")); + HelloWorldService client9 = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1b2a3a4b"); + assertEquals("Hi petra", client9.getGreetings("petra")); + HelloWorldService client10 = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1b2a3b4a"); + assertEquals("Hi petra", client10.getGreetings("petra")); + HelloWorldService client11 = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1b2a3b4b"); + assertEquals("Hi petra", client11.getGreetings("petra")); +//TODO: TUSCANY-1124 DataBindingInterceptor incorrect when binding.ws wired to java component using interface.wsdl +// HelloWorldService client12 = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1b2b3a4a"); +// assertEquals("Hi petra", client12.getGreetings("petra")); +// HelloWorldService client13 = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1b2b3a4b"); +// assertEquals("Hi petra", client13.getGreetings("petra")); +// HelloWorldService client14 = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1b2b3b4a"); +// assertEquals("Hi petra", client14.getGreetings("petra")); +// HelloWorldService client15 = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1b2b3b4b"); +// assertEquals("Hi petra", client15.getGreetings("petra")); + } + + // TODO: TUSCANY-1125, Testcases fail with out of heap space if too many individual test run in one testcase +// public void testClient1a2a3a4a() { +// HelloWorldService client = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1a2a3a4a"); +// assertEquals("Hi petra", client.getGreetings("petra")); +// } +// public void testClient1a2a3a4b() { +// HelloWorldService client = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1a2a3a4b"); +// assertEquals("Hi petra", client.getGreetings("petra")); +// } +// public void testClient1a2a3b4a() { +// HelloWorldService client = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1a2a3b4a"); +// assertEquals("Hi petra", client.getGreetings("petra")); +// } +// public void testClient1a2a3b4b() { +// HelloWorldService client = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1a2a3b4b"); +// assertEquals("Hi petra", client.getGreetings("petra")); +// } +// public void testClient1a2b3a4a() { +// HelloWorldService client = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1a2b3a4a"); +// assertEquals("Hi petra", client.getGreetings("petra")); +// } +// public void testClient1a2b3a4b() { +// HelloWorldService client = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1a2b3a4b"); +// assertEquals("Hi petra", client.getGreetings("petra")); +// } +// public void testClient1a2b3b4a() { +// HelloWorldService client = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1a2b3b4a"); +// assertEquals("Hi petra", client.getGreetings("petra")); +// } +// public void testClient1a2b3b4b() { +// HelloWorldService client = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1a2b3b4b"); +// assertEquals("Hi petra", client.getGreetings("petra")); +// } +// public void testClient1b2a3a4a() { +// HelloWorldService client = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1b2a3a4a"); +// assertEquals("Hi petra", client.getGreetings("petra")); +// } +// public void testClient1b2a3a4b() { +// HelloWorldService client = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1b2a3a4b"); +// assertEquals("Hi petra", client.getGreetings("petra")); +// } +// public void testClient1b2a3b4a() { +// HelloWorldService client = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1b2a3b4a"); +// assertEquals("Hi petra", client.getGreetings("petra")); +// } +// public void testClient1b2a3b4b() { +// HelloWorldService client = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1b2a3b4b"); +// assertEquals("Hi petra", client.getGreetings("petra")); +// } +// public void testClient1b2b3a4a() { +// HelloWorldService client = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1b2b3a4a"); +// assertEquals("Hi petra", client.getGreetings("petra")); +// } +// public void testClient1b2b3a4b() { +// HelloWorldService client = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1b2b3a4b"); +// assertEquals("Hi petra", client.getGreetings("petra")); +// } +// public void testClient1b2b3b4a() { +// HelloWorldService client = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1b2b3b4a"); +// assertEquals("Hi petra", client.getGreetings("petra")); +// } +// public void testClient1b2b3b4b() { +// HelloWorldService client = CurrentCompositeContext.getContext().locateService(HelloWorldService.class, "Client1b2b3b4b"); +// assertEquals("Hi petra", client.getGreetings("petra")); +// } + + protected void setUp() throws Exception { + SCARuntime.start("WSDLTest.composite"); + } + + protected void tearDown() throws Exception { + SCARuntime.stop(); + } + +} -- cgit v1.2.3