From 074cc3cff2f00457318bd322a6bd58f65686ae5c Mon Sep 17 00:00:00 2001 From: nash Date: Tue, 16 Nov 2010 10:40:14 +0000 Subject: Tag for 1.6.1-RC2 git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1035578 13f79535-47bb-0310-9956-ffa450edef68 --- .../1.6.1-RC2/itest/databindings/common/pom.xml | 126 ++ .../tuscany/sca/itest/generate/Generate.java | 181 +++ .../resources/generate/DatabindingTestCase.java.vm | 112 ++ .../src/main/resources/generate/Greeter.wsdl.vm | 103 ++ .../main/resources/generate/GreeterService.java.vm | 53 + .../generate/GreeterServiceClient.java.vm | 42 + .../generate/GreeterServiceClientImpl.java.vm | 65 + .../resources/generate/GreeterServiceImpl.java.vm | 55 + .../src/main/resources/generate/generate.xsd | 61 + .../common/src/main/resources/wsdl/Dummy.txt | 4 + .../common/src/main/resources/xsd/Annotation.xml | 24 + .../common/src/main/resources/xsd/Annotation.xsd | 38 + .../common/src/main/resources/xsd/Attribute.xml | 24 + .../common/src/main/resources/xsd/Attribute.xsd | 39 + .../src/main/resources/xsd/AttributeReference.xml | 24 + .../src/main/resources/xsd/AttributeReference.xsd | 40 + .../resources/xsd/AttributeWithDefaultValue.xml | 24 + .../resources/xsd/AttributeWithDefaultValue.xsd | 38 + .../main/resources/xsd/AttributeWithFixedValue.xml | 24 + .../main/resources/xsd/AttributeWithFixedValue.xsd | 38 + .../resources/xsd/AttributeWithSDOAliasName.xml | 24 + .../resources/xsd/AttributeWithSDOAliasName.xsd | 38 + .../resources/xsd/AttributeWithSDODataType.xml | 24 + .../resources/xsd/AttributeWithSDODataType.xsd | 38 + .../main/resources/xsd/AttributeWithSDOName.xml | 24 + .../main/resources/xsd/AttributeWithSDOName.xsd | 38 + ...ibuteWithSDOPropertySDOOppositePropertyType.xml | 24 + ...ibuteWithSDOPropertySDOOppositePropertyType.xsd | 38 + .../resources/xsd/AttributeWithSDOPropertyType.xml | 24 + .../resources/xsd/AttributeWithSDOPropertyType.xsd | 38 + .../main/resources/xsd/AttributeWithSDOString.xml | 24 + .../main/resources/xsd/AttributeWithSDOString.xsd | 38 + .../main/resources/xsd/BuiltInAnySimpleType.xml | 24 + .../main/resources/xsd/BuiltInAnySimpleType.xsd | 31 + .../src/main/resources/xsd/BuiltInAnyType.xml | 24 + .../src/main/resources/xsd/BuiltInAnyType.xsd | 31 + .../src/main/resources/xsd/BuiltInAnyURI.xml | 24 + .../src/main/resources/xsd/BuiltInAnyURI.xsd | 31 + .../src/main/resources/xsd/BuiltInBase64Binary.xml | 24 + .../src/main/resources/xsd/BuiltInBase64Binary.xsd | 31 + .../src/main/resources/xsd/BuiltInBoolean.xml | 27 + .../src/main/resources/xsd/BuiltInBoolean.xsd | 31 + .../common/src/main/resources/xsd/BuiltInByte.xml | 25 + .../common/src/main/resources/xsd/BuiltInByte.xsd | 31 + .../common/src/main/resources/xsd/BuiltInDate.xml | 24 + .../common/src/main/resources/xsd/BuiltInDate.xsd | 31 + .../src/main/resources/xsd/BuiltInDateTime.xml | 24 + .../src/main/resources/xsd/BuiltInDateTime.xsd | 31 + .../src/main/resources/xsd/BuiltInDecimal.xml | 23 + .../src/main/resources/xsd/BuiltInDecimal.xsd | 31 + .../src/main/resources/xsd/BuiltInDouble.xml | 25 + .../src/main/resources/xsd/BuiltInDouble.xsd | 31 + .../src/main/resources/xsd/BuiltInDuration.xml | 24 + .../src/main/resources/xsd/BuiltInDuration.xsd | 31 + .../common/src/main/resources/xsd/BuiltInFloat.xml | 24 + .../common/src/main/resources/xsd/BuiltInFloat.xsd | 31 + .../common/src/main/resources/xsd/BuiltInGDay.xml | 24 + .../common/src/main/resources/xsd/BuiltInGDay.xsd | 31 + .../src/main/resources/xsd/BuiltInGMonth.xml | 24 + .../src/main/resources/xsd/BuiltInGMonth.xsd | 31 + .../src/main/resources/xsd/BuiltInGMonthDay.xml | 24 + .../src/main/resources/xsd/BuiltInGMonthDay.xsd | 31 + .../common/src/main/resources/xsd/BuiltInGYear.xml | 24 + .../common/src/main/resources/xsd/BuiltInGYear.xsd | 31 + .../src/main/resources/xsd/BuiltInGYearMonth.xml | 24 + .../src/main/resources/xsd/BuiltInGYearMonth.xsd | 31 + .../src/main/resources/xsd/BuiltInHexBinary.xml | 24 + .../src/main/resources/xsd/BuiltInHexBinary.xsd | 31 + .../common/src/main/resources/xsd/BuiltInID.xml | 24 + .../common/src/main/resources/xsd/BuiltInID.xsd | 31 + .../common/src/main/resources/xsd/BuiltInIDREF.xml | 24 + .../common/src/main/resources/xsd/BuiltInIDREF.xsd | 31 + .../src/main/resources/xsd/BuiltInIDREFS.xml | 24 + .../src/main/resources/xsd/BuiltInIDREFS.xsd | 31 + .../common/src/main/resources/xsd/BuiltInInt.xml | 25 + .../common/src/main/resources/xsd/BuiltInInt.xsd | 31 + .../src/main/resources/xsd/BuiltInInteger.xml | 25 + .../src/main/resources/xsd/BuiltInInteger.xsd | 31 + .../src/main/resources/xsd/BuiltInLanguage.xml | 24 + .../src/main/resources/xsd/BuiltInLanguage.xsd | 31 + .../common/src/main/resources/xsd/BuiltInLong.xml | 25 + .../common/src/main/resources/xsd/BuiltInLong.xsd | 33 + .../src/main/resources/xsd/BuiltInNCName.xml | 24 + .../src/main/resources/xsd/BuiltInNCName.xsd | 31 + .../src/main/resources/xsd/BuiltInNMTOKEN.xml | 24 + .../src/main/resources/xsd/BuiltInNMTOKEN.xsd | 31 + .../src/main/resources/xsd/BuiltInNMTOKENS.xml | 24 + .../src/main/resources/xsd/BuiltInNMTOKENS.xsd | 31 + .../src/main/resources/xsd/BuiltInNOTATION.xml | 24 + .../src/main/resources/xsd/BuiltInNOTATION.xsd | 39 + .../common/src/main/resources/xsd/BuiltInName.xml | 24 + .../common/src/main/resources/xsd/BuiltInName.xsd | 31 + .../main/resources/xsd/BuiltInNegativeInteger.xml | 24 + .../main/resources/xsd/BuiltInNegativeInteger.xsd | 31 + .../resources/xsd/BuiltInNonNegativeInteger.xml | 24 + .../resources/xsd/BuiltInNonNegativeInteger.xsd | 31 + .../resources/xsd/BuiltInNonPositiveInteger.xml | 24 + .../resources/xsd/BuiltInNonPositiveInteger.xsd | 31 + .../main/resources/xsd/BuiltInNormalizedString.xml | 24 + .../main/resources/xsd/BuiltInNormalizedString.xsd | 31 + .../main/resources/xsd/BuiltInPositiveInteger.xml | 24 + .../main/resources/xsd/BuiltInPositiveInteger.xsd | 31 + .../common/src/main/resources/xsd/BuiltInQName.xml | 24 + .../common/src/main/resources/xsd/BuiltInQName.xsd | 31 + .../common/src/main/resources/xsd/BuiltInShort.xml | 25 + .../common/src/main/resources/xsd/BuiltInShort.xsd | 31 + .../src/main/resources/xsd/BuiltInString.xml | 24 + .../src/main/resources/xsd/BuiltInString.xsd | 31 + .../common/src/main/resources/xsd/BuiltInTime.xml | 24 + .../common/src/main/resources/xsd/BuiltInTime.xsd | 31 + .../common/src/main/resources/xsd/BuiltInToken.xml | 24 + .../common/src/main/resources/xsd/BuiltInToken.xsd | 31 + .../src/main/resources/xsd/BuiltInUnsignedByte.xml | 25 + .../src/main/resources/xsd/BuiltInUnsignedByte.xsd | 31 + .../src/main/resources/xsd/BuiltInUnsignedInt.xml | 25 + .../src/main/resources/xsd/BuiltInUnsignedInt.xsd | 31 + .../src/main/resources/xsd/BuiltInUnsignedLong.xml | 25 + .../src/main/resources/xsd/BuiltInUnsignedLong.xsd | 31 + .../main/resources/xsd/BuiltInUnsignedShort.xml | 25 + .../main/resources/xsd/BuiltInUnsignedShort.xsd | 31 + ...lexTypeComplexContentRestrictingComplexType.xml | 26 + ...lexTypeComplexContentRestrictingComplexType.xsd | 44 + .../xsd/ComplexTypeExtendingComplexType.xml | 27 + .../xsd/ComplexTypeExtendingComplexType.xsd | 43 + .../xsd/ComplexTypeExtendingSimpleType.xml | 24 + .../xsd/ComplexTypeExtendingSimpleType.xsd | 41 + ...plexTypeSimpleContentRestrictingComplexType.xml | 24 + ...plexTypeSimpleContentRestrictingComplexType.xsd | 41 + .../main/resources/xsd/ComplexTypeWithAbstract.xml | 27 + .../main/resources/xsd/ComplexTypeWithAbstract.xsd | 47 + .../main/resources/xsd/ComplexTypeWithCDATA.xml | 30 + .../main/resources/xsd/ComplexTypeWithCDATA.xsd | 39 + .../main/resources/xsd/ComplexTypeWithContent.xml | 26 + .../main/resources/xsd/ComplexTypeWithContent.xsd | 37 + .../main/resources/xsd/ComplexTypeWithMixed.xml | 29 + .../main/resources/xsd/ComplexTypeWithMixed.xsd | 39 + .../xsd/ComplexTypeWithOpenAttributes.xml | 24 + .../xsd/ComplexTypeWithOpenAttributes.xsd | 42 + .../resources/xsd/ComplexTypeWithOpenContent.xml | 31 + .../resources/xsd/ComplexTypeWithOpenContent.xsd | 39 + .../xsd/ComplexTypeWithOppositeProperty.xml | 30 + .../xsd/ComplexTypeWithOppositeProperty.xsd | 59 + .../resources/xsd/ComplexTypeWithSDOAliasName.xml | 26 + .../resources/xsd/ComplexTypeWithSDOAliasName.xsd | 38 + .../main/resources/xsd/ComplexTypeWithSDOName.xml | 26 + .../main/resources/xsd/ComplexTypeWithSDOName.xsd | 38 + .../resources/xsd/ComplexTypeWithSDOSequence.xml | 26 + .../resources/xsd/ComplexTypeWithSDOSequence.xsd | 40 + .../resources/xsd/ComplexTypeWithoutContent.xml | 24 + .../resources/xsd/ComplexTypeWithoutContent.xsd | 33 + .../main/resources/xsd/ComplexTypeWithoutName.xml | 26 + .../main/resources/xsd/ComplexTypeWithoutName.xsd | 39 + .../src/main/resources/xsd/DefaultNamespace.xml | 23 + .../src/main/resources/xsd/DefaultNamespace.xsd | 32 + .../common/src/main/resources/xsd/ElementInAll.xml | 27 + .../common/src/main/resources/xsd/ElementInAll.xsd | 40 + .../src/main/resources/xsd/ElementInChoice.xml | 25 + .../src/main/resources/xsd/ElementInChoice.xsd | 48 + .../xsd/ElementOfSDOChangeSummaryType.xml | 29 + .../xsd/ElementOfSDOChangeSummaryType.xsd | 34 + .../xsd/ElementOfSimpleTypeWithDefault.xml | 24 + .../xsd/ElementOfSimpleTypeWithDefault.xsd | 31 + .../resources/xsd/ElementOfSimpleTypeWithFixed.xml | 24 + .../resources/xsd/ElementOfSimpleTypeWithFixed.xsd | 31 + .../xsd/ElementOfSimpleTypeWithSDODataType.xml | 24 + .../xsd/ElementOfSimpleTypeWithSDODataType.xsd | 33 + ...mentOfSimpleTypeWithSDOOppositePropertyType.xml | 24 + ...mentOfSimpleTypeWithSDOOppositePropertyType.xsd | 33 + .../xsd/ElementOfSimpleTypeWithSDOPropertyType.xml | 24 + .../xsd/ElementOfSimpleTypeWithSDOPropertyType.xsd | 32 + .../xsd/ElementOfSimpleTypeWithSDOString.xml | 24 + .../xsd/ElementOfSimpleTypeWithSDOString.xsd | 32 + .../resources/xsd/ElementSubstitutionGroupBase.xml | 40 + .../resources/xsd/ElementSubstitutionGroupBase.xsd | 52 + .../main/resources/xsd/ElementWithMaxOccurs.xml | 25 + .../main/resources/xsd/ElementWithMaxOccurs.xsd | 31 + .../src/main/resources/xsd/ElementWithNillable.xml | 24 + .../src/main/resources/xsd/ElementWithNillable.xsd | 31 + .../main/resources/xsd/ElementWithSDOAliasName.xml | 24 + .../main/resources/xsd/ElementWithSDOAliasName.xsd | 32 + .../src/main/resources/xsd/ElementWithSDOName.xml | 24 + .../src/main/resources/xsd/ElementWithSDOName.xsd | 32 + .../resources/xsd/GlobalElementComplexType.xml | 24 + .../resources/xsd/GlobalElementComplexType.xsd | 31 + .../main/resources/xsd/GlobalElementSimpleType.xml | 24 + .../main/resources/xsd/GlobalElementSimpleType.xsd | 26 + .../common/src/main/resources/xsd/Import.xml | 30 + .../common/src/main/resources/xsd/Import.xsd | 40 + .../src/main/resources/xsd/ImportedSchema.xsd | 33 + .../common/src/main/resources/xsd/Include.xml | 24 + .../common/src/main/resources/xsd/Include.xsd | 36 + .../common/src/main/resources/xsd/Interop.xsd | 138 ++ .../common/src/main/resources/xsd/Notation.xml | 24 + .../common/src/main/resources/xsd/Notation.xsd | 35 + .../common/src/main/resources/xsd/Person.xsd | 30 + .../src/main/resources/xsd/SDOJavaPackage.xml | 25 + .../src/main/resources/xsd/SDOJavaPackage.xsd | 39 + .../main/resources/xsd/SimpleTypeWithAbstract.xml | 24 + .../main/resources/xsd/SimpleTypeWithAbstract.xsd | 40 + .../xsd/SimpleTypeWithExtendedInstanceClass.xml | 24 + .../xsd/SimpleTypeWithExtendedInstanceClass.xsd | 36 + .../resources/xsd/SimpleTypeWithInstanceClass.xml | 24 + .../resources/xsd/SimpleTypeWithInstanceClass.xsd | 37 + .../src/main/resources/xsd/SimpleTypeWithList.xml | 24 + .../src/main/resources/xsd/SimpleTypeWithList.xsd | 37 + .../src/main/resources/xsd/SimpleTypeWithName.xml | 24 + .../src/main/resources/xsd/SimpleTypeWithName.xsd | 36 + .../main/resources/xsd/SimpleTypeWithSDOName.xml | 24 + .../main/resources/xsd/SimpleTypeWithSDOName.xsd | 37 + .../src/main/resources/xsd/SimpleTypeWithUnion.xml | 25 + .../src/main/resources/xsd/SimpleTypeWithUnion.xsd | 46 + .../main/resources/xsd/SimpleTypeWithoutName.xml | 26 + .../main/resources/xsd/SimpleTypeWithoutName.xsd | 38 + .../src/main/resources/xsd/TargetNamespace.xml | 24 + .../src/main/resources/xsd/TargetNamespace.xsd | 34 + .../common/src/main/resources/xsd/datagraph.xsd | 88 ++ .../common/src/main/resources/xsd/sdoJava.xsd | 88 ++ .../common/src/main/resources/xsd/sdoModel.xsd | 221 +++ .../sca/itest/generate/GenerateTestCase.java | 49 + .../tags/1.6.1-RC2/itest/databindings/config.png | Bin 0 -> 31222 bytes .../tags/1.6.1-RC2/itest/databindings/config.svg | 117 ++ .../1.6.1-RC2/itest/databindings/databinding.png | Bin 0 -> 14106 bytes .../1.6.1-RC2/itest/databindings/databinding.svg | 242 ++++ .../tags/1.6.1-RC2/itest/databindings/interop.png | Bin 0 -> 23179 bytes .../tags/1.6.1-RC2/itest/databindings/interop.svg | 352 +++++ .../1.6.1-RC2/itest/databindings/interop/pom.xml | 238 ++++ .../generate/InteropDatabindingTestCase.java.vm | 113 ++ .../main/resources/generate/JAXBGreeter.wsdl.vm | 103 ++ .../src/main/resources/generate/SDOGreeter.wsdl.vm | 103 ++ .../src/main/resources/generate/generate.xml | 159 +++ .../resources/generate/interopgreeter.composite.vm | 78 ++ .../itest/databindings/jaxb-bottom-up/pom.xml | 260 ++++ .../itest/databindings/jaxb/AClientService.java | 29 + .../sca/itest/databindings/jaxb/AService.java | 32 + .../tuscany/sca/itest/databindings/jaxb/Bean1.java | 66 + .../sca/itest/databindings/jaxb/Bean10.java | 25 + .../sca/itest/databindings/jaxb/Bean11.java | 25 + .../tuscany/sca/itest/databindings/jaxb/Bean2.java | 59 + .../tuscany/sca/itest/databindings/jaxb/Bean3.java | 56 + .../sca/itest/databindings/jaxb/Bean31.java | 56 + .../databindings/jaxb/GenericsLocalService.java | 42 + .../itest/databindings/jaxb/GenericsService.java | 30 + .../databindings/jaxb/GenericsServiceClient.java | 43 + .../databindings/jaxb/HelloLocalServiceSimple.java | 37 + .../databindings/jaxb/HelloServiceSimple.java | 29 + .../jaxb/HelloServiceSimpleClient.java | 38 + .../databindings/jaxb/PrimitivesLocalService.java | 47 + .../itest/databindings/jaxb/PrimitivesService.java | 29 + .../databindings/jaxb/PrimitivesServiceClient.java | 48 + .../jaxb/StandardTypesLocalService.java | 78 ++ .../databindings/jaxb/StandardTypesService.java | 30 + .../jaxb/StandardTypesServiceClient.java | 79 ++ .../databindings/jaxb/impl/AClientServiceImpl.java | 38 + .../itest/databindings/jaxb/impl/AServiceImpl.java | 33 + .../jaxb/impl/GenericsLocalServiceClientImpl.java | 77 ++ .../jaxb/impl/GenericsServiceClientImpl.java | 40 + .../jaxb/impl/GenericsServiceImpl.java | 69 + .../jaxb/impl/GenericsTransformer.java | 125 ++ .../impl/HelloLocalServiceSimpleClientImpl.java | 73 + .../jaxb/impl/HelloServiceSimpleClientImpl.java | 38 + .../jaxb/impl/HelloServiceSimpleImpl.java | 86 ++ .../impl/PrimitivesLocalServiceClientImpl.java | 138 ++ .../jaxb/impl/PrimitivesServiceClientImpl.java | 38 + .../jaxb/impl/PrimitivesServiceImpl.java | 151 ++ .../impl/StandardTypesLocalServiceClientImpl.java | 157 +++ .../jaxb/impl/StandardTypesServiceClientImpl.java | 38 + .../jaxb/impl/StandardTypesServiceImpl.java | 208 +++ .../jaxb/impl/StandardTypesTransformer.java | 144 ++ .../src/main/resources/aservice.wsdl | 127 ++ .../src/main/resources/doclitbarewsdl.composite | 37 + .../src/main/resources/generics-service.composite | 69 + .../src/main/resources/helloservice.composite | 65 + .../src/main/resources/myContent/home.html | 210 +++ .../src/main/resources/primitivesservice.composite | 66 + .../resources/standard-types-service.composite | 75 + .../databindings/jaxb/DatabindingTestCase.java | 339 +++++ .../databindings/jaxb/DocLitBareWsdlTestCase.java | 67 + .../jaxb/GenericsDatabindingTestCase.java | 484 +++++++ .../jaxb/PrimitivesDatabindingTestCase.java | 776 +++++++++++ .../jaxb/StandardTypesDatabindingTestCase.java | 1439 +++++++++++++++++++ .../itest/databindings/jaxb-top-down/pom.xml | 213 +++ .../sca/itest/databindings/jaxb/HelloService.java | 42 + .../databindings/jaxb/HelloServiceClient.java | 41 + .../itest/databindings/jaxb/PrimitivesService.java | 51 + .../databindings/jaxb/PrimitivesServiceClient.java | 50 + .../databindings/jaxb/StandardTypesService.java | 84 ++ .../jaxb/StandardTypesServiceClient.java | 81 ++ .../jaxb/impl/HelloServiceClientImpl.java | 73 + .../databindings/jaxb/impl/HelloServiceImpl.java | 86 ++ .../jaxb/impl/PrimitivesServiceClientImpl.java | 139 ++ .../jaxb/impl/PrimitivesServiceImpl.java | 151 ++ .../jaxb/impl/StandardTypesServiceClientImpl.java | 159 +++ .../jaxb/impl/StandardTypesServiceImpl.java | 207 +++ .../jaxb/impl/StandardTypesTransformer.java | 142 ++ .../src/main/resources/myContent/home.html | 210 +++ .../main/resources/wsdl/wrapped/hello-service.wsdl | 371 +++++ .../resources/wsdl/wrapped/helloservice.composite | 80 ++ .../resources/wsdl/wrapped/primitives-service.wsdl | 927 +++++++++++++ .../wsdl/wrapped/primitivesservice.composite | 80 ++ .../wsdl/wrapped/standard-types-service.composite | 89 ++ .../wsdl/wrapped/standard-types-service.wsdl | 1155 ++++++++++++++++ .../jaxb/topdown/DatabindingTestCase.java | 347 +++++ .../topdown/PrimitivesDatabindingTestCase.java | 849 ++++++++++++ .../topdown/StandardTypesDatabindingTestCase.java | 1446 ++++++++++++++++++++ .../1.6.1-RC2/itest/databindings/jaxbgen/pom.xml | 300 ++++ .../src/main/resources/generate/generate.xml | 172 +++ .../jaxbgen/src/main/resources/greeter.composite | 49 + .../tags/1.6.1-RC2/itest/databindings/pom.xml | 47 + .../tags/1.6.1-RC2/itest/databindings/readme.html | 157 +++ .../1.6.1-RC2/itest/databindings/sdogen/pom.xml | 261 ++++ .../src/main/resources/generate/generate.xml | 170 +++ .../main/resources/generate/greeter.composite.vm | 56 + 312 files changed, 23623 insertions(+) create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/pom.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/java/org/apache/tuscany/sca/itest/generate/Generate.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/generate/DatabindingTestCase.java.vm create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/generate/Greeter.wsdl.vm create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/generate/GreeterService.java.vm create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/generate/GreeterServiceClient.java.vm create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/generate/GreeterServiceClientImpl.java.vm create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/generate/GreeterServiceImpl.java.vm create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/generate/generate.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/wsdl/Dummy.txt create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Annotation.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Annotation.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Attribute.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Attribute.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeReference.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeReference.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithDefaultValue.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithDefaultValue.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithFixedValue.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithFixedValue.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOAliasName.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOAliasName.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDODataType.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDODataType.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOName.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOName.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertySDOOppositePropertyType.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertySDOOppositePropertyType.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertyType.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertyType.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOString.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOString.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInAnySimpleType.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInAnySimpleType.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInAnyType.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInAnyType.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInAnyURI.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInAnyURI.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInBase64Binary.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInBase64Binary.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInBoolean.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInBoolean.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInByte.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInByte.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDate.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDate.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDateTime.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDateTime.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDecimal.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDecimal.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDouble.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDouble.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDuration.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDuration.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInFloat.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInFloat.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGDay.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGDay.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGMonth.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGMonth.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGMonthDay.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGMonthDay.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGYear.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGYear.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGYearMonth.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGYearMonth.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInHexBinary.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInHexBinary.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInID.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInID.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInIDREF.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInIDREF.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInIDREFS.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInIDREFS.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInInt.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInInt.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInInteger.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInInteger.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInLanguage.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInLanguage.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInLong.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInLong.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNCName.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNCName.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKEN.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKEN.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKENS.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKENS.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNOTATION.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNOTATION.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInName.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInName.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNegativeInteger.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNegativeInteger.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNonNegativeInteger.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNonNegativeInteger.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNonPositiveInteger.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNonPositiveInteger.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNormalizedString.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNormalizedString.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInPositiveInteger.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInPositiveInteger.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInQName.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInQName.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInShort.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInShort.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInString.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInString.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInTime.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInTime.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInToken.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInToken.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedByte.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedByte.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedInt.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedInt.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedLong.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedLong.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedShort.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedShort.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeComplexContentRestrictingComplexType.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeComplexContentRestrictingComplexType.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingComplexType.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingComplexType.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingSimpleType.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingSimpleType.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeSimpleContentRestrictingComplexType.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeSimpleContentRestrictingComplexType.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithAbstract.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithAbstract.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithCDATA.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithCDATA.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithContent.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithContent.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithMixed.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithMixed.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenAttributes.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenAttributes.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenContent.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenContent.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOppositeProperty.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOppositeProperty.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOAliasName.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOAliasName.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOName.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOName.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOSequence.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOSequence.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutContent.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutContent.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutName.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutName.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/DefaultNamespace.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/DefaultNamespace.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementInAll.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementInAll.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementInChoice.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementInChoice.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSDOChangeSummaryType.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSDOChangeSummaryType.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithDefault.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithDefault.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithFixed.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithFixed.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDODataType.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDODataType.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOOppositePropertyType.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOOppositePropertyType.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOPropertyType.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOPropertyType.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOString.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOString.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementSubstitutionGroupBase.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementSubstitutionGroupBase.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithMaxOccurs.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithMaxOccurs.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithNillable.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithNillable.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithSDOAliasName.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithSDOAliasName.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithSDOName.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithSDOName.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/GlobalElementComplexType.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/GlobalElementComplexType.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/GlobalElementSimpleType.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/GlobalElementSimpleType.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Import.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Import.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ImportedSchema.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Include.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Include.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Interop.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Notation.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Notation.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Person.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SDOJavaPackage.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SDOJavaPackage.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithAbstract.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithAbstract.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithExtendedInstanceClass.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithExtendedInstanceClass.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithInstanceClass.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithInstanceClass.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithList.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithList.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithName.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithName.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithSDOName.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithSDOName.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithUnion.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithUnion.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithoutName.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithoutName.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/TargetNamespace.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/TargetNamespace.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/datagraph.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/sdoJava.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/sdoModel.xsd create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/test/java/org/apache/tuscany/sca/itest/generate/GenerateTestCase.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/config.png create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/config.svg create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/databinding.png create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/databinding.svg create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop.png create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop.svg create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop/pom.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop/src/main/resources/generate/InteropDatabindingTestCase.java.vm create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop/src/main/resources/generate/JAXBGreeter.wsdl.vm create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop/src/main/resources/generate/SDOGreeter.wsdl.vm create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop/src/main/resources/generate/generate.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop/src/main/resources/generate/interopgreeter.composite.vm create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/pom.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AClientService.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AService.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean1.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean10.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean11.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean2.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean3.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean31.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsLocalService.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsService.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsServiceClient.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloLocalServiceSimple.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimple.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimpleClient.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesLocalService.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesService.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesServiceClient.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesLocalService.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesService.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesServiceClient.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AClientServiceImpl.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AServiceImpl.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsLocalServiceClientImpl.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsServiceClientImpl.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsServiceImpl.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsTransformer.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloLocalServiceSimpleClientImpl.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleClientImpl.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleImpl.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesLocalServiceClientImpl.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceClientImpl.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceImpl.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesLocalServiceClientImpl.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceClientImpl.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceImpl.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesTransformer.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/resources/aservice.wsdl create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/resources/doclitbarewsdl.composite create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/resources/generics-service.composite create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/resources/helloservice.composite create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/resources/myContent/home.html create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/resources/primitivesservice.composite create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/resources/standard-types-service.composite create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DatabindingTestCase.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DocLitBareWsdlTestCase.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsDatabindingTestCase.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesDatabindingTestCase.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesDatabindingTestCase.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/pom.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloService.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceClient.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesService.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesServiceClient.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesService.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesServiceClient.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceClientImpl.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceImpl.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceClientImpl.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceImpl.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceClientImpl.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceImpl.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesTransformer.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/resources/myContent/home.html create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/hello-service.wsdl create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/helloservice.composite create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/primitives-service.wsdl create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/primitivesservice.composite create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/standard-types-service.composite create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/standard-types-service.wsdl create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/DatabindingTestCase.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/PrimitivesDatabindingTestCase.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/StandardTypesDatabindingTestCase.java create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxbgen/pom.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxbgen/src/main/resources/generate/generate.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxbgen/src/main/resources/greeter.composite create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/pom.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/readme.html create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/sdogen/pom.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/sdogen/src/main/resources/generate/generate.xml create mode 100644 sca-java-1.x/tags/1.6.1-RC2/itest/databindings/sdogen/src/main/resources/generate/greeter.composite.vm (limited to 'sca-java-1.x/tags/1.6.1-RC2/itest/databindings') diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/pom.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/pom.xml new file mode 100644 index 0000000000..d515cfc0b2 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/pom.xml @@ -0,0 +1,126 @@ + + + + + org.apache.tuscany.sca + itest-databindings + 1.6.1 + + + 4.0.0 + + itest-databindings-common + 1.6.1 + jar + Apache Tuscany SCA iTest Databinding Common + + + + + true + + java.net + java.net Maven 1.x Repository + http://download.java.net/maven/1 + legacy + + + + + + + true + + java.net + java.net Maven 1.x Repository + http://download.java.net/maven/1 + legacy + + + + + + org.apache.tuscany.sca + tuscany-databinding-sdo + ${pom.version} + compile + + + org.apache.tuscany.sdo + tuscany-sdo-tools + 1.1.1 + 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.1.1 + + + generate-sdo + generate-sources + + + + ${basedir}/src/main/resources/generate/generate.xsd + + + true + true + true + + + generate + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/java/org/apache/tuscany/sca/itest/generate/Generate.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/java/org/apache/tuscany/sca/itest/generate/Generate.java new file mode 100644 index 0000000000..adb546a1ea --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/java/org/apache/tuscany/sca/itest/generate/Generate.java @@ -0,0 +1,181 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, 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.File; +import java.io.FileInputStream; +import java.io.FileWriter; +import java.util.List; +import java.util.Properties; + +import org.apache.tuscany.generate.GenerateFactory; +import org.apache.tuscany.generate.GenerateType; +import org.apache.tuscany.generate.InputFileType; +import org.apache.tuscany.generate.TemplateType; +import org.apache.tuscany.sdo.generate.XSD2JavaGenerator; +import org.apache.tuscany.sdo.util.SDOUtil; +import org.apache.velocity.VelocityContext; +import org.apache.velocity.app.Velocity; + +import commonj.sdo.helper.HelperContext; +import commonj.sdo.helper.XMLDocument; + +/** + * Generates test files based on the information in a configuration files (generate.xml) + * and a set of velocity templates. The process is + * + * for each template + * for each xsd file + * generate SDOs + * 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 convenient 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 configured file holds a list of types + // that the velocity templates expand into appropriate methods and method calls + List fileList = generateType.getInputFile(); + + //Initialise 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); + File f = new File(filename); + // Create folders since the package doesn't exist before the code-gen for the 1st time + f.getParentFile().mkdirs(); + FileWriter fw = new FileWriter(f); + 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 SDO generator tool does all of the hard work + * + * @param projectBuildDir the path to the target dir of the project being generated. + */ + public static void generateSDO(String projectBuildDir) { + System.out.println(">> Building SDOs 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 convenient 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 configured file holds a list of types + // that the velocity templates expand into appropriate methods and method calls + List fileList = generateType.getInputFile(); + + // for each XSD in the XSD file list generate an SDO. + XSD2JavaGenerator generator = new XSD2JavaGenerator(); + + for ( Object item : fileList){ + InputFileType file = (InputFileType)item; + + XSD2JavaGenerator.generateFromXMLSchema(projectBuildDir + "/classes/xsd/" + file.getFileName(), + file.getNamespace(), + projectBuildDir + "/sdo-source", + file.getJavaPackage(), + null, //file.getPrefix(), + XSD2JavaGenerator.OPTION_NO_CONTAINMENT | XSD2JavaGenerator.OPTION_NO_NOTIFICATION | XSD2JavaGenerator.OPTION_NO_UNSETTABLE); + + } + + } 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.generate(args[0]); + + if (args.length > 1){ + Generate.generateSDO(args[0]); + } + } + +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/generate/DatabindingTestCase.java.vm b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/generate/DatabindingTestCase.java.vm new file mode 100644 index 0000000000..b2346aa973 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/generate/DatabindingTestCase.java.vm @@ -0,0 +1,112 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package $template.getJavaPackage(); + +import junit.framework.TestCase; + +import org.apache.tuscany.sca.host.embedded.SCADomain; +import org.osoa.sca.ComponentContext; +import org.osoa.sca.ServiceReference; + +import ${template.getJavaPackage()}.GreeterService; + +// Data types +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) +import $file.getJavaPackage().$typeInstance.getTypeName(); +import $file.getJavaPackage().$file.getFactory(); +#end +#end + +/** + * Automatically generated test case. Calls the greeter client for a number of + * bindings and a number of data types. + * + * @version $Rev: 511417 $ $Date: 2007-02-25 03:06:42 +0000 (Sun, 25 Feb 2007) $ + */ +public class DatabindingTestCase extends TestCase { + + private SCADomain domain; + private GreeterService greeterClient; + + /** + * Runs before each test method + */ + protected void setUp() throws Exception { + domain = SCADomain.newInstance("greeter.composite"); + super.setUp(); + } + + /** + * Runs after each test method + */ + protected void tearDown() { + domain.close(); + } + + /** + * Finds the SCA component that relates to the protocol being tested. This test + * always connects locally to the client component but the client component will + * connect to the back end component using the appropriate protocol + * + * @param ext the protcol required + */ + private void setUpClient(String ext) throws Exception { + greeterClient = domain.getService(GreeterService.class, ext + "GreeterServiceClient"); + } + + /** + * Invokes the SDO Greet service using web service bindings with SDO payload + */ + public void testWSGreet() throws Exception { + setUpClient("WS"); + greet(); + } + + /** + * Invokes the SDO Greet service using default bindings with SDO payload + */ + public void testDefaultGreet() throws Exception { + setUpClient("Default"); + greet(); + } + + /** + * A generic method which, regarless of which client is connected, sends out a + * series of requrests passing different data types. + */ + public void greet() { +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + // test $typeInstance.getTypeName() + { + $typeInstance.getTypeName() param = null; + $typeInstance.getCreateTypeCode() + $typeInstance.getTypeName() result = greeterClient.greet$typeInstance.getTypeName()(param); + $typeInstance.getResultComparison() + } +#end +#end + } + +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/generate/Greeter.wsdl.vm b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/generate/Greeter.wsdl.vm new file mode 100644 index 0000000000..88616cc997 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/generate/Greeter.wsdl.vm @@ -0,0 +1,103 @@ + + + + + + + +#foreach($file in $fileList) + +#end + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + + + + + + +#end +#end + + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + + + + + + +#end +#end + + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + + + +#end +#end + + + + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + + + + + + + + +#end +#end + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/generate/GreeterService.java.vm b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/generate/GreeterService.java.vm new file mode 100644 index 0000000000..77a12e92ec --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/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 automatically generated interface to the service that reflects data objects + * that are sent to it + * + * @version $Rev: 511417 $ $Date: 2007-02-25 03:06:42 +0000 (Sun, 25 Feb 2007) $ + */ +@Remotable +public interface GreeterService { + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + /** + * Take the provided data object, change it slightly and return it + * + * @param param the data object to be changed and returned + * @return the change data object + */ + $typeInstance.getTypeName() greet$typeInstance.getTypeName()($typeInstance.getTypeName() param); +#end +#end + +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/generate/GreeterServiceClient.java.vm b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/generate/GreeterServiceClient.java.vm new file mode 100644 index 0000000000..ee73db6152 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/generate/GreeterServiceClient.java.vm @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package $template.getJavaPackage(); + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) +import $file.getJavaPackage().$typeInstance.getTypeName(); +#end +#end + +import org.osoa.sca.annotations.AllowsPassByReference; + +/** + * GreeterServiceClient + */ +@AllowsPassByReference +public interface GreeterServiceClient { +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + $typeInstance.getTypeName() greet$typeInstance.getTypeName()($typeInstance.getTypeName() param); +#end +#end +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/generate/GreeterServiceClientImpl.java.vm b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/generate/GreeterServiceClientImpl.java.vm new file mode 100644 index 0000000000..aab564dc1e --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/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 automatically generated service that simply forwards data objects on to + * the GreeterService and passes back the responses + * + * @version $Rev: 508831 $ $Date: 2007-02-18 00:12:31 +0000 (Sun, 18 Feb 2007) $ + */ +@Service(GreeterService.class) +public class GreeterServiceClientImpl implements GreeterService { + + /** + * the reference the the GreeterService that will + * change each data object slightly and return it + */ + private GreeterService service; + + @Reference + public void setGreeterService(GreeterService service) { + this.service = service; + } +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + /* + * (non-Javadoc) + * + * @see org.apache.tuscany.sca.itest.sdodatabinding.GreeterService#greet$typeInstance.getTypeName()($typeInstance.getTypeName() param) + */ + public $typeInstance.getTypeName() greet$typeInstance.getTypeName()($typeInstance.getTypeName() param) { + return service.greet$typeInstance.getTypeName()(param); + } +#end +#end +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/generate/GreeterServiceImpl.java.vm b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/generate/GreeterServiceImpl.java.vm new file mode 100644 index 0000000000..5507a0b747 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/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 automatically generated service implementation that reflects data objects + * that are sent to it + * + * @version $Rev: 511417 $ $Date: 2007-02-25 03:06:42 +0000 (Sun, 25 Feb 2007) $ + */ +@Service(GreeterService.class) +public class GreeterServiceImpl implements GreeterService { +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + /** + * Take the provided data object, change it slightly and return it + * + * @param param the data object to be changed and returned + * @return the change data object + */ + public $typeInstance.getTypeName() greet$typeInstance.getTypeName()($typeInstance.getTypeName() param) { + $typeInstance.getModifyTypeCode() + return param; + } +#end +#end +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/generate/generate.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/generate/generate.xsd new file mode 100644 index 0000000000..1fabedf55f --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/generate/generate.xsd @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/wsdl/Dummy.txt b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/wsdl/Dummy.txt new file mode 100644 index 0000000000..8927d725b6 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/wsdl/Dummy.txt @@ -0,0 +1,4 @@ +A dummy file that causes the target/classes/wsdl dir to be created in the generated test project. This is +required because the test generator must run in the process-resource phase, after generate.xml has been copied +into target. The generator needs to write out target/classes/wsdl and will fail the directory isn't there. So +this file just gets unpacked and forces the directory to be created. diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Annotation.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Annotation.xml new file mode 100644 index 0000000000..f1f4346e58 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Annotation.xml @@ -0,0 +1,24 @@ + + + + SimpleTypeWithName + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Annotation.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Annotation.xsd new file mode 100644 index 0000000000..1fae43eb09 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Annotation.xsd @@ -0,0 +1,38 @@ + + + + + + SDO 2.0.1 + + A schema that tests the presence of annotations in schema read by SDO + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Attribute.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Attribute.xml new file mode 100644 index 0000000000..c20c80b658 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Attribute.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Attribute.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Attribute.xsd new file mode 100644 index 0000000000..bd3db2e030 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Attribute.xsd @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeReference.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeReference.xml new file mode 100644 index 0000000000..30e4979dca --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeReference.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeReference.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeReference.xsd new file mode 100644 index 0000000000..e7738dcff7 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeReference.xsd @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithDefaultValue.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithDefaultValue.xml new file mode 100644 index 0000000000..9552421e2d --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithDefaultValue.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithDefaultValue.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithDefaultValue.xsd new file mode 100644 index 0000000000..c7b9655749 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithDefaultValue.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithFixedValue.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithFixedValue.xml new file mode 100644 index 0000000000..5e5e7fbd55 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithFixedValue.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithFixedValue.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithFixedValue.xsd new file mode 100644 index 0000000000..5c455c2ab5 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithFixedValue.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOAliasName.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOAliasName.xml new file mode 100644 index 0000000000..635e851632 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOAliasName.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOAliasName.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOAliasName.xsd new file mode 100644 index 0000000000..004dab4fbb --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOAliasName.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDODataType.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDODataType.xml new file mode 100644 index 0000000000..136092951b --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDODataType.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDODataType.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDODataType.xsd new file mode 100644 index 0000000000..796f08e1cf --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDODataType.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOName.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOName.xml new file mode 100644 index 0000000000..927b94885c --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOName.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOName.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOName.xsd new file mode 100644 index 0000000000..93f83cd0a1 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOName.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertySDOOppositePropertyType.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertySDOOppositePropertyType.xml new file mode 100644 index 0000000000..ea7db70595 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertySDOOppositePropertyType.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertySDOOppositePropertyType.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertySDOOppositePropertyType.xsd new file mode 100644 index 0000000000..c64323e7e1 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertySDOOppositePropertyType.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertyType.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertyType.xml new file mode 100644 index 0000000000..85c7d85fd4 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertyType.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertyType.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertyType.xsd new file mode 100644 index 0000000000..543f276c50 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOPropertyType.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOString.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOString.xml new file mode 100644 index 0000000000..fcd281539b --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOString.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOString.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOString.xsd new file mode 100644 index 0000000000..1610c2b861 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/AttributeWithSDOString.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInAnySimpleType.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInAnySimpleType.xml new file mode 100644 index 0000000000..36a0760a61 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInAnySimpleType.xml @@ -0,0 +1,24 @@ + + + + anySimpleType + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInAnySimpleType.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInAnySimpleType.xsd new file mode 100644 index 0000000000..999b72bb35 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInAnySimpleType.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInAnyType.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInAnyType.xml new file mode 100644 index 0000000000..5849165fe0 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInAnyType.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInAnyType.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInAnyType.xsd new file mode 100644 index 0000000000..71dad561ca --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInAnyType.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInAnyURI.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInAnyURI.xml new file mode 100644 index 0000000000..8acf9376d7 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInAnyURI.xml @@ -0,0 +1,24 @@ + + + + http://tempuri.org + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInAnyURI.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInAnyURI.xsd new file mode 100644 index 0000000000..a49987c352 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInAnyURI.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInBase64Binary.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInBase64Binary.xml new file mode 100644 index 0000000000..a35b6e174a --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInBase64Binary.xml @@ -0,0 +1,24 @@ + + + + ABCDEF + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInBase64Binary.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInBase64Binary.xsd new file mode 100644 index 0000000000..e1995890f9 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInBase64Binary.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInBoolean.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInBoolean.xml new file mode 100644 index 0000000000..91cfce51b8 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInBoolean.xml @@ -0,0 +1,27 @@ + + + + true + false + 1 + 0 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInBoolean.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInBoolean.xsd new file mode 100644 index 0000000000..a2f86ba8c5 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInBoolean.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInByte.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInByte.xml new file mode 100644 index 0000000000..907474cd1b --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInByte.xml @@ -0,0 +1,25 @@ + + + + 127 + -127 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInByte.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInByte.xsd new file mode 100644 index 0000000000..a2f6bcfa77 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInByte.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDate.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDate.xml new file mode 100644 index 0000000000..c5820e1a2e --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDate.xml @@ -0,0 +1,24 @@ + + + + 2001-01-01 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDate.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDate.xsd new file mode 100644 index 0000000000..f4d596bfe3 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDate.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDateTime.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDateTime.xml new file mode 100644 index 0000000000..0debe2fec5 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDateTime.xml @@ -0,0 +1,24 @@ + + + + 2001-12-31T12:00:00 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDateTime.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDateTime.xsd new file mode 100644 index 0000000000..b5bcfdcfd4 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDateTime.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDecimal.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDecimal.xml new file mode 100644 index 0000000000..7f001254cc --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDecimal.xml @@ -0,0 +1,23 @@ + + + + -1.23456789 + 1.23456789 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDecimal.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDecimal.xsd new file mode 100644 index 0000000000..8d4d106f59 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDecimal.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDouble.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDouble.xml new file mode 100644 index 0000000000..f875b9f94d --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDouble.xml @@ -0,0 +1,25 @@ + + + + 0.0 + 12.3E-4 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDouble.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDouble.xsd new file mode 100644 index 0000000000..4c8a39b06c --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDouble.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDuration.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDuration.xml new file mode 100644 index 0000000000..7d343d6dda --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDuration.xml @@ -0,0 +1,24 @@ + + + + P1D + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDuration.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDuration.xsd new file mode 100644 index 0000000000..bb12bc04a9 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInDuration.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInFloat.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInFloat.xml new file mode 100644 index 0000000000..7a81f3b0dd --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInFloat.xml @@ -0,0 +1,24 @@ + + + + 0.0 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInFloat.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInFloat.xsd new file mode 100644 index 0000000000..f0e1c21233 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInFloat.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGDay.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGDay.xml new file mode 100644 index 0000000000..d35568b3c9 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGDay.xml @@ -0,0 +1,24 @@ + + + + ---01 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGDay.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGDay.xsd new file mode 100644 index 0000000000..92bd9a4b66 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGDay.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGMonth.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGMonth.xml new file mode 100644 index 0000000000..52cdfa8c4e --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGMonth.xml @@ -0,0 +1,24 @@ + + + + --01-- + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGMonth.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGMonth.xsd new file mode 100644 index 0000000000..78d001a585 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGMonth.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGMonthDay.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGMonthDay.xml new file mode 100644 index 0000000000..2609a858f7 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGMonthDay.xml @@ -0,0 +1,24 @@ + + + + --01-01 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGMonthDay.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGMonthDay.xsd new file mode 100644 index 0000000000..38f6c55059 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGMonthDay.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGYear.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGYear.xml new file mode 100644 index 0000000000..7868a47ca3 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGYear.xml @@ -0,0 +1,24 @@ + + + + 2001 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGYear.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGYear.xsd new file mode 100644 index 0000000000..0d65b124ff --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGYear.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGYearMonth.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGYearMonth.xml new file mode 100644 index 0000000000..3f5080d49f --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGYearMonth.xml @@ -0,0 +1,24 @@ + + + + 2001-01 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGYearMonth.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGYearMonth.xsd new file mode 100644 index 0000000000..340555dc5f --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInGYearMonth.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInHexBinary.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInHexBinary.xml new file mode 100644 index 0000000000..0deb7af980 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInHexBinary.xml @@ -0,0 +1,24 @@ + + + + 0F00 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInHexBinary.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInHexBinary.xsd new file mode 100644 index 0000000000..8059fe6da0 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInHexBinary.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInID.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInID.xml new file mode 100644 index 0000000000..06c92ce19b --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInID.xml @@ -0,0 +1,24 @@ + + + + idvalue0 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInID.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInID.xsd new file mode 100644 index 0000000000..7b1f02d1d4 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInID.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInIDREF.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInIDREF.xml new file mode 100644 index 0000000000..9bc0cefd0f --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInIDREF.xml @@ -0,0 +1,24 @@ + + + + idvalue0 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInIDREF.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInIDREF.xsd new file mode 100644 index 0000000000..0c207983bc --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInIDREF.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInIDREFS.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInIDREFS.xml new file mode 100644 index 0000000000..f91b602f99 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInIDREFS.xml @@ -0,0 +1,24 @@ + + + + idvalue0 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInIDREFS.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInIDREFS.xsd new file mode 100644 index 0000000000..b99bf01b73 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInIDREFS.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInInt.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInInt.xml new file mode 100644 index 0000000000..c99698e175 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInInt.xml @@ -0,0 +1,25 @@ + + + + -2147483648 + 2147483647 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInInt.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInInt.xsd new file mode 100644 index 0000000000..b5b9b0d1eb --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInInt.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInInteger.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInInteger.xml new file mode 100644 index 0000000000..80d22ce057 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInInteger.xml @@ -0,0 +1,25 @@ + + + + -2147483648 + 2147483647 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInInteger.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInInteger.xsd new file mode 100644 index 0000000000..4902935db5 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInInteger.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInLanguage.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInLanguage.xml new file mode 100644 index 0000000000..664bf824b4 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInLanguage.xml @@ -0,0 +1,24 @@ + + + + EN + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInLanguage.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInLanguage.xsd new file mode 100644 index 0000000000..5d3658d224 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInLanguage.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInLong.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInLong.xml new file mode 100644 index 0000000000..c5861fa92a --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInLong.xml @@ -0,0 +1,25 @@ + + + + -9223372036854775808 + 9223372036854775807 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInLong.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInLong.xsd new file mode 100644 index 0000000000..0aa4710057 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInLong.xsd @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNCName.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNCName.xml new file mode 100644 index 0000000000..1f95950394 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNCName.xml @@ -0,0 +1,24 @@ + + + + NCName + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNCName.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNCName.xsd new file mode 100644 index 0000000000..6ee9c435db --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNCName.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKEN.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKEN.xml new file mode 100644 index 0000000000..0297f1aeb4 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKEN.xml @@ -0,0 +1,24 @@ + + + + NMTOKEN + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKEN.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKEN.xsd new file mode 100644 index 0000000000..56d027bdbb --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKEN.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKENS.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKENS.xml new file mode 100644 index 0000000000..81ba1069bd --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKENS.xml @@ -0,0 +1,24 @@ + + + + NMTOKENS + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKENS.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKENS.xsd new file mode 100644 index 0000000000..866ab73024 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNMTOKENS.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNOTATION.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNOTATION.xml new file mode 100644 index 0000000000..8bb3a08b94 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNOTATION.xml @@ -0,0 +1,24 @@ + + + + tns:BuiltInNotationNotation + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNOTATION.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNOTATION.xsd new file mode 100644 index 0000000000..c7c62f812b --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNOTATION.xsd @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInName.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInName.xml new file mode 100644 index 0000000000..8235718c5e --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInName.xml @@ -0,0 +1,24 @@ + + + + Name + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInName.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInName.xsd new file mode 100644 index 0000000000..36caba2f16 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInName.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNegativeInteger.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNegativeInteger.xml new file mode 100644 index 0000000000..599c428a44 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNegativeInteger.xml @@ -0,0 +1,24 @@ + + + + -1 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNegativeInteger.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNegativeInteger.xsd new file mode 100644 index 0000000000..389d5a99f0 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNegativeInteger.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNonNegativeInteger.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNonNegativeInteger.xml new file mode 100644 index 0000000000..919c4a20ee --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNonNegativeInteger.xml @@ -0,0 +1,24 @@ + + + + 0 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNonNegativeInteger.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNonNegativeInteger.xsd new file mode 100644 index 0000000000..59887078b5 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNonNegativeInteger.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNonPositiveInteger.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNonPositiveInteger.xml new file mode 100644 index 0000000000..79011f26ab --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNonPositiveInteger.xml @@ -0,0 +1,24 @@ + + + + -1 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNonPositiveInteger.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNonPositiveInteger.xsd new file mode 100644 index 0000000000..5de7d64d7b --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNonPositiveInteger.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNormalizedString.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNormalizedString.xml new file mode 100644 index 0000000000..c40be9e18b --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNormalizedString.xml @@ -0,0 +1,24 @@ + + + + normalizedString + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNormalizedString.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNormalizedString.xsd new file mode 100644 index 0000000000..d4a78787b8 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInNormalizedString.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInPositiveInteger.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInPositiveInteger.xml new file mode 100644 index 0000000000..c30434de66 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInPositiveInteger.xml @@ -0,0 +1,24 @@ + + + + 1 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInPositiveInteger.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInPositiveInteger.xsd new file mode 100644 index 0000000000..5381590cd1 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInPositiveInteger.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInQName.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInQName.xml new file mode 100644 index 0000000000..4cd6ea7e72 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInQName.xml @@ -0,0 +1,24 @@ + + + + QName + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInQName.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInQName.xsd new file mode 100644 index 0000000000..e8faf6225b --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInQName.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInShort.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInShort.xml new file mode 100644 index 0000000000..b4375467c4 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInShort.xml @@ -0,0 +1,25 @@ + + + + -32768 + 32767 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInShort.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInShort.xsd new file mode 100644 index 0000000000..a4f564d9b7 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInShort.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInString.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInString.xml new file mode 100644 index 0000000000..d30ab85530 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInString.xml @@ -0,0 +1,24 @@ + + + + string + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInString.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInString.xsd new file mode 100644 index 0000000000..8abb34b5a5 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInString.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInTime.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInTime.xml new file mode 100644 index 0000000000..7fd9a061ae --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInTime.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInTime.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInTime.xsd new file mode 100644 index 0000000000..1615976813 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInTime.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInToken.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInToken.xml new file mode 100644 index 0000000000..cd567ba528 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInToken.xml @@ -0,0 +1,24 @@ + + + + token + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInToken.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInToken.xsd new file mode 100644 index 0000000000..0beaac571f --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInToken.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedByte.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedByte.xml new file mode 100644 index 0000000000..025362defb --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedByte.xml @@ -0,0 +1,25 @@ + + + + 0 + 255 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedByte.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedByte.xsd new file mode 100644 index 0000000000..d6d951fe5d --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedByte.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedInt.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedInt.xml new file mode 100644 index 0000000000..5736a8c121 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedInt.xml @@ -0,0 +1,25 @@ + + + + 0 + 4294967295 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedInt.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedInt.xsd new file mode 100644 index 0000000000..242be1d53b --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedInt.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedLong.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedLong.xml new file mode 100644 index 0000000000..d728115a77 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedLong.xml @@ -0,0 +1,25 @@ + + + + 0 + 18446744073709551615 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedLong.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedLong.xsd new file mode 100644 index 0000000000..108e3a8619 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedLong.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedShort.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedShort.xml new file mode 100644 index 0000000000..d4ffae5e17 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedShort.xml @@ -0,0 +1,25 @@ + + + + 0 + 65535 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedShort.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedShort.xsd new file mode 100644 index 0000000000..5ee5e0229e --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/BuiltInUnsignedShort.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeComplexContentRestrictingComplexType.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeComplexContentRestrictingComplexType.xml new file mode 100644 index 0000000000..3d5aed5aa8 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeComplexContentRestrictingComplexType.xml @@ -0,0 +1,26 @@ + + + + + SimpleTypeWithName + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeComplexContentRestrictingComplexType.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeComplexContentRestrictingComplexType.xsd new file mode 100644 index 0000000000..e7b80ab11c --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeComplexContentRestrictingComplexType.xsd @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingComplexType.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingComplexType.xml new file mode 100644 index 0000000000..2b4fe5594e --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingComplexType.xml @@ -0,0 +1,27 @@ + + + + + SimpleTypeWithName + SimpleTypeWithNameExtended + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingComplexType.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingComplexType.xsd new file mode 100644 index 0000000000..fc4deb63c2 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingComplexType.xsd @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingSimpleType.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingSimpleType.xml new file mode 100644 index 0000000000..03570f41d9 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingSimpleType.xml @@ -0,0 +1,24 @@ + + + + ComplexTypeExtendingSimpeTypeElement + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingSimpleType.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingSimpleType.xsd new file mode 100644 index 0000000000..c754502645 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeExtendingSimpleType.xsd @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeSimpleContentRestrictingComplexType.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeSimpleContentRestrictingComplexType.xml new file mode 100644 index 0000000000..4603793bfc --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeSimpleContentRestrictingComplexType.xml @@ -0,0 +1,24 @@ + + + + ComplexTypeSimpleContentRestrictingComplexTypeElement + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeSimpleContentRestrictingComplexType.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeSimpleContentRestrictingComplexType.xsd new file mode 100644 index 0000000000..4bcd2f8c46 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeSimpleContentRestrictingComplexType.xsd @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithAbstract.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithAbstract.xml new file mode 100644 index 0000000000..a6861f803a --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithAbstract.xml @@ -0,0 +1,27 @@ + + + + + BaseElement + ExtensionElement + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithAbstract.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithAbstract.xsd new file mode 100644 index 0000000000..8bb251cab2 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithAbstract.xsd @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithCDATA.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithCDATA.xml new file mode 100644 index 0000000000..467ec007ed --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithCDATA.xml @@ -0,0 +1,30 @@ + + + + + Some + ]]> + Mixed + SimpleType]]>WithName + Content + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithCDATA.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithCDATA.xsd new file mode 100644 index 0000000000..8d00646678 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithCDATA.xsd @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithContent.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithContent.xml new file mode 100644 index 0000000000..7deafd798a --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithContent.xml @@ -0,0 +1,26 @@ + + + + + SimpleTypeWithName + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithContent.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithContent.xsd new file mode 100644 index 0000000000..72ac75fee0 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithContent.xsd @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithMixed.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithMixed.xml new file mode 100644 index 0000000000..f6208f81b3 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithMixed.xml @@ -0,0 +1,29 @@ + + + + + Some + Mixed + SimpleTypeWithName + Content + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithMixed.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithMixed.xsd new file mode 100644 index 0000000000..1f26e13673 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithMixed.xsd @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenAttributes.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenAttributes.xml new file mode 100644 index 0000000000..97de7b98eb --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenAttributes.xml @@ -0,0 +1,24 @@ + + + + + SimpleTypeWithName + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenAttributes.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenAttributes.xsd new file mode 100644 index 0000000000..67716553d8 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenAttributes.xsd @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenContent.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenContent.xml new file mode 100644 index 0000000000..5941348921 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenContent.xml @@ -0,0 +1,31 @@ + + + + + + + Some + Mixed + SimpleTypeWithName + Content + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenContent.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenContent.xsd new file mode 100644 index 0000000000..24d5d09054 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOpenContent.xsd @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOppositeProperty.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOppositeProperty.xml new file mode 100644 index 0000000000..f684d06a4d --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOppositeProperty.xml @@ -0,0 +1,30 @@ + + + + + SomeData + + + idvalue2 + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOppositeProperty.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOppositeProperty.xsd new file mode 100644 index 0000000000..de4a8a666d --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithOppositeProperty.xsd @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOAliasName.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOAliasName.xml new file mode 100644 index 0000000000..242908bd27 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOAliasName.xml @@ -0,0 +1,26 @@ + + + + + SimpleTypeWithName + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOAliasName.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOAliasName.xsd new file mode 100644 index 0000000000..4c00fbe295 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOAliasName.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOName.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOName.xml new file mode 100644 index 0000000000..925e8625d5 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOName.xml @@ -0,0 +1,26 @@ + + + + + SimpleTypeWithName + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOName.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOName.xsd new file mode 100644 index 0000000000..b12bec040b --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOName.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOSequence.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOSequence.xml new file mode 100644 index 0000000000..c73708ce46 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOSequence.xml @@ -0,0 +1,26 @@ + + + + + SimpleTypeWithName + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOSequence.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOSequence.xsd new file mode 100644 index 0000000000..795c3ea7d9 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithSDOSequence.xsd @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutContent.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutContent.xml new file mode 100644 index 0000000000..3ebdc89ae0 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutContent.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutContent.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutContent.xsd new file mode 100644 index 0000000000..21546d0f67 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutContent.xsd @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutName.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutName.xml new file mode 100644 index 0000000000..89657e42ca --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutName.xml @@ -0,0 +1,26 @@ + + + + + SimpleTypeWithName + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutName.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutName.xsd new file mode 100644 index 0000000000..d01b4172e4 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ComplexTypeWithoutName.xsd @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/DefaultNamespace.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/DefaultNamespace.xml new file mode 100644 index 0000000000..82fd1eedaf --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/DefaultNamespace.xml @@ -0,0 +1,23 @@ + + + + SimpleTypeWithName + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/DefaultNamespace.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/DefaultNamespace.xsd new file mode 100644 index 0000000000..e1dcf06194 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/DefaultNamespace.xsd @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementInAll.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementInAll.xml new file mode 100644 index 0000000000..ebf03c9d5d --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementInAll.xml @@ -0,0 +1,27 @@ + + + + + ElementInAllOne + ElementInAllTwo + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementInAll.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementInAll.xsd new file mode 100644 index 0000000000..8b9ba5b4b8 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementInAll.xsd @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementInChoice.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementInChoice.xml new file mode 100644 index 0000000000..26466b1b39 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementInChoice.xml @@ -0,0 +1,25 @@ + + + + Element1InChoice + Element2InChoice + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementInChoice.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementInChoice.xsd new file mode 100644 index 0000000000..ff418c56ab --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementInChoice.xsd @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSDOChangeSummaryType.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSDOChangeSummaryType.xml new file mode 100644 index 0000000000..27bb1ce9cc --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSDOChangeSummaryType.xml @@ -0,0 +1,29 @@ + + + + + + ChangeSummaryText + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSDOChangeSummaryType.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSDOChangeSummaryType.xsd new file mode 100644 index 0000000000..2bf1df8c99 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSDOChangeSummaryType.xsd @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithDefault.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithDefault.xml new file mode 100644 index 0000000000..9b5561ed43 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithDefault.xml @@ -0,0 +1,24 @@ + + + + ElementOfSimpleTypeWithDefaultDefault + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithDefault.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithDefault.xsd new file mode 100644 index 0000000000..0b4e7bdf45 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithDefault.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithFixed.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithFixed.xml new file mode 100644 index 0000000000..f1b7cd264c --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithFixed.xml @@ -0,0 +1,24 @@ + + + + ElementOfSimpleTypeWithFixedFixed + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithFixed.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithFixed.xsd new file mode 100644 index 0000000000..a2c8456257 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithFixed.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDODataType.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDODataType.xml new file mode 100644 index 0000000000..1f60b0423f --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDODataType.xml @@ -0,0 +1,24 @@ + + + + ElementOfSimpleTypeWithSDODataTypeElement + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDODataType.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDODataType.xsd new file mode 100644 index 0000000000..21e55ab8c1 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDODataType.xsd @@ -0,0 +1,33 @@ + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOOppositePropertyType.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOOppositePropertyType.xml new file mode 100644 index 0000000000..30762f4912 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOOppositePropertyType.xml @@ -0,0 +1,24 @@ + + + + idvalue0 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOOppositePropertyType.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOOppositePropertyType.xsd new file mode 100644 index 0000000000..5bf35d0d70 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOOppositePropertyType.xsd @@ -0,0 +1,33 @@ + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOPropertyType.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOPropertyType.xml new file mode 100644 index 0000000000..2dd01e4090 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOPropertyType.xml @@ -0,0 +1,24 @@ + + + + idvalue0 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOPropertyType.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOPropertyType.xsd new file mode 100644 index 0000000000..6920cd8dd0 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOPropertyType.xsd @@ -0,0 +1,32 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOString.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOString.xml new file mode 100644 index 0000000000..6a526bdc47 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOString.xml @@ -0,0 +1,24 @@ + + + + ElementOfSimpleTypeWithSDOStringElement + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOString.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOString.xsd new file mode 100644 index 0000000000..1117a95eb8 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementOfSimpleTypeWithSDOString.xsd @@ -0,0 +1,32 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementSubstitutionGroupBase.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementSubstitutionGroupBase.xml new file mode 100644 index 0000000000..ab91458bff --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementSubstitutionGroupBase.xml @@ -0,0 +1,40 @@ + + + + + + ElementInSubstitutionGroupBase + + + + Some Data + + + + ElementInSubstitutionGroupBase + + + ElementInSubstitutionGroupExtends + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementSubstitutionGroupBase.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementSubstitutionGroupBase.xsd new file mode 100644 index 0000000000..3e015843b5 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementSubstitutionGroupBase.xsd @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithMaxOccurs.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithMaxOccurs.xml new file mode 100644 index 0000000000..b6d68fd08a --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithMaxOccurs.xml @@ -0,0 +1,25 @@ + + + + ElementWithMaxOccursElement1 + ElementWithMaxOccursElement2 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithMaxOccurs.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithMaxOccurs.xsd new file mode 100644 index 0000000000..d4453a4477 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithMaxOccurs.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithNillable.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithNillable.xml new file mode 100644 index 0000000000..6de3adc937 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithNillable.xml @@ -0,0 +1,24 @@ + + + + ElementWithNillableElement + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithNillable.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithNillable.xsd new file mode 100644 index 0000000000..786ab226da --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithNillable.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithSDOAliasName.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithSDOAliasName.xml new file mode 100644 index 0000000000..64093aa803 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithSDOAliasName.xml @@ -0,0 +1,24 @@ + + + + ElementWithSDOAliasName + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithSDOAliasName.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithSDOAliasName.xsd new file mode 100644 index 0000000000..01f4c2b1ef --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithSDOAliasName.xsd @@ -0,0 +1,32 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithSDOName.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithSDOName.xml new file mode 100644 index 0000000000..774646f682 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithSDOName.xml @@ -0,0 +1,24 @@ + + + + ElementWithSDONameElement + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithSDOName.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithSDOName.xsd new file mode 100644 index 0000000000..34da37564c --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ElementWithSDOName.xsd @@ -0,0 +1,32 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/GlobalElementComplexType.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/GlobalElementComplexType.xml new file mode 100644 index 0000000000..a1fb3aa803 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/GlobalElementComplexType.xml @@ -0,0 +1,24 @@ + + + + SimpleTypeWithName + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/GlobalElementComplexType.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/GlobalElementComplexType.xsd new file mode 100644 index 0000000000..8eb7a4fce4 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/GlobalElementComplexType.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/GlobalElementSimpleType.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/GlobalElementSimpleType.xml new file mode 100644 index 0000000000..f68eb1939d --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/GlobalElementSimpleType.xml @@ -0,0 +1,24 @@ + + + + GlobalElementSimpleType + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/GlobalElementSimpleType.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/GlobalElementSimpleType.xsd new file mode 100644 index 0000000000..b9f77e6658 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/GlobalElementSimpleType.xsd @@ -0,0 +1,26 @@ + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Import.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Import.xml new file mode 100644 index 0000000000..fd28850050 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Import.xml @@ -0,0 +1,30 @@ + + + + + SimpleTypeWithName + + SomeString + SomeString + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Import.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Import.xsd new file mode 100644 index 0000000000..eae93fd44a --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Import.xsd @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ImportedSchema.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ImportedSchema.xsd new file mode 100644 index 0000000000..a7e568decf --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/ImportedSchema.xsd @@ -0,0 +1,33 @@ + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Include.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Include.xml new file mode 100644 index 0000000000..d4b9e24fa6 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Include.xml @@ -0,0 +1,24 @@ + + + + SimpleTypeWithName + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Include.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Include.xsd new file mode 100644 index 0000000000..34ff314a19 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Include.xsd @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Interop.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Interop.xsd new file mode 100644 index 0000000000..ae22ab2c44 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Interop.xsd @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Notation.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Notation.xml new file mode 100644 index 0000000000..b75ac6500a --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Notation.xml @@ -0,0 +1,24 @@ + + + +tns:Tuscany + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Notation.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Notation.xsd new file mode 100644 index 0000000000..6ad019cb81 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Notation.xsd @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Person.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Person.xsd new file mode 100644 index 0000000000..5f5021b15e --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/Person.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SDOJavaPackage.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SDOJavaPackage.xml new file mode 100644 index 0000000000..6c5ad88ff4 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SDOJavaPackage.xml @@ -0,0 +1,25 @@ + + + + SimpleTypeWithName + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SDOJavaPackage.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SDOJavaPackage.xsd new file mode 100644 index 0000000000..6b7e39b334 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SDOJavaPackage.xsd @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithAbstract.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithAbstract.xml new file mode 100644 index 0000000000..f9d4a24a49 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithAbstract.xml @@ -0,0 +1,24 @@ + + + + SimpleTypeWithAbstractExtensionElement + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithAbstract.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithAbstract.xsd new file mode 100644 index 0000000000..f649e2ba83 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithAbstract.xsd @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithExtendedInstanceClass.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithExtendedInstanceClass.xml new file mode 100644 index 0000000000..410df4b7e4 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithExtendedInstanceClass.xml @@ -0,0 +1,24 @@ + + + + SimpleTypeWithExtendedInstanceClassElement + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithExtendedInstanceClass.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithExtendedInstanceClass.xsd new file mode 100644 index 0000000000..5d27ef5ce1 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithExtendedInstanceClass.xsd @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithInstanceClass.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithInstanceClass.xml new file mode 100644 index 0000000000..7b74867c03 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithInstanceClass.xml @@ -0,0 +1,24 @@ + + + + SimpleTypeWithInstanceClassElement + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithInstanceClass.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithInstanceClass.xsd new file mode 100644 index 0000000000..ec16a678a3 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithInstanceClass.xsd @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithList.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithList.xml new file mode 100644 index 0000000000..708d526f44 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithList.xml @@ -0,0 +1,24 @@ + + + + listmember1 listmember2 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithList.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithList.xsd new file mode 100644 index 0000000000..ed681009f9 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithList.xsd @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithName.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithName.xml new file mode 100644 index 0000000000..e404ac86b7 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithName.xml @@ -0,0 +1,24 @@ + + + + SimpleTypeWithNameElement + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithName.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithName.xsd new file mode 100644 index 0000000000..af0431f048 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithName.xsd @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithSDOName.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithSDOName.xml new file mode 100644 index 0000000000..c86a0f6bcb --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithSDOName.xml @@ -0,0 +1,24 @@ + + + + SimpleTypeWithSDONameElement + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithSDOName.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithSDOName.xsd new file mode 100644 index 0000000000..89b00a36cc --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithSDOName.xsd @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithUnion.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithUnion.xml new file mode 100644 index 0000000000..399b0d8175 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithUnion.xml @@ -0,0 +1,25 @@ + + + + EN + 01:02:03 + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithUnion.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithUnion.xsd new file mode 100644 index 0000000000..ea35bec61a --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithUnion.xsd @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithoutName.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithoutName.xml new file mode 100644 index 0000000000..bc8cf35368 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithoutName.xml @@ -0,0 +1,26 @@ + + + + + SimpleTypeWithoutName + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithoutName.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithoutName.xsd new file mode 100644 index 0000000000..57981e3666 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/SimpleTypeWithoutName.xsd @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/TargetNamespace.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/TargetNamespace.xml new file mode 100644 index 0000000000..da2929776e --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/TargetNamespace.xml @@ -0,0 +1,24 @@ + + + + SimpleTypeWithName + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/TargetNamespace.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/TargetNamespace.xsd new file mode 100644 index 0000000000..ace5427786 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/TargetNamespace.xsd @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/datagraph.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/datagraph.xsd new file mode 100644 index 0000000000..e6b9697a8d --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/datagraph.xsd @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Expected type is emof:Package. + + + + + + + + + + + Expected type is xsd:schema. + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/sdoJava.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/sdoJava.xsd new file mode 100644 index 0000000000..7387568942 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/sdoJava.xsd @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/sdoModel.xsd b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/sdoModel.xsd new file mode 100644 index 0000000000..c5aabc9cc8 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/main/resources/xsd/sdoModel.xsd @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/test/java/org/apache/tuscany/sca/itest/generate/GenerateTestCase.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/test/java/org/apache/tuscany/sca/itest/generate/GenerateTestCase.java new file mode 100644 index 0000000000..fa3f310d4d --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/common/src/test/java/org/apache/tuscany/sca/itest/generate/GenerateTestCase.java @@ -0,0 +1,49 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.generate; + +import junit.framework.TestCase; + + +/** + * + */ +public class GenerateTestCase extends TestCase { + + //private Generate generator = null; + + @Override + protected void setUp() throws Exception { + //generator = new Generate(); + } + + @Override + protected void tearDown() { + } + + /** + * Invokes the Generate class to generate databinding test classes and resources. + * + * @throws Exception + */ + public void testGenerate() throws Exception { + //generator.generate(); + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/config.png b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/config.png new file mode 100644 index 0000000000..7912019e9d Binary files /dev/null and b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/config.png differ diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/config.svg b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/config.svg new file mode 100644 index 0000000000..aaf027e2df --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/config.svg @@ -0,0 +1,117 @@ + + + + + + + + + + + image/svg+xml + + + + + + <tns:Generate ...> <Template> <TemplateName>greeter.composite.vm</TemplateName> <TemplateTargetDir>classes</TemplateTargetDir> </Template> ... <InputFile> <FileName>Person.xsd</FileName> <FilePath>xsd</FilePath> <JavaPackage>org.apache.tuscany.sca.itest.databinding.types</JavaPackage> <Factory>TypesFactory</Factory> <Namespace>http://apache.org/tuscany/sca/itest/databinding/types</Namespace> <Prefix>p</Prefix> <Type> <TypeName>PersonType</TypeName> <CreateTypeCode> TypesFactory factory = TypesFactory.INSTANCE; param = factory.createPersonType(); param.setFirstName("George"); param.setLastName("Doors"); </CreateTypeCode> <ModifyTypeCode> param.setGreeting("Hello"); </ModifyTypeCode> <ResultComparison> assertNotSame("greetedPerson.getGreeting() not set", "", result.getGreeting()); </ResultComparison> </Type> </InputFile> ...</tns:Generate> + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/databinding.png b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/databinding.png new file mode 100644 index 0000000000..76a9c71b7d Binary files /dev/null and b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/databinding.png differ diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/databinding.svg b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/databinding.svg new file mode 100644 index 0000000000..d6850ccf7d --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/databinding.svg @@ -0,0 +1,242 @@ + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + GreeterService + + DefaultGreeterServiceClient + + + GreeterServiceComponent + + WSGreeterServiceClient + + + + + WSReference WSService + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop.png b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop.png new file mode 100644 index 0000000000..005e0f24ea Binary files /dev/null and b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop.png differ diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop.svg b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop.svg new file mode 100644 index 0000000000..03897c6d09 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop.svg @@ -0,0 +1,352 @@ + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + InteropGreeterService + + SDODefaultGreeterServiceClient + + + SDOGreeterServiceComponent + + SDOWSGreeterServiceClient + + + + WSReference WSService + JAXBDefaultGreeterServiceClient + + + JAXBWSGreeterServiceClient + + + + WSReference WSService + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop/pom.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop/pom.xml new file mode 100644 index 0000000000..5732be3182 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop/pom.xml @@ -0,0 +1,238 @@ + + + + + org.apache.tuscany.sca + itest-databindings + 1.6.1 + + + 4.0.0 + + itest-databindings-interop + 1.6.1 + jar + Apache Tuscany SCA iTest DataBinding Interop + + + + + true + + java.net + java.net Maven 1.x Repository + http://download.java.net/maven/1 + legacy + + + java.net2 + java.net Maven 2.x Repository + http://download.java.net/maven/2 + + + + + + + true + + java.net + java.net Maven 1.x Repository + http://download.java.net/maven/1 + legacy + + + + false + + ibiblio + ibiblio Maven 2.x Repository + http://mirrors.ibiblio.org/pub/mirrors/maven2 + + + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-databinding-jaxb + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-databinding-sdo + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-databinding-axiom + ${pom.version} + compile + + + javax.xml.bind + jaxb-api + 2.1 + compile + + + + javax.xml.ws + jaxws-api + 2.1 + + + javax.xml.soap + saaj-api + + + + + org.apache.tuscany.sca + itest-databindings-common + ${pom.version} + compile + + + org.apache.tuscany.sca + itest-databindings-sdo + ${pom.version} + compile + + + org.apache.tuscany.sca + itest-databindings-jaxb + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-host-embedded + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-interface-java-xml + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-host-jetty + 1.6.1 + test + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + -Djava.endorsed.dirs=target/endorsed + + + + org.apache.maven.plugins + maven-dependency-plugin + + + generate-sources + + unpack + + + + + org.apache.tuscany.sca + itest-databindings-common + ${project.version} + true + ${project.build.directory}/classes + + + + + + copy + generate-sources + + copy + + + + + javax.xml.ws + jaxws-api + 2.1 + jar + + + javax.xml.bind + jaxb-api + 2.1 + jar + + + ${project.build.directory}/endorsed + false + true + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.1 + + + generate-test-source + process-resources + + java + + + + + org.apache.tuscany.sca.itest.generate.Generate + + ${project.build.directory} + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop/src/main/resources/generate/InteropDatabindingTestCase.java.vm b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop/src/main/resources/generate/InteropDatabindingTestCase.java.vm new file mode 100644 index 0000000000..7bdfc57924 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop/src/main/resources/generate/InteropDatabindingTestCase.java.vm @@ -0,0 +1,113 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package $template.getJavaPackage(); + +import junit.framework.TestCase; + +import org.apache.tuscany.sca.host.embedded.SCADomain; +import ${template.getJavaPackage()}.GreeterService; + +// Data types +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) +import $file.getJavaPackage().$typeInstance.getTypeName(); +import $file.getJavaPackage().$file.getFactory(); +#end +#end + +/** + * Automatically generated test case. Calls the greeter client for a number of + * bindings and a number of data types. + * + * @version $Rev: 511417 $ $Date: 2007-02-25 03:06:42 +0000 (Sun, 25 Feb 2007) $ + */ +public class InteropDatabindingTestCase extends TestCase { + + private static boolean initalised = false; + private GreeterService greeterClient; + private static SCADomain domain; + + /** + * Runs before each test method + */ + protected void setUp() throws Exception { + if (!initalised) { + domain = SCADomain.newInstance("interopgreeter.composite"); + super.setUp(); + initalised = true; + } + } + + /** + * Runs after each test method + */ + protected void tearDown() { + + } + + /** + * Finds the SCA component that relates to the protocol being tested. This test + * always connects locally to the client component but the client component will + * connect to the back end component using the appropriate protocol + * + * @param ext the protcol required + */ + private void setUpClient(String ext) throws Exception { + greeterClient = domain.getService(GreeterService.class, "SDO" + ext + "GreeterServiceClient"); + } + + /** + * Invokes the SDO Greet service using web service bindings with SDO payload + */ + public void testWSGreet() throws Exception { + setUpClient("WS"); + greet(); + } + + /** + * Invokes the SDO Greet service using default bindings with SDO payload + */ + public void testDefaultGreet() throws Exception { + setUpClient("Default"); + greet(); + } + + /** + * A generic method which, regarless of which client is connected, sends out a + * series of requrests passing different data types. + */ + public void greet() { +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + // test $typeInstance.getTypeName() + { + $typeInstance.getTypeName() param = null; + $typeInstance.getCreateTypeCode() + $typeInstance.getTypeName() result = greeterClient.greet$typeInstance.getTypeName()(param); + $typeInstance.getResultComparison() + } +#end +#end + } + +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop/src/main/resources/generate/JAXBGreeter.wsdl.vm b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop/src/main/resources/generate/JAXBGreeter.wsdl.vm new file mode 100644 index 0000000000..38bfccce0c --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop/src/main/resources/generate/JAXBGreeter.wsdl.vm @@ -0,0 +1,103 @@ + + + + + + + +#foreach($file in $fileList) + +#end + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + + + + + + +#end +#end + + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + + + + + + +#end +#end + + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + + + +#end +#end + + + + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + + + + + + + + +#end +#end + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop/src/main/resources/generate/SDOGreeter.wsdl.vm b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop/src/main/resources/generate/SDOGreeter.wsdl.vm new file mode 100644 index 0000000000..6f02af4c9d --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop/src/main/resources/generate/SDOGreeter.wsdl.vm @@ -0,0 +1,103 @@ + + + + + + + +#foreach($file in $fileList) + +#end + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + + + + + + +#end +#end + + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + + + + + + +#end +#end + + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + + + +#end +#end + + + + +#foreach($file in $fileList) +#set($typeList = $file.getType_()) +#foreach($typeInstance in $typeList) + + + + + + + + + +#end +#end + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop/src/main/resources/generate/generate.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop/src/main/resources/generate/generate.xml new file mode 100644 index 0000000000..8453dd56b4 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop/src/main/resources/generate/generate.xml @@ -0,0 +1,159 @@ + + + + + + + + + + Person.xsd + xsd + org.apache.tuscany.sca.itest.databinding.types + TypesFactory + http://apache.org/tuscany/sca/itest/databinding/types + p + + PersonType + + TypesFactory factory = TypesFactory.INSTANCE; + param = factory.createPersonType(); + param.setFirstName("George"); + param.setLastName("Doors"); + + + param.setGreeting("Hello"); + + + assertNotSame("greetedPerson.getGreeting() not set", "", result.getGreeting()); + + + + + Interop.xsd + xsd + org.apache.tuscany.interop + InteropFactory + http://www.apache.org/tuscany/interop + i + + + AttributeComplexType + + InteropFactory factory = InteropFactory.INSTANCE; + org.apache.tuscany.interop.AttributeType attrib = factory.createAttributeType(); + attrib.setAttribute("SomeText"); + param = factory.createAttributeComplexType(); + param.setAttributeElement(attrib); + + + param.getAttributeElement().setAttribute("SomeChangedText");; + + + assertEquals("data not changed corretly", "SomeChangedText", result.getAttributeElement().getAttribute()); + + + + AttributeReferenceComplexType + + InteropFactory factory = InteropFactory.INSTANCE; + param = factory.createAttributeReferenceComplexType(); + + param.setReferencedAttribute("SomeText"); + + + param.setReferencedAttribute("SomeChangedText");; + + + assertEquals("data not changed corretly", "SomeChangedText", result.getReferencedAttribute()); + + + + SimpleTypeWithAbstractComplexType + + InteropFactory factory = InteropFactory.INSTANCE; + param = factory.createSimpleTypeWithAbstractComplexType(); + param.setSimpleTypeWithAbstractExtensionElement("SomeText"); + + + param.setSimpleTypeWithAbstractExtensionElement("SomeChangedText");; + + + assertEquals("data not changed corretly", "SomeChangedText", result.getSimpleTypeWithAbstractExtensionElement()); + + + + SimpleTypeWithNameComplexType + + InteropFactory factory = InteropFactory.INSTANCE; + param = factory.createSimpleTypeWithNameComplexType(); + param.setSimpleTypeWithNameElement("SomeText"); + + + param.setSimpleTypeWithNameElement("SomeChangedText");; + + + assertEquals("data not changed corretly", "SomeChangedText", result.getSimpleTypeWithNameElement()); + + + + ComplexTypeWithContentType + + InteropFactory factory = InteropFactory.INSTANCE; + param = factory.createComplexTypeWithContentType(); + param.setSimpleTypeWithName("SomeText"); + + + param.setSimpleTypeWithName("SomeChangedText");; + + + assertEquals("data not changed corretly", "SomeChangedText", result.getSimpleTypeWithName()); + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop/src/main/resources/generate/interopgreeter.composite.vm b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop/src/main/resources/generate/interopgreeter.composite.vm new file mode 100644 index 0000000000..36797fde57 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/interop/src/main/resources/generate/interopgreeter.composite.vm @@ -0,0 +1,78 @@ + + + + + + #foreach( $file in $fileList ) + + #end + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/pom.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/pom.xml new file mode 100644 index 0000000000..fcd01a242d --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/pom.xml @@ -0,0 +1,260 @@ + + + + + org.apache.tuscany.sca + itest-databindings + 1.6.1 + + + 4.0.0 + + itest-databindings-jaxb-bottom-up + 1.6.1 + jar + Apache Tuscany SCA iTest Databinding - JAXB Bottom Up + + + + + true + + java.net + java.net Maven 1.x Repository + http://download.java.net/maven/1 + legacy + + + java.net2 + java.net Maven 2.x Repository + http://download.java.net/maven/2 + + + + + + java.net2 + java.net Maven 2.x Repository + http://download.java.net/maven/2 + + + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + ${pom.version} + runtime + + + org.apache.tuscany.sca + tuscany-databinding-jaxb + ${pom.version} + runtime + + + org.apache.tuscany.sca + tuscany-databinding-sdo + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-databinding-axiom + ${pom.version} + compile + + + org.apache.tuscany.sca + itest-databindings-common + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-host-embedded + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-interface-java-xml + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-host-jetty + 1.6.1 + runtime + + + javax.xml.bind + jaxb-api + 2.1 + compile + + + + javax.xml.ws + jaxws-api + 2.1 + + + javax.xml.soap + saaj-api + + + + + + commons-collections + commons-collections + 3.1 + + + log4j + log4j + 1.2.12 + provided + + + + + org.apache.tuscany.sca + tuscany-implementation-resource-runtime + 1.6.1 + runtime + + + + org.apache.tuscany.sca + tuscany-binding-http-runtime + 1.6.1 + runtime + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + -Djava.endorsed.dirs=target/endorsed + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy + generate-sources + + copy + + + + + javax.xml.ws + jaxws-api + 2.1 + jar + + + javax.xml.bind + jaxb-api + 2.1 + jar + + + ${project.build.directory}/endorsed + false + true + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AClientService.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AClientService.java new file mode 100644 index 0000000000..7f9b62f9b4 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AClientService.java @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest.databindings.jaxb; + +import org.osoa.sca.annotations.Remotable; + +/** + * The interface for AClientService. + */ +@Remotable +public interface AClientService { + public String getGreetingsForward(String name); +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AService.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AService.java new file mode 100644 index 0000000000..1762812c1f --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/AService.java @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest.databindings.jaxb; + +import javax.jws.soap.SOAPBinding; + +import org.osoa.sca.annotations.Remotable; + +/** + * The interface for AService. + */ +@Remotable +@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE) +public interface AService { + public String getGreetings(String name); +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean1.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean1.java new file mode 100644 index 0000000000..f1c948dc1c --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean1.java @@ -0,0 +1,66 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest.databindings.jaxb; + +import javax.xml.bind.annotation.XmlSeeAlso; + +/** + * @version $Rev$ $Date$ + */ +@XmlSeeAlso({Bean10.class, Bean11.class, Bean10[].class, Bean11[].class}) +public class Bean1 { + private T item; + + public Bean1() { + } + + public Bean1(T item) { + this.item = item; + } + + public void setItem(T item) { + this.item = item; + } + + public T getItem() { + return item; + } + + public boolean equals(Object that) { + if(that == null) { + return false; + } + if(that.getClass() != this.getClass()) { + return false; + } + + Bean1 that1 = (Bean1)that; + if(this == that1) { + return true; + } else if(this.item != null) { + return this.item.equals(that1.item); + } else { + return that1.item == null; + } + } + + public String toString() { + return this.getClass().getSimpleName()+"[item = "+item+"]"; + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean10.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean10.java new file mode 100644 index 0000000000..4a4419a42b --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean10.java @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest.databindings.jaxb; + +/** + * @version $Rev$ $Date$ + */ +public class Bean10 extends Bean1 { +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean11.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean11.java new file mode 100644 index 0000000000..65f019ec48 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean11.java @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest.databindings.jaxb; + +/** + * @version $Rev$ $Date$ + */ +public class Bean11 extends Bean1 { +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean2.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean2.java new file mode 100644 index 0000000000..45c01dc054 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean2.java @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest.databindings.jaxb; + +import javax.xml.bind.annotation.XmlSeeAlso; + +/** + * @version $Rev$ $Date$ + */ +@XmlSeeAlso({Bean3.class, Bean3[].class, Bean31.class, Bean31[].class}) +public class Bean2 { + private String name; + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + public boolean equals(Object that) { + if(that == null) { + return false; + } + + if(this.getClass() != that.getClass()) { + return false; + } + + if(this == that) { + return true; + } else if(this.name != null) { + return this.name.equals(((Bean2)that).name); + } else { + return ((Bean2)that).name == null; + } + } + + public String toString() { + return this.getClass().getSimpleName()+"[name = "+name+"]"; + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean3.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean3.java new file mode 100644 index 0000000000..4e0bd38b2b --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean3.java @@ -0,0 +1,56 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest.databindings.jaxb; + +/** + * @version $Rev$ $Date$ + */ +public class Bean3 extends Bean2 { + private String address; + + public void setAddress(String address) { + this.address = address; + } + + public String getAddress() { + return address; + } + + public boolean equals(Object that) { + if(that == null) { + return false; + } + + if(this.getClass() != that.getClass()) { + return false; + } + + if(this == that) { + return true; + } else if(this.address != null) { + return this.address.equals(((Bean3)that).address) && super.equals(that); + } else { + return ((Bean3)that).address == null && super.equals(that); + } + } + + public String toString() { + return this.getClass().getSimpleName()+"[name = "+super.getName()+", address = "+address+"]"; + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean31.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean31.java new file mode 100644 index 0000000000..40aff31297 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/Bean31.java @@ -0,0 +1,56 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest.databindings.jaxb; + +/** + * @version $Rev$ $Date$ + */ +public class Bean31 extends Bean2 { + private String address; + + public void setAddress(String address) { + this.address = address; + } + + public String getAddress() { + return address; + } + + public boolean equals(Object that) { + if(that == null) { + return false; + } + + if(this.getClass() != that.getClass()) { + return false; + } + + if(this == that) { + return true; + } else if(this.address != null) { + return this.address.equals(((Bean31)that).address) && super.equals(that); + } else { + return ((Bean31)that).address == null && super.equals(that); + } + } + + public String toString() { + return this.getClass().getSimpleName()+"[name = "+super.getName()+", address = "+address+"]"; + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsLocalService.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsLocalService.java new file mode 100644 index 0000000000..ca012b967d --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsLocalService.java @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest.databindings.jaxb; + +/** + * The interface for GenericsLocalService. + * + * @version $Rev$ $Date$ + */ +public interface GenericsLocalService { + Bean1 getTypeExplicit(Bean1 arg); + + Bean1 getTypeUnbound(T[] anArray); + + Bean1 getTypeExtends(T[] anArray); + + > Bean1 getRecursiveTypeBound(T[] anArray); + + Bean1 getWildcardUnbound(Bean1 arg); + + Bean1 getWildcardSuper(Bean1 arg); + + Bean1 getWildcardExtends(Bean1 arg); + + Bean2 getPolymorphic(Bean2 arg); +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsService.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsService.java new file mode 100644 index 0000000000..12ed7d0ec7 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsService.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest.databindings.jaxb; + +import org.osoa.sca.annotations.Remotable; + +/** + * The interface for GenericsService. + * + * @version $Rev$ $Date$ + */ +@Remotable +public interface GenericsService extends GenericsLocalService{ +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsServiceClient.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsServiceClient.java new file mode 100644 index 0000000000..3bae554dc7 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsServiceClient.java @@ -0,0 +1,43 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb; + +/** + * The interface for GenericsServiceClient. + * + * @version $Rev$ $Date$ + */ +public interface GenericsServiceClient { + Bean1 getTypeExplicitForward(Bean1 arg); + + Bean1 getTypeUnboundForward(T[] anArray); + + Bean1 getTypeExtendsForward(T[] anArray); + + > Bean1 getRecursiveTypeBoundForward(T[] anArray); + + Bean1 getWildcardUnboundForward(Bean1 arg); + + Bean1 getWildcardSuperForward(Bean1 arg); + + Bean1 getWildcardExtendsForward(Bean1 arg); + + Bean2 getPolymorphicForward(Bean2 arg); +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloLocalServiceSimple.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloLocalServiceSimple.java new file mode 100644 index 0000000000..a31cc3d45a --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloLocalServiceSimple.java @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest.databindings.jaxb; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * The interface for HelloLocalServiceSimple. + */ +public interface HelloLocalServiceSimple { + String getGreetings(String name); + String[] getGreetingsArray(String[] names); + List getGreetingsList(List names); + ArrayList getGreetingsArrayList(ArrayList names); + Map getGreetingsMap(Map namesMap); + HashMap getGreetingsHashMap(HashMap namesMap); + String getGreetingsVarArgs(String... names); +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimple.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimple.java new file mode 100644 index 0000000000..34ac9024f6 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimple.java @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest.databindings.jaxb; + +import org.osoa.sca.annotations.Remotable; + +/** + * The interface for HelloServiceSimple. + */ +@Remotable +public interface HelloServiceSimple extends HelloLocalServiceSimple { + // Add any methods to the local interface. +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimpleClient.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimpleClient.java new file mode 100644 index 0000000000..23ed57dec9 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceSimpleClient.java @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb; + +import java.util.ArrayList; +import java.util.List; +import java.util.HashMap; +import java.util.Map; + +/** + * The interface for HelloServiceSimpleClient. + */ +public interface HelloServiceSimpleClient { + String getGreetingsForward(String name); + String[] getGreetingsArrayForward(String[] names); + List getGreetingsListForward(List names); + ArrayList getGreetingsArrayListForward(ArrayList names); + Map getGreetingsMapForward(Map namesMap); + HashMap getGreetingsHashMapForward(HashMap namesMap); + String getGreetingsVarArgsForward(String... names); +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesLocalService.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesLocalService.java new file mode 100644 index 0000000000..6239c0f5f1 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesLocalService.java @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest.databindings.jaxb; + + +/** + * The interface for PrimitivesLocalService. + */ +public interface PrimitivesLocalService { + boolean negateBoolean(boolean flag); + boolean[] negateBooleanArray(boolean[] flags); + boolean[] identityBooleanArray(boolean[] flags); + byte negateByte(byte b); + byte[] negateByteArray(byte[] ba); + byte[] identityByteArray(byte[] ba); + short negateShort(short s); + short[] negateShortArray(short[] s); + short[] identityShortArray(short[] sa); + int negateInt(int s); + int[] negateIntArray(int[] s); + int[] identityIntArray(int[] ia); + long negateLong(long l); + long[] negateLongArray(long[] la); + long[] identityLongArray(long[] la); + float negateFloat(float f); + float[] negateFloatArray(float[] fa); + float[] identityFloatArray(float[] fa); + double negateDouble(double d); + double[] negateDoubleArray(double[] da); + double[] identityDoubleArray(double[] da); +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesService.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesService.java new file mode 100644 index 0000000000..c5553688e2 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesService.java @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest.databindings.jaxb; + +import org.osoa.sca.annotations.Remotable; + +/** + * The interface for PrimitivesService. + */ +@Remotable +public interface PrimitivesService extends PrimitivesLocalService { + // Add any methods to the local interface. +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesServiceClient.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesServiceClient.java new file mode 100644 index 0000000000..3bdf886dfa --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesServiceClient.java @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb; + + +/** + * The interface for PrimitivesServiceClient. + */ +public interface PrimitivesServiceClient { + boolean negateBooleanForward(boolean flag); + boolean[] negateBooleanArrayForward(boolean[] flags); + boolean passByValueBooleanArray(); + byte negateByteForward(byte b); + byte[] negateByteArrayForward(byte[] ba); + boolean passByValueByteArray(); + short negateShortForward(short s); + short[] negateShortArrayForward(short[] sa); + boolean passByValueShortArray(); + int negateIntForward(int i); + int[] negateIntArrayForward(int[] ia); + boolean passByValueIntArray(); + long negateLongForward(long l); + long[] negateLongArrayForward(long[] la); + boolean passByValueLongArray(); + float negateFloatForward(float f); + float[] negateFloatArrayForward(float[] fa); + boolean passByValueFloatArray(); + double negateDoubleForward(double d); + double[] negateDoubleArrayForward(double[] da); + boolean passByValueDoubleArray(); +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesLocalService.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesLocalService.java new file mode 100644 index 0000000000..0fdf69459f --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesLocalService.java @@ -0,0 +1,78 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest.databindings.jaxb; + +import java.awt.Image; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.URI; +import java.util.Calendar; +import java.util.Date; +import java.util.UUID; + +import javax.activation.DataHandler; +import javax.xml.datatype.Duration; +import javax.xml.datatype.XMLGregorianCalendar; +import javax.xml.namespace.QName; +import javax.xml.transform.Source; + + +/** + * The interface for StandardTypesLocalService. + */ +public interface StandardTypesLocalService { + BigInteger getNewBigInteger(BigInteger bi); + BigInteger[] getNewBigIntegerArray(BigInteger[] bia); + + BigDecimal getNewBigDecimal(BigDecimal bd); + BigDecimal[] getNewBigDecimalArray(BigDecimal[] bda); + + Calendar getNewCalendar(Calendar c); + Calendar[] getNewCalendarArray(Calendar[] ca); + + Date getNewDate(Date d); + Date[] getNewDateArray(Date[] da); + + QName getNewQName(QName qname); + QName[] getNewQNameArray(QName[] qnames); + + URI getNewURI(URI uri); + URI[] getNewURIArray(URI[] uris); + + XMLGregorianCalendar getNewXMLGregorianCalendar(XMLGregorianCalendar xgcal); + XMLGregorianCalendar[] getNewXMLGregorianCalendarArray(XMLGregorianCalendar[] xgcal); + + Duration getNewDuration(Duration d); + Duration[] getNewDurationArray(Duration[] da); + + Object getNewObject(Object obj); + Object[] getNewObjectArray(Object[] objs); + + Image getNewImage(Image img); + Image[] getNewImageArray(Image[] imgs); + + DataHandler getNewDataHandler(DataHandler dh); + DataHandler[] getNewDataHandlerArray(DataHandler[] dha); + + Source getNewSource(Source src); + Source[] getNewSourceArray(Source[] srcs); + + UUID getNewUUID(UUID uuid); + UUID[] getNewUUIDArray(UUID[] uuids); +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesService.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesService.java new file mode 100644 index 0000000000..2842205085 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesService.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest.databindings.jaxb; + +import org.osoa.sca.annotations.Remotable; + + + +/** + * The interface for StandardTypesService. + */ +@Remotable +public interface StandardTypesService extends StandardTypesLocalService{ +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesServiceClient.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesServiceClient.java new file mode 100644 index 0000000000..351d9df0cb --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesServiceClient.java @@ -0,0 +1,79 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb; + +import java.awt.Image; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.URI; +import java.util.Calendar; +import java.util.Date; +import java.util.UUID; + +import javax.activation.DataHandler; +import javax.xml.datatype.Duration; +import javax.xml.datatype.XMLGregorianCalendar; +import javax.xml.namespace.QName; +import javax.xml.transform.Source; + + +/** + * The interface for StandardTypesServiceClient. + */ +public interface StandardTypesServiceClient { + BigInteger getNewBigIntegerForward(BigInteger bi); + BigInteger[] getNewBigIntegerArrayForward(BigInteger[] bia); + + BigDecimal getNewBigDecimalForward(BigDecimal bd); + BigDecimal[] getNewBigDecimalArrayForward(BigDecimal[] bda); + + Calendar getNewCalendarForward(Calendar c); + Calendar[] getNewCalendarArrayForward(Calendar[] ca); + + Date getNewDateForward(Date d); + Date[] getNewDateArrayForward(Date[] da); + + QName getNewQNameForward(QName qname); + QName[] getNewQNameArrayForward(QName[] qnames); + + URI getNewURIForward(URI uri); + URI[] getNewURIArrayForward(URI[] uris); + + XMLGregorianCalendar getNewXMLGregorianCalendarForward(XMLGregorianCalendar xgcal); + XMLGregorianCalendar[] getNewXMLGregorianCalendarArrayForward(XMLGregorianCalendar[] xgcals); + + Duration getNewDurationForward(Duration d); + Duration[] getNewDurationArrayForward(Duration[] da); + + Object getNewObjectForward(Object obj); + Object[] getNewObjectArrayForward(Object[] objs); + + Image getNewImageForward(Image img); + Image[] getNewImageArrayForward(Image[] imgs); + + DataHandler getNewDataHandlerForward(DataHandler dh); + DataHandler[] getNewDataHandlerArrayForward(DataHandler[] dha); + + Source getNewSourceForward(Source src); + Source[] getNewSourceArrayForward(Source[] srcs); + + UUID getNewUUIDForward(UUID uuid); + UUID[] getNewUUIDArrayForward(UUID[] uuids); +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AClientServiceImpl.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AClientServiceImpl.java new file mode 100644 index 0000000000..8b484e93f0 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AClientServiceImpl.java @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest.databindings.jaxb.impl; + +import org.apache.tuscany.sca.itest.databindings.jaxb.AClientService; +import org.apache.tuscany.sca.itest.databindings.jaxb.AService; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +/** + * This class implements AService. + */ +@Service(AClientService.class) +public class AClientServiceImpl implements AClientService { + + @Reference + protected AService aService; + + public String getGreetingsForward(String name) { + return aService.getGreetings(name); + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AServiceImpl.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AServiceImpl.java new file mode 100644 index 0000000000..4a35d41c04 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/AServiceImpl.java @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest.databindings.jaxb.impl; + +import org.apache.tuscany.sca.itest.databindings.jaxb.AService; +import org.osoa.sca.annotations.Service; + +/** + * This class implements AService. + */ +@Service(AService.class) +public class AServiceImpl implements AService { + + public String getGreetings(String name) { + return "Hello " + name; + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsLocalServiceClientImpl.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsLocalServiceClientImpl.java new file mode 100644 index 0000000000..9e042ffe6a --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsLocalServiceClientImpl.java @@ -0,0 +1,77 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb.impl; + +import org.apache.tuscany.sca.itest.databindings.jaxb.Bean1; +import org.apache.tuscany.sca.itest.databindings.jaxb.Bean2; +import org.apache.tuscany.sca.itest.databindings.jaxb.Bean3; +import org.apache.tuscany.sca.itest.databindings.jaxb.GenericsLocalService; +import org.apache.tuscany.sca.itest.databindings.jaxb.GenericsServiceClient; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +/** + * An implementation of GenericsLocalServiceClient. + * The client forwards the request to the service component and returns the response from the service component. + * + * @version $Rev$ $Date$ + */ +@Service(GenericsServiceClient.class) +public class GenericsLocalServiceClientImpl implements GenericsServiceClient { + + private GenericsLocalService service; + + @Reference(required=false) + protected void setGenericsLocalService(GenericsLocalService service) { + this.service = service; + } + + public Bean1 getTypeExplicitForward(Bean1 arg) { + return service.getTypeExplicit(arg); + } + + public Bean1 getTypeUnboundForward(T[] anArray) { + return service.getTypeUnbound(anArray); + } + + public Bean1 getTypeExtendsForward(T[] anArray) { + return service.getTypeExtends(anArray); + } + + public > Bean1 getRecursiveTypeBoundForward(T[] anArray) { + return service.getRecursiveTypeBound(anArray); + } + + public Bean1 getWildcardUnboundForward(Bean1 arg) { + return service.getWildcardUnbound(arg); + } + + public Bean1 getWildcardSuperForward(Bean1 arg) { + return service.getWildcardSuper(arg); + } + + public Bean1 getWildcardExtendsForward(Bean1 arg) { + return service.getWildcardExtends(arg); + } + + public Bean2 getPolymorphicForward(Bean2 arg) { + return service.getPolymorphic(arg); + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsServiceClientImpl.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsServiceClientImpl.java new file mode 100644 index 0000000000..ec929ddece --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsServiceClientImpl.java @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb.impl; + +import org.apache.tuscany.sca.itest.databindings.jaxb.GenericsService; +import org.apache.tuscany.sca.itest.databindings.jaxb.GenericsServiceClient; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +/** + * An implementation of GenericsServiceClient. + * The client forwards the request to the service component and returns the response from the service component. + * + * @version $Rev$ $Date$ + */ +@Service(GenericsServiceClient.class) +public class GenericsServiceClientImpl extends GenericsLocalServiceClientImpl { + + @Reference + public void setGenericsService(GenericsService service) { + super.setGenericsLocalService(service); + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsServiceImpl.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsServiceImpl.java new file mode 100644 index 0000000000..58808eec4f --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsServiceImpl.java @@ -0,0 +1,69 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb.impl; + +import org.apache.tuscany.sca.itest.databindings.jaxb.Bean1; +import org.apache.tuscany.sca.itest.databindings.jaxb.Bean2; +import org.apache.tuscany.sca.itest.databindings.jaxb.Bean3; +import org.apache.tuscany.sca.itest.databindings.jaxb.GenericsLocalService; +import org.apache.tuscany.sca.itest.databindings.jaxb.GenericsService; +import org.osoa.sca.annotations.Service; + +/** + * An implementation of GenericsService. + * This implementation provides both a local and a remotable service. + * + * @version $Rev$ $Date$ + */ +@Service(interfaces={GenericsService.class, GenericsLocalService.class}) +public class GenericsServiceImpl implements GenericsService, GenericsLocalService { + + public Bean1 getTypeExplicit(Bean1 arg) { + return GenericsTransformer.getTypeExplicit(arg); + } + + public Bean1 getTypeUnbound(T[] anArray) { + return GenericsTransformer.getTypeUnbound(anArray); + } + + public Bean1 getTypeExtends(T[] anArray) { + return GenericsTransformer.getTypeExtends(anArray); + } + + public > Bean1 getRecursiveTypeBound(T[] anArray) { + return GenericsTransformer.getRecursiveTypeBound(anArray); + } + + public Bean1 getWildcardUnbound(Bean1 arg) { + return GenericsTransformer.getWildcardUnbound(arg); + } + + public Bean1 getWildcardSuper(Bean1 arg) { + return GenericsTransformer.getWildcardSuper(arg); + } + + public Bean1 getWildcardExtends(Bean1 arg) { + return GenericsTransformer.getWildcardExtends(arg); + } + + public Bean2 getPolymorphic(Bean2 arg) { + return GenericsTransformer.getPolymorphic(arg); + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsTransformer.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsTransformer.java new file mode 100644 index 0000000000..858b8da59a --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/GenericsTransformer.java @@ -0,0 +1,125 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb.impl; + +import org.apache.tuscany.sca.itest.databindings.jaxb.Bean1; +import org.apache.tuscany.sca.itest.databindings.jaxb.Bean10; +import org.apache.tuscany.sca.itest.databindings.jaxb.Bean11; +import org.apache.tuscany.sca.itest.databindings.jaxb.Bean2; +import org.apache.tuscany.sca.itest.databindings.jaxb.Bean3; +import org.apache.tuscany.sca.itest.databindings.jaxb.Bean31; + + +/** + * GenericsTransformer class that provide for transforming input provided to GenericsService methods. + * + * @version $Rev$ $Date$ + */ +public class GenericsTransformer { + + public static Bean1 getTypeExplicit(Bean1 arg) { + return new Bean1(arg.getItem() == null ? null : arg.getItem()+" AA"); + } + + public static Bean1 getTypeUnbound(T[] arg) { + if(arg instanceof String[]) { + return new Bean1(arg[0]); + } else if(arg instanceof Integer[]){ + return new Bean1(arg[1]); + } else { + return new Bean1(arg[2]); + } + } + + public static Bean1 getTypeExtends(T[] arg) { + if(arg instanceof Bean3[]) { + return new Bean1(arg[0]); + } else if(arg instanceof Bean31[]) { + return new Bean1(arg[1]); + } else { + return new Bean1(arg[2]); + } + } + + public static > Bean1 getRecursiveTypeBound(T[] arg) { + if(arg instanceof Bean10[]) { + return new Bean1(arg[0]); + } else if(arg instanceof Bean11[]) { + return new Bean1(arg[1]); + } else { + return new Bean1(arg[2]); + } + } + + public static Bean1 getWildcardUnbound(Bean1 arg) { + if(arg.getItem() instanceof String) { + Bean1 temp = new Bean1(); + temp.setItem("Hello "+arg.getItem()); + return temp; + } else if(arg.getItem() instanceof Integer) { + Bean1 temp = new Bean1(); + temp.setItem(10+(Integer)arg.getItem()); + return temp; + } else { + return new Bean1(arg.toString()); + } + } + + public static Bean1 getWildcardSuper(Bean1 arg) { + Object item = arg.getItem(); + if(item instanceof Bean3) { + Bean3 temp = new Bean3(); + temp.setName("Hello " + ((Bean3)item).getName()); + temp.setAddress("New "+((Bean3)item).getAddress()); + return new Bean1(temp); + } else if(item instanceof Bean2) { + Bean2 temp = new Bean2(); + temp.setName("Hello " + ((Bean3)item).getName()); + return new Bean1(temp); + } else { + Bean2 temp = new Bean2(); + temp.setName(item.toString()); + return new Bean1(temp); + } + } + + public static Bean1 getWildcardExtends(Bean1 arg) { + Bean2 item = arg.getItem(); + if(item instanceof Bean3) { + Bean3 temp = new Bean3(); + temp.setName("Hello "+item.getName()); + temp.setAddress("New "+((Bean3)item).getAddress()); + return new Bean1(temp); + } else if(item instanceof Bean31) { + Bean31 temp = new Bean31(); + temp.setName("Hello "+item.getName()); + temp.setAddress("New "+((Bean31)item).getAddress()); + return new Bean1(temp); + } else { + Bean2 temp = new Bean2(); + temp.setName("Hello "+item.getName()); + return new Bean1(temp); + } + } + + public static Bean2 getPolymorphic(Bean2 arg) { + return arg; + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloLocalServiceSimpleClientImpl.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloLocalServiceSimpleClientImpl.java new file mode 100644 index 0000000000..51e48edbc9 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloLocalServiceSimpleClientImpl.java @@ -0,0 +1,73 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb.impl; + +import java.util.ArrayList; +import java.util.List; +import java.util.HashMap; +import java.util.Map; + +import org.apache.tuscany.sca.itest.databindings.jaxb.HelloLocalServiceSimple; +import org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceSimpleClient; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +/** + * An implementation of HelloServiceSimpleClient. + * The client forwards the request to the service component and returns the response from the service component. + */ +@Service(HelloServiceSimpleClient.class) +public class HelloLocalServiceSimpleClientImpl implements HelloServiceSimpleClient { + + private HelloLocalServiceSimple service; + + @Reference(required=false) + protected void setHelloLocalServiceSimple(HelloLocalServiceSimple service) { + this.service = service; + } + + public String getGreetingsForward(String name) { + return service.getGreetings(name); + } + + public String[] getGreetingsArrayForward(String[] names) { + return service.getGreetingsArray(names); + } + + public List getGreetingsListForward(List names) { + return service.getGreetingsList(names); + } + + public Map getGreetingsMapForward(Map namesMap) { + return service.getGreetingsMap(namesMap); + } + + public ArrayList getGreetingsArrayListForward(ArrayList names) { + return service.getGreetingsArrayList(names); + } + + public HashMap getGreetingsHashMapForward(HashMap namesMap) { + return service.getGreetingsHashMap(namesMap); + } + + public String getGreetingsVarArgsForward(String... names) { + return service.getGreetingsVarArgs(names[0], names[1], names[2]); + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleClientImpl.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleClientImpl.java new file mode 100644 index 0000000000..de52cdfac3 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleClientImpl.java @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb.impl; + +import org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceSimple; +import org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceSimpleClient; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +/** + * An implementation of HelloServiceSimpleClient. + * The client forwards the request to the service component and returns the response from the service component. + */ +@Service(HelloServiceSimpleClient.class) +public class HelloServiceSimpleClientImpl extends HelloLocalServiceSimpleClientImpl { + + @Reference + public void setHelloServiceSimple(HelloServiceSimple service) { + super.setHelloLocalServiceSimple(service); + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleImpl.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleImpl.java new file mode 100644 index 0000000000..199335c38c --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceSimpleImpl.java @@ -0,0 +1,86 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb.impl; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.tuscany.sca.itest.databindings.jaxb.HelloLocalServiceSimple; +import org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceSimple; +import org.osoa.sca.annotations.Service; + +/** + * An implementation of HelloServiceSimple. + * The implementation provides both a local and a remotable service. + */ +@Service(interfaces = {HelloServiceSimple.class, HelloLocalServiceSimple.class}) +public class HelloServiceSimpleImpl implements HelloServiceSimple { + public String getGreetings(String name) { + return "Hello " + name; + } + + public String[] getGreetingsArray(String[] names) { + String[] resps = new String[names.length]; + for (int i = 0; i < names.length; ++i) { + resps[i] = "Hello " + names[i]; + } + return resps; + } + + public List getGreetingsList(List names) { + List resps = new ArrayList(); + for (int i = 0; i < names.size(); ++i) { + resps.add("Hello " + names.get(i)); + } + return resps; + } + + public ArrayList getGreetingsArrayList(ArrayList names) { + ArrayList resps = new ArrayList(); + for (int i = 0; i < names.size(); ++i) { + resps.add("Hello " + names.get(i)); + } + return resps; + } + + public Map getGreetingsMap(Map namesMap) { + for (Map.Entry entry : namesMap.entrySet()) { + entry.setValue("Hello " + entry.getKey()); + } + return namesMap; + } + + public HashMap getGreetingsHashMap(HashMap namesMap) { + for (Map.Entry entry : namesMap.entrySet()) { + entry.setValue("Hello " + entry.getKey()); + } + return namesMap; + } + + public String getGreetingsVarArgs(String... names) { + String resp = "Hello"; + for(int i = 0; i < names.length; ++i) { + resp += (" "+names[i]); + } + return resp; + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesLocalServiceClientImpl.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesLocalServiceClientImpl.java new file mode 100644 index 0000000000..fe9121be9d --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesLocalServiceClientImpl.java @@ -0,0 +1,138 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb.impl; + +import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesLocalService; +import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesServiceClient; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +/** + * An implementation of PrimitivesLocalServiceClient. + * The client forwards the request to the service component and returns the response from the service component. + */ +@Service(PrimitivesServiceClient.class) +public class PrimitivesLocalServiceClientImpl implements PrimitivesServiceClient { + + private PrimitivesLocalService service; + + @Reference(required=false) + protected void setPrimitivesLocalService(PrimitivesLocalService service) { + this.service = service; + } + + public boolean negateBooleanForward(boolean flag) { + return service.negateBoolean(flag); + } + + public boolean[] negateBooleanArrayForward(boolean[] flags) { + return service.negateBooleanArray(flags); + } + + public boolean passByValueBooleanArray() { + boolean[] req = new boolean[2]; + boolean[] resp = service.identityBooleanArray(req); + return req != resp; + } + + public byte negateByteForward(byte b) { + return service.negateByte(b); + } + + public byte[] negateByteArrayForward(byte[] ba) { + return service.negateByteArray(ba); + } + + public boolean passByValueByteArray() { + byte[] req = new byte[2]; + byte[] resp = service.identityByteArray(req); + return req != resp; + } + + public short negateShortForward(short s) { + return service.negateShort(s); + } + + public short[] negateShortArrayForward(short[] s) { + return service.negateShortArray(s); + } + + public boolean passByValueShortArray() { + short[] req = new short[2]; + short[] resp = service.identityShortArray(req); + return req != resp; + } + + public int negateIntForward(int i) { + return service.negateInt(i); + } + + public int[] negateIntArrayForward(int[] ia) { + return service.negateIntArray(ia); + } + + public boolean passByValueIntArray() { + int[] req = new int[2]; + int[] resp = service.identityIntArray(req); + return req != resp; + } + + public long negateLongForward(long l) { + return service.negateLong(l); + } + + public long[] negateLongArrayForward(long[] la) { + return service.negateLongArray(la); + } + + public boolean passByValueLongArray() { + long[] req = new long[2]; + long[] resp = service.identityLongArray(req); + return req != resp; + } + + public float negateFloatForward(float f) { + return service.negateFloat(f); + } + + public float[] negateFloatArrayForward(float[] fa) { + return service.negateFloatArray(fa); + } + + public boolean passByValueFloatArray() { + float[] req = new float[2]; + float[] resp = service.identityFloatArray(req); + return req != resp; + } + + public double negateDoubleForward(double d) { + return service.negateDouble(d); + } + + public double[] negateDoubleArrayForward(double[] da) { + return service.negateDoubleArray(da); + } + + public boolean passByValueDoubleArray() { + double[] req = new double[2]; + double[] resp = service.identityDoubleArray(req); + return req != resp; + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceClientImpl.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceClientImpl.java new file mode 100644 index 0000000000..28ace6aab7 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceClientImpl.java @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb.impl; + +import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesService; +import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesServiceClient; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +/** + * An implementation of PrimitivesServiceClient. + * The client forwards the request to the service component and returns the response from the service component. + */ +@Service(PrimitivesServiceClient.class) +public class PrimitivesServiceClientImpl extends PrimitivesLocalServiceClientImpl { + + @Reference + public void setPrimitivesService(PrimitivesService service) { + super.setPrimitivesLocalService(service); + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceImpl.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceImpl.java new file mode 100644 index 0000000000..ab1a3b4ab8 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceImpl.java @@ -0,0 +1,151 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb.impl; + +import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesLocalService; +import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesService; +import org.osoa.sca.annotations.Service; + +/** + * An implementation of PrimitivesService. + * This implementation provides both a local and a remotable service. + */ +@Service(interfaces={PrimitivesService.class, PrimitivesLocalService.class}) +public class PrimitivesServiceImpl implements PrimitivesService, PrimitivesLocalService { + + public boolean negateBoolean(boolean flag) { + return !flag; + } + + public boolean[] negateBooleanArray(boolean[] flags) { + boolean[] resp = new boolean[flags.length]; + + for(int i = 0; i < flags.length; ++i) { + resp[i] = !flags[i]; + } + return resp; + } + + public boolean[] identityBooleanArray(boolean[] flags) { + return flags; + } + + public byte negateByte(byte b) { + return (byte)-b; + } + + public byte[] negateByteArray(byte[] ba) { + byte[] resp = new byte[ba.length]; + + for(int i = 0; i < ba.length; ++i) { + resp[i] = (byte)-ba[i]; + } + return resp; + } + + public byte[] identityByteArray(byte[] ba) { + return ba; + } + + public short negateShort(short s) { + return (short)-s; + } + + public short[] negateShortArray(short[] s) { + short[] resp = new short[s.length]; + + for(int i = 0; i < s.length; ++i) { + resp[i] = (short)-s[i]; + } + return resp; + } + + public short[] identityShortArray(short[] sa) { + return sa; + } + + public int negateInt(int i) { + return -i; + } + + public int[] negateIntArray(int[] ia) { + int[] resp = new int[ia.length]; + + for(int i = 0; i < ia.length; ++i) { + resp[i] = -ia[i]; + } + return resp; + } + + public int[] identityIntArray(int[] ia) { + return ia; + } + + public long negateLong(long l) { + return -l; + } + + public long[] negateLongArray(long[] la) { + long[] resp = new long[la.length]; + + for(int i = 0; i < la.length; ++i) { + resp[i] = -la[i]; + } + return resp; + } + + public long[] identityLongArray(long[] la) { + return la; + } + + public float negateFloat(float f) { + return -f; + } + + public float[] negateFloatArray(float[] fa) { + float[] resp = new float[fa.length]; + + for(int i = 0; i < fa.length; ++i) { + resp[i] = -fa[i]; + } + return resp; + } + + public float[] identityFloatArray(float[] fa) { + return fa; + } + + public double negateDouble(double d) { + return -d; + } + + public double[] negateDoubleArray(double[] da) { + double[] resp = new double[da.length]; + + for(int i = 0; i < da.length; ++i) { + resp[i] = -da[i]; + } + return resp; + } + + public double[] identityDoubleArray(double[] da) { + return da; + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesLocalServiceClientImpl.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesLocalServiceClientImpl.java new file mode 100644 index 0000000000..0a8f6772b5 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesLocalServiceClientImpl.java @@ -0,0 +1,157 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb.impl; + +import java.awt.Image; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.URI; +import java.util.Calendar; +import java.util.Date; +import java.util.UUID; + +import javax.activation.DataHandler; +import javax.xml.datatype.Duration; +import javax.xml.datatype.XMLGregorianCalendar; +import javax.xml.namespace.QName; +import javax.xml.transform.Source; + +import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesLocalService; +import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesServiceClient; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +/** + * An implementation of StandardTypesLocalServiceClient. + * The client forwards the request to the service component and returns the response from the service component. + */ +@Service(StandardTypesServiceClient.class) +public class StandardTypesLocalServiceClientImpl implements StandardTypesServiceClient { + + private StandardTypesLocalService service; + + @Reference(required=false) + protected void setStandardTypesLocalService(StandardTypesLocalService service) { + this.service = service; + } + + public BigInteger getNewBigIntegerForward(BigInteger bi) { + return service.getNewBigInteger(bi); + } + + public BigInteger[] getNewBigIntegerArrayForward(BigInteger[] bia) { + return service.getNewBigIntegerArray(bia); + } + + public BigDecimal getNewBigDecimalForward(BigDecimal bd) { + return service.getNewBigDecimal(bd); + } + + public BigDecimal[] getNewBigDecimalArrayForward(BigDecimal[] bda) { + return service.getNewBigDecimalArray(bda); + } + public Calendar getNewCalendarForward(Calendar c) { + return service.getNewCalendar(c); + } + public Calendar[] getNewCalendarArrayForward(Calendar[] ca) { + return service.getNewCalendarArray(ca); + } + + public Date getNewDateForward(Date d) { + return service.getNewDate(d); + } + + public Date[] getNewDateArrayForward(Date[] da) { + return service.getNewDateArray(da); + } + + public QName getNewQNameForward(QName qname) { + return service.getNewQName(qname); + } + + public QName[] getNewQNameArrayForward(QName[] qnames) { + return service.getNewQNameArray(qnames); + } + + public URI getNewURIForward(URI uri) { + return service.getNewURI(uri); + } + + public URI[] getNewURIArrayForward(URI[] uris) { + return service.getNewURIArray(uris); + } + + public XMLGregorianCalendar getNewXMLGregorianCalendarForward(XMLGregorianCalendar xgcal) { + return service.getNewXMLGregorianCalendar(xgcal); + } + + public XMLGregorianCalendar[] getNewXMLGregorianCalendarArrayForward(XMLGregorianCalendar[] xgcals) { + return service.getNewXMLGregorianCalendarArray(xgcals); + } + + public Duration getNewDurationForward(Duration d) { + return service.getNewDuration(d); + } + + public Duration[] getNewDurationArrayForward(Duration[] da) { + return service.getNewDurationArray(da); + } + + public Object getNewObjectForward(Object obj) { + return service.getNewObject(obj); + } + + public Object[] getNewObjectArrayForward(Object[] objs) { + return service.getNewObjectArray(objs); + } + + public Image getNewImageForward(Image img) { + return service.getNewImage(img); + } + + public Image[] getNewImageArrayForward(Image[] imgs) { + return service.getNewImageArray(imgs); + } + + public DataHandler getNewDataHandlerForward(DataHandler dh) { + return service.getNewDataHandler(dh); + } + + public DataHandler[] getNewDataHandlerArrayForward(DataHandler[] dha) { + return service.getNewDataHandlerArray(dha); + } + + + public Source getNewSourceForward(Source src) { + return service.getNewSource(src); + } + + public Source[] getNewSourceArrayForward(Source[] srcs) { + return service.getNewSourceArray(srcs); + } + + public UUID getNewUUIDForward(UUID uuid) { + return service.getNewUUID(uuid); + } + + public UUID[] getNewUUIDArrayForward(UUID[] uuids) { + return service.getNewUUIDArray(uuids); + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceClientImpl.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceClientImpl.java new file mode 100644 index 0000000000..626b0e9844 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceClientImpl.java @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb.impl; + +import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesService; +import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesServiceClient; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +/** + * An implementation of StandardTypesServiceClient. + * The client forwards the request to the service component and returns the response from the service component. + */ +@Service(StandardTypesServiceClient.class) +public class StandardTypesServiceClientImpl extends StandardTypesLocalServiceClientImpl { + + @Reference + public void setStandardTypesService(StandardTypesService service) { + super.setStandardTypesLocalService(service); + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceImpl.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceImpl.java new file mode 100644 index 0000000000..19a6cae01b --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceImpl.java @@ -0,0 +1,208 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb.impl; + +import java.awt.Image; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.URI; +import java.util.Calendar; +import java.util.Date; +import java.util.UUID; + +import javax.activation.DataHandler; +import javax.xml.datatype.Duration; +import javax.xml.datatype.XMLGregorianCalendar; +import javax.xml.namespace.QName; +import javax.xml.transform.Source; + +import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesLocalService; +import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesService; +import org.osoa.sca.annotations.Service; + +/** + * An implementation of StandardTypesService. + * This implementation provides both a local and a remotable service. + */ +@Service(interfaces={StandardTypesService.class, StandardTypesLocalService.class}) +public class StandardTypesServiceImpl implements StandardTypesService, StandardTypesLocalService { + + public BigInteger getNewBigInteger(BigInteger bi) { + return bi.negate(); + } + + public BigInteger[] getNewBigIntegerArray(BigInteger[] bia) { + BigInteger[] resp = new BigInteger[bia.length]; + for(int i = 0; i < bia.length; ++i) { + resp[i] = bia[i].negate(); + } + return resp; + } + + public BigDecimal getNewBigDecimal(BigDecimal bd) { + return bd.negate(); + } + + public BigDecimal[] getNewBigDecimalArray(BigDecimal[] bda) { + BigDecimal[] resp = new BigDecimal[bda.length]; + for(int i = 0; i < bda.length; ++i) { + resp[i] = bda[i].negate(); + } + return resp; + } + + public Calendar getNewCalendar(Calendar c) { + Calendar resp = (Calendar)c.clone(); + resp.add(Calendar.DAY_OF_MONTH, 5); + return resp; + } + + public Calendar[] getNewCalendarArray(Calendar[] ca) { + Calendar[] resp = new Calendar[ca.length]; + for(int i = 0; i < ca.length; ++i) { + resp[i] = getNewCalendar(ca[i]); + } + return resp; + } + + public Date getNewDate(Date d) { + return new Date(d.getTime() + 5*24*60*60*1000); + } + + public Date[] getNewDateArray(Date[] da) { + Date[] resp = new Date[da.length]; + for(int i = 0; i < da.length; ++i) { + resp[i] = getNewDate(da[i]); + } + return resp; + } + + public QName getNewQName(QName qname) { + return new QName(qname.getNamespaceURI()+"q", qname.getLocalPart()+"q", qname.getPrefix()+"q"); + + } + + public QName[] getNewQNameArray(QName[] qnames) { + QName[] resp = new QName[qnames.length]; + for(int i = 0; i < qnames.length; ++i) { + resp[i] = getNewQName(qnames[i]); + } + return resp; + } + + public URI getNewURI(URI uri) { + return uri.resolve("uri"); + } + + public URI[] getNewURIArray(URI[] uris) { + URI[] resp = new URI[uris.length]; + for(int i = 0; i < uris.length; ++i) { + resp[i] = getNewURI(uris[i]); + } + return resp; + } + + public XMLGregorianCalendar getNewXMLGregorianCalendar(XMLGregorianCalendar xgcal) { + xgcal = (XMLGregorianCalendar)xgcal.clone(); + xgcal.setDay(xgcal.getDay()+5); + return xgcal; + } + + public XMLGregorianCalendar[] getNewXMLGregorianCalendarArray(XMLGregorianCalendar[] xgcals) { + XMLGregorianCalendar[] resp = new XMLGregorianCalendar[xgcals.length]; + for(int i = 0; i < xgcals.length; ++i) { + resp[i] = getNewXMLGregorianCalendar(xgcals[i]); + } + return resp; + } + + public Duration getNewDuration(Duration d) { + return d.negate(); + } + + public Duration[] getNewDurationArray(Duration[] da) { + Duration[] resp = new Duration[da.length]; + for(int i = 0; i < da.length; ++i) { + resp[i] = da[i].negate(); + } + return resp; + } + + public Object getNewObject(Object obj) { + return StandardTypesTransformer.getNewObject(obj); + } + + public Object[] getNewObjectArray(Object[] objs) { + Object[] resp = new Object[objs.length]; + for(int i = 0; i < objs.length; ++i) { + resp[i] = getNewObject(objs[i]); + } + return resp; + } + + public Image getNewImage(Image img) { + return StandardTypesTransformer.getNewImage(img); + } + + public Image[] getNewImageArray(Image[] imgs) { + Image[] resp = new Image[imgs.length]; + for(int i = 0; i < imgs.length; ++i) { + resp[i] = getNewImage(imgs[i]); + } + return resp; + } + + public DataHandler getNewDataHandler(DataHandler dh) { + // FIXME: transform the input + return dh; + } + + public DataHandler[] getNewDataHandlerArray(DataHandler[] dha) { + DataHandler[] resp = new DataHandler[dha.length]; + for(int i = 0; i < dha.length; ++i) { + resp[i] = dha[i]; + } + return resp; + } + + public Source getNewSource(Source src) { + return StandardTypesTransformer.getNewSource(src); + } + + public Source[] getNewSourceArray(Source[] srcs) { + Source[] resp = new Source[srcs.length]; + for(int i = 0; i < srcs.length; ++i) { + resp[i] = getNewSource(srcs[i]); + } + return resp; + } + + public UUID getNewUUID(UUID uuid) { + return UUID.fromString(uuid.toString()+"AAA"); + } + + public UUID[] getNewUUIDArray(UUID[] uuids) { + UUID[] resp = new UUID[uuids.length]; + for(int i = 0; i < uuids.length; ++i) { + resp[i] = getNewUUID(uuids[i]); + } + return resp; + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesTransformer.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesTransformer.java new file mode 100644 index 0000000000..68510b4b03 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesTransformer.java @@ -0,0 +1,144 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb.impl; + +import java.awt.Image; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.CharArrayReader; +import java.io.CharArrayWriter; +import java.io.IOException; +import java.io.InputStream; +import java.io.Reader; + +import javax.xml.transform.Source; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.sax.SAXSource; +import javax.xml.transform.stream.StreamSource; + +import org.xml.sax.InputSource; + + + +/** + * StandardTypesTransformer class that provide for transforming input provided to StandardTypesService methods. + * + * @version $Rev$ $Date$ + */ +public class StandardTypesTransformer { + + public static Object getNewObject(Object obj) { + if(obj instanceof String) { + return "Hello "+obj; + } else if(obj instanceof Integer) { + return new Integer(-((Integer)obj).intValue()); + } else if(obj instanceof Double) { + return new Double(-((Double)obj).doubleValue()); + } + + return obj; + } + + /** + * Returns a copy of the source object if the input is DOMSource, SAXSource or StreamSource. + * Returns the input object as is for other types. + */ + public static Source getNewSource(Source src) { + Source ret = null; + if(src instanceof DOMSource) { + DOMSource dsrc = (DOMSource)src; + ret = new DOMSource(dsrc.getNode() != null ? dsrc.getNode().cloneNode(true) : null); + } else if(src instanceof SAXSource) { + SAXSource ssrc = (SAXSource)src; + if(ssrc.getInputSource().getByteStream() != null) { + InputStream inp = ssrc.getInputSource().getByteStream(); + ByteArrayOutputStream bout = new ByteArrayOutputStream(); + int b; + try { + while((b = inp.read()) != -1) { + bout.write(b); + } + } catch (IOException ignored) { + } + try { bout.close();} catch (IOException ignored) {} + try { inp.reset();} catch (IOException ignored) {} + ret = new SAXSource(new InputSource(new ByteArrayInputStream(bout.toByteArray()))); + } else if(ssrc.getInputSource().getCharacterStream() != null) { + Reader rdr = ssrc.getInputSource().getCharacterStream(); + CharArrayWriter caw = new CharArrayWriter(); + try { + int c; + while((c = rdr.read()) != -1) { + caw.append((char)c); + } + } catch (IOException ignored) { + } + caw.close(); + try{ rdr.reset();} catch(IOException ignored) {} + ret = new SAXSource(new InputSource(new CharArrayReader(caw.toCharArray()))); + } else { + ret = new SAXSource(); + } + } else if(src instanceof StreamSource) { + StreamSource ssrc = (StreamSource)src; + if(ssrc.getInputStream() != null) { + InputStream inp = ssrc.getInputStream(); + ByteArrayOutputStream bout = new ByteArrayOutputStream(); + int b; + try { + while((b = inp.read()) != -1) { + bout.write(b); + } + } catch (IOException ignored) { + } + try { bout.close();} catch (IOException ignored) {} + try { inp.reset();} catch (IOException ignored) {} + ret = new StreamSource(new ByteArrayInputStream(bout.toByteArray())); + } else if(ssrc.getReader() != null) { + Reader rdr = ssrc.getReader(); + CharArrayWriter caw = new CharArrayWriter(); + try { + int c; + while((c = rdr.read()) != -1) { + caw.append((char)c); + } + } catch (IOException ignored) { + } + caw.close(); + try{ rdr.reset();} catch(IOException ignored) {} + ret = new StreamSource(new CharArrayReader(caw.toCharArray())); + } else { + ret = new StreamSource(); + } + } + + if(ret != null) { + ret.setSystemId(src.getSystemId()); + } else { + ret = src; + } + return ret; + } + + public static Image getNewImage(Image arg) { + arg.getGraphics().drawOval(2, 2, 7, 7); + return arg; + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/resources/aservice.wsdl b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/resources/aservice.wsdl new file mode 100644 index 0000000000..10a242be4d --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/resources/aservice.wsdl @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/resources/doclitbarewsdl.composite b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/resources/doclitbarewsdl.composite new file mode 100644 index 0000000000..b0d3fe7aeb --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/resources/doclitbarewsdl.composite @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/resources/generics-service.composite b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/resources/generics-service.composite new file mode 100644 index 0000000000..910091cf53 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/resources/generics-service.composite @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/resources/helloservice.composite b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/resources/helloservice.composite new file mode 100644 index 0000000000..2dfcb1327b --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/resources/helloservice.composite @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/resources/myContent/home.html b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/resources/myContent/home.html new file mode 100644 index 0000000000..d2bdecb1af --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/resources/myContent/home.html @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + Apache Tuscany : Home + + + + + + + + + + + + + + + + +
+ + + + + +   + +
+ + +
+
+ + + + + + + + + + + +
+  Apache Tuscany > Home + + User List | Dev List | Issue Tracker   +
+ + + + + + + + +
+ + +
+ +
+ +
+ + +
+ + + +
Subprojects
+ +

SDO
+DAS

+
+ +

Welcome to Apache Tuscany

+

Apache Tuscany simplifies the task of developing SOA solutions by providing a comprehensive infrastructure for SOA development and management that is based on Service Component Architecture (SCA) standard. With SCA as it's foundation, Tuscany offers solution developers the following advantages:

+
    +
  • Provides a model for creating composite applications by defining the services in the fabric and their relationships with one another. The services can be implemented in any technology.
  • + +
  • Enables service developers to create reusable services that only contain business logic. Protocols are pushed out of business logic and are handled through pluggable bindings. This lowers development cost.
  • +
  • Applications can easily adapt to infrastructure changes without recoding since protocols are handled via pluggable bindings and quality of services (transaction, security) are handled declaratively.
  • +
  • Existing applications can work with new SCA compositions. This allows for incremental growth towards a more flexible architecture, outsourcing or providing services to others.
  • +
+ + + + +
+ +

In addition, Tuscany is integrated with various technologies and offers:

+ +
    +
  • a wide range of bindings (pluggable protocols)
  • +
  • various component types including and not limited to Java, C++, BPEL, Spring and scripting
  • +
  • an end to end service and data solution which includes support for Jaxb and SDO
  • +
  • a lightweight runtime that works standalone or with other application servers
  • +
  • a modular architecture that makes it easy to integrate with different technologies and to extend
  • +
  • Integration with web20 technologies
  • + +
+ + +

Apache Tuscany SCA is implemented in Java and C++ (referred to as Native) . Learn more about SCA

+ +

Please join us to create a practical SOA infrastructure that addresses the challenges which small to large scale businesses face.

+ +
+ + +
GSoC 2010
+ + +
+
Tuscany News Dashboard
+
Unknown macro: {rss}
+
+ +
+
+
+
+ + +
+ + + + + + + website stats + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/resources/primitivesservice.composite b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/resources/primitivesservice.composite new file mode 100644 index 0000000000..20529e7273 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/resources/primitivesservice.composite @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/resources/standard-types-service.composite b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/resources/standard-types-service.composite new file mode 100644 index 0000000000..6d5742ac10 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/main/resources/standard-types-service.composite @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DatabindingTestCase.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DatabindingTestCase.java new file mode 100644 index 0000000000..4967b896a5 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DatabindingTestCase.java @@ -0,0 +1,339 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import junit.framework.Assert; + +import org.apache.tuscany.sca.host.embedded.SCADomain; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +/** + * @version $Rev$ $Date$ + */ +public class DatabindingTestCase { + + private static SCADomain domain; + + /** + * Runs once before running the tests + */ + @BeforeClass + public static void setUp() throws Exception { + try { + domain = SCADomain.newInstance("helloservice.composite"); + } catch(Throwable e) { + e.printStackTrace(); + } + } + + /** + * Runs once after running the tests + */ + @AfterClass + public static void tearDown() { + domain.close(); + } + + /** + * Invokes the HelloServiceSimple service using SCA binding. + * Service method invoked is getGreetings. + */ + @Test + public void testSCA() throws Exception { + HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientSCAComponent"); + performTest(helloServiceSimpleClient); + } + + /** + * Invokes the HelloServiceSimple service using SCA binding. + * Service method invoked is getGreetingsArray. + */ + @Test + public void testSCAArray() throws Exception { + HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientSCAComponent"); + performTestArray(helloServiceSimpleClient); + } + + /** + * Invokes the HelloServiceSimple service using SCA binding. + * Service method invoked is getGreetingsList. + */ + @Test + public void testSCAList() throws Exception { + HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientSCAComponent"); + performTestList(helloServiceSimpleClient); + } + + /** + * Invokes the HelloServiceSimple service using SCA binding. + * Service method invoked is getGreetingsArrayList. + */ + @Test + public void testSCAArrayList() throws Exception { + HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientSCAComponent"); + performTestArrayList(helloServiceSimpleClient); + } + + /** + * Invokes the HelloServiceSimple service using SCA binding. + * Service method invoked is getGreetingsMap. + */ + @Test + public void testSCAMap() throws Exception { + HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientSCAComponent"); + performTestMap(helloServiceSimpleClient); + } + + /** + * Invokes the HelloServiceSimple service using SCA binding. + * Service method invoked is getGreetingsHashMap. + */ + @Test + public void testSCAHashMap() throws Exception { + HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientSCAComponent"); + performTestHashMap(helloServiceSimpleClient); + } + + /** + * Invokes the HelloServiceSimple service using SCA binding. + * Service method invoked is getGreetingsVarArgs. + */ + @Test + public void testSCAVarArgs() throws Exception { + HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientSCAComponent"); + performTestVarArgs(helloServiceSimpleClient); + } + + /** + * Invokes the HelloServiceSimple service using WS binding. + * Service method invoked is getGreetings. + */ + @Test + public void testWS() throws Exception { + HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientWSComponent"); + performTest(helloServiceSimpleClient); + } + + /** + * Invokes the HelloServiceSimple service using WS binding. + * Service method invoked is getGreetingsArray. + */ + @Test + public void testWSArray() throws Exception { + HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientWSComponent"); + performTestArray(helloServiceSimpleClient); + } + + /** + * Invokes the HelloServiceSimple service using WS binding. + * Service method invoked is getGreetingsList. + */ + @Test + public void testWSList() throws Exception { + HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientWSComponent"); + performTestList(helloServiceSimpleClient); + } + + /** + * Invokes the HelloServiceSimple service using WS binding. + * Service method invoked is getGreetingsArrayList. + */ + @Test + public void testWSArrayList() throws Exception { + HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientWSComponent"); + performTestArrayList(helloServiceSimpleClient); + } + + /** + * Invokes the HelloServiceSimple service using WS binding. + * Service method invoked is getGreetingsMap. + */ + @Test + public void testWSMap() throws Exception { + HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientWSComponent"); + performTestMap(helloServiceSimpleClient); + } + + /** + * Invokes the HelloServiceSimple service using WS binding. + * Service method invoked is getGreetingsHashMap. + */ + @Test + public void testWSHashMap() throws Exception { + HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientWSComponent"); + performTestHashMap(helloServiceSimpleClient); + } + + /** + * Invokes the HelloServiceSimple service using WS binding. + * Service method invoked is getGreetingsVarArgs. + */ + @Test + public void testWSVarArgs() throws Exception { + HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloServiceSimpleClientWSComponent"); + performTestVarArgs(helloServiceSimpleClient); + } + + /** + * Invokes the HelloLocalServiceSimple service using SCA binding. + * Service method invoked is getGreetings. + */ + @Test + public void testSCALocal() throws Exception { + HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloLocalServiceSimpleClientSCAComponent"); + performTest(helloServiceSimpleClient); + } + + /** + * Invokes the HelloLocalServiceSimple service using SCA binding. + * Service method invoked is getGreetingsArray. + */ + @Test + public void testSCALocalArray() throws Exception { + HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloLocalServiceSimpleClientSCAComponent"); + performTestArray(helloServiceSimpleClient); + } + + /** + * Invokes the HelloLocalServiceSimple service using SCA binding. + * Service method invoked is getGreetingsList. + */ + @Test + public void testSCALocalList() throws Exception { + HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloLocalServiceSimpleClientSCAComponent"); + performTestList(helloServiceSimpleClient); + } + + /** + * Invokes the HelloLocalServiceSimple service using SCA binding. + * Service method invoked is getGreetingsArrayList. + */ + @Test + public void testSCALocalArrayList() throws Exception { + HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloLocalServiceSimpleClientSCAComponent"); + performTestArrayList(helloServiceSimpleClient); + } + + /** + * Invokes the HelloLocalServiceSimple service using SCA binding. + * Service method invoked is getGreetingsMap. + */ + @Test + public void testSCALocalMap() throws Exception { + HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloLocalServiceSimpleClientSCAComponent"); + performTestMap(helloServiceSimpleClient); + } + + /** + * Invokes the HelloLocalServiceSimple service using SCA binding. + * Service method invoked is getGreetingsHashMap. + */ + @Test + public void testSCALocalHashMap() throws Exception { + HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloLocalServiceSimpleClientSCAComponent"); + performTestHashMap(helloServiceSimpleClient); + } + + /** + * Invokes the HelloLocalServiceSimple service using SCA binding. + * Service method invoked is getGreetingsVarArgs. + */ + @Test + public void testSCALocalVarArgs() throws Exception { + HelloServiceSimpleClient helloServiceSimpleClient = domain.getService(HelloServiceSimpleClient.class, "HelloLocalServiceSimpleClientSCAComponent"); + performTestVarArgs(helloServiceSimpleClient); + } + + private void performTest(HelloServiceSimpleClient helloServiceSimpleClient) { + String name = "Pandu"; + String resp = helloServiceSimpleClient.getGreetingsForward(name); + Assert.assertEquals("Hello "+name, resp); + } + + private void performTestArray(HelloServiceSimpleClient helloServiceSimpleClient) { + String[] names = {"Me", "Pandu"}; + String[] resps = helloServiceSimpleClient.getGreetingsArrayForward(names); + for(int i = 0; i < names.length; ++i) { + Assert.assertEquals("Hello "+names[i], resps[i]); + } + } + + private void performTestList(HelloServiceSimpleClient helloServiceSimpleClient) { + List namesList = new ArrayList(); + namesList.add("Me"); + namesList.add("Pandu"); + namesList.add("Chinnipandu"); + List respList = helloServiceSimpleClient.getGreetingsListForward(namesList); + Assert.assertEquals(namesList.size(), respList.size()); + for(int i = 0; i < namesList.size(); ++i) { + Assert.assertEquals("Hello "+namesList.get(i), respList.get(i)); + } + } + + private void performTestArrayList(HelloServiceSimpleClient helloServiceSimpleClient) { + ArrayList namesList = new ArrayList(); + namesList.add("Me"); + namesList.add("Pandu"); + namesList.add("Chinnipandu"); + ArrayList respList = helloServiceSimpleClient.getGreetingsArrayListForward(namesList); + Assert.assertEquals(namesList.size(), respList.size()); + for(int i = 0; i < namesList.size(); ++i) { + Assert.assertEquals("Hello "+namesList.get(i), respList.get(i)); + } + } + + private void performTestMap(HelloServiceSimpleClient helloServiceSimpleClient) { + Map namesMap = new HashMap(); + namesMap.put("Me", null); + namesMap.put("Pandu", null); + namesMap.put("Chinnipandu", null); + Map respMap = helloServiceSimpleClient.getGreetingsMapForward(namesMap); + Assert.assertEquals(namesMap.keySet().size(), respMap.keySet().size()); + for(Map.Entry entry: namesMap.entrySet()) { + Assert.assertEquals("Hello "+entry.getKey(), respMap.get(entry.getKey())); + } + } + + private void performTestHashMap(HelloServiceSimpleClient helloServiceSimpleClient) { + HashMap namesMap = new HashMap(); + namesMap.put("Me", null); + namesMap.put("Pandu", null); + namesMap.put("Chinnipandu", null); + Map respMap = helloServiceSimpleClient.getGreetingsHashMapForward(namesMap); + Assert.assertEquals(namesMap.keySet().size(), respMap.keySet().size()); + for(Map.Entry entry: namesMap.entrySet()) { + Assert.assertEquals("Hello "+entry.getKey(), respMap.get(entry.getKey())); + } + } + + private void performTestVarArgs(HelloServiceSimpleClient helloServiceSimpleClient) { + String[] names = { "Me", "You", "Pandu" }; // Do not change the array size from 3. + String expected = "Hello Me You Pandu"; + String actual = helloServiceSimpleClient.getGreetingsVarArgsForward(names[0], names[1], names[2]); + Assert.assertEquals(expected, actual); + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DocLitBareWsdlTestCase.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DocLitBareWsdlTestCase.java new file mode 100644 index 0000000000..744bf20494 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/DocLitBareWsdlTestCase.java @@ -0,0 +1,67 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb; + +import junit.framework.Assert; + +import org.apache.tuscany.sca.host.embedded.SCADomain; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +/** + * @version $Rev$ $Date$ + */ +public class DocLitBareWsdlTestCase { + + private static SCADomain domain; + + /** + * Runs once before running the tests + */ + @BeforeClass + public static void setUp() throws Exception { + try { + domain = SCADomain.newInstance("doclitbarewsdl.composite"); + } catch (Throwable e) { + // @Ignore("TUSCANY-2398") + e.printStackTrace(); + } + } + + /** + * Runs once after running the tests + */ + @AfterClass + public static void tearDown() { + if (domain != null) { + domain.close(); + } + } + + // @Ignore("TUSCANY-2398") + @Test + public void testDocLitBareWsdl() throws Exception { + AClientService client = domain.getService(AClientService.class, "AClientComponent"); + String name = "Pandu"; + String resp = client.getGreetingsForward(name); + Assert.assertEquals("Hello " + name, resp); + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsDatabindingTestCase.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsDatabindingTestCase.java new file mode 100644 index 0000000000..c22d00140e --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/GenericsDatabindingTestCase.java @@ -0,0 +1,484 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb; + +import junit.framework.Assert; + +import org.apache.tuscany.sca.host.embedded.SCADomain; +import org.apache.tuscany.sca.itest.databindings.jaxb.impl.GenericsTransformer; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +/** + * Databinding tests for generics, parameterized and polymorphic types. + * + * @version $Rev$ $Date$ + */ +public class GenericsDatabindingTestCase { + private static SCADomain domain; + + /** + * Runs before each test method + */ + @BeforeClass + public static void setUp() throws Exception { + try { + domain = SCADomain.newInstance("generics-service.composite"); + } catch(Throwable e) { + e.printStackTrace(); + } + } + + /** + * Runs after each test method + */ + @AfterClass + public static void tearDown() { + domain.close(); + } + + /** + * Invokes the GenericsService service using SCA binding. + * Service method invoked is getTypeExplicit. + */ + @Test + public void testSCATypeExplicit() throws Exception { + GenericsServiceClient serviceClient = domain.getService(GenericsServiceClient.class, "GenericsServiceClientSCAComponent"); + performTestTypeExplicit(serviceClient); + } + + /** + * Invokes the GenericsService service using SCA binding. + * Service method invoked is getTypeUnbound. + */ + @Test + public void testSCATypeUnbound() throws Exception { + GenericsServiceClient serviceClient = domain.getService(GenericsServiceClient.class, "GenericsServiceClientSCAComponent"); + performTestTypeUnbound(serviceClient); + } + + /** + * Invokes the GenericsService service using SCA binding. + * Service method invoked is getTypeExtends. + */ + @Test + public void testSCATypeExtends() throws Exception { + GenericsServiceClient serviceClient = domain.getService(GenericsServiceClient.class, "GenericsServiceClientSCAComponent"); + performTestTypeExtends(serviceClient); + } + + /** + * Invokes the GenericsService service using SCA binding. + * Service method invoked is getRecursiveTypeBound. + */ + @Test + public void testSCARecursiveTypeBound() throws Exception { + GenericsServiceClient serviceClient = domain.getService(GenericsServiceClient.class, "GenericsServiceClientSCAComponent"); + performTestRecursiveTypeBound(serviceClient); + } + + /** + * Invokes the GenericsService service using SCA binding. + * Service method invoked is getWildcardUnbound. + */ + @Test + public void testSCAWildcardUnbound() throws Exception { + GenericsServiceClient serviceClient = domain.getService(GenericsServiceClient.class, "GenericsServiceClientSCAComponent"); + performTestWildcardUnbound(serviceClient); + } + + /** + * Invokes the GenericsService service using SCA binding. + * Service method invoked is getWildcardSuper. + */ + @Test + public void testSCAWildcardSuper() throws Exception { + GenericsServiceClient serviceClient = domain.getService(GenericsServiceClient.class, "GenericsServiceClientSCAComponent"); + performTestWildcardSuper(serviceClient); + } + + /** + * Invokes the GenericsService service using SCA binding. + * Service method invoked is getWildcardExtends. + */ + @Test + public void testSCAWildcardExtends() throws Exception { + GenericsServiceClient serviceClient = domain.getService(GenericsServiceClient.class, "GenericsServiceClientSCAComponent"); + performTestWildcardExtends(serviceClient); + } + + /** + * Invokes the GenericsService service using SCA binding. + * Service method invoked is getPolymorphic. + */ + @Test + public void testSCAPolymorphic() throws Exception { + GenericsServiceClient serviceClient = domain.getService(GenericsServiceClient.class, "GenericsServiceClientSCAComponent"); + performTestPolymorphic(serviceClient); + } + + /** + * Invokes the GenericsService service using WS binding. + * Service method invoked is getTypeExplicit. + */ + @Test + public void testWSTypeExplicit() throws Exception { + GenericsServiceClient serviceClient = domain.getService(GenericsServiceClient.class, "GenericsServiceClientWSComponent"); + performTestTypeExplicit(serviceClient); + } + + /** + * Invokes the GenericsService service using WS binding. + * Service method invoked is getTypeUnbound. + */ + @Test + public void testWSTypeUnbound() throws Exception { + GenericsServiceClient serviceClient = domain.getService(GenericsServiceClient.class, "GenericsServiceClientWSComponent"); + performTestTypeUnbound(serviceClient); + } + + /** + * Invokes the GenericsService service using WS binding. + * Service method invoked is getTypeExtends. + */ + @Test + public void testWSTypeExtends() throws Exception { + GenericsServiceClient serviceClient = domain.getService(GenericsServiceClient.class, "GenericsServiceClientWSComponent"); + performTestTypeExtends(serviceClient); + } + + /** + * Invokes the GenericsService service using WS binding. + * Service method invoked is getRecursiveTypeBound. + */ + @Test + public void testWSRecursiveTypeBound() throws Exception { + GenericsServiceClient serviceClient = domain.getService(GenericsServiceClient.class, "GenericsServiceClientWSComponent"); + performTestRecursiveTypeBound(serviceClient); + } + + /** + * Invokes the GenericsService service using WS binding. + * Service method invoked is getWildcardUnbound. + */ + @Test + public void testWSWildcardUnbound() throws Exception { + GenericsServiceClient serviceClient = domain.getService(GenericsServiceClient.class, "GenericsServiceClientWSComponent"); + performTestWildcardUnbound(serviceClient); + } + + /** + * Invokes the GenericsService service using WS binding. + * Service method invoked is getWildcardSuper. + */ + @Test + public void testWSWildcardSuper() throws Exception { + GenericsServiceClient serviceClient = domain.getService(GenericsServiceClient.class, "GenericsServiceClientWSComponent"); + performTestWildcardSuper(serviceClient); + } + + /** + * Invokes the GenericsService service using WS binding. + * Service method invoked is getWildcardExtends. + */ + @Test + public void testWSWildcardExtends() throws Exception { + GenericsServiceClient serviceClient = domain.getService(GenericsServiceClient.class, "GenericsServiceClientWSComponent"); + performTestWildcardExtends(serviceClient); + } + + /** + * Invokes the GenericsService service using WS binding. + * Service method invoked is getPolymorphic. + */ + @Test + public void testWSPolymorphic() throws Exception { + GenericsServiceClient serviceClient = domain.getService(GenericsServiceClient.class, "GenericsServiceClientWSComponent"); + performTestPolymorphic(serviceClient); + } + + /** + * Invokes the GenericsLocalService service using SCA binding. + * Service method invoked is getTypeExplicit. + */ + @Test + public void testSCALocalTypeExplicit() throws Exception { + GenericsServiceClient serviceClient = domain.getService(GenericsServiceClient.class, "GenericsLocalServiceClientSCAComponent"); + performTestTypeExplicit(serviceClient); + } + + /** + * Invokes the GenericsLocalService service using SCA binding. + * Service method invoked is getTypeUnbound. + */ + @Test + public void testSCALocalTypeUnbound() throws Exception { + GenericsServiceClient serviceClient = domain.getService(GenericsServiceClient.class, "GenericsLocalServiceClientSCAComponent"); + performTestTypeUnbound(serviceClient); + } + + /** + * Invokes the GenericsLocalService service using SCA binding. + * Service method invoked is getTypeExtends. + */ + @Test + public void testSCALocalTypeExtends() throws Exception { + GenericsServiceClient serviceClient = domain.getService(GenericsServiceClient.class, "GenericsLocalServiceClientSCAComponent"); + performTestTypeExtends(serviceClient); + } + + /** + * Invokes the GenericsLocalService service using SCA binding. + * Service method invoked is getRecursiveTypeBound. + */ + @Test + public void testSCALocalRecursiveTypeBound() throws Exception { + GenericsServiceClient serviceClient = domain.getService(GenericsServiceClient.class, "GenericsLocalServiceClientSCAComponent"); + performTestRecursiveTypeBound(serviceClient); + } + + /** + * Invokes the GenericsLocalService service using SCA binding. + * Service method invoked is getWildcardUnbound. + */ + @Test + public void testSCALocalWildcardUnbound() throws Exception { + GenericsServiceClient serviceClient = domain.getService(GenericsServiceClient.class, "GenericsLocalServiceClientSCAComponent"); + performTestWildcardUnbound(serviceClient); + } + + /** + * Invokes the GenericsLocalService service using SCA binding. + * Service method invoked is getWildcardSuper. + */ + @Test + public void testSCALocalWildcardSuper() throws Exception { + GenericsServiceClient serviceClient = domain.getService(GenericsServiceClient.class, "GenericsLocalServiceClientSCAComponent"); + performTestWildcardSuper(serviceClient); + } + + /** + * Invokes the GenericsLocalService service using SCA binding. + * Service method invoked is getWildcardExtends. + */ + @Test + public void testSCALocalWildcardExtends() throws Exception { + GenericsServiceClient serviceClient = domain.getService(GenericsServiceClient.class, "GenericsLocalServiceClientSCAComponent"); + performTestWildcardExtends(serviceClient); + } + + /** + * Invokes the GenericsLocalService service using SCA binding. + * Service method invoked is getPolymorphic. + */ + @Test + public void testSCALocalPolymorphic() throws Exception { + GenericsServiceClient serviceClient = domain.getService(GenericsServiceClient.class, "GenericsLocalServiceClientSCAComponent"); + performTestPolymorphic(serviceClient); + } + + private void performTestTypeExplicit(GenericsServiceClient serviceClient) { + Bean1 args[] = new Bean1[2]; + args[0] = new Bean1("Me"); + args[1] = new Bean1(); + for(int i = 0; i < args.length; ++i) { + Bean1 arg = args[i]; + Bean1 expected = GenericsTransformer.getTypeExplicit(arg); + Bean1 actual = serviceClient.getTypeExplicitForward(arg); + Assert.assertEquals(expected, actual); + } + } + + private void performTestTypeUnbound(GenericsServiceClient serviceClient) { + { // String + String[] args = { "Me", "You", "Him" }; + Bean1 expected = GenericsTransformer.getTypeUnbound(args); + Bean1 actual = serviceClient.getTypeUnboundForward(args); + // Assert.assertEquals(expected, actual); + } + { // Integer + Integer[] args = new Integer[3]; + args[0] = -10; + args[1] = 0; + args[2] = 10; + Bean1 expected = GenericsTransformer.getTypeUnbound(args); + Bean1 actual = serviceClient.getTypeUnboundForward(args); + // Assert.assertEquals(expected, actual); + } + { // Object + Object[] args = new Object[3]; + args[0] = "Me"; + args[1] = 10; + args[2] = "Him"; + Bean1 expected = GenericsTransformer.getTypeUnbound(args); + Bean1 actual = serviceClient.getTypeUnboundForward(args); + Assert.assertEquals(expected, actual); + } + } + + private void performTestTypeExtends(GenericsServiceClient serviceClient) { + { // Bean2 + Bean2[] args = new Bean2[3]; + for(int i = 0; i < args.length; ++i) { + args[i] = new Bean2(); + args[i].setName("Name"+i); + } + + Bean1 expected = GenericsTransformer.getTypeExtends(args); + Bean1 actual = serviceClient.getTypeExtendsForward(args); + Assert.assertEquals(expected, actual); + } + { // Bean3 extends Bean2 + Bean3[] args = new Bean3[3]; + for(int i = 0; i < args.length; ++i) { + args[i] = new Bean3(); + args[i].setName("Name"+i); + args[i].setAddress("Address"+i); + } + + Bean1 expected = GenericsTransformer.getTypeExtends(args); + Bean1 actual = serviceClient.getTypeExtendsForward(args); + // Assert.assertEquals(expected, actual); + } + { //Bean31 extends Bean2 + Bean31[] args = new Bean31[3]; + for(int i = 0; i < args.length; ++i) { + args[i] = new Bean31(); + args[i].setName("Name"+i); + args[i].setAddress("Address"+i); + } + + Bean1 expected = GenericsTransformer.getTypeExtends(args); + Bean1 actual = serviceClient.getTypeExtendsForward(args); + // Assert.assertEquals(expected, actual); + } + } + + private void performTestRecursiveTypeBound(GenericsServiceClient serviceClient) { + { // Bean1 + Bean1[] args = new Bean1[3]; + for(int i = 0; i < args.length; ++i) { + args[i] = new Bean1(); + args[i].setItem("Bean."+i); + } + Bean1> expected = GenericsTransformer.getRecursiveTypeBound(args); + Bean1> actual = serviceClient.getRecursiveTypeBoundForward(args); + Assert.assertEquals(expected, actual); + } + { // Bean10 extends Bean1 + Bean10[] args = new Bean10[3]; + for(int i = 0; i < args.length; ++i) { + args[i] = new Bean10(); + args[i].setItem("Bean10."+i); + } + Bean1 expected = GenericsTransformer.getRecursiveTypeBound(args); + Bean1 actual = serviceClient.getRecursiveTypeBoundForward(args); + // Assert.assertEquals(expected, actual); + } + { // Bean11 extends Bean1 + Bean11[] args = new Bean11[3]; + for(int i = 0; i < args.length; ++i) { + args[i] = new Bean11(); + args[i].setItem("Bean11."+i); + } + Bean1 expected = GenericsTransformer.getRecursiveTypeBound(args); + Bean1 actual = serviceClient.getRecursiveTypeBoundForward(args); + // Assert.assertEquals(expected, actual); + } + } + + private void performTestWildcardUnbound(GenericsServiceClient serviceClient) { + { + Bean1 arg = new Bean1("Me"); + Bean1 expected = GenericsTransformer.getWildcardUnbound(arg); + Bean1 actual = serviceClient.getWildcardUnboundForward(arg); + Assert.assertEquals(expected, actual); + } + { + Bean1 arg = new Bean1(1); + Bean1 expected = GenericsTransformer.getWildcardUnbound(arg); + Bean1 actual = serviceClient.getWildcardUnboundForward(arg); + Assert.assertEquals(expected, actual); + } + } + + private void performTestWildcardSuper(GenericsServiceClient serviceClient) { + Bean1 arg = new Bean1(); + Bean3 item = new Bean3(); + item.setName("Name"); + item.setAddress("Address"); + arg.setItem(item); + Bean1 expected = GenericsTransformer.getWildcardSuper(arg); + Bean1 actual = serviceClient.getWildcardSuperForward(arg); + Assert.assertEquals(expected, actual); + } + + private void performTestWildcardExtends(GenericsServiceClient serviceClient) { + { // Bean2 + Bean2 temp = new Bean2(); + temp.setName("Me"); + Bean1 arg = new Bean1(temp); + Bean1 expected = GenericsTransformer.getWildcardExtends(arg); + Bean1 actual = serviceClient.getWildcardExtendsForward(arg); + Assert.assertEquals(expected, actual); + } + { // Bean3 extends Bean2 + Bean3 temp = new Bean3(); + temp.setName("Me"); + temp.setAddress("My address"); + Bean1 arg = new Bean1(temp); + Bean1 expected = GenericsTransformer.getWildcardExtends(arg); + Bean1 actual = serviceClient.getWildcardExtendsForward(arg); + // The Bean3 will be unmarshalled into Bean2 + // Assert.assertEquals(expected, actual); + Assert.assertTrue(actual.getItem() instanceof Bean2); + } + { // Bean31 extends Bean2 + Bean31 temp = new Bean31(); + temp.setName("Me1"); + temp.setAddress("My address1"); + Bean1 arg = new Bean1(temp); + Bean1 expected = GenericsTransformer.getWildcardExtends(arg); + Bean1 actual = serviceClient.getWildcardExtendsForward(arg); + // The Bean31 will be unmarshalled into Bean2 + // Assert.assertEquals(expected, actual); + Assert.assertTrue(actual.getItem() instanceof Bean2); + } + } + + private void performTestPolymorphic(GenericsServiceClient serviceClient) { + { // Bean2 + Bean2 arg = new Bean2(); + arg.setName("Me"); + Bean2 expected = GenericsTransformer.getPolymorphic(arg); + Bean2 actual = serviceClient.getPolymorphicForward(arg); + Assert.assertEquals(expected, actual); + } + { // Bean3 extends Bean2 + Bean3 arg = new Bean3(); + arg.setName("Me"); + arg.setAddress("My address"); + Bean2 expected = GenericsTransformer.getPolymorphic(arg); + Bean2 actual = serviceClient.getPolymorphicForward(arg); + Assert.assertEquals(expected.getName(), actual.getName()); + } + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesDatabindingTestCase.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesDatabindingTestCase.java new file mode 100644 index 0000000000..f8aaad3dac --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesDatabindingTestCase.java @@ -0,0 +1,776 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb; + +import junit.framework.Assert; + +import org.apache.tuscany.sca.host.embedded.SCADomain; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +/** + * @version $Rev$ $Date$ + */ +public class PrimitivesDatabindingTestCase { + + private static SCADomain domain; + + /** + * Runs before each test method + */ + @BeforeClass + public static void setUp() throws Exception { + try { + domain = SCADomain.newInstance("primitivesservice.composite"); + } catch(Throwable e) { + e.printStackTrace(); + Assert.fail(); + } + } + + /** + * Runs after each test method + */ + @AfterClass + public static void tearDown() { + domain.close(); + } + + /** + * Invokes the PrimitivesService service using SCA binding. + * Service method invoked is negateBoolean. + */ + @Test + public void testSCANegateBoolean() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent"); + performTestNegateBoolean(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using SCA binding. + * Service method invoked is negateBooleanArray. + */ + @Test + public void testSCANegateBooleanArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent"); + performTestNegateBooleanArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with SCA binding. + * Test for boolean array. + */ + @Test + public void testSCAPassByValueBooleanArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueBooleanArray()); + } + + /** + * Invokes the PrimitivesService service using SCA binding. + * Service method invoked is negateByte. + */ + @Test + public void testSCANegateByte() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent"); + performTestNegateByte(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using SCA binding. + * Service method invoked is negateByteArray. + */ + @Test + public void testSCANegateByteArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent"); + performTestNegateByteArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with SCA binding. + * Test for byte array. + */ + @Test + public void testSCAPassByValueByteArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueByteArray()); + } + + /** + * Invokes the PrimitivesService service using SCA binding. + * Service method invoked is negateShort. + */ + @Test + public void testSCANegateShort() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent"); + performTestNegateShort(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using SCA binding. + * Service method invoked is negateShortArray. + */ + @Test + public void testSCANegateShortArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent"); + performTestNegateShortArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with SCA binding. + * Test for short array. + */ + @Test + public void testSCAPassByValueShortArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueShortArray()); + } + + /** + * Invokes the PrimitivesService service using SCA binding. + * Service method invoked is negateInt. + */ + @Test + public void testSCANegateInt() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent"); + performTestNegateInt(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using SCA binding. + * Service method invoked is negateIntArray. + */ + @Test + public void testSCANegateIntArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent"); + performTestNegateIntArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with SCA binding. + * Test for int array. + */ + @Test + public void testSCAPassByValueIntArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueIntArray()); + } + + /** + * Invokes the PrimitivesService service using SCA binding. + * Service method invoked is negateLong. + */ + @Test + public void testSCANegateLong() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent"); + performTestNegateLong(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using SCA binding. + * Service method invoked is negateLongArray. + */ + @Test + public void testSCANegateLongArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent"); + performTestNegateLongArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with SCA binding. + * Test for long array. + */ + @Test + public void testSCAPassByValueLongArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueLongArray()); + } + + /** + * Invokes the PrimitivesService service using SCA binding. + * Service method invoked is negateFloat. + */ + @Test + public void testSCANegateFloat() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent"); + performTestNegateFloat(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using SCA binding. + * Service method invoked is negateFloatArray. + */ + @Test + public void testSCANegateFloatArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent"); + performTestNegateFloatArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with SCA binding. + * Test for float array. + */ + @Test + public void testSCAPassByValueFloatArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueFloatArray()); + } + + /** + * Invokes the PrimitivesService service using SCA binding. + * Service method invoked is negateDouble. + */ + @Test + public void testSCANegateDouble() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent"); + performTestNegateDouble(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using SCA binding. + * Service method invoked is negateDoubleArray. + */ + @Test + public void testSCANegateDoubleArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent"); + performTestNegateDoubleArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with SCA binding. + * Test for double array. + */ + @Test + public void testSCAPassByValueDoubleArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientSCAComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueDoubleArray()); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateBoolean. + */ + @Test + public void testWSNegateBoolean() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent"); + performTestNegateBoolean(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateBooleanArray. + */ + @Test + public void testWSNegateBooleanArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent"); + performTestNegateBooleanArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with WS binding. + * Test for boolean array. + */ + @Test + public void testWSPassByValueBooleanArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueBooleanArray()); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateByte. + */ + @Test + public void testWSNegateByte() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent"); + performTestNegateByte(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateByteArray. + */ + @Test + public void testWSNegateByteArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent"); + performTestNegateByteArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with WS binding. + * Test for byte array. + */ + @Test + public void testWSPassByValueByteArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueByteArray()); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateShort. + */ + @Test + public void testWSNegateShort() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent"); + performTestNegateShort(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateShortArray. + */ + @Test + public void testWSNegateShortArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent"); + performTestNegateShortArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with WS binding. + * Test for short array. + */ + @Test + public void testWSPassByValueShortArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueShortArray()); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateInt. + */ + @Test + public void testWSNegateInt() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent"); + performTestNegateInt(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateIntArray. + */ + @Test + public void testWSNegateIntArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent"); + performTestNegateIntArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with WS binding. + * Test for int array. + */ + @Test + public void testWSPassByValueIntArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueIntArray()); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateLong. + */ + @Test + public void testWSNegateLong() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent"); + performTestNegateLong(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateLongArray. + */ + @Test + public void testWSNegateLongArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent"); + performTestNegateLongArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with WS binding. + * Test for long array. + */ + @Test + public void testWSPassByValueLongArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueLongArray()); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateFloat. + */ + @Test + public void testWSNegateFloat() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent"); + performTestNegateFloat(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateFloatArray. + */ + @Test + public void testWSNegateFloatArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent"); + performTestNegateFloatArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with WS binding. + * Test for float array. + */ + @Test + public void testWSPassByValueFloatArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueFloatArray()); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateDouble. + */ + @Test + public void testWSNegateDouble() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent"); + performTestNegateDouble(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateDoubleArray. + */ + @Test + public void testWSNegateDoubleArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent"); + performTestNegateDoubleArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with WS binding. + * Test for double array. + */ + @Test + public void testWSPassByValueDoubleArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientWSComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueDoubleArray()); + } + + /** + * Invokes the PrimitivesLocalService service using SCA binding. + * Service method invoked is negateBoolean. + */ + @Test + public void testSCALocalNegateBoolean() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesLocalServiceClientSCAComponent"); + performTestNegateBoolean(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesLocalService service using SCA binding. + * Service method invoked is negateBooleanArray. + */ + @Test + public void testSCALocalNegateBooleanArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesLocalServiceClientSCAComponent"); + performTestNegateBooleanArray(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesLocalService service using SCA binding. + * Service method invoked is negateByte. + */ + @Test + public void testSCALocalNegateByte() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesLocalServiceClientSCAComponent"); + performTestNegateByte(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesLocalService service using SCA binding. + * Service method invoked is negateByteArray. + */ + @Test + public void testSCALocalNegateByteArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesLocalServiceClientSCAComponent"); + performTestNegateByteArray(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesLocalService service using SCA binding. + * Service method invoked is negateShort. + */ + @Test + public void testSCALocalNegateShort() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesLocalServiceClientSCAComponent"); + performTestNegateShort(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesLocalService service using SCA binding. + * Service method invoked is negateShortArray. + */ + @Test + public void testSCALocalNegateShortArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesLocalServiceClientSCAComponent"); + performTestNegateShortArray(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesLocalService service using SCA binding. + * Service method invoked is negateInt. + */ + @Test + public void testSCALocalNegateInt() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesLocalServiceClientSCAComponent"); + performTestNegateInt(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesLocalService service using SCA binding. + * Service method invoked is negateIntArray. + */ + @Test + public void testSCALocalNegateIntArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesLocalServiceClientSCAComponent"); + performTestNegateIntArray(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesLocalService service using SCA binding. + * Service method invoked is negateLong. + */ + @Test + public void testSCALocalNegateLong() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesLocalServiceClientSCAComponent"); + performTestNegateLong(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesLocalService service using SCA binding. + * Service method invoked is negateLongArray. + */ + @Test + public void testSCALocalNegateLongArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesLocalServiceClientSCAComponent"); + performTestNegateLongArray(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesLocalService service using SCA binding. + * Service method invoked is negateFloat. + */ + @Test + public void testSCALocalNegateFloat() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesLocalServiceClientSCAComponent"); + performTestNegateFloat(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using SCA binding. + * Service method invoked is negateFloatArray. + */ + @Test + public void testSCALocalNegateFloatArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesLocalServiceClientSCAComponent"); + performTestNegateFloatArray(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesLocalService service using SCA binding. + * Service method invoked is negateDouble. + */ + @Test + public void testSCALocalNegateDouble() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesLocalServiceClientSCAComponent"); + performTestNegateDouble(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesLocalService service using SCA binding. + * Service method invoked is negateDoubleArray. + */ + @Test + public void testSCALocalNegateDoubleArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesLocalServiceClientSCAComponent"); + performTestNegateDoubleArray(primitivesServiceClient); + } + + private void performTestNegateBoolean(PrimitivesServiceClient primitivesServiceClient) { + Assert.assertTrue(primitivesServiceClient.negateBooleanForward(false)); + Assert.assertFalse(primitivesServiceClient.negateBooleanForward(true)); + } + + private void performTestNegateBooleanArray(PrimitivesServiceClient primitivesServiceClient) { + boolean flags[] = new boolean[2]; + flags[0] = false; + flags[1] = true; + boolean[] respFlags = primitivesServiceClient.negateBooleanArrayForward(flags); + Assert.assertEquals(flags.length, respFlags.length); + for(int i = 0; i < flags.length; ++i) { + Assert.assertEquals(!flags[i], respFlags[i]); + } + } + + private void performTestNegateByte(PrimitivesServiceClient primitivesServiceClient) { + byte[] ba = new byte[3]; + ba[0] = -1; + ba[1] = 0; + ba[2] = 1; + + for(int i = 0; i < ba.length; ++i) { + Assert.assertEquals((byte)-ba[i], primitivesServiceClient.negateByteForward(ba[i])); + } + } + + private void performTestNegateByteArray(PrimitivesServiceClient primitivesServiceClient) { + byte[] ba = new byte[3]; + ba[0] = -1; + ba[1] = 0; + ba[2] = 1; + + byte[] r = primitivesServiceClient.negateByteArrayForward(ba); + Assert.assertEquals(ba.length, r.length); + for(int i = 0; i < ba.length; ++i) { + Assert.assertEquals((byte)-ba[i], r[i]); + } + } + + private void performTestNegateShort(PrimitivesServiceClient primitivesServiceClient) { + short[] s = new short[3]; + s[0] = -1; + s[1] = 0; + s[2] = 1; + + for(int i = 0; i < s.length; ++i) { + Assert.assertEquals((short)-s[i], primitivesServiceClient.negateShortForward(s[i])); + } + } + + private void performTestNegateShortArray(PrimitivesServiceClient primitivesServiceClient) { + short[] s = new short[3]; + s[0] = -1; + s[1] = 0; + s[2] = 1; + + short[] r = primitivesServiceClient.negateShortArrayForward(s); + Assert.assertEquals(s.length, r.length); + for(int i = 0; i < s.length; ++i) { + Assert.assertEquals((short)-s[i], r[i]); + } + } + + private void performTestNegateInt(PrimitivesServiceClient primitivesServiceClient) { + int[] ia = new int[3]; + ia[0] = -1; + ia[1] = 0; + ia[2] = 1; + + for(int i = 0; i < ia.length; ++i) { + Assert.assertEquals(-ia[i], primitivesServiceClient.negateIntForward(ia[i])); + } + } + + private void performTestNegateIntArray(PrimitivesServiceClient primitivesServiceClient) { + int[] ia = new int[3]; + ia[0] = -1; + ia[1] = 0; + ia[2] = 1; + + int[] r = primitivesServiceClient.negateIntArrayForward(ia); + Assert.assertEquals(ia.length, r.length); + for(int i = 0; i < ia.length; ++i) { + Assert.assertEquals(-ia[i], r[i]); + } + } + + private void performTestNegateLong(PrimitivesServiceClient primitivesServiceClient) { + long[] la = new long[3]; + la[0] = -1; + la[1] = 0; + la[2] = 1; + + for(int i = 0; i < la.length; ++i) { + Assert.assertEquals(-la[i], primitivesServiceClient.negateLongForward(la[i])); + } + } + + private void performTestNegateLongArray(PrimitivesServiceClient primitivesServiceClient) { + long[] la = new long[3]; + la[0] = -1; + la[1] = 0; + la[2] = 1; + + long[] r = primitivesServiceClient.negateLongArrayForward(la); + Assert.assertEquals(la.length, r.length); + for(int i = 0; i < la.length; ++i) { + Assert.assertEquals(-la[i], r[i]); + } + } + + private void performTestNegateFloat(PrimitivesServiceClient primitivesServiceClient) { + float[] fa = new float[3]; + fa[0] = -1; + fa[1] = 0; + fa[2] = 1; + + for(int i = 0; i < fa.length; ++i) { + Assert.assertEquals(-fa[i], primitivesServiceClient.negateFloatForward(fa[i])); + } + } + + private void performTestNegateFloatArray(PrimitivesServiceClient primitivesServiceClient) { + float[] ia = new float[3]; + ia[0] = -1; + ia[1] = 0; + ia[2] = 1; + + float[] r = primitivesServiceClient.negateFloatArrayForward(ia); + Assert.assertEquals(ia.length, r.length); + for(int i = 0; i < ia.length; ++i) { + Assert.assertEquals(-ia[i], r[i]); + } + } + + private void performTestNegateDouble(PrimitivesServiceClient primitivesServiceClient) { + double[] da = new double[3]; + da[0] = -1; + da[1] = 0; + da[2] = 1; + + for(int i = 0; i < da.length; ++i) { + Assert.assertEquals(-da[i], primitivesServiceClient.negateDoubleForward(da[i])); + } + } + + private void performTestNegateDoubleArray(PrimitivesServiceClient primitivesServiceClient) { + double[] da = new double[3]; + da[0] = -1; + da[1] = 0; + da[2] = 1; + + double[] r = primitivesServiceClient.negateDoubleArrayForward(da); + Assert.assertEquals(da.length, r.length); + for(int i = 0; i < da.length; ++i) { + Assert.assertEquals(-da[i], r[i]); + } + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesDatabindingTestCase.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesDatabindingTestCase.java new file mode 100644 index 0000000000..9788a7f2df --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-bottom-up/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesDatabindingTestCase.java @@ -0,0 +1,1439 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb; + +import java.awt.Image; +import java.awt.image.BufferedImage; +import java.awt.image.PixelGrabber; +import java.io.IOException; +import java.io.InputStream; +import java.io.StringReader; +import java.io.StringWriter; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.URI; +import java.net.URL; +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.TimeZone; +import java.util.UUID; + +import javax.activation.DataHandler; +import javax.xml.datatype.DatatypeConfigurationException; +import javax.xml.datatype.DatatypeFactory; +import javax.xml.datatype.Duration; +import javax.xml.datatype.XMLGregorianCalendar; +import javax.xml.namespace.QName; +import javax.xml.transform.Result; +import javax.xml.transform.Source; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.sax.SAXSource; +import javax.xml.transform.stream.StreamResult; +import javax.xml.transform.stream.StreamSource; + +import junit.framework.Assert; + +import org.apache.axiom.attachments.ByteArrayDataSource; +import org.apache.tuscany.sca.databinding.xml.String2Node; +import org.apache.tuscany.sca.host.embedded.SCADomain; +import org.apache.tuscany.sca.itest.databindings.jaxb.impl.StandardTypesTransformer; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Ignore; +import org.junit.Test; +import org.xml.sax.InputSource; + +/** + * @version $Rev$ $Date$ + */ +public class StandardTypesDatabindingTestCase { + + private static SCADomain domain; + + /** + * Runs before each test method + */ + @BeforeClass + public static void setUp() throws Exception { + try { + domain = SCADomain.newInstance("standard-types-service.composite"); + } catch (Throwable e) { + e.printStackTrace(); + } + } + + /** + * Runs after each test method + */ + @AfterClass + public static void tearDown() { + domain.close(); + } + + /** + * Invokes the StandardTypesService service using SCA binding. + * Service method invoked is getNewBigInteger. + */ + @Test + public void testSCANewBigInteger() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent"); + performTestNewBigInteger(serviceClient); + } + + /** + * Invokes the StandardTypesService service using SCA binding. + * Service method invoked is getNewBigIntegerArray. + */ + @Test + public void testSCANewBigIntegerArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent"); + performTestNewBigIntegerArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using SCA binding. + * Service method invoked is getNewBigDecimal. + */ + @Test + public void testSCANewBigDecimal() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent"); + performTestNewBigDecimal(serviceClient); + } + + /** + * Invokes the StandardTypesService service using SCA binding. + * Service method invoked is getNewBigDecimalArray. + */ + @Test + public void testSCANewBigDecimalArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent"); + performTestNewBigDecimalArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using SCA binding. + * Service method invoked is getNewCalendar. + */ + @Test + public void testSCANewCalendar() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent"); + performTestNewCalendar(serviceClient); + } + + /** + * Invokes the StandardTypesService service using SCA binding. + * Service method invoked is getNewCalendarArray. + */ + @Test + public void testSCANewCalendarArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent"); + performTestNewCalendarArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using SCA binding. + * Service method invoked is getNewDate. + */ + @Test + public void testSCANewDate() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent"); + performTestNewDate(serviceClient); + } + + /** + * Invokes the StandardTypesService service using SCA binding. + * Service method invoked is getNewDateArray. + */ + @Test + public void testSCANewDateArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent"); + performTestNewDateArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using SCA binding. + * Service method invoked is getNewQName. + */ + @Test + public void testSCANewQName() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent"); + performTestNewQName(serviceClient); + } + + /** + * Invokes the StandardTypesService service using SCA binding. + * Service method invoked is getNewQNameArray. + */ + @Test + public void testSCANewQNameArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent"); + performTestNewQNameArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using SCA binding. + * Service method invoked is getNewURI. + */ + @Test + public void testSCANewURI() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent"); + performTestNewURI(serviceClient); + } + + /** + * Invokes the StandardTypesService service using SCA binding. + * Service method invoked is getNewURIArray. + */ + @Test + public void testSCANewURIArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent"); + performTestNewURIArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using SCA binding. + * Service method invoked is getNewXMLGregorianCalendar. + */ + @Test + public void testSCANewXMLGregorianCalendar() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent"); + performTestNewXMLGregorianCalendar(serviceClient); + } + + /** + * Invokes the StandardTypesService service using SCA binding. + * Service method invoked is getNewXMLGregorianCalendarArray. + */ + @Test + public void testSCANewXMLGregorianCalendarArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent"); + performTestNewXMLGregorianCalendarArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using SCA binding. + * Service method invoked is getNewDuration. + */ + @Test + public void testSCANewDuration() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent"); + performTestNewDuration(serviceClient); + } + + /** + * Invokes the StandardTypesService service using SCA binding. + * Service method invoked is getNewDurationArray. + */ + @Test + public void testSCANewDurationArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent"); + performTestNewDurationArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using SCA binding. + * Service method invoked is getNewObject. + */ + @Test + public void testSCANewObject() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent"); + performTestNewObject(serviceClient); + } + + /** + * Invokes the StandardTypesService service using SCA binding. + * Service method invoked is getNewObjectArray. + */ + @Test + public void testSCANewObjectArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent"); + performTestNewObjectArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using SCA binding. + * Service method invoked is getNewImage. + */ + @Test + public void testSCANewImage() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent"); + performTestNewImage(serviceClient); + } + + /** + * Invokes the StandardTypesService service using SCA binding. + * Service method invoked is getNewImageArray. + */ + @Test + public void testSCANewImageArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent"); + performTestNewImageArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using SCA binding. + * Service method invoked is getNewDataHandler. + */ + @Test + public void testSCANewDataHandler() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent"); + performTestNewDataHandler(serviceClient); + } + + /** + * Invokes the StandardTypesService service using SCA binding. + * Service method invoked is getNewDataHandlerArray. + */ + @Test + public void testSCANewDataHandlerArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent"); + performTestNewDataHandlerArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using SCA binding. + * Service method invoked is getNewSource. + */ + @Test + public void testSCANewSource() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent"); + performTestNewSource(serviceClient); + } + + /** + * Invokes the StandardTypesService service using SCA binding. + * Service method invoked is getNewSourceArray. + */ + @Test + @Ignore("TUSCANY-2387") + public void testSCANewSourceArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent"); + performTestNewSourceArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using SCA binding. + * Service method invoked is getNewUUID. + */ + @Test + public void testSCANewUUID() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent"); + performTestNewUUID(serviceClient); + } + + /** + * Invokes the StandardTypesService service using SCA binding. + * Service method invoked is getNewUUIDArray. + */ + @Test + public void testSCANewUUIDArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientSCAComponent"); + performTestNewUUIDArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewBigInteger. + */ + @Test + public void testWSNewBigInteger() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent"); + performTestNewBigInteger(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewBigIntegerArray. + */ + @Test + public void testWSNewBigIntegerArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent"); + performTestNewBigIntegerArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewBigDecimal. + */ + @Test + public void testWSNewBigDecimal() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent"); + performTestNewBigDecimal(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewBigDecimalArray. + */ + @Test + public void testWSNewBigDecimalArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent"); + performTestNewBigDecimalArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewCalendar. + */ + @Test + public void testWSNewCalendar() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent"); + performTestNewCalendar(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewCalendarArray. + */ + @Test + public void testWSNewCalendarArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent"); + performTestNewCalendarArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewDate. + */ + @Test + public void testWSNewDate() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent"); + performTestNewDate(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewDateArray. + */ + @Test + public void testWSNewDateArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent"); + performTestNewDateArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewQName. + */ + @Test + public void testWSNewQName() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent"); + performTestNewQName(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewQNameArray. + */ + @Test + public void testWSNewQNameArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent"); + performTestNewQNameArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewURI. + */ + @Test + public void testWSNewURI() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent"); + performTestNewURI(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewURIArray. + */ + @Test + public void testWSNewURIArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent"); + performTestNewURIArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewXMLGregorianCalendar. + */ + @Test + public void testWSNewXMLGregorianCalendar() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent"); + performTestNewXMLGregorianCalendar(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewXMLGregorianCalendarArray. + */ + @Test + public void testWSNewXMLGregorianCalendarArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent"); + performTestNewXMLGregorianCalendarArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewDuration. + */ + @Test + public void testWSNewDuration() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent"); + performTestNewDuration(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewDurationArray. + */ + @Test + public void testWSNewDurationArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent"); + performTestNewDurationArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewObject. + */ + @Test + public void testWSNewObject() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent"); + performTestNewObject(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewObjectArray. + */ + @Test + public void testWSNewObjectArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent"); + performTestNewObjectArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewImage. + */ + @Test + public void testWSNewImage() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent"); + performTestNewImage(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewImageArray. + */ + @Test + public void testWSNewImageArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent"); + performTestNewImageArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewDataHandler. + */ + @Test + public void testWSNewDataHandler() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent"); + performTestNewDataHandler(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewDataHandlerArray. + */ + @Test + public void testWSNewDataHandlerArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent"); + performTestNewDataHandlerArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewSource. + */ + @Test + // @Ignore("junit.framework.ComparisonFailure: null expected:<... encoding=\"UTF-8\"?><[a>A> but was:<... encoding=\"UTF-8\"?><[return xmlns=\"http://jaxb.databindings.itest.sca.tuscany.apache.org/\">A>") + public void testWSNewSource() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent"); + performTestNewSource(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewSourceArray. + */ + @Test + @Ignore("TUSCANY-2386") + public void testWSNewSourceArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent"); + performTestNewSourceArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewUUID. + */ + @Test + public void testWSNewUUID() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent"); + performTestNewUUID(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewUUIDArray. + */ + @Test + public void testWSNewUUIDArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientWSComponent"); + performTestNewUUIDArray(serviceClient); + } + + /** + * Invokes the StandardTypesLocalService service using SCA binding. + * Service method invoked is getNewBigInteger. + */ + @Test + public void testSCALocalNewBigInteger() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent"); + performTestNewBigInteger(serviceClient); + } + + /** + * Invokes the StandardTypesLocalService service using SCA binding. + * Service method invoked is getNewBigIntegerArray. + */ + @Test + public void testSCALocalNewBigIntegerArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent"); + performTestNewBigIntegerArray(serviceClient); + } + + /** + * Invokes the StandardTypesLocalService service using SCA binding. + * Service method invoked is getNewBigDecimal. + */ + @Test + public void testSCALocalNewBigDecimal() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent"); + performTestNewBigDecimal(serviceClient); + } + + /** + * Invokes the StandardTypesLocalService service using SCA binding. + * Service method invoked is getNewBigDecimalArray. + */ + @Test + public void testSCALocalNewBigDecimalArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent"); + performTestNewBigDecimalArray(serviceClient); + } + + /** + * Invokes the StandardTypesLocalService service using SCA binding. + * Service method invoked is getNewCalendar. + */ + @Test + public void testSCALocalNewCalendar() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent"); + performTestNewCalendar(serviceClient); + } + + /** + * Invokes the StandardTypesLocalService service using SCA binding. + * Service method invoked is getNewCalendarArray. + */ + @Test + public void testSCALocalNewCalendarArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent"); + performTestNewCalendarArray(serviceClient); + } + + /** + * Invokes the StandardTypesLocalService service using SCA binding. + * Service method invoked is getNewDate. + */ + @Test + public void testSCALocalNewDate() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent"); + performTestNewDate(serviceClient); + } + + /** + * Invokes the StandardTypesLocalService service using SCA binding. + * Service method invoked is getNewDateArray. + */ + @Test + public void testSCALocalNewDateArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent"); + performTestNewDateArray(serviceClient); + } + + /** + * Invokes the StandardTypesLocalService service using SCA binding. + * Service method invoked is getNewQName. + */ + @Test + public void testSCALocalNewQName() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent"); + performTestNewQName(serviceClient); + } + + /** + * Invokes the StandardTypesLocalService service using SCA binding. + * Service method invoked is getNewQNameArray. + */ + @Test + public void testSCALocalNewQNameArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent"); + performTestNewQNameArray(serviceClient); + } + + /** + * Invokes the StandardTypesLocalService service using SCA binding. + * Service method invoked is getNewURI. + */ + @Test + public void testSCALocalNewURI() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent"); + performTestNewURI(serviceClient); + } + + /** + * Invokes the StandardTypesLocalService service using SCA binding. + * Service method invoked is getNewURIArray. + */ + @Test + public void testSCALocalNewURIArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent"); + performTestNewURIArray(serviceClient); + } + + /** + * Invokes the StandardTypesLocalService service using SCA binding. + * Service method invoked is getNewXMLGregorianCalendar. + */ + @Test + public void testSCALocalNewXMLGregorianCalendar() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent"); + performTestNewXMLGregorianCalendar(serviceClient); + } + + /** + * Invokes the StandardTypesLocalService service using SCA binding. + * Service method invoked is getNewXMLGregorianCalendarArray. + */ + @Test + public void testSCALocalNewXMLGregorianCalendarArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent"); + performTestNewXMLGregorianCalendarArray(serviceClient); + } + + /** + * Invokes the StandardTypesLocalService service using SCA binding. + * Service method invoked is getNewDuration. + */ + @Test + public void testSCALocalNewDuration() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent"); + performTestNewDuration(serviceClient); + } + + /** + * Invokes the StandardTypesLocalService service using SCA binding. + * Service method invoked is getNewDurationArray. + */ + @Test + public void testSCALocalNewDurationArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent"); + performTestNewDurationArray(serviceClient); + } + + /** + * Invokes the StandardTypesLocalService service using SCA binding. + * Service method invoked is getNewObject. + */ + @Test + public void testSCALocalNewObject() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent"); + performTestNewObject(serviceClient); + } + + /** + * Invokes the StandardTypesLocalService service using SCA binding. + * Service method invoked is getNewObjectArray. + */ + @Test + public void testSCALocalNewObjectArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent"); + performTestNewObjectArray(serviceClient); + } + + /** + * Invokes the StandardTypesLocalService service using SCA binding. + * Service method invoked is getNewImage. + */ + @Test + public void testSCALocalNewImage() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent"); + performTestNewImage(serviceClient); + } + + /** + * Invokes the StandardTypesLocalService service using SCA binding. + * Service method invoked is getNewImageArray. + */ + @Test + public void testSCALocalNewImageArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent"); + performTestNewImageArray(serviceClient); + } + + /** + * Invokes the StandardTypesLocalLocalService service using SCA binding. + * Service method invoked is getNewDataHandler. + */ + @Test + public void testSCALocalNewDataHandler() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent"); + performTestNewDataHandler(serviceClient); + } + + /** + * Invokes the StandardTypesLocalService service using SCA binding. + * Service method invoked is getNewDataHandlerArray. + */ + @Test + public void testSCALocalNewDataHandlerArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent"); + performTestNewDataHandlerArray(serviceClient); + } + + /** + * Invokes the StandardTypesLocalService service using SCA binding. + * Service method invoked is getNewSource. + */ + @Test + public void testSCALocalNewSource() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent"); + performTestNewSource(serviceClient); + } + + /** + * Invokes the StandardTypesLocalService service using SCA binding. + * Service method invoked is getNewSourceArray. + */ + @Test + public void testSCALocalNewSourceArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent"); + performTestNewSourceArray(serviceClient); + } + + /** + * Invokes the StandardTypesLocalService service using SCA binding. + * Service method invoked is getNewUUID. + */ + @Test + public void testSCALocalNewUUID() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent"); + performTestNewUUID(serviceClient); + } + + /** + * Invokes the StandardTypesLocalService service using SCA binding. + * Service method invoked is getNewUUIDArray. + */ + @Test + public void testSCALocalNewUUIDArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesLocalServiceClientSCAComponent"); + performTestNewUUIDArray(serviceClient); + } + + private void performTestNewBigInteger(StandardTypesServiceClient serviceClient) { + BigInteger bi = new BigInteger("1234567890123456789012345678901234"); + BigInteger expected = bi.negate(); + BigInteger actual = serviceClient.getNewBigIntegerForward(bi); + Assert.assertEquals(expected, actual); + } + + private void performTestNewBigIntegerArray(StandardTypesServiceClient serviceClient) { + BigInteger[] bia = new BigInteger[2]; + bia[0] = new BigInteger("1234567890123456789012345678901234"); + bia[1] = new BigInteger("-98765432109876543210987654321"); + BigInteger[] actual = serviceClient.getNewBigIntegerArrayForward(bia); + Assert.assertEquals(bia.length, actual.length); + for (int i = 0; i < bia.length; ++i) { + Assert.assertEquals(bia[i].negate(), actual[i]); + } + } + + private void performTestNewBigDecimal(StandardTypesServiceClient serviceClient) { + BigDecimal bd = new BigDecimal("12345678901234567890.12345678901234"); + BigDecimal expected = bd.negate(); + BigDecimal actual = serviceClient.getNewBigDecimalForward(bd); + Assert.assertEquals(expected, actual); + } + + private void performTestNewBigDecimalArray(StandardTypesServiceClient serviceClient) { + BigDecimal[] bda = new BigDecimal[2]; + bda[0] = new BigDecimal("1234567890123456.789012345678901234"); + bda[1] = new BigDecimal("-987654321098765.43210987654321"); + BigDecimal[] actual = serviceClient.getNewBigDecimalArrayForward(bda); + Assert.assertEquals(bda.length, actual.length); + for (int i = 0; i < bda.length; ++i) { + Assert.assertEquals(bda[i].negate(), actual[i]); + } + } + + private void performTestNewCalendar(StandardTypesServiceClient serviceClient) { + Calendar[] ca = new Calendar[3]; + String[] tz = {"GMT+05:30", "GMT+00:00", "GMT-05:00"}; + for (int i = 0; i < ca.length; ++i) { + ca[i] = Calendar.getInstance(TimeZone.getTimeZone(tz[i])); + ca[i].set(Calendar.DAY_OF_MONTH, i + 1); + } + for (int i = 0; i < ca.length; ++i) { + Calendar actual = serviceClient.getNewCalendarForward(ca[i]); + ca[i].add(Calendar.DAY_OF_MONTH, 5); + if (actual instanceof GregorianCalendar && ca[i] instanceof GregorianCalendar) { + // FIXME: Is this a problem? + // The instance returned by service method invoked over binding.ws seems to have a gregorianCutover + // different from the instance passed. Adjust the gregorianCutover as per the input instance. + ((GregorianCalendar)actual).setGregorianChange(((GregorianCalendar)ca[i]).getGregorianChange()); + } + Assert.assertEquals(ca[i], actual); + } + } + + private void performTestNewCalendarArray(StandardTypesServiceClient serviceClient) { + Calendar[] ca = new Calendar[3]; + String[] tz = {"GMT+05:30", "GMT+00:00", "GMT-05:00"}; + for (int i = 0; i < ca.length; ++i) { + ca[i] = Calendar.getInstance(TimeZone.getTimeZone(tz[i])); + ca[i].set(Calendar.DAY_OF_MONTH, i + 1); + } + Calendar[] actual = serviceClient.getNewCalendarArrayForward(ca); + Assert.assertEquals(ca.length, actual.length); + for (int i = 0; i < ca.length; ++i) { + ca[i].add(Calendar.DAY_OF_MONTH, 5); + if (actual[i] instanceof GregorianCalendar && ca[i] instanceof GregorianCalendar) { + // FIXME: Is this a problem? + // The instance returned by service method invoked over binding.ws seems to have a gregorianCutover + // different from the instance passed. Adjust the gregorianCutover as per the input instance. + ((GregorianCalendar)actual[i]).setGregorianChange(((GregorianCalendar)ca[i]).getGregorianChange()); + } + Assert.assertEquals(ca[i], actual[i]); + } + } + + private void performTestNewDate(StandardTypesServiceClient serviceClient) { + Date d = new Date(); + Date expected = new Date(d.getTime() + 5 * 24 * 60 * 60 * 1000); + Date actual = serviceClient.getNewDateForward(d); + Assert.assertEquals(expected, actual); + } + + private void performTestNewDateArray(StandardTypesServiceClient serviceClient) { + Date[] d = new Date[2]; + Date[] expected = new Date[d.length]; + for (int i = 0; i < d.length; ++i) { + d[i] = new Date(); + d[i].setTime(d[i].getTime() + i * 24 * 60 * 60 * 1000); + expected[i] = new Date(d[i].getTime() + 5 * 24 * 60 * 60 * 1000); + } + Date[] actual = serviceClient.getNewDateArrayForward(d); + Assert.assertEquals(expected.length, actual.length); + for (int i = 0; i < expected.length; ++i) { + Assert.assertEquals(expected[i], actual[i]); + } + } + + private void performTestNewQName(StandardTypesServiceClient serviceClient) { + QName[] qnames = new QName[3]; + qnames[0] = new QName("localPart"); + qnames[1] = new QName("namespaceUri", "localPart"); + qnames[2] = new QName("namespaceUri", "localPart", "prefix"); + QName[] expected = new QName[qnames.length]; + for (int i = 0; i < qnames.length; ++i) { + expected[i] = + new QName(qnames[i].getNamespaceURI() + "q", qnames[i].getLocalPart() + "q", + qnames[i].getPrefix() + "q"); + } + for (int i = 0; i < qnames.length; ++i) { + QName actual = serviceClient.getNewQNameForward(qnames[i]); + Assert.assertEquals(expected[i], actual); + } + } + + private void performTestNewQNameArray(StandardTypesServiceClient serviceClient) { + QName[] qnames = new QName[4]; + qnames[0] = new QName("localPart"); + qnames[1] = new QName("namespaceUri", "localPart"); + qnames[2] = new QName("namespaceUri", "localPart", "prefix"); + qnames[3] = new QName("localPart2"); + QName[] expected = new QName[qnames.length]; + for (int i = 0; i < qnames.length; ++i) { + expected[i] = + new QName(qnames[i].getNamespaceURI() + "q", qnames[i].getLocalPart() + "q", + qnames[i].getPrefix() + "q"); + } + QName[] actual = serviceClient.getNewQNameArrayForward(qnames); + Assert.assertEquals(expected.length, actual.length); + for (int i = 0; i < qnames.length; ++i) { + Assert.assertEquals(expected[i], actual[i]); + } + } + + private void performTestNewURI(StandardTypesServiceClient serviceClient) { + URI[] uris = new URI[4]; + uris[0] = URI.create("a/b/c"); + uris[1] = URI.create("http://abc/"); + uris[2] = URI.create("ftp://a/b"); + uris[3] = URI.create("http://abc/").resolve("xyz"); + + for (int i = 0; i < uris.length; ++i) { + URI expected = uris[i].resolve("uri"); + URI actual = serviceClient.getNewURIForward(uris[i]); + Assert.assertEquals(expected, actual); + } + } + + private void performTestNewURIArray(StandardTypesServiceClient serviceClient) { + URI[] uris = new URI[4]; + uris[0] = URI.create("a/b/c"); + // [rfeng] We need to have a trialign / to avoid the resolving problem + // FIXME: [vamsi] This is actually a data transformation problem. The array being returned from the service method is + // not making to the caller intact. + uris[1] = URI.create("http://abc/"); + uris[2] = URI.create("ftp://a/b"); + uris[3] = URI.create("http://abc/").resolve("xyz"); + + URI[] expected = new URI[uris.length]; + for (int i = 0; i < uris.length; ++i) { + expected[i] = uris[i].resolve("uri"); + } + + URI[] actual = serviceClient.getNewURIArrayForward(uris); + Assert.assertEquals(expected.length, actual.length); + for (int i = 0; i < uris.length; ++i) { + Assert.assertEquals(expected[i], actual[i]); + } + } + + private void performTestNewXMLGregorianCalendar(StandardTypesServiceClient serviceClient) + throws DatatypeConfigurationException { + DatatypeFactory df = DatatypeFactory.newInstance(); + XMLGregorianCalendar[] xgcals = new XMLGregorianCalendar[3]; + xgcals[0] = df.newXMLGregorianCalendar(new GregorianCalendar(1974, GregorianCalendar.APRIL, 19)); + xgcals[1] = df.newXMLGregorianCalendar(new GregorianCalendar(1978, GregorianCalendar.OCTOBER, 13)); + xgcals[2] = df.newXMLGregorianCalendar(new GregorianCalendar(2006, GregorianCalendar.JUNE, 16)); + + for (int i = 0; i < xgcals.length; ++i) { + XMLGregorianCalendar actual = serviceClient.getNewXMLGregorianCalendarForward(xgcals[i]); + xgcals[i].setDay(xgcals[i].getDay() + 5); + Assert.assertEquals(xgcals[i], actual); + } + } + + private void performTestNewXMLGregorianCalendarArray(StandardTypesServiceClient serviceClient) + throws DatatypeConfigurationException { + DatatypeFactory df = DatatypeFactory.newInstance(); + XMLGregorianCalendar[] xgcals = new XMLGregorianCalendar[3]; + xgcals[0] = df.newXMLGregorianCalendar(new GregorianCalendar(1974, GregorianCalendar.APRIL, 19)); + xgcals[1] = df.newXMLGregorianCalendar(new GregorianCalendar(1978, GregorianCalendar.OCTOBER, 13)); + xgcals[2] = df.newXMLGregorianCalendar(new GregorianCalendar(2006, GregorianCalendar.JUNE, 16)); + + XMLGregorianCalendar[] actual = serviceClient.getNewXMLGregorianCalendarArrayForward(xgcals); + Assert.assertEquals(xgcals.length, actual.length); + for (int i = 0; i < xgcals.length; ++i) { + xgcals[i].setDay(xgcals[i].getDay() + 5); + Assert.assertEquals(xgcals[i], actual[i]); + } + } + + private void performTestNewDuration(StandardTypesServiceClient serviceClient) throws DatatypeConfigurationException { + DatatypeFactory df = DatatypeFactory.newInstance(); + Duration[] da = new Duration[3]; + da[0] = df.newDuration(1000000000000L); + da[1] = df.newDurationDayTime(1000000000000L); + da[2] = df.newDurationYearMonth(true, 1, 3); + + for (int i = 0; i < da.length; ++i) { + Assert.assertEquals(da[i].negate(), serviceClient.getNewDurationForward(da[i])); + } + } + + private void performTestNewObject(StandardTypesServiceClient serviceClient) { + Object[] objs = new Object[5]; + objs[0] = "Hello"; + objs[1] = 10; + objs[2] = null; + objs[3] = -1.0; + objs[4] = null; + + for (int i = 0; i < objs.length; ++i) { + Object expected = StandardTypesTransformer.getNewObject(objs[i]); + Object actual = serviceClient.getNewObjectForward(objs[i]); + Assert.assertEquals(expected, actual); + } + } + + private void performTestNewObjectArray(StandardTypesServiceClient serviceClient) { + Object[] objs = new Object[5]; + objs[0] = "Hello"; + objs[1] = 10; + objs[2] = null; + objs[3] = -1.0; + objs[4] = null; + + Object[] actual = serviceClient.getNewObjectArrayForward(objs); + Assert.assertEquals(objs.length, actual.length); + for (int i = 0; i < objs.length; ++i) { + Object expected = StandardTypesTransformer.getNewObject(objs[i]); + Assert.assertEquals(expected, actual[i]); + } + } + + private void performTestNewImage(StandardTypesServiceClient serviceClient) throws InterruptedException { + // Create some images to test with. + Image[] imgs = new Image[3]; + imgs[0] = new BufferedImage(10, 10, BufferedImage.TYPE_3BYTE_BGR); + imgs[1] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB); + imgs[2] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB); + imgs[0].getGraphics().drawLine(1, 1, 8, 8); + imgs[1].getGraphics().drawLine(8, 1, 1, 8); + imgs[2].getGraphics().drawLine(1, 8, 8, 1); + + Image[] copy = imgs; + // Create the same images once again as the StandardTypesTransformer may manipulate the image passed. + imgs = new Image[3]; + imgs[0] = new BufferedImage(10, 10, BufferedImage.TYPE_3BYTE_BGR); + imgs[1] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB); + imgs[2] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB); + imgs[0].getGraphics().drawLine(1, 1, 8, 8); + imgs[1].getGraphics().drawLine(8, 1, 1, 8); + imgs[2].getGraphics().drawLine(1, 8, 8, 1); + + // Make sure the images and copies are equal using ImageInfo + for(int i = 0; i < imgs.length; ++i) { + Assert.assertEquals(new ImageInfo(imgs[i]), new ImageInfo(copy[i])); + } + + for (int i = 0; i < imgs.length; ++i) { + Image actual = serviceClient.getNewImageForward(imgs[i]); + Image expected = StandardTypesTransformer.getNewImage(copy[i]); + // Compare using ImageInfo + Assert.assertEquals(new ImageInfo(expected), new ImageInfo(actual)); + } + } + + private void performTestNewImageArray(StandardTypesServiceClient serviceClient) throws InterruptedException { + // Create some images to test with. + Image[] imgs = new Image[3]; + imgs[0] = new BufferedImage(10, 10, BufferedImage.TYPE_3BYTE_BGR); + imgs[1] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB); + imgs[2] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB); + imgs[0].getGraphics().drawLine(1, 1, 8, 8); + imgs[1].getGraphics().drawLine(8, 1, 1, 8); + imgs[2].getGraphics().drawLine(1, 8, 8, 1); + + Image[] copy = imgs; + // Create the same images once again as the StandardTypesTransformer may manipulate the image passed. + imgs = new Image[3]; + imgs[0] = new BufferedImage(10, 10, BufferedImage.TYPE_3BYTE_BGR); + imgs[1] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB); + imgs[2] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB); + imgs[0].getGraphics().drawLine(1, 1, 8, 8); + imgs[1].getGraphics().drawLine(8, 1, 1, 8); + imgs[2].getGraphics().drawLine(1, 8, 8, 1); + + // Make sure the images and copies are equal using ImageInfo + for(int i = 0; i < imgs.length; ++i) { + Assert.assertEquals(new ImageInfo(imgs[i]), new ImageInfo(copy[i])); + } + + Image[] actual = serviceClient.getNewImageArrayForward(imgs); + Assert.assertEquals(imgs.length, actual.length); + for (int i = 0; i < imgs.length; ++i) { + Image expected = StandardTypesTransformer.getNewImage(copy[i]); + // Compare using ImageInfo + Assert.assertEquals(new ImageInfo(expected), new ImageInfo(actual[i])); + } + } + + private void performTestNewDurationArray(StandardTypesServiceClient serviceClient) + throws DatatypeConfigurationException { + DatatypeFactory df = DatatypeFactory.newInstance(); + Duration[] da = new Duration[3]; + da[0] = df.newDuration(1000000000000L); + da[1] = df.newDurationDayTime(1000000000000L); + da[2] = df.newDurationYearMonth(true, 1, 3); + + Duration[] actual = serviceClient.getNewDurationArrayForward(da); + Assert.assertEquals(da.length, actual.length); + for (int i = 0; i < da.length; ++i) { + Assert.assertEquals(da[i].negate(), actual[i]); + } + } + + private void performTestNewDataHandler(StandardTypesServiceClient serviceClient) throws IOException { + DataHandler[] dha = new DataHandler[3]; + dha[0] = new DataHandler("Some data", "text/plain"); + dha[1] = new DataHandler(new URL("http://localhost:8080/myWeb/home.html")); + dha[2] = new DataHandler(new ByteArrayDataSource("Some data2".getBytes())); + + for (int i = 0; i < dha.length; ++i) { + DataHandler actual = serviceClient.getNewDataHandlerForward(dha[i]); + // Note: The DataHandler returned may use a different type of DataSource. + // Compare the data content instead of using equals(). + Assert.assertTrue(compare(dha[i], actual)); + } + } + + private void performTestNewDataHandlerArray(StandardTypesServiceClient serviceClient) throws IOException { + DataHandler[] dha = new DataHandler[3]; + dha[0] = new DataHandler("Some data", "text/plain"); + dha[1] = new DataHandler(new URL("http://localhost:8080/myWeb/home.html")); + dha[2] = new DataHandler(new ByteArrayDataSource("Some data2".getBytes())); + + DataHandler[] actual = serviceClient.getNewDataHandlerArrayForward(dha); + Assert.assertEquals(dha.length, actual.length); + for (int i = 0; i < dha.length; ++i) { + // Note: The DataHandler returned may use a different type of DataSource. + // Compare the data content instead of using equals(). + Assert.assertTrue(compare(dha[i], actual[i])); + } + } + + private void performTestNewSource(StandardTypesServiceClient serviceClient) throws Exception { + String xml = "ABC"; + Source[] srcs = new Source[3]; + srcs[0] = new DOMSource(new String2Node().transform(xml, null)); + srcs[1] = new SAXSource(new InputSource(new StringReader(xml))); + srcs[2] = new StreamSource(new StringReader(xml)); + + for (int i = 0; i < srcs.length; ++i) { + Source expected = StandardTypesTransformer.getNewSource(srcs[i]); + Source actual = serviceClient.getNewSourceForward(srcs[i]); + // [rfeng] The data may come back as a different source + Assert.assertEquals(sourceToString(expected), sourceToString(actual)); + } + } + + private void performTestNewSourceArray(StandardTypesServiceClient serviceClient) throws Exception { + String xml = "ABC"; + Source[] srcs = new Source[3]; + srcs[0] = new DOMSource(new String2Node().transform(xml, null)); + srcs[1] = new SAXSource(new InputSource(new StringReader(xml))); + srcs[2] = new StreamSource(new StringReader(xml)); + + Source[] actual = serviceClient.getNewSourceArrayForward(srcs); + Source[] expected = new Source[srcs.length]; + for(int i = 0; i < srcs.length; ++i) { + expected[i] = StandardTypesTransformer.getNewSource(srcs[i]); + } + Assert.assertEquals(srcs.length, actual.length); + for (int i = 0; i < srcs.length; ++i) { + // [rfeng] The data may come back as a different source + Assert.assertEquals(sourceToString(expected[i]), sourceToString(actual[i])); + } + + } + + private void performTestNewUUID(StandardTypesServiceClient serviceClient) { + UUID[] uuids = new UUID[3]; + uuids[0] = UUID.nameUUIDFromBytes("ABCDEFGHJKLMNOPQRSTUVWXYZ".getBytes()); + uuids[1] = UUID.nameUUIDFromBytes("abcdefghjklmnopqrstuvwxyz".getBytes()); + uuids[2] = UUID.randomUUID(); + + for (int i = 0; i < uuids.length; ++i) { + UUID expected = UUID.fromString(uuids[i].toString() + "AAA"); + UUID actual = serviceClient.getNewUUIDForward(uuids[i]); + Assert.assertEquals(expected, actual); + } + } + + private void performTestNewUUIDArray(StandardTypesServiceClient serviceClient) { + UUID[] uuids = new UUID[3]; + uuids[0] = UUID.nameUUIDFromBytes("ABCDEFGHJKLMNOPQRSTUVWXYZ".getBytes()); + uuids[1] = UUID.nameUUIDFromBytes("abcdefghjklmnopqrstuvwxyz".getBytes()); + uuids[2] = UUID.randomUUID(); + + UUID[] actual = serviceClient.getNewUUIDArrayForward(uuids); + for (int i = 0; i < uuids.length; ++i) { + UUID expected = UUID.fromString(uuids[i].toString() + "AAA"); + Assert.assertEquals(expected, actual[i]); + } + } + + /** + * This method compares two DataHandlers. + * @return true if the data in the two handlers is the same. + */ + private boolean compare(DataHandler dh1, DataHandler dh2) throws IOException { + InputStream inp1 = dh1.getInputStream(); + InputStream inp2 = dh2.getInputStream(); + for(;;) { + int i1 = inp1.read(); + int i2 = inp2.read(); + if(i1 == -1 && i2 == -1) { + return true; + } else if(i1 != -1 && i2 != -1) { + if(i1 != i2) { + return false; + } + } else { + return false; + } + } + } + + /** + * This method returns the content of a source object as String. + */ + private String sourceToString(Source s) throws Exception { + StringWriter sw = new StringWriter(); + Result r = new StreamResult(sw); + TransformerFactory.newInstance().newTransformer().transform(s, r); + sw.close(); + return sw.toString(); + } + + /** + * This class initializes with the width, height and pixel data of a java.awt.Image object. + */ + private static class ImageInfo { + private int h, w, pixels[]; + public ImageInfo(Image img) throws InterruptedException { + w = img.getWidth(null); + h = img.getHeight(null); + pixels = new int[w*h]; + PixelGrabber pg = new PixelGrabber(img, 0, 0, w, h, pixels, 0, w); + pg.grabPixels(); + } + + public boolean equals(Object that) { + if(that == null) { + return false; + } else if(!(that instanceof ImageInfo)) { + return false; + } + + ImageInfo that1 = (ImageInfo)that; + if(w != that1.w || h != that1.h || pixels == null || that1.pixels == null || pixels.length != that1.pixels.length) { + return false; + } + for(int i = 0; i < pixels.length; ++i) { + if(pixels[i] != that1.pixels[i]) { + return false; + } + } + return true; + } + + public String toString() { + return this.getClass().getSimpleName()+"[w = "+w+", h = "+h+", pixels = "+pixels+"]"; + } + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/pom.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/pom.xml new file mode 100644 index 0000000000..16c49a6c75 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/pom.xml @@ -0,0 +1,213 @@ + + + + + + + + org.apache.tuscany.sca + itest-databindings + 1.6.1 + + + 4.0.0 + + itest-databindings-jaxb-top-down + 1.6.1 + jar + Apache Tuscany SCA iTest Databinding - JAXB Top Down + + + + + true + + java.net + java.net Maven 1.x Repository + http://download.java.net/maven/1 + legacy + + + java.net2 + java.net Maven 2.x Repository + http://download.java.net/maven/2 + + + + + + java.net2 + java.net Maven 2.x Repository + http://download.java.net/maven/2 + + + + + + org.apache.tuscany.sca + tuscany-node-impl + 1.6.1 + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + 1.6.1 + runtime + + + org.apache.tuscany.sca + tuscany-databinding-jaxb + 1.6.1 + runtime + + + org.apache.tuscany.sca + tuscany-databinding-sdo + 1.6.1 + compile + + + org.apache.tuscany.sca + tuscany-databinding-axiom + 1.6.1 + compile + + + org.apache.tuscany.sca + itest-databindings-common + 1.6.1 + compile + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 1.6.1 + runtime + + + org.apache.tuscany.sca + tuscany-interface-java-xml + 1.6.1 + compile + + + org.apache.tuscany.sca + tuscany-host-jetty + 1.6.1 + runtime + + + javax.xml.bind + jaxb-api + 2.1 + compile + + + + javax.xml.ws + jaxws-api + 2.1 + + + javax.xml.soap + saaj-api + + + + + + commons-collections + commons-collections + 3.1 + + + log4j + log4j + 1.2.12 + provided + + + + + org.apache.tuscany.sca + tuscany-implementation-resource-runtime + 1.6.1 + runtime + + + + org.apache.tuscany.sca + tuscany-binding-http-runtime + 1.6.1 + runtime + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + -Djava.endorsed.dirs=target/endorsed + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy + generate-sources + + copy + + + + + javax.xml.ws + jaxws-api + 2.1 + jar + + + javax.xml.bind + jaxb-api + 2.1 + jar + + + ${project.build.directory}/endorsed + false + true + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloService.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloService.java new file mode 100644 index 0000000000..352f805c7d --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloService.java @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest.databindings.jaxb; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.osoa.sca.annotations.Remotable; + +/** + * The interface for HelloService. + * + * @version $Rev$ $Date$ + */ +@Remotable +public interface HelloService { + String getGreetings(String name); + String[] getGreetingsArray(String[] names); + List getGreetingsList(List names); + ArrayList getGreetingsArrayList(ArrayList names); + Map getGreetingsMap(Map namesMap); + HashMap getGreetingsHashMap(HashMap namesMap); + String getGreetingsVarArgs(String... names); +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceClient.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceClient.java new file mode 100644 index 0000000000..7bd95cec95 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/HelloServiceClient.java @@ -0,0 +1,41 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +/** + * The interface for HelloServiceClient. + * + * @version $Rev$ $Date$ + */ +public interface HelloServiceClient { + String getGreetingsForward(String name); + String[] getGreetingsArrayForward(String[] names); + List getGreetingsListForward(List names); + ArrayList getGreetingsArrayListForward(ArrayList names); + Map getGreetingsMapForward(Map namesMap); + HashMap getGreetingsHashMapForward(HashMap namesMap); + String getGreetingsVarArgsForward(String... names); +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesService.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesService.java new file mode 100644 index 0000000000..8c0fb24da9 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesService.java @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest.databindings.jaxb; + +import org.osoa.sca.annotations.Remotable; + +/** + * The interface for PrimitivesService. + * + * @version $Rev$ $Date$ + */ +@Remotable +public interface PrimitivesService { + boolean negateBoolean(boolean flag); + boolean[] negateBooleanArray(boolean[] flags); + boolean[] identityBooleanArray(boolean[] flags); + byte negateByte(byte b); + byte[] negateByteArray(byte[] ba); + byte[] identityByteArray(byte[] ba); + short negateShort(short s); + short[] negateShortArray(short[] s); + short[] identityShortArray(short[] sa); + int negateInt(int s); + int[] negateIntArray(int[] s); + int[] identityIntArray(int[] ia); + long negateLong(long l); + long[] negateLongArray(long[] la); + long[] identityLongArray(long[] la); + float negateFloat(float f); + float[] negateFloatArray(float[] fa); + float[] identityFloatArray(float[] fa); + double negateDouble(double d); + double[] negateDoubleArray(double[] da); + double[] identityDoubleArray(double[] da); +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesServiceClient.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesServiceClient.java new file mode 100644 index 0000000000..3a5a81bae4 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/PrimitivesServiceClient.java @@ -0,0 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb; + + +/** + * The interface for PrimitivesServiceClient. + * + * @version $Rev$ $Date$ + */ +public interface PrimitivesServiceClient { + boolean negateBooleanForward(boolean flag); + boolean[] negateBooleanArrayForward(boolean[] flags); + boolean passByValueBooleanArray(); + byte negateByteForward(byte b); + byte[] negateByteArrayForward(byte[] ba); + boolean passByValueByteArray(); + short negateShortForward(short s); + short[] negateShortArrayForward(short[] sa); + boolean passByValueShortArray(); + int negateIntForward(int i); + int[] negateIntArrayForward(int[] ia); + boolean passByValueIntArray(); + long negateLongForward(long l); + long[] negateLongArrayForward(long[] la); + boolean passByValueLongArray(); + float negateFloatForward(float f); + float[] negateFloatArrayForward(float[] fa); + boolean passByValueFloatArray(); + double negateDoubleForward(double d); + double[] negateDoubleArrayForward(double[] da); + boolean passByValueDoubleArray(); +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesService.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesService.java new file mode 100644 index 0000000000..4be057fe68 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesService.java @@ -0,0 +1,84 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.sca.itest.databindings.jaxb; + +import java.awt.Image; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.URI; +import java.util.Calendar; +import java.util.Date; +import java.util.UUID; + +import javax.activation.DataHandler; +import javax.xml.datatype.Duration; +import javax.xml.datatype.XMLGregorianCalendar; +import javax.xml.namespace.QName; +import javax.xml.transform.Source; + +import org.osoa.sca.annotations.Remotable; + + + +/** + * The interface for StandardTypesService. + * + * @version $Rev$ $Date$ + */ +@Remotable +public interface StandardTypesService { + BigInteger getNewBigInteger(BigInteger bi); + BigInteger[] getNewBigIntegerArray(BigInteger[] bia); + + BigDecimal getNewBigDecimal(BigDecimal bd); + BigDecimal[] getNewBigDecimalArray(BigDecimal[] bda); + + Calendar getNewCalendar(Calendar c); + Calendar[] getNewCalendarArray(Calendar[] ca); + + Date getNewDate(Date d); + Date[] getNewDateArray(Date[] da); + + QName getNewQName(QName qname); + QName[] getNewQNameArray(QName[] qnames); + + URI getNewURI(URI uri); + URI[] getNewURIArray(URI[] uris); + + XMLGregorianCalendar getNewXMLGregorianCalendar(XMLGregorianCalendar xgcal); + XMLGregorianCalendar[] getNewXMLGregorianCalendarArray(XMLGregorianCalendar[] xgcal); + + Duration getNewDuration(Duration d); + Duration[] getNewDurationArray(Duration[] da); + + Object getNewObject(Object obj); + Object[] getNewObjectArray(Object[] objs); + + Image getNewImage(Image img); + Image[] getNewImageArray(Image[] imgs); + + DataHandler getNewDataHandler(DataHandler dh); + DataHandler[] getNewDataHandlerArray(DataHandler[] dha); + + Source getNewSource(Source src); + Source[] getNewSourceArray(Source[] srcs); + + UUID getNewUUID(UUID uuid); + UUID[] getNewUUIDArray(UUID[] uuids); +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesServiceClient.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesServiceClient.java new file mode 100644 index 0000000000..0c073cd054 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/StandardTypesServiceClient.java @@ -0,0 +1,81 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb; + +import java.awt.Image; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.URI; +import java.util.Calendar; +import java.util.Date; +import java.util.UUID; + +import javax.activation.DataHandler; +import javax.xml.datatype.Duration; +import javax.xml.datatype.XMLGregorianCalendar; +import javax.xml.namespace.QName; +import javax.xml.transform.Source; + + +/** + * The interface for StandardTypesServiceClient. + * + * @version $Rev$ $Date$ + */ +public interface StandardTypesServiceClient { + BigInteger getNewBigIntegerForward(BigInteger bi); + BigInteger[] getNewBigIntegerArrayForward(BigInteger[] bia); + + BigDecimal getNewBigDecimalForward(BigDecimal bd); + BigDecimal[] getNewBigDecimalArrayForward(BigDecimal[] bda); + + Calendar getNewCalendarForward(Calendar c); + Calendar[] getNewCalendarArrayForward(Calendar[] ca); + + Date getNewDateForward(Date d); + Date[] getNewDateArrayForward(Date[] da); + + QName getNewQNameForward(QName qname); + QName[] getNewQNameArrayForward(QName[] qnames); + + URI getNewURIForward(URI uri); + URI[] getNewURIArrayForward(URI[] uris); + + XMLGregorianCalendar getNewXMLGregorianCalendarForward(XMLGregorianCalendar xgcal); + XMLGregorianCalendar[] getNewXMLGregorianCalendarArrayForward(XMLGregorianCalendar[] xgcals); + + Duration getNewDurationForward(Duration d); + Duration[] getNewDurationArrayForward(Duration[] da); + + Object getNewObjectForward(Object obj); + Object[] getNewObjectArrayForward(Object[] objs); + + Image getNewImageForward(Image img); + Image[] getNewImageArrayForward(Image[] imgs); + + DataHandler getNewDataHandlerForward(DataHandler dh); + DataHandler[] getNewDataHandlerArrayForward(DataHandler[] dha); + + Source getNewSourceForward(Source src); + Source[] getNewSourceArrayForward(Source[] srcs); + + UUID getNewUUIDForward(UUID uuid); + UUID[] getNewUUIDArrayForward(UUID[] uuids); +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceClientImpl.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceClientImpl.java new file mode 100644 index 0000000000..c4026fdb9a --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceClientImpl.java @@ -0,0 +1,73 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb.impl; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.tuscany.sca.itest.databindings.jaxb.HelloService; +import org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceClient; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +/** + * An implementation of HelloServiceClient. + * The client forwards the request to the service component and returns the response from the service component. + */ +@Service(HelloServiceClient.class) +public class HelloServiceClientImpl { + + private HelloService service; + + @Reference + public void setHelloService(HelloService service) { + this.service = service; + } + + public String getGreetingsForward(String name) { + return service.getGreetings(name); + } + + public String[] getGreetingsArrayForward(String[] names) { + return service.getGreetingsArray(names); + } + + public List getGreetingsListForward(List names) { + return service.getGreetingsList(names); + } + + public Map getGreetingsMapForward(Map namesMap) { + return service.getGreetingsMap(namesMap); + } + + public ArrayList getGreetingsArrayListForward(ArrayList names) { + return service.getGreetingsArrayList(names); + } + + public HashMap getGreetingsHashMapForward(HashMap namesMap) { + return service.getGreetingsHashMap(namesMap); + } + + public String getGreetingsVarArgsForward(String... names) { + return service.getGreetingsVarArgs(names[0], names[1], names[2]); + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceImpl.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceImpl.java new file mode 100644 index 0000000000..fc2dc64b7d --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/HelloServiceImpl.java @@ -0,0 +1,86 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb.impl; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.tuscany.sca.itest.databindings.jaxb.HelloService; +import org.osoa.sca.annotations.Service; + +/** + * An implementation of HelloService. + * + * @version $Rev$ $Date$ + */ +@Service(interfaces = {HelloService.class}) +public class HelloServiceImpl implements HelloService { + public String getGreetings(String name) { + return "Hello " + name; + } + + public String[] getGreetingsArray(String[] names) { + String[] resps = new String[names.length]; + for (int i = 0; i < names.length; ++i) { + resps[i] = "Hello " + names[i]; + } + return resps; + } + + public List getGreetingsList(List names) { + List resps = new ArrayList(); + for (int i = 0; i < names.size(); ++i) { + resps.add("Hello " + names.get(i)); + } + return resps; + } + + public ArrayList getGreetingsArrayList(ArrayList names) { + ArrayList resps = new ArrayList(); + for (int i = 0; i < names.size(); ++i) { + resps.add("Hello " + names.get(i)); + } + return resps; + } + + public Map getGreetingsMap(Map namesMap) { + for (Map.Entry entry : namesMap.entrySet()) { + entry.setValue("Hello " + entry.getKey()); + } + return namesMap; + } + + public HashMap getGreetingsHashMap(HashMap namesMap) { + for (Map.Entry entry : namesMap.entrySet()) { + entry.setValue("Hello " + entry.getKey()); + } + return namesMap; + } + + public String getGreetingsVarArgs(String... names) { + String resp = "Hello"; + for(int i = 0; i < names.length; ++i) { + resp += (" "+names[i]); + } + return resp; + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceClientImpl.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceClientImpl.java new file mode 100644 index 0000000000..ef1a907b29 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceClientImpl.java @@ -0,0 +1,139 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb.impl; + +import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesService; +import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesServiceClient; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +/** + * An implementation of PrimitivesServiceClient. + * The client forwards the request to the service component and returns the response from the service component. + * + * @version $Rev$ $Date$ + */ +@Service(PrimitivesServiceClient.class) +public class PrimitivesServiceClientImpl { + + private PrimitivesService service; + + @Reference + public void setPrimitivesService(PrimitivesService service) { + this.service = service; + } + public boolean negateBooleanForward(boolean flag) { + return service.negateBoolean(flag); + } + + public boolean[] negateBooleanArrayForward(boolean[] flags) { + return service.negateBooleanArray(flags); + } + + public boolean passByValueBooleanArray() { + boolean[] req = new boolean[2]; + boolean[] resp = service.identityBooleanArray(req); + return req != resp; + } + + public byte negateByteForward(byte b) { + return service.negateByte(b); + } + + public byte[] negateByteArrayForward(byte[] ba) { + return service.negateByteArray(ba); + } + + public boolean passByValueByteArray() { + byte[] req = new byte[2]; + byte[] resp = service.identityByteArray(req); + return req != resp; + } + + public short negateShortForward(short s) { + return service.negateShort(s); + } + + public short[] negateShortArrayForward(short[] s) { + return service.negateShortArray(s); + } + + public boolean passByValueShortArray() { + short[] req = new short[2]; + short[] resp = service.identityShortArray(req); + return req != resp; + } + + public int negateIntForward(int i) { + return service.negateInt(i); + } + + public int[] negateIntArrayForward(int[] ia) { + return service.negateIntArray(ia); + } + + public boolean passByValueIntArray() { + int[] req = new int[2]; + int[] resp = service.identityIntArray(req); + return req != resp; + } + + public long negateLongForward(long l) { + return service.negateLong(l); + } + + public long[] negateLongArrayForward(long[] la) { + return service.negateLongArray(la); + } + + public boolean passByValueLongArray() { + long[] req = new long[2]; + long[] resp = service.identityLongArray(req); + return req != resp; + } + + public float negateFloatForward(float f) { + return service.negateFloat(f); + } + + public float[] negateFloatArrayForward(float[] fa) { + return service.negateFloatArray(fa); + } + + public boolean passByValueFloatArray() { + float[] req = new float[2]; + float[] resp = service.identityFloatArray(req); + return req != resp; + } + + public double negateDoubleForward(double d) { + return service.negateDouble(d); + } + + public double[] negateDoubleArrayForward(double[] da) { + return service.negateDoubleArray(da); + } + + public boolean passByValueDoubleArray() { + double[] req = new double[2]; + double[] resp = service.identityDoubleArray(req); + return req != resp; + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceImpl.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceImpl.java new file mode 100644 index 0000000000..e60ae41767 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/PrimitivesServiceImpl.java @@ -0,0 +1,151 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb.impl; + +import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesService; +import org.osoa.sca.annotations.Service; + +/** + * An implementation of PrimitivesService. + * + * @version $Rev$ $Date$ + */ +@Service(interfaces={PrimitivesService.class}) +public class PrimitivesServiceImpl implements PrimitivesService { + + public boolean negateBoolean(boolean flag) { + return !flag; + } + + public boolean[] negateBooleanArray(boolean[] flags) { + boolean[] resp = new boolean[flags.length]; + + for(int i = 0; i < flags.length; ++i) { + resp[i] = !flags[i]; + } + return resp; + } + + public boolean[] identityBooleanArray(boolean[] flags) { + return flags; + } + + public byte negateByte(byte b) { + return (byte)-b; + } + + public byte[] negateByteArray(byte[] ba) { + byte[] resp = new byte[ba.length]; + + for(int i = 0; i < ba.length; ++i) { + resp[i] = (byte)-ba[i]; + } + return resp; + } + + public byte[] identityByteArray(byte[] ba) { + return ba; + } + + public short negateShort(short s) { + return (short)-s; + } + + public short[] negateShortArray(short[] s) { + short[] resp = new short[s.length]; + + for(int i = 0; i < s.length; ++i) { + resp[i] = (short)-s[i]; + } + return resp; + } + + public short[] identityShortArray(short[] sa) { + return sa; + } + + public int negateInt(int i) { + return -i; + } + + public int[] negateIntArray(int[] ia) { + int[] resp = new int[ia.length]; + + for(int i = 0; i < ia.length; ++i) { + resp[i] = -ia[i]; + } + return resp; + } + + public int[] identityIntArray(int[] ia) { + return ia; + } + + public long negateLong(long l) { + return -l; + } + + public long[] negateLongArray(long[] la) { + long[] resp = new long[la.length]; + + for(int i = 0; i < la.length; ++i) { + resp[i] = -la[i]; + } + return resp; + } + + public long[] identityLongArray(long[] la) { + return la; + } + + public float negateFloat(float f) { + return -f; + } + + public float[] negateFloatArray(float[] fa) { + float[] resp = new float[fa.length]; + + for(int i = 0; i < fa.length; ++i) { + resp[i] = -fa[i]; + } + return resp; + } + + public float[] identityFloatArray(float[] fa) { + return fa; + } + + public double negateDouble(double d) { + return -d; + } + + public double[] negateDoubleArray(double[] da) { + double[] resp = new double[da.length]; + + for(int i = 0; i < da.length; ++i) { + resp[i] = -da[i]; + } + return resp; + } + + public double[] identityDoubleArray(double[] da) { + return da; + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceClientImpl.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceClientImpl.java new file mode 100644 index 0000000000..8803eb262a --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceClientImpl.java @@ -0,0 +1,159 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb.impl; + +import java.awt.Image; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.URI; +import java.util.Calendar; +import java.util.Date; +import java.util.UUID; + +import javax.activation.DataHandler; +import javax.xml.datatype.Duration; +import javax.xml.datatype.XMLGregorianCalendar; +import javax.xml.namespace.QName; +import javax.xml.transform.Source; + +import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesService; +import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesServiceClient; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +/** + * An implementation of StandardTypesServiceClient. + * The client forwards the request to the service component and returns the response from the service component. + * + * @version $Rev$ $Date$ + */ +@Service(StandardTypesServiceClient.class) +public class StandardTypesServiceClientImpl implements StandardTypesServiceClient{ + + private StandardTypesService service; + + @Reference + public void setStandardTypesService(StandardTypesService service) { + this.service = service; + } + + public BigInteger getNewBigIntegerForward(BigInteger bi) { + return service.getNewBigInteger(bi); + } + + public BigInteger[] getNewBigIntegerArrayForward(BigInteger[] bia) { + return service.getNewBigIntegerArray(bia); + } + + public BigDecimal getNewBigDecimalForward(BigDecimal bd) { + return service.getNewBigDecimal(bd); + } + + public BigDecimal[] getNewBigDecimalArrayForward(BigDecimal[] bda) { + return service.getNewBigDecimalArray(bda); + } + public Calendar getNewCalendarForward(Calendar c) { + return service.getNewCalendar(c); + } + public Calendar[] getNewCalendarArrayForward(Calendar[] ca) { + return service.getNewCalendarArray(ca); + } + + public Date getNewDateForward(Date d) { + return service.getNewDate(d); + } + + public Date[] getNewDateArrayForward(Date[] da) { + return service.getNewDateArray(da); + } + + public QName getNewQNameForward(QName qname) { + return service.getNewQName(qname); + } + + public QName[] getNewQNameArrayForward(QName[] qnames) { + return service.getNewQNameArray(qnames); + } + + public URI getNewURIForward(URI uri) { + return service.getNewURI(uri); + } + + public URI[] getNewURIArrayForward(URI[] uris) { + return service.getNewURIArray(uris); + } + + public XMLGregorianCalendar getNewXMLGregorianCalendarForward(XMLGregorianCalendar xgcal) { + return service.getNewXMLGregorianCalendar(xgcal); + } + + public XMLGregorianCalendar[] getNewXMLGregorianCalendarArrayForward(XMLGregorianCalendar[] xgcals) { + return service.getNewXMLGregorianCalendarArray(xgcals); + } + + public Duration getNewDurationForward(Duration d) { + return service.getNewDuration(d); + } + + public Duration[] getNewDurationArrayForward(Duration[] da) { + return service.getNewDurationArray(da); + } + + public Object getNewObjectForward(Object obj) { + return service.getNewObject(obj); + } + + public Object[] getNewObjectArrayForward(Object[] objs) { + return service.getNewObjectArray(objs); + } + + public Image getNewImageForward(Image img) { + return service.getNewImage(img); + } + + public Image[] getNewImageArrayForward(Image[] imgs) { + return service.getNewImageArray(imgs); + } + + public DataHandler getNewDataHandlerForward(DataHandler dh) { + return service.getNewDataHandler(dh); + } + + public DataHandler[] getNewDataHandlerArrayForward(DataHandler[] dha) { + return service.getNewDataHandlerArray(dha); + } + + + public Source getNewSourceForward(Source src) { + return service.getNewSource(src); + } + + public Source[] getNewSourceArrayForward(Source[] srcs) { + return service.getNewSourceArray(srcs); + } + + public UUID getNewUUIDForward(UUID uuid) { + return service.getNewUUID(uuid); + } + + public UUID[] getNewUUIDArrayForward(UUID[] uuids) { + return service.getNewUUIDArray(uuids); + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceImpl.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceImpl.java new file mode 100644 index 0000000000..46569311ff --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesServiceImpl.java @@ -0,0 +1,207 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb.impl; + +import java.awt.Image; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.URI; +import java.util.Calendar; +import java.util.Date; +import java.util.UUID; + +import javax.activation.DataHandler; +import javax.xml.datatype.Duration; +import javax.xml.datatype.XMLGregorianCalendar; +import javax.xml.namespace.QName; +import javax.xml.transform.Source; + +import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesService; +import org.osoa.sca.annotations.Service; + +/** + * An implementation of StandardTypesService. + * + * @version $Rev$ $Date$ + */ +@Service(interfaces={StandardTypesService.class}) +public class StandardTypesServiceImpl implements StandardTypesService { + public BigInteger getNewBigInteger(BigInteger bi) { + return bi.negate(); + } + + public BigInteger[] getNewBigIntegerArray(BigInteger[] bia) { + BigInteger[] resp = new BigInteger[bia.length]; + for(int i = 0; i < bia.length; ++i) { + resp[i] = bia[i].negate(); + } + return resp; + } + + public BigDecimal getNewBigDecimal(BigDecimal bd) { + return bd.negate(); + } + + public BigDecimal[] getNewBigDecimalArray(BigDecimal[] bda) { + BigDecimal[] resp = new BigDecimal[bda.length]; + for(int i = 0; i < bda.length; ++i) { + resp[i] = bda[i].negate(); + } + return resp; + } + + public Calendar getNewCalendar(Calendar c) { + Calendar resp = (Calendar)c.clone(); + resp.add(Calendar.DAY_OF_MONTH, 5); + return resp; + } + + public Calendar[] getNewCalendarArray(Calendar[] ca) { + Calendar[] resp = new Calendar[ca.length]; + for(int i = 0; i < ca.length; ++i) { + resp[i] = getNewCalendar(ca[i]); + } + return resp; + } + + public Date getNewDate(Date d) { + return new Date(d.getTime() + 5*24*60*60*1000); + } + + public Date[] getNewDateArray(Date[] da) { + Date[] resp = new Date[da.length]; + for(int i = 0; i < da.length; ++i) { + resp[i] = getNewDate(da[i]); + } + return resp; + } + + public QName getNewQName(QName qname) { + return new QName(qname.getNamespaceURI()+"q", qname.getLocalPart()+"q", qname.getPrefix()+"q"); + + } + + public QName[] getNewQNameArray(QName[] qnames) { + QName[] resp = new QName[qnames.length]; + for(int i = 0; i < qnames.length; ++i) { + resp[i] = getNewQName(qnames[i]); + } + return resp; + } + + public URI getNewURI(URI uri) { + return uri.resolve("uri"); + } + + public URI[] getNewURIArray(URI[] uris) { + URI[] resp = new URI[uris.length]; + for(int i = 0; i < uris.length; ++i) { + resp[i] = getNewURI(uris[i]); + } + return resp; + } + + public XMLGregorianCalendar getNewXMLGregorianCalendar(XMLGregorianCalendar xgcal) { + xgcal = (XMLGregorianCalendar)xgcal.clone(); + xgcal.setDay(xgcal.getDay()+5); + return xgcal; + } + + public XMLGregorianCalendar[] getNewXMLGregorianCalendarArray(XMLGregorianCalendar[] xgcals) { + XMLGregorianCalendar[] resp = new XMLGregorianCalendar[xgcals.length]; + for(int i = 0; i < xgcals.length; ++i) { + resp[i] = getNewXMLGregorianCalendar(xgcals[i]); + } + return resp; + } + + public Duration getNewDuration(Duration d) { + return d.negate(); + } + + public Duration[] getNewDurationArray(Duration[] da) { + Duration[] resp = new Duration[da.length]; + for(int i = 0; i < da.length; ++i) { + resp[i] = da[i].negate(); + } + return resp; + } + + public Object getNewObject(Object obj) { + return StandardTypesTransformer.getNewObject(obj); + } + + public Object[] getNewObjectArray(Object[] objs) { + Object[] resp = new Object[objs.length]; + for(int i = 0; i < objs.length; ++i) { + resp[i] = getNewObject(objs[i]); + } + return resp; + } + + public Image getNewImage(Image img) { + return StandardTypesTransformer.getNewImage(img); + } + + public Image[] getNewImageArray(Image[] imgs) { + Image[] resp = new Image[imgs.length]; + for(int i = 0; i < imgs.length; ++i) { + resp[i] = getNewImage(imgs[i]); + } + return resp; + } + + public DataHandler getNewDataHandler(DataHandler dh) { + // FIXME: transform the input + return dh; + } + + public DataHandler[] getNewDataHandlerArray(DataHandler[] dha) { + DataHandler[] resp = new DataHandler[dha.length]; + for(int i = 0; i < dha.length; ++i) { + resp[i] = dha[i]; + } + return resp; + } + + public Source getNewSource(Source src) { + return StandardTypesTransformer.getNewSource(src); + } + + public Source[] getNewSourceArray(Source[] srcs) { + Source[] resp = new Source[srcs.length]; + for(int i = 0; i < srcs.length; ++i) { + resp[i] = getNewSource(srcs[i]); + } + return resp; + } + + public UUID getNewUUID(UUID uuid) { + return UUID.fromString(uuid.toString()+"AAA"); + } + + public UUID[] getNewUUIDArray(UUID[] uuids) { + UUID[] resp = new UUID[uuids.length]; + for(int i = 0; i < uuids.length; ++i) { + resp[i] = getNewUUID(uuids[i]); + } + return resp; + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesTransformer.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesTransformer.java new file mode 100644 index 0000000000..9d851455da --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/java/org/apache/tuscany/sca/itest/databindings/jaxb/impl/StandardTypesTransformer.java @@ -0,0 +1,142 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb.impl; + +import java.awt.Image; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.CharArrayReader; +import java.io.CharArrayWriter; +import java.io.IOException; +import java.io.InputStream; +import java.io.Reader; + +import javax.xml.transform.Source; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.sax.SAXSource; +import javax.xml.transform.stream.StreamSource; + +import org.xml.sax.InputSource; + +/** + * StandardTypesTransformer class that provide for transforming input provided to StandardTypesService methods. + * + * @version $Rev$ $Date$ + */ +public class StandardTypesTransformer { + + public static Object getNewObject(Object obj) { + if(obj instanceof String) { + return "Hello "+obj; + } else if(obj instanceof Integer) { + return new Integer(-((Integer)obj).intValue()); + } else if(obj instanceof Double) { + return new Double(-((Double)obj).doubleValue()); + } + + return obj; + } + + /** + * Returns a copy of the source object if the input is DOMSource, SAXSource or StreamSource. + * Returns the input object as is for other types. + */ + public static Source getNewSource(Source src) { + Source ret = null; + if(src instanceof DOMSource) { + DOMSource dsrc = (DOMSource)src; + ret = new DOMSource(dsrc.getNode() != null ? dsrc.getNode().cloneNode(true) : null); + } else if(src instanceof SAXSource) { + SAXSource ssrc = (SAXSource)src; + if(ssrc.getInputSource().getByteStream() != null) { + InputStream inp = ssrc.getInputSource().getByteStream(); + ByteArrayOutputStream bout = new ByteArrayOutputStream(); + int b; + try { + while((b = inp.read()) != -1) { + bout.write(b); + } + } catch (IOException ignored) { + } + try { bout.close();} catch (IOException ignored) {} + try { inp.reset();} catch (IOException ignored) {} + ret = new SAXSource(new InputSource(new ByteArrayInputStream(bout.toByteArray()))); + } else if(ssrc.getInputSource().getCharacterStream() != null) { + Reader rdr = ssrc.getInputSource().getCharacterStream(); + CharArrayWriter caw = new CharArrayWriter(); + try { + int c; + while((c = rdr.read()) != -1) { + caw.append((char)c); + } + } catch (IOException ignored) { + } + caw.close(); + try{ rdr.reset();} catch(IOException ignored) {} + ret = new SAXSource(new InputSource(new CharArrayReader(caw.toCharArray()))); + } else { + ret = new SAXSource(); + } + } else if(src instanceof StreamSource) { + StreamSource ssrc = (StreamSource)src; + if(ssrc.getInputStream() != null) { + InputStream inp = ssrc.getInputStream(); + ByteArrayOutputStream bout = new ByteArrayOutputStream(); + int b; + try { + while((b = inp.read()) != -1) { + bout.write(b); + } + } catch (IOException ignored) { + } + try { bout.close();} catch (IOException ignored) {} + try { inp.reset();} catch (IOException ignored) {} + ret = new StreamSource(new ByteArrayInputStream(bout.toByteArray())); + } else if(ssrc.getReader() != null) { + Reader rdr = ssrc.getReader(); + CharArrayWriter caw = new CharArrayWriter(); + try { + int c; + while((c = rdr.read()) != -1) { + caw.append((char)c); + } + } catch (IOException ignored) { + } + caw.close(); + try{ rdr.reset();} catch(IOException ignored) {} + ret = new StreamSource(new CharArrayReader(caw.toCharArray())); + } else { + ret = new StreamSource(); + } + } + + if(ret != null) { + ret.setSystemId(src.getSystemId()); + } else { + ret = src; + } + return ret; + } + + public static Image getNewImage(Image arg) { + arg.getGraphics().drawOval(2, 2, 7, 7); + return arg; + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/resources/myContent/home.html b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/resources/myContent/home.html new file mode 100644 index 0000000000..d2bdecb1af --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/resources/myContent/home.html @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + Apache Tuscany : Home + + + + + + + + + + + + + + + + +
+ + + + + +   + +
+ + +
+
+ + + + + + + + + + + +
+  Apache Tuscany > Home + + User List | Dev List | Issue Tracker   +
+ + + + + + + + +
+ + +
+ +
+ +
+ + +
+ + + +
Subprojects
+ +

SDO
+DAS

+
+ +

Welcome to Apache Tuscany

+

Apache Tuscany simplifies the task of developing SOA solutions by providing a comprehensive infrastructure for SOA development and management that is based on Service Component Architecture (SCA) standard. With SCA as it's foundation, Tuscany offers solution developers the following advantages:

+
    +
  • Provides a model for creating composite applications by defining the services in the fabric and their relationships with one another. The services can be implemented in any technology.
  • + +
  • Enables service developers to create reusable services that only contain business logic. Protocols are pushed out of business logic and are handled through pluggable bindings. This lowers development cost.
  • +
  • Applications can easily adapt to infrastructure changes without recoding since protocols are handled via pluggable bindings and quality of services (transaction, security) are handled declaratively.
  • +
  • Existing applications can work with new SCA compositions. This allows for incremental growth towards a more flexible architecture, outsourcing or providing services to others.
  • +
+ + + + +
+ +

In addition, Tuscany is integrated with various technologies and offers:

+ +
    +
  • a wide range of bindings (pluggable protocols)
  • +
  • various component types including and not limited to Java, C++, BPEL, Spring and scripting
  • +
  • an end to end service and data solution which includes support for Jaxb and SDO
  • +
  • a lightweight runtime that works standalone or with other application servers
  • +
  • a modular architecture that makes it easy to integrate with different technologies and to extend
  • +
  • Integration with web20 technologies
  • + +
+ + +

Apache Tuscany SCA is implemented in Java and C++ (referred to as Native) . Learn more about SCA

+ +

Please join us to create a practical SOA infrastructure that addresses the challenges which small to large scale businesses face.

+ +
+ + +
GSoC 2010
+ + +
+
Tuscany News Dashboard
+
Unknown macro: {rss}
+
+ +
+
+
+
+ + +
+ + + + + + + website stats + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/hello-service.wsdl b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/hello-service.wsdl new file mode 100644 index 0000000000..926e4154aa --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/hello-service.wsdl @@ -0,0 +1,371 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/helloservice.composite b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/helloservice.composite new file mode 100644 index 0000000000..afde4b7de9 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/helloservice.composite @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/primitives-service.wsdl b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/primitives-service.wsdl new file mode 100644 index 0000000000..f366783e5e --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/primitives-service.wsdl @@ -0,0 +1,927 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/primitivesservice.composite b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/primitivesservice.composite new file mode 100644 index 0000000000..f218419f45 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/primitivesservice.composite @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/standard-types-service.composite b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/standard-types-service.composite new file mode 100644 index 0000000000..9c81b78e45 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/standard-types-service.composite @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/standard-types-service.wsdl b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/standard-types-service.wsdl new file mode 100644 index 0000000000..5bfd1ea277 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/main/resources/wsdl/wrapped/standard-types-service.wsdl @@ -0,0 +1,1155 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/DatabindingTestCase.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/DatabindingTestCase.java new file mode 100644 index 0000000000..7bb63fff1e --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/DatabindingTestCase.java @@ -0,0 +1,347 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb.topdown; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import junit.framework.Assert; + +import org.apache.tuscany.sca.itest.databindings.jaxb.HelloServiceClient; +import org.apache.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.Ignore; + +/** + * @version $Rev$ $Date$ + */ +public class DatabindingTestCase { + + private static SCAClient client; + private static SCANode node; + + /** + * Runs once before running the tests + */ + @BeforeClass + public static void setUp() throws Exception { + try { + SCANodeFactory nodeFactory = SCANodeFactory.newInstance(); + node = nodeFactory.createSCANodeFromClassLoader("wsdl/wrapped/helloservice.composite", null); + node.start(); + client = (SCAClient)node; + }catch(Throwable e) { + e.printStackTrace(); + } + } + + /** + * Runs once after running the tests + */ + @AfterClass + public static void tearDown() { + node.stop(); + } + + /** + * Invokes the HelloService service using WS binding. + * Service method invoked is getGreetings. + */ + @Test + public void testW2W() throws Exception { + HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2WComponent"); + performTest(helloServiceClient); + } + + /** + * Invokes the HelloService service using WS binding. + * Service method invoked is getGreetingsArray. + */ + @Test + public void testW2WArray() throws Exception { + HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2WComponent"); + performTestArray(helloServiceClient); + } + + /** + * Invokes the HelloService service using WS binding. + * Service method invoked is getGreetingsList. + */ + @Test + public void testW2WList() throws Exception { + HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2WComponent"); + performTestList(helloServiceClient); + } + + /** + * Invokes the HelloService service using WS binding. + * Service method invoked is getGreetingsArrayList. + */ + @Test + public void testW2WArrayList() throws Exception { + HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2WComponent"); + performTestArrayList(helloServiceClient); + } + + /** + * Invokes the HelloService service using WS binding. + * Service method invoked is getGreetingsMap. + */ + @Test + public void testW2WMap() throws Exception { + HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2WComponent"); + performTestMap(helloServiceClient); + } + + /** + * Invokes the HelloService service using WS binding. + * Service method invoked is getGreetingsHashMap. + */ + @Test + public void testW2WHashMap() throws Exception { + HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2WComponent"); + performTestHashMap(helloServiceClient); + } + + /** + * Invokes the HelloService service using WS binding. + * Service method invoked is getGreetingsVarArgs. + */ + @Test + public void testW2WVarArgs() throws Exception { + HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2WComponent"); + performTestVarArgs(helloServiceClient); + } + + /** + * Invokes the HelloService service using WS binding. + * Service method invoked is getGreetings. + */ + @Test + public void testJ2W() throws Exception { + HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientJ2WComponent"); + performTest(helloServiceClient); + } + + /** + * Invokes the HelloService service using WS binding. + * Service method invoked is getGreetingsArray. + */ + @Test + public void testJ2WArray() throws Exception { + HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientJ2WComponent"); + performTestArray(helloServiceClient); + } + + /** + * Invokes the HelloService service using WS binding. + * Service method invoked is getGreetingsList. + */ + @Test + public void testJ2WList() throws Exception { + HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientJ2WComponent"); + performTestList(helloServiceClient); + } + + /** + * Invokes the HelloService service using WS binding. + * Service method invoked is getGreetingsArrayList. + */ + @Test + public void testJ2WArrayList() throws Exception { + HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientJ2WComponent"); + performTestArrayList(helloServiceClient); + } + + /** + * Invokes the HelloService service using WS binding. + * Service method invoked is getGreetingsMap. + */ + @Test + public void testJ2WMap() throws Exception { + HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientJ2WComponent"); + performTestMap(helloServiceClient); + } + + /** + * Invokes the HelloService service using WS binding. + * Service method invoked is getGreetingsHashMap. + */ + @Test + public void testJ2WHashMap() throws Exception { + HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientJ2WComponent"); + performTestHashMap(helloServiceClient); + } + + /** + * Invokes the HelloService service using WS binding. + * Service method invoked is getGreetingsVarArgs. + */ + @Test + public void testJ2WVarArgs() throws Exception { + HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientJ2WComponent"); + performTestVarArgs(helloServiceClient); + } + + /** + * Invokes the HelloService service using WS binding. + * Service method invoked is getGreetings. + */ + @Test + public void testW2J() throws Exception { + HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2JComponent"); + performTest(helloServiceClient); + } + + /** + * Invokes the HelloService service using WS binding. + * Service method invoked is getGreetingsArray. + */ + @Test + public void testW2JArray() throws Exception { + HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2JComponent"); + performTestArray(helloServiceClient); + } + + /** + * Invokes the HelloService service using WS binding. + * Service method invoked is getGreetingsList. + */ + @Test + public void testW2JList() throws Exception { + HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2JComponent"); + performTestList(helloServiceClient); + } + + /** + * Invokes the HelloService service using WS binding. + * Service method invoked is getGreetingsArrayList. + */ + @Test + public void testW2JArrayList() throws Exception { + HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2JComponent"); + performTestArrayList(helloServiceClient); + } + + /** + * Invokes the HelloService service using WS binding. + * Service method invoked is getGreetingsMap. + */ + @Test + public void testW2JMap() throws Exception { + HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2JComponent"); + performTestMap(helloServiceClient); + } + + /** + * Invokes the HelloService service using WS binding. + * Service method invoked is getGreetingsHashMap. + */ + @Test + public void testW2JHashMap() throws Exception { + HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2JComponent"); + performTestHashMap(helloServiceClient); + } + + /** + * Invokes the HelloService service using WS binding. + * Service method invoked is getGreetingsVarArgs. + */ + @Test + public void testW2JVarArgs() throws Exception { + HelloServiceClient helloServiceClient = client.getService(HelloServiceClient.class, "HelloServiceClientW2JComponent"); + performTestVarArgs(helloServiceClient); + } + + private void performTest(HelloServiceClient helloServiceClient) { + String name = "Pandu"; + String resp = helloServiceClient.getGreetingsForward(name); + Assert.assertEquals("Hello "+name, resp); + } + + private void performTestArray(HelloServiceClient helloServiceClient) { + String[] names = {"Me", "Pandu"}; + String[] resps = helloServiceClient.getGreetingsArrayForward(names); + for(int i = 0; i < names.length; ++i) { + Assert.assertEquals("Hello "+names[i], resps[i]); + } + } + + private void performTestList(HelloServiceClient helloServiceClient) { + List namesList = new ArrayList(); + namesList.add("Me"); + namesList.add("Pandu"); + namesList.add("Chinnipandu"); + List respList = helloServiceClient.getGreetingsListForward(namesList); + Assert.assertEquals(namesList.size(), respList.size()); + for(int i = 0; i < namesList.size(); ++i) { + Assert.assertEquals("Hello "+namesList.get(i), respList.get(i)); + } + } + + private void performTestArrayList(HelloServiceClient helloServiceClient) { + ArrayList namesList = new ArrayList(); + namesList.add("Me"); + namesList.add("Pandu"); + namesList.add("Chinnipandu"); + ArrayList respList = helloServiceClient.getGreetingsArrayListForward(namesList); + Assert.assertEquals(namesList.size(), respList.size()); + for(int i = 0; i < namesList.size(); ++i) { + Assert.assertEquals("Hello "+namesList.get(i), respList.get(i)); + } + } + + private void performTestMap(HelloServiceClient helloServiceClient) { + Map namesMap = new HashMap(); + namesMap.put("Me", null); + namesMap.put("Pandu", null); + namesMap.put("Chinnipandu", null); + Map respMap = helloServiceClient.getGreetingsMapForward(namesMap); + Assert.assertEquals(namesMap.keySet().size(), respMap.keySet().size()); + for(Map.Entry entry: namesMap.entrySet()) { + Assert.assertEquals("Hello "+entry.getKey(), respMap.get(entry.getKey())); + } + } + + private void performTestHashMap(HelloServiceClient helloServiceClient) { + HashMap namesMap = new HashMap(); + namesMap.put("Me", null); + namesMap.put("Pandu", null); + namesMap.put("Chinnipandu", null); + Map respMap = helloServiceClient.getGreetingsHashMapForward(namesMap); + Assert.assertEquals(namesMap.keySet().size(), respMap.keySet().size()); + for(Map.Entry entry: namesMap.entrySet()) { + Assert.assertEquals("Hello "+entry.getKey(), respMap.get(entry.getKey())); + } + } + + private void performTestVarArgs(HelloServiceClient helloServiceClient) { + String[] names = { "Me", "You", "Pandu" }; // Do not change the array size from 3. + String expected = "Hello Me You Pandu"; + String actual = helloServiceClient.getGreetingsVarArgsForward(names[0], names[1], names[2]); + Assert.assertEquals(expected, actual); + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/PrimitivesDatabindingTestCase.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/PrimitivesDatabindingTestCase.java new file mode 100644 index 0000000000..eaf54b0f1b --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/PrimitivesDatabindingTestCase.java @@ -0,0 +1,849 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb.topdown; + +import junit.framework.Assert; + +import org.apache.tuscany.sca.itest.databindings.jaxb.PrimitivesServiceClient; +import org.apache.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.Ignore; + +/** + * @version $Rev$ $Date$ + */ +public class PrimitivesDatabindingTestCase { + + private static SCAClient domain; + private static SCANode node; + + /** + * Runs before each test method + */ + @BeforeClass + public static void setUp() throws Exception { + SCANodeFactory nodeFactory = SCANodeFactory.newInstance(); + node = nodeFactory.createSCANodeFromClassLoader("wsdl/wrapped/primitivesservice.composite", null); + node.start(); + domain = (SCAClient)node; + } + + /** + * Runs after each test method + */ + @AfterClass + public static void tearDown() { + node.stop(); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateBoolean. + */ + @Test + public void testW2WNegateBoolean() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent"); + performTestNegateBoolean(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateBooleanArray. + */ + @Test + public void testW2WNegateBooleanArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent"); + performTestNegateBooleanArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with WS binding. + * Test for boolean array. + */ + @Test + public void testW2WPassByValueBooleanArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueBooleanArray()); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateByte. + */ + @Test + public void testW2WNegateByte() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent"); + performTestNegateByte(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateByteArray. + */ + @Test + public void testW2WNegateByteArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent"); + performTestNegateByteArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with WS binding. + * Test for byte array. + */ + @Test + public void testW2WPassByValueByteArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueByteArray()); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateShort. + */ + @Test + public void testW2WNegateShort() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent"); + performTestNegateShort(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateShortArray. + */ + @Test + public void testW2WNegateShortArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent"); + performTestNegateShortArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with WS binding. + * Test for short array. + */ + @Test + public void testW2WPassByValueShortArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueShortArray()); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateInt. + */ + @Test + public void testW2WNegateInt() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent"); + performTestNegateInt(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateIntArray. + */ + @Test + public void testW2WNegateIntArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent"); + performTestNegateIntArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with WS binding. + * Test for int array. + */ + @Test + public void testW2WPassByValueIntArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueIntArray()); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateLong. + */ + @Test + public void testW2WNegateLong() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent"); + performTestNegateLong(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateLongArray. + */ + @Test + public void testW2WNegateLongArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent"); + performTestNegateLongArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with WS binding. + * Test for long array. + */ + @Test + public void testW2WPassByValueLongArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueLongArray()); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateFloat. + */ + @Test + public void testW2WNegateFloat() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent"); + performTestNegateFloat(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateFloatArray. + */ + @Test + public void testW2WNegateFloatArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent"); + performTestNegateFloatArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with WS binding. + * Test for float array. + */ + @Test + public void testW2WPassByValueFloatArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueFloatArray()); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateDouble. + */ + @Test + public void testW2WNegateDouble() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent"); + performTestNegateDouble(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateDoubleArray. + */ + @Test + public void testW2WNegateDoubleArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent"); + performTestNegateDoubleArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with WS binding. + * Test for double array. + */ + @Test + public void testW2WPassByValueDoubleArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2WComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueDoubleArray()); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateBoolean. + */ + @Test + public void testJ2WNegateBoolean() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent"); + performTestNegateBoolean(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateBooleanArray. + */ + @Test + public void testJ2WNegateBooleanArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent"); + performTestNegateBooleanArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with WS binding. + * Test for boolean array. + */ + @Test + public void testJ2WPassByValueBooleanArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueBooleanArray()); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateByte. + */ + @Test + public void testJ2WNegateByte() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent"); + performTestNegateByte(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateByteArray. + */ + @Test + public void testJ2WNegateByteArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent"); + performTestNegateByteArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with WS binding. + * Test for byte array. + */ + @Test + public void testJ2WPassByValueByteArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueByteArray()); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateShort. + */ + @Test + public void testJ2WNegateShort() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent"); + performTestNegateShort(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateShortArray. + */ + @Test + public void testJ2WNegateShortArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent"); + performTestNegateShortArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with WS binding. + * Test for short array. + */ + @Test + public void testJ2WPassByValueShortArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueShortArray()); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateInt. + */ + @Test + public void testJ2WNegateInt() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent"); + performTestNegateInt(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateIntArray. + */ + @Test + public void testJ2WNegateIntArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent"); + performTestNegateIntArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with WS binding. + * Test for int array. + */ + @Test + public void testJ2WPassByValueIntArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueIntArray()); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateLong. + */ + @Test + public void testJ2WNegateLong() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent"); + performTestNegateLong(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateLongArray. + */ + @Test + public void testJ2WNegateLongArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent"); + performTestNegateLongArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with WS binding. + * Test for long array. + */ + @Test + public void testJ2WPassByValueLongArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueLongArray()); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateFloat. + */ + @Test + public void testJ2WNegateFloat() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent"); + performTestNegateFloat(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateFloatArray. + */ + @Test + public void testJ2WNegateFloatArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent"); + performTestNegateFloatArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with WS binding. + * Test for float array. + */ + @Test + public void testJ2WPassByValueFloatArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueFloatArray()); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateDouble. + */ + @Test + public void testJ2WNegateDouble() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent"); + performTestNegateDouble(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateDoubleArray. + */ + @Test + public void testJ2WNegateDoubleArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent"); + performTestNegateDoubleArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with WS binding. + * Test for double array. + */ + @Test + public void testJ2WPassByValueDoubleArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientJ2WComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueDoubleArray()); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateBoolean. + */ + @Test + public void testW2JNegateBoolean() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent"); + performTestNegateBoolean(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateBooleanArray. + */ + @Test + public void testW2JNegateBooleanArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent"); + performTestNegateBooleanArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with WS binding. + * Test for boolean array. + */ + @Test + public void testW2JPassByValueBooleanArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueBooleanArray()); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateByte. + */ + @Test + public void testW2JNegateByte() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent"); + performTestNegateByte(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateByteArray. + */ + @Test + public void testW2JNegateByteArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent"); + performTestNegateByteArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with WS binding. + * Test for byte array. + */ + @Test + public void testW2JPassByValueByteArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueByteArray()); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateShort. + */ + @Test + public void testW2JNegateShort() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent"); + performTestNegateShort(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateShortArray. + */ + @Test + public void testW2JNegateShortArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent"); + performTestNegateShortArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with WS binding. + * Test for short array. + */ + @Test + public void testW2JPassByValueShortArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueShortArray()); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateInt. + */ + @Test + public void testW2JNegateInt() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent"); + performTestNegateInt(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateIntArray. + */ + @Test + public void testW2JNegateIntArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent"); + performTestNegateIntArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with WS binding. + * Test for int array. + */ + @Test + public void testW2JPassByValueIntArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueIntArray()); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateLong. + */ + @Test + public void testW2JNegateLong() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent"); + performTestNegateLong(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateLongArray. + */ + @Test + public void testW2JNegateLongArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent"); + performTestNegateLongArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with WS binding. + * Test for long array. + */ + @Test + public void testW2JPassByValueLongArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueLongArray()); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateFloat. + */ + @Test + public void testW2JNegateFloat() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent"); + performTestNegateFloat(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateFloatArray. + */ + @Test + public void testW2JNegateFloatArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent"); + performTestNegateFloatArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with WS binding. + * Test for float array. + */ + @Test + public void testW2JPassByValueFloatArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueFloatArray()); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateDouble. + */ + @Test + public void testW2JNegateDouble() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent"); + performTestNegateDouble(primitivesServiceClient); + } + + /** + * Invokes the PrimitivesService service using WS binding. + * Service method invoked is negateDoubleArray. + */ + @Test + public void testW2JNegateDoubleArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent"); + performTestNegateDoubleArray(primitivesServiceClient); + } + + /** + * Test the pass-by-value semantics of a remotable service with WS binding. + * Test for double array. + */ + @Test + public void testW2JPassByValueDoubleArray() throws Exception { + PrimitivesServiceClient primitivesServiceClient = domain.getService(PrimitivesServiceClient.class, "PrimitivesServiceClientW2JComponent"); + Assert.assertTrue(primitivesServiceClient.passByValueDoubleArray()); + } + + private void performTestNegateBoolean(PrimitivesServiceClient primitivesServiceClient) { + Assert.assertTrue(primitivesServiceClient.negateBooleanForward(false)); + Assert.assertFalse(primitivesServiceClient.negateBooleanForward(true)); + } + + private void performTestNegateBooleanArray(PrimitivesServiceClient primitivesServiceClient) { + boolean flags[] = new boolean[2]; + flags[0] = false; + flags[1] = true; + boolean[] respFlags = primitivesServiceClient.negateBooleanArrayForward(flags); + Assert.assertEquals(flags.length, respFlags.length); + for(int i = 0; i < flags.length; ++i) { + Assert.assertEquals(!flags[i], respFlags[i]); + } + } + + private void performTestNegateByte(PrimitivesServiceClient primitivesServiceClient) { + byte[] ba = new byte[3]; + ba[0] = -1; + ba[1] = 0; + ba[2] = 1; + + for(int i = 0; i < ba.length; ++i) { + Assert.assertEquals((byte)-ba[i], primitivesServiceClient.negateByteForward(ba[i])); + } + } + + private void performTestNegateByteArray(PrimitivesServiceClient primitivesServiceClient) { + byte[] ba = new byte[3]; + ba[0] = -1; + ba[1] = 0; + ba[2] = 1; + + byte[] r = primitivesServiceClient.negateByteArrayForward(ba); + Assert.assertEquals(ba.length, r.length); + for(int i = 0; i < ba.length; ++i) { + Assert.assertEquals((byte)-ba[i], r[i]); + } + } + + private void performTestNegateShort(PrimitivesServiceClient primitivesServiceClient) { + short[] s = new short[3]; + s[0] = -1; + s[1] = 0; + s[2] = 1; + + for(int i = 0; i < s.length; ++i) { + Assert.assertEquals((short)-s[i], primitivesServiceClient.negateShortForward(s[i])); + } + } + + private void performTestNegateShortArray(PrimitivesServiceClient primitivesServiceClient) { + short[] s = new short[3]; + s[0] = -1; + s[1] = 0; + s[2] = 1; + + short[] r = primitivesServiceClient.negateShortArrayForward(s); + Assert.assertEquals(s.length, r.length); + for(int i = 0; i < s.length; ++i) { + Assert.assertEquals((short)-s[i], r[i]); + } + } + + private void performTestNegateInt(PrimitivesServiceClient primitivesServiceClient) { + int[] ia = new int[3]; + ia[0] = -1; + ia[1] = 0; + ia[2] = 1; + + for(int i = 0; i < ia.length; ++i) { + Assert.assertEquals(-ia[i], primitivesServiceClient.negateIntForward(ia[i])); + } + } + + private void performTestNegateIntArray(PrimitivesServiceClient primitivesServiceClient) { + int[] ia = new int[3]; + ia[0] = -1; + ia[1] = 0; + ia[2] = 1; + + int[] r = primitivesServiceClient.negateIntArrayForward(ia); + Assert.assertEquals(ia.length, r.length); + for(int i = 0; i < ia.length; ++i) { + Assert.assertEquals(-ia[i], r[i]); + } + } + + private void performTestNegateLong(PrimitivesServiceClient primitivesServiceClient) { + long[] la = new long[3]; + la[0] = -1; + la[1] = 0; + la[2] = 1; + + for(int i = 0; i < la.length; ++i) { + Assert.assertEquals(-la[i], primitivesServiceClient.negateLongForward(la[i])); + } + } + + private void performTestNegateLongArray(PrimitivesServiceClient primitivesServiceClient) { + long[] la = new long[3]; + la[0] = -1; + la[1] = 0; + la[2] = 1; + + long[] r = primitivesServiceClient.negateLongArrayForward(la); + Assert.assertEquals(la.length, r.length); + for(int i = 0; i < la.length; ++i) { + Assert.assertEquals(-la[i], r[i]); + } + } + + private void performTestNegateFloat(PrimitivesServiceClient primitivesServiceClient) { + float[] fa = new float[3]; + fa[0] = -1; + fa[1] = 0; + fa[2] = 1; + + for(int i = 0; i < fa.length; ++i) { + Assert.assertEquals(-fa[i], primitivesServiceClient.negateFloatForward(fa[i])); + } + } + + private void performTestNegateFloatArray(PrimitivesServiceClient primitivesServiceClient) { + float[] ia = new float[3]; + ia[0] = -1; + ia[1] = 0; + ia[2] = 1; + + float[] r = primitivesServiceClient.negateFloatArrayForward(ia); + Assert.assertEquals(ia.length, r.length); + for(int i = 0; i < ia.length; ++i) { + Assert.assertEquals(-ia[i], r[i]); + } + } + + private void performTestNegateDouble(PrimitivesServiceClient primitivesServiceClient) { + double[] da = new double[3]; + da[0] = -1; + da[1] = 0; + da[2] = 1; + + for(int i = 0; i < da.length; ++i) { + Assert.assertEquals(-da[i], primitivesServiceClient.negateDoubleForward(da[i])); + } + } + + private void performTestNegateDoubleArray(PrimitivesServiceClient primitivesServiceClient) { + double[] da = new double[3]; + da[0] = -1; + da[1] = 0; + da[2] = 1; + + double[] r = primitivesServiceClient.negateDoubleArrayForward(da); + Assert.assertEquals(da.length, r.length); + for(int i = 0; i < da.length; ++i) { + Assert.assertEquals(-da[i], r[i]); + } + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/StandardTypesDatabindingTestCase.java b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/StandardTypesDatabindingTestCase.java new file mode 100644 index 0000000000..cec01cf4d8 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxb-top-down/src/test/java/org/apache/tuscany/sca/itest/databindings/jaxb/topdown/StandardTypesDatabindingTestCase.java @@ -0,0 +1,1446 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.itest.databindings.jaxb.topdown; + +import java.awt.Image; +import java.awt.image.BufferedImage; +import java.awt.image.PixelGrabber; +import java.io.IOException; +import java.io.InputStream; +import java.io.StringReader; +import java.io.StringWriter; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.URI; +import java.net.URL; +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.TimeZone; +import java.util.UUID; + +import javax.activation.DataHandler; +import javax.xml.datatype.DatatypeConfigurationException; +import javax.xml.datatype.DatatypeFactory; +import javax.xml.datatype.Duration; +import javax.xml.datatype.XMLGregorianCalendar; +import javax.xml.namespace.QName; +import javax.xml.transform.Result; +import javax.xml.transform.Source; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.sax.SAXSource; +import javax.xml.transform.stream.StreamResult; +import javax.xml.transform.stream.StreamSource; + +import junit.framework.Assert; + +import org.apache.axiom.attachments.ByteArrayDataSource; +import org.apache.tuscany.sca.databinding.xml.String2Node; +import org.apache.tuscany.sca.itest.databindings.jaxb.StandardTypesServiceClient; +import org.apache.tuscany.sca.itest.databindings.jaxb.impl.StandardTypesTransformer; +import org.apache.tuscany.sca.node.SCAClient; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Ignore; +import org.junit.Test; +import org.xml.sax.InputSource; +import org.junit.Ignore; + +/** + * @version $Rev$ $Date$ + */ +public class StandardTypesDatabindingTestCase { + + private static SCAClient domain; + private static SCANode node; + + /** + * Runs once before the tests + */ + @BeforeClass + public static void setUp() throws Exception { + SCANodeFactory nodeFactory = SCANodeFactory.newInstance(); + node = nodeFactory.createSCANodeFromClassLoader("wsdl/wrapped/standard-types-service.composite", null); + node.start(); + domain = (SCAClient)node; + } + + /** + * Runs once after the tests + */ + @AfterClass + public static void tearDown() { + node.stop(); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewBigInteger. + */ + @Test + public void testW2WNewBigInteger() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent"); + performTestNewBigInteger(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewBigIntegerArray. + */ + @Test + public void testW2WNewBigIntegerArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent"); + performTestNewBigIntegerArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewBigDecimal. + */ + @Test + public void testW2WNewBigDecimal() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent"); + performTestNewBigDecimal(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewBigDecimalArray. + */ + @Test + public void testW2WNewBigDecimalArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent"); + performTestNewBigDecimalArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewCalendar. + */ + @Test + public void testW2WNewCalendar() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent"); + performTestNewCalendar(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewCalendarArray. + */ + @Test + public void testW2WNewCalendarArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent"); + performTestNewCalendarArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewDate. + */ + @Test + public void testW2WNewDate() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent"); + performTestNewDate(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewDateArray. + */ + @Test + public void testW2WNewDateArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent"); + performTestNewDateArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewQName. + */ + @Test + public void testW2WNewQName() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent"); + performTestNewQName(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewQNameArray. + */ + @Test + public void testW2WNewQNameArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent"); + performTestNewQNameArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewURI. + */ + @Test + public void testW2WNewURI() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent"); + performTestNewURI(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewURIArray. + */ + @Test + public void testW2WNewURIArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent"); + performTestNewURIArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewXMLGregorianCalendar. + */ + @Test + public void testW2WNewXMLGregorianCalendar() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent"); + performTestNewXMLGregorianCalendar(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewXMLGregorianCalendarArray. + */ + @Test + public void testW2WNewXMLGregorianCalendarArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent"); + performTestNewXMLGregorianCalendarArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewDuration. + */ + @Test + public void testW2WNewDuration() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent"); + performTestNewDuration(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewDurationArray. + */ + @Test + public void testW2WNewDurationArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent"); + performTestNewDurationArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewObject. + */ + @Test + public void testW2WNewObject() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent"); + performTestNewObject(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewObjectArray. + */ + @Test + public void testW2WNewObjectArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent"); + performTestNewObjectArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewImage. + */ + @Test + public void testW2WNewImage() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent"); + performTestNewImage(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewImageArray. + */ + @Test + public void testW2WNewImageArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent"); + performTestNewImageArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewDataHandler. + */ + @Test + public void testW2WNewDataHandler() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent"); + performTestNewDataHandler(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewDataHandlerArray. + */ + @Test + public void testW2WNewDataHandlerArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent"); + performTestNewDataHandlerArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewSource. + */ + @Test + //@Ignore("junit.framework.ComparisonFailure: null expected:<... encoding=\"UTF-8\"?><[a>A> but was:<... encoding=\"UTF-8\"?><[return xmlns=\"http://jaxb.databindings.itest.sca.tuscany.apache.org/\">A>") + public void testW2WNewSource() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent"); + performTestNewSource(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewSourceArray. + */ + @Test + @Ignore("TUSCANY-2452") + public void testW2WNewSourceArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent"); + performTestNewSourceArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewUUID. + */ + @Test + public void testW2WNewUUID() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent"); + performTestNewUUID(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewUUIDArray. + */ + @Test + public void testW2WNewUUIDArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2WComponent"); + performTestNewUUIDArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewBigInteger. + */ + @Test + public void testJ2WNewBigInteger() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent"); + performTestNewBigInteger(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewBigIntegerArray. + */ + @Test + public void testJ2WNewBigIntegerArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent"); + performTestNewBigIntegerArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewBigDecimal. + */ + @Test + public void testJ2WNewBigDecimal() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent"); + performTestNewBigDecimal(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewBigDecimalArray. + */ + @Test + public void testJ2WNewBigDecimalArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent"); + performTestNewBigDecimalArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewCalendar. + */ + @Test + public void testJ2WNewCalendar() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent"); + performTestNewCalendar(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewCalendarArray. + */ + @Test + public void testJ2WNewCalendarArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent"); + performTestNewCalendarArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewDate. + */ + @Test + public void testJ2WNewDate() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent"); + performTestNewDate(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewDateArray. + */ + @Test + public void testJ2WNewDateArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent"); + performTestNewDateArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewQName. + */ + @Test + public void testJ2WNewQName() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent"); + performTestNewQName(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewQNameArray. + */ + @Test + public void testJ2WNewQNameArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent"); + performTestNewQNameArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewURI. + */ + @Test + public void testJ2WNewURI() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent"); + performTestNewURI(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewURIArray. + */ + @Test + public void testJ2WNewURIArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent"); + performTestNewURIArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewXMLGregorianCalendar. + */ + @Test + public void testJ2WNewXMLGregorianCalendar() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent"); + performTestNewXMLGregorianCalendar(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewXMLGregorianCalendarArray. + */ + @Test + public void testJ2WNewXMLGregorianCalendarArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent"); + performTestNewXMLGregorianCalendarArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewDuration. + */ + @Test + public void testJ2WNewDuration() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent"); + performTestNewDuration(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewDurationArray. + */ + @Test + public void testJ2WNewDurationArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent"); + performTestNewDurationArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewObject. + */ + @Test + public void testJ2WNewObject() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent"); + performTestNewObject(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewObjectArray. + */ + @Test + public void testJ2WNewObjectArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent"); + performTestNewObjectArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewImage. + */ + @Test + public void testJ2WNewImage() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent"); + performTestNewImage(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewImageArray. + */ + @Test + public void testJ2WNewImageArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent"); + performTestNewImageArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewDataHandler. + */ + @Test + public void testJ2WNewDataHandler() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent"); + performTestNewDataHandler(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewDataHandlerArray. + */ + @Test + public void testJ2WNewDataHandlerArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent"); + performTestNewDataHandlerArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewSource. + */ + @Test + //@Ignore("junit.framework.ComparisonFailure: null expected:<... encoding=\"UTF-8\"?><[a>A> but was:<... encoding=\"UTF-8\"?><[return xmlns=\"http://jaxb.databindings.itest.sca.tuscany.apache.org/\">A>") + public void testJ2WNewSource() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent"); + performTestNewSource(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewSourceArray. + */ + @Test + @Ignore("TUSCANY-2452") + public void testJ2WNewSourceArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent"); + performTestNewSourceArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewUUID. + */ + @Test + public void testJ2WNewUUID() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent"); + performTestNewUUID(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewUUIDArray. + */ + @Test + public void testJ2WNewUUIDArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientJ2WComponent"); + performTestNewUUIDArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewBigInteger. + */ + @Test + public void testW2JNewBigInteger() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent"); + performTestNewBigInteger(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewBigIntegerArray. + */ + @Test + public void testW2JNewBigIntegerArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent"); + performTestNewBigIntegerArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewBigDecimal. + */ + @Test + public void testW2JNewBigDecimal() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent"); + performTestNewBigDecimal(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewBigDecimalArray. + */ + @Test + public void testW2JNewBigDecimalArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent"); + performTestNewBigDecimalArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewCalendar. + */ + @Test + public void testW2JNewCalendar() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent"); + performTestNewCalendar(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewCalendarArray. + */ + @Test + public void testW2JNewCalendarArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent"); + performTestNewCalendarArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewDate. + */ + @Test + public void testW2JNewDate() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent"); + performTestNewDate(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewDateArray. + */ + @Test + public void testW2JNewDateArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent"); + performTestNewDateArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewQName. + */ + @Test + public void testW2JNewQName() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent"); + performTestNewQName(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewQNameArray. + */ + @Test + public void testW2JNewQNameArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent"); + performTestNewQNameArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewURI. + */ + @Test + public void testW2JNewURI() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent"); + performTestNewURI(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewURIArray. + */ + @Test + public void testW2JNewURIArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent"); + performTestNewURIArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewXMLGregorianCalendar. + */ + @Test + public void testW2JNewXMLGregorianCalendar() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent"); + performTestNewXMLGregorianCalendar(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewXMLGregorianCalendarArray. + */ + @Test + public void testW2JNewXMLGregorianCalendarArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent"); + performTestNewXMLGregorianCalendarArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewDuration. + */ + @Test + public void testW2JNewDuration() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent"); + performTestNewDuration(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewDurationArray. + */ + @Test + public void testW2JNewDurationArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent"); + performTestNewDurationArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewObject. + */ + @Test + public void testW2JNewObject() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent"); + performTestNewObject(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewObjectArray. + */ + @Test + public void testW2JNewObjectArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent"); + performTestNewObjectArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewImage. + */ + @Test + public void testW2JNewImage() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent"); + performTestNewImage(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewImageArray. + */ + @Test + public void testW2JNewImageArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent"); + performTestNewImageArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewDataHandler. + */ + @Test + public void testW2JNewDataHandler() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent"); + performTestNewDataHandler(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewDataHandlerArray. + */ + @Test + public void testW2JNewDataHandlerArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent"); + performTestNewDataHandlerArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewSource. + */ + @Test + //@Ignore("junit.framework.ComparisonFailure: null expected:<... encoding=\"UTF-8\"?><[a>A> but was:<... encoding=\"UTF-8\"?><[return xmlns=\"http://jaxb.databindings.itest.sca.tuscany.apache.org/\">A>") + public void testW2JNewSource() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent"); + performTestNewSource(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewSourceArray. + */ + @Test + @Ignore("TUSCANY-2452") + public void testW2JNewSourceArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent"); + performTestNewSourceArray(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewUUID. + */ + @Test + public void testW2JNewUUID() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent"); + performTestNewUUID(serviceClient); + } + + /** + * Invokes the StandardTypesService service using WS binding. + * Service method invoked is getNewUUIDArray. + */ + @Test + public void testW2JNewUUIDArray() throws Exception { + StandardTypesServiceClient serviceClient = + domain.getService(StandardTypesServiceClient.class, "StandardTypesServiceClientW2JComponent"); + performTestNewUUIDArray(serviceClient); + } + + private void performTestNewBigInteger(StandardTypesServiceClient serviceClient) { + BigInteger bi = new BigInteger("1234567890123456789012345678901234"); + BigInteger expected = bi.negate(); + BigInteger actual = serviceClient.getNewBigIntegerForward(bi); + Assert.assertEquals(expected, actual); + } + + private void performTestNewBigIntegerArray(StandardTypesServiceClient serviceClient) { + BigInteger[] bia = new BigInteger[2]; + bia[0] = new BigInteger("1234567890123456789012345678901234"); + bia[1] = new BigInteger("-98765432109876543210987654321"); + BigInteger[] actual = serviceClient.getNewBigIntegerArrayForward(bia); + Assert.assertEquals(bia.length, actual.length); + for (int i = 0; i < bia.length; ++i) { + Assert.assertEquals(bia[i].negate(), actual[i]); + } + } + + private void performTestNewBigDecimal(StandardTypesServiceClient serviceClient) { + BigDecimal bd = new BigDecimal("12345678901234567890.12345678901234"); + BigDecimal expected = bd.negate(); + BigDecimal actual = serviceClient.getNewBigDecimalForward(bd); + Assert.assertEquals(expected, actual); + } + + private void performTestNewBigDecimalArray(StandardTypesServiceClient serviceClient) { + BigDecimal[] bda = new BigDecimal[2]; + bda[0] = new BigDecimal("1234567890123456.789012345678901234"); + bda[1] = new BigDecimal("-987654321098765.43210987654321"); + BigDecimal[] actual = serviceClient.getNewBigDecimalArrayForward(bda); + Assert.assertEquals(bda.length, actual.length); + for (int i = 0; i < bda.length; ++i) { + Assert.assertEquals(bda[i].negate(), actual[i]); + } + } + + private void performTestNewCalendar(StandardTypesServiceClient serviceClient) { + Calendar[] ca = new Calendar[3]; + String[] tz = {"GMT+05:30", "GMT+00:00", "GMT-05:00"}; + for (int i = 0; i < ca.length; ++i) { + ca[i] = Calendar.getInstance(TimeZone.getTimeZone(tz[i])); + ca[i].set(Calendar.DAY_OF_MONTH, i + 1); + } + for (int i = 0; i < ca.length; ++i) { + Calendar actual = serviceClient.getNewCalendarForward(ca[i]); + ca[i].add(Calendar.DAY_OF_MONTH, 5); + if (actual instanceof GregorianCalendar && ca[i] instanceof GregorianCalendar) { + // FIXME: Is this a problem? + // The instance returned by service method invoked over binding.ws seems to have a gregorianCutover + // different from the instance passed. Adjust the gregorianCutover as per the input instance. + ((GregorianCalendar)actual).setGregorianChange(((GregorianCalendar)ca[i]).getGregorianChange()); + } + Assert.assertEquals(ca[i], actual); + } + } + + private void performTestNewCalendarArray(StandardTypesServiceClient serviceClient) { + Calendar[] ca = new Calendar[3]; + String[] tz = {"GMT+05:30", "GMT+00:00", "GMT-05:00"}; + for (int i = 0; i < ca.length; ++i) { + ca[i] = Calendar.getInstance(TimeZone.getTimeZone(tz[i])); + ca[i].set(Calendar.DAY_OF_MONTH, i + 1); + } + Calendar[] actual = serviceClient.getNewCalendarArrayForward(ca); + Assert.assertEquals(ca.length, actual.length); + for (int i = 0; i < ca.length; ++i) { + ca[i].add(Calendar.DAY_OF_MONTH, 5); + if (actual[i] instanceof GregorianCalendar && ca[i] instanceof GregorianCalendar) { + // FIXME: Is this a problem? + // The instance returned by service method invoked over binding.ws seems to have a gregorianCutover + // different from the instance passed. Adjust the gregorianCutover as per the input instance. + ((GregorianCalendar)actual[i]).setGregorianChange(((GregorianCalendar)ca[i]).getGregorianChange()); + } + Assert.assertEquals(ca[i], actual[i]); + } + } + + private void performTestNewDate(StandardTypesServiceClient serviceClient) { + Date d = new Date(); + Date expected = new Date(d.getTime() + 5 * 24 * 60 * 60 * 1000); + Date actual = serviceClient.getNewDateForward(d); + Assert.assertEquals(expected, actual); + } + + private void performTestNewDateArray(StandardTypesServiceClient serviceClient) { + Date[] d = new Date[2]; + Date[] expected = new Date[d.length]; + for (int i = 0; i < d.length; ++i) { + d[i] = new Date(); + d[i].setTime(d[i].getTime() + i * 24 * 60 * 60 * 1000); + expected[i] = new Date(d[i].getTime() + 5 * 24 * 60 * 60 * 1000); + } + Date[] actual = serviceClient.getNewDateArrayForward(d); + Assert.assertEquals(expected.length, actual.length); + for (int i = 0; i < expected.length; ++i) { + Assert.assertEquals(expected[i], actual[i]); + } + } + + private void performTestNewQName(StandardTypesServiceClient serviceClient) { + QName[] qnames = new QName[3]; + qnames[0] = new QName("localPart"); + qnames[1] = new QName("namespaceUri", "localPart"); + qnames[2] = new QName("namespaceUri", "localPart", "prefix"); + QName[] expected = new QName[qnames.length]; + for (int i = 0; i < qnames.length; ++i) { + expected[i] = + new QName(qnames[i].getNamespaceURI() + "q", qnames[i].getLocalPart() + "q", + qnames[i].getPrefix() + "q"); + } + for (int i = 0; i < qnames.length; ++i) { + QName actual = serviceClient.getNewQNameForward(qnames[i]); + Assert.assertEquals(expected[i], actual); + } + } + + private void performTestNewQNameArray(StandardTypesServiceClient serviceClient) { + QName[] qnames = new QName[4]; + qnames[0] = new QName("localPart"); + qnames[1] = new QName("namespaceUri", "localPart"); + qnames[2] = new QName("namespaceUri", "localPart", "prefix"); + qnames[3] = new QName("localPart2"); + QName[] expected = new QName[qnames.length]; + for (int i = 0; i < qnames.length; ++i) { + expected[i] = + new QName(qnames[i].getNamespaceURI() + "q", qnames[i].getLocalPart() + "q", + qnames[i].getPrefix() + "q"); + } + QName[] actual = serviceClient.getNewQNameArrayForward(qnames); + Assert.assertEquals(expected.length, actual.length); + for (int i = 0; i < qnames.length; ++i) { + Assert.assertEquals(expected[i], actual[i]); + } + } + + private void performTestNewURI(StandardTypesServiceClient serviceClient) { + URI[] uris = new URI[4]; + uris[0] = URI.create("a/b/c"); + uris[1] = URI.create("http://abc/"); + uris[2] = URI.create("ftp://a/b"); + uris[3] = URI.create("http://abc/").resolve("xyz"); + + for (int i = 0; i < uris.length; ++i) { + URI expected = uris[i].resolve("uri"); + URI actual = serviceClient.getNewURIForward(uris[i]); + Assert.assertEquals(expected, actual); + } + } + + private void performTestNewURIArray(StandardTypesServiceClient serviceClient) { + URI[] uris = new URI[4]; + uris[0] = URI.create("a/b/c"); + // [rfeng] We need to have a trialign / to avoid the resolving problem + // FIXME: [vamsi] This is actually a data transformation problem. The array being returned from the service method is + // not making to the caller intact. + uris[1] = URI.create("http://abc/"); + uris[2] = URI.create("ftp://a/b"); + uris[3] = URI.create("http://abc/").resolve("xyz"); + + URI[] expected = new URI[uris.length]; + for (int i = 0; i < uris.length; ++i) { + expected[i] = uris[i].resolve("uri"); + } + + URI[] actual = serviceClient.getNewURIArrayForward(uris); + Assert.assertEquals(expected.length, actual.length); + for (int i = 0; i < uris.length; ++i) { + Assert.assertEquals(expected[i], actual[i]); + } + } + + private void performTestNewXMLGregorianCalendar(StandardTypesServiceClient serviceClient) + throws DatatypeConfigurationException { + DatatypeFactory df = DatatypeFactory.newInstance(); + XMLGregorianCalendar[] xgcals = new XMLGregorianCalendar[3]; + xgcals[0] = df.newXMLGregorianCalendar(new GregorianCalendar(1974, GregorianCalendar.APRIL, 19)); + xgcals[1] = df.newXMLGregorianCalendar(new GregorianCalendar(1978, GregorianCalendar.OCTOBER, 13)); + xgcals[2] = df.newXMLGregorianCalendar(new GregorianCalendar(2006, GregorianCalendar.JUNE, 16)); + + for (int i = 0; i < xgcals.length; ++i) { + XMLGregorianCalendar actual = serviceClient.getNewXMLGregorianCalendarForward(xgcals[i]); + xgcals[i].setDay(xgcals[i].getDay() + 5); + Assert.assertEquals(xgcals[i], actual); + } + } + + private void performTestNewXMLGregorianCalendarArray(StandardTypesServiceClient serviceClient) + throws DatatypeConfigurationException { + DatatypeFactory df = DatatypeFactory.newInstance(); + XMLGregorianCalendar[] xgcals = new XMLGregorianCalendar[3]; + xgcals[0] = df.newXMLGregorianCalendar(new GregorianCalendar(1974, GregorianCalendar.APRIL, 19)); + xgcals[1] = df.newXMLGregorianCalendar(new GregorianCalendar(1978, GregorianCalendar.OCTOBER, 13)); + xgcals[2] = df.newXMLGregorianCalendar(new GregorianCalendar(2006, GregorianCalendar.JUNE, 16)); + + XMLGregorianCalendar[] actual = serviceClient.getNewXMLGregorianCalendarArrayForward(xgcals); + Assert.assertEquals(xgcals.length, actual.length); + for (int i = 0; i < xgcals.length; ++i) { + xgcals[i].setDay(xgcals[i].getDay() + 5); + Assert.assertEquals(xgcals[i], actual[i]); + } + } + + private void performTestNewDuration(StandardTypesServiceClient serviceClient) throws DatatypeConfigurationException { + DatatypeFactory df = DatatypeFactory.newInstance(); + Duration[] da = new Duration[3]; + da[0] = df.newDuration(1000000000000L); + da[1] = df.newDurationDayTime(1000000000000L); + da[2] = df.newDurationYearMonth(true, 1, 3); + + for (int i = 0; i < da.length; ++i) { + Assert.assertEquals(da[i].negate(), serviceClient.getNewDurationForward(da[i])); + } + } + + private void performTestNewObject(StandardTypesServiceClient serviceClient) { + Object[] objs = new Object[5]; + objs[0] = "Hello"; + objs[1] = 10; + objs[2] = null; + objs[3] = -1.0; + objs[4] = null; + + for (int i = 0; i < objs.length; ++i) { + Object expected = StandardTypesTransformer.getNewObject(objs[i]); + Object actual = serviceClient.getNewObjectForward(objs[i]); + Assert.assertEquals(expected, actual); + } + } + + private void performTestNewObjectArray(StandardTypesServiceClient serviceClient) { + Object[] objs = new Object[5]; + objs[0] = "Hello"; + objs[1] = 10; + objs[2] = null; + objs[3] = -1.0; + objs[4] = null; + + Object[] actual = serviceClient.getNewObjectArrayForward(objs); + Assert.assertEquals(objs.length, actual.length); + for (int i = 0; i < objs.length; ++i) { + Object expected = StandardTypesTransformer.getNewObject(objs[i]); + Assert.assertEquals(expected, actual[i]); + } + } + + private void performTestNewImage(StandardTypesServiceClient serviceClient) throws InterruptedException { + // Create some images to test with. + Image[] imgs = new Image[3]; + imgs[0] = new BufferedImage(10, 10, BufferedImage.TYPE_3BYTE_BGR); + imgs[1] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB); + imgs[2] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB); + imgs[0].getGraphics().drawLine(1, 1, 8, 8); + imgs[1].getGraphics().drawLine(8, 1, 1, 8); + imgs[2].getGraphics().drawLine(1, 8, 8, 1); + + Image[] copy = imgs; + // Create the same images once again as the StandardTypesTransformer may manipulate the image passed. + imgs = new Image[3]; + imgs[0] = new BufferedImage(10, 10, BufferedImage.TYPE_3BYTE_BGR); + imgs[1] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB); + imgs[2] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB); + imgs[0].getGraphics().drawLine(1, 1, 8, 8); + imgs[1].getGraphics().drawLine(8, 1, 1, 8); + imgs[2].getGraphics().drawLine(1, 8, 8, 1); + + // Make sure the images and copies are equal using ImageInfo + for(int i = 0; i < imgs.length; ++i) { + Assert.assertEquals(new ImageInfo(imgs[i]), new ImageInfo(copy[i])); + } + + for (int i = 0; i < imgs.length; ++i) { + Image actual = serviceClient.getNewImageForward(imgs[i]); + Image expected = StandardTypesTransformer.getNewImage(copy[i]); + // Compare using ImageInfo + Assert.assertEquals(new ImageInfo(expected), new ImageInfo(actual)); + } + } + + private void performTestNewImageArray(StandardTypesServiceClient serviceClient) throws InterruptedException { + // Create some images to test with. + Image[] imgs = new Image[3]; + imgs[0] = new BufferedImage(10, 10, BufferedImage.TYPE_3BYTE_BGR); + imgs[1] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB); + imgs[2] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB); + imgs[0].getGraphics().drawLine(1, 1, 8, 8); + imgs[1].getGraphics().drawLine(8, 1, 1, 8); + imgs[2].getGraphics().drawLine(1, 8, 8, 1); + + Image[] copy = imgs; + // Create the same images once again as the StandardTypesTransformer may manipulate the image passed. + imgs = new Image[3]; + imgs[0] = new BufferedImage(10, 10, BufferedImage.TYPE_3BYTE_BGR); + imgs[1] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB); + imgs[2] = new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB); + imgs[0].getGraphics().drawLine(1, 1, 8, 8); + imgs[1].getGraphics().drawLine(8, 1, 1, 8); + imgs[2].getGraphics().drawLine(1, 8, 8, 1); + + // Make sure the images and copies are equal using ImageInfo + for(int i = 0; i < imgs.length; ++i) { + Assert.assertEquals(new ImageInfo(imgs[i]), new ImageInfo(copy[i])); + } + + Image[] actual = serviceClient.getNewImageArrayForward(imgs); + Assert.assertEquals(imgs.length, actual.length); + for (int i = 0; i < imgs.length; ++i) { + Image expected = StandardTypesTransformer.getNewImage(copy[i]); + // Compare using ImageInfo + Assert.assertEquals(new ImageInfo(expected), new ImageInfo(actual[i])); + } + } + + private void performTestNewDurationArray(StandardTypesServiceClient serviceClient) + throws DatatypeConfigurationException { + DatatypeFactory df = DatatypeFactory.newInstance(); + Duration[] da = new Duration[3]; + da[0] = df.newDuration(1000000000000L); + da[1] = df.newDurationDayTime(1000000000000L); + da[2] = df.newDurationYearMonth(true, 1, 3); + + Duration[] actual = serviceClient.getNewDurationArrayForward(da); + Assert.assertEquals(da.length, actual.length); + for (int i = 0; i < da.length; ++i) { + Assert.assertEquals(da[i].negate(), actual[i]); + } + } + + private void performTestNewDataHandler(StandardTypesServiceClient serviceClient) throws IOException { + DataHandler[] dha = new DataHandler[3]; + dha[0] = new DataHandler("Some data", "text/plain"); + dha[1] = new DataHandler(new URL("http://localhost:8080/myWeb/home.html")); + dha[2] = new DataHandler(new ByteArrayDataSource("Some data2".getBytes())); + + for (int i = 0; i < dha.length; ++i) { + DataHandler actual = serviceClient.getNewDataHandlerForward(dha[i]); + // Note: The DataHandler returned may use a different type of DataSource. + // Compare the data content instead of using equals(). + Assert.assertTrue(compare(dha[i], actual)); + } + } + + private void performTestNewDataHandlerArray(StandardTypesServiceClient serviceClient) throws IOException { + DataHandler[] dha = new DataHandler[3]; + dha[0] = new DataHandler("Some data", "text/plain"); + dha[1] = new DataHandler(new URL("http://localhost:8080/myWeb/home.html")); + dha[2] = new DataHandler(new ByteArrayDataSource("Some data2".getBytes())); + + DataHandler[] actual = serviceClient.getNewDataHandlerArrayForward(dha); + Assert.assertEquals(dha.length, actual.length); + for (int i = 0; i < dha.length; ++i) { + // Note: The DataHandler returned may use a different type of DataSource. + // Compare the data content instead of using equals(). + Assert.assertTrue(compare(dha[i], actual[i])); + } + } + + private void performTestNewSource(StandardTypesServiceClient serviceClient) throws Exception { + String xml = "ABC"; + Source[] srcs = new Source[3]; + srcs[0] = new DOMSource(new String2Node().transform(xml, null)); + srcs[1] = new SAXSource(new InputSource(new StringReader(xml))); + srcs[2] = new StreamSource(new StringReader(xml)); + + for (int i = 0; i < srcs.length; ++i) { + Source expected = StandardTypesTransformer.getNewSource(srcs[i]); + Source actual = serviceClient.getNewSourceForward(srcs[i]); + // [rfeng] The data may come back as a different source + Assert.assertEquals(sourceToString(expected), sourceToString(actual)); + } + } + + private void performTestNewSourceArray(StandardTypesServiceClient serviceClient) throws Exception { + String xml = "ABC"; + Source[] srcs = new Source[3]; + srcs[0] = new DOMSource(new String2Node().transform(xml, null)); + srcs[1] = new SAXSource(new InputSource(new StringReader(xml))); + srcs[2] = new StreamSource(new StringReader(xml)); + + Source[] actual = serviceClient.getNewSourceArrayForward(srcs); + Source[] expected = new Source[srcs.length]; + for(int i = 0; i < srcs.length; ++i) { + expected[i] = StandardTypesTransformer.getNewSource(srcs[i]); + } + Assert.assertEquals(srcs.length, actual.length); + for (int i = 0; i < srcs.length; ++i) { + // [rfeng] The data may come back as a different source + Assert.assertEquals(sourceToString(expected[i]), sourceToString(actual[i])); + } + + } + + private void performTestNewUUID(StandardTypesServiceClient serviceClient) { + UUID[] uuids = new UUID[3]; + uuids[0] = UUID.nameUUIDFromBytes("ABCDEFGHJKLMNOPQRSTUVWXYZ".getBytes()); + uuids[1] = UUID.nameUUIDFromBytes("abcdefghjklmnopqrstuvwxyz".getBytes()); + uuids[2] = UUID.randomUUID(); + + for (int i = 0; i < uuids.length; ++i) { + UUID expected = UUID.fromString(uuids[i].toString() + "AAA"); + UUID actual = serviceClient.getNewUUIDForward(uuids[i]); + Assert.assertEquals(expected, actual); + } + } + + private void performTestNewUUIDArray(StandardTypesServiceClient serviceClient) { + UUID[] uuids = new UUID[3]; + uuids[0] = UUID.nameUUIDFromBytes("ABCDEFGHJKLMNOPQRSTUVWXYZ".getBytes()); + uuids[1] = UUID.nameUUIDFromBytes("abcdefghjklmnopqrstuvwxyz".getBytes()); + uuids[2] = UUID.randomUUID(); + + UUID[] actual = serviceClient.getNewUUIDArrayForward(uuids); + for (int i = 0; i < uuids.length; ++i) { + UUID expected = UUID.fromString(uuids[i].toString() + "AAA"); + Assert.assertEquals(expected, actual[i]); + } + } + + /** + * This method compares two DataHandlers. + * @return true if the data in the two handlers is the same. + */ + private boolean compare(DataHandler dh1, DataHandler dh2) throws IOException { + InputStream inp1 = dh1.getInputStream(); + InputStream inp2 = dh2.getInputStream(); + for(;;) { + int i1 = inp1.read(); + int i2 = inp2.read(); + if(i1 == -1 && i2 == -1) { + return true; + } else if(i1 != -1 && i2 != -1) { + if(i1 != i2) { + return false; + } + } else { + return false; + } + } + } + + /** + * This method returns the content of a source object as String. + */ + private String sourceToString(Source s) throws Exception { + StringWriter sw = new StringWriter(); + Result r = new StreamResult(sw); + TransformerFactory.newInstance().newTransformer().transform(s, r); + sw.close(); + return sw.toString(); + } + + /** + * This class initializes with the width, height and pixel data of a java.awt.Image object. + */ + private static class ImageInfo { + private int h, w, pixels[]; + public ImageInfo(Image img) throws InterruptedException { + w = img.getWidth(null); + h = img.getHeight(null); + pixels = new int[w*h]; + PixelGrabber pg = new PixelGrabber(img, 0, 0, w, h, pixels, 0, w); + pg.grabPixels(); + } + + public boolean equals(Object that) { + if(that == null) { + return false; + } else if(!(that instanceof ImageInfo)) { + return false; + } + + ImageInfo that1 = (ImageInfo)that; + if(w != that1.w || h != that1.h || pixels == null || that1.pixels == null || pixels.length != that1.pixels.length) { + return false; + } + for(int i = 0; i < pixels.length; ++i) { + if(pixels[i] != that1.pixels[i]) { + return false; + } + } + return true; + } + + public String toString() { + return this.getClass().getSimpleName()+"[w = "+w+", h = "+h+", pixels = "+pixels+"]"; + } + } +} diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxbgen/pom.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxbgen/pom.xml new file mode 100644 index 0000000000..e3cae4ded4 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxbgen/pom.xml @@ -0,0 +1,300 @@ + + + + + org.apache.tuscany.sca + itest-databindings + 1.6.1 + + + 4.0.0 + + itest-databindings-jaxb + 1.6.1 + jar + Apache Tuscany SCA iTest JAXB Databinding + + + + + true + + java.net + java.net Maven 1.x Repository + http://download.java.net/maven/1 + legacy + + + java.net2 + java.net Maven 2.x Repository + http://download.java.net/maven/2 + + + + + + java.net2 + java.net Maven 2.x Repository + http://download.java.net/maven/2 + + + + false + + ibiblio + ibiblio Maven 2.x Repository + http://mirrors.ibiblio.org/pub/mirrors/maven2 + + + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + ${pom.version} + runtime + + + org.apache.tuscany.sca + tuscany-databinding-jaxb + ${pom.version} + runtime + + + org.apache.tuscany.sca + tuscany-databinding-sdo + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-databinding-axiom + ${pom.version} + compile + + + org.apache.tuscany.sca + itest-databindings-common + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-host-embedded + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-interface-java-xml + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-host-jetty + 1.6.1 + runtime + + + javax.xml.bind + jaxb-api + 2.1 + compile + + + + javax.xml.ws + jaxws-api + 2.1 + + + javax.xml.soap + saaj-api + + + + + + commons-collections + commons-collections + 3.1 + + + log4j + log4j + 1.2.12 + provided + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + -Djava.endorsed.dirs=target/endorsed + + + + org.apache.maven.plugins + maven-dependency-plugin + + + generate-sources + + unpack + + + + + org.apache.tuscany.sca + itest-databindings-common + ${project.version} + true + ${project.build.directory}/classes + + + + + + copy + generate-sources + + copy + + + + + javax.xml.ws + jaxws-api + 2.1 + jar + + + javax.xml.bind + jaxb-api + 2.1 + jar + + + ${project.build.directory}/endorsed + false + true + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.0 + + + add-test-source + generate-sources + + add-test-source + + + + target/jaxws-source + + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.1 + + + generate-test-source + process-resources + + java + + + + + org.apache.tuscany.sca.itest.generate.Generate + + ${project.build.directory} + + + + + org.codehaus.mojo + jaxws-maven-plugin + 1.12 + + + + javax.jws + jsr181-api + 1.0-MR1 + + + javax.annotation + jsr250-api + 1.0 + + + + org.apache.geronimo.specs + geronimo-jaxws_2.1_spec + 1.0 + + + + + process-resources + + wsimport + + + + + org.apache.tuscany.sca.itest.jaxbdatabinding.generated + ${project.build.directory}/classes/wsdl + + Greeter.wsdl + + ${project.build.directory}/jaxws-source + false + true + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxbgen/src/main/resources/generate/generate.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxbgen/src/main/resources/generate/generate.xml new file mode 100644 index 0000000000..8381a164ea --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxbgen/src/main/resources/generate/generate.xml @@ -0,0 +1,172 @@ + + + + + + + + + + + + + Person.xsd + xsd + org.apache.tuscany.sca.itest.jaxbdatabinding.generated + ObjectFactory + http://apache.org/tuscany/sca/itest/databinding/types + p + + PersonType + + ObjectFactory factory = new ObjectFactory(); + param = factory.createPersonType(); + param.setFirstName("George"); + param.setLastName("Doors"); + + + param.setGreeting("Hello"); + + + assertNotSame("greetedPerson.getGreeting() not set", "", result.getGreeting()); + + + + + Interop.xsd + xsd + org.apache.tuscany.sca.itest.jaxbdatabinding.generated + ObjectFactory + http://www.apache.org/tuscany/interop + i + + + AttributeComplexType + + ObjectFactory factory = new ObjectFactory(); + org.apache.tuscany.sca.itest.jaxbdatabinding.generated.AttributeType attrib = factory.createAttributeType(); + attrib.setAttribute("SomeText"); + param = factory.createAttributeComplexType(); + param.setAttributeElement(attrib); + + + param.getAttributeElement().setAttribute("SomeChangedText");; + + + assertEquals("data not changed corretly", "SomeChangedText", result.getAttributeElement().getAttribute()); + + + + AttributeReferenceComplexType + + ObjectFactory factory = new ObjectFactory(); + param = factory.createAttributeReferenceComplexType(); + + param.setReferencedAttribute("SomeText"); + + + param.setReferencedAttribute("SomeChangedText");; + + + assertEquals("data not changed corretly", "SomeChangedText", result.getReferencedAttribute()); + + + + SimpleTypeWithAbstractComplexType + + ObjectFactory factory = new ObjectFactory(); + param = factory.createSimpleTypeWithAbstractComplexType(); + param.setSimpleTypeWithAbstractExtensionElement("SomeText"); + + + param.setSimpleTypeWithAbstractExtensionElement("SomeChangedText");; + + + assertEquals("data not changed corretly", "SomeChangedText", result.getSimpleTypeWithAbstractExtensionElement()); + + + + SimpleTypeWithNameComplexType + + ObjectFactory factory = new ObjectFactory(); + param = factory.createSimpleTypeWithNameComplexType(); + param.setSimpleTypeWithNameElement("SomeText"); + + + param.setSimpleTypeWithNameElement("SomeChangedText");; + + + assertEquals("data not changed corretly", "SomeChangedText", result.getSimpleTypeWithNameElement()); + + + + ComplexTypeWithContentType + + ObjectFactory factory = new ObjectFactory(); + param = factory.createComplexTypeWithContentType(); + param.setSimpleTypeWithName("SomeText"); + + + param.setSimpleTypeWithName("SomeChangedText");; + + + assertEquals("data not changed corretly", "SomeChangedText", result.getSimpleTypeWithName()); + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxbgen/src/main/resources/greeter.composite b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxbgen/src/main/resources/greeter.composite new file mode 100644 index 0000000000..ae0740e6fe --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/jaxbgen/src/main/resources/greeter.composite @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/pom.xml b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/pom.xml new file mode 100644 index 0000000000..6ab02a7081 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/pom.xml @@ -0,0 +1,47 @@ + + + + + org.apache.tuscany.sca + tuscany-itest + 1.6.1 + ../pom.xml + + 4.0.0 + + org.apache.tuscany.sca + itest-databindings + Apache Tuscany SCA Databindings Integration Tests + 1.6.1 + + + pom + + install + + + common + sdogen + jaxbgen + jaxb-bottom-up + jaxb-top-down + interop + + diff --git a/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/readme.html b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/readme.html new file mode 100644 index 0000000000..24a44e4ed7 --- /dev/null +++ b/sca-java-1.x/tags/1.6.1-RC2/itest/databindings/readme.html @@ -0,0 +1,157 @@ + + + + + + + + + Tuscany SCA Integration Test Databindings + + + + + +

Tuscany SCA Integation Test Databindings

+ +

Overview

+ +

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

+

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

+ +

Test Structure

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

Test Generation

+

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

+ +

+Each