From 7d34713fecd6b842bb4abd78f3bbc5bac6dad3bf Mon Sep 17 00:00:00 2001 From: slaws Date: Fri, 29 Aug 2008 08:31:14 +0000 Subject: Branch for 1.3.2 git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@690149 13f79535-47bb-0310-9956-ffa450edef68 --- .../itest/databindings/sdogen/pom.xml | 251 +++++++++++++++++++++ .../src/main/resources/generate/generate.xml | 170 ++++++++++++++ .../main/resources/generate/greeter.composite.vm | 56 +++++ 3 files changed, 477 insertions(+) create mode 100644 branches/sca-java-1.3.2/itest/databindings/sdogen/pom.xml create mode 100644 branches/sca-java-1.3.2/itest/databindings/sdogen/src/main/resources/generate/generate.xml create mode 100644 branches/sca-java-1.3.2/itest/databindings/sdogen/src/main/resources/generate/greeter.composite.vm (limited to 'branches/sca-java-1.3.2/itest/databindings/sdogen') diff --git a/branches/sca-java-1.3.2/itest/databindings/sdogen/pom.xml b/branches/sca-java-1.3.2/itest/databindings/sdogen/pom.xml new file mode 100644 index 0000000000..d2a4918cb0 --- /dev/null +++ b/branches/sca-java-1.3.2/itest/databindings/sdogen/pom.xml @@ -0,0 +1,251 @@ + + + + + org.apache.tuscany.sca + itest-databindings + 1.3.1-SNAPSHOT + + + 4.0.0 + + itest-databindings-sdo + 1.3.1-SNAPSHOT + jar + Apache Tuscany SCA SDO Databinding Integration Tests + + + + + true + + java.net + java.net Maven 1.x Repository + http://download.java.net/maven/1 + legacy + + + + + + + true + + java.net + java.net Maven 1.x Repository + http://download.java.net/maven/1 + legacy + + + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + ${pom.version} + runtime + + + org.apache.tuscany.sca + tuscany-core-databinding + ${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 + 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 + itest-databindings-common + ${pom.version} + compile + + + org.apache.tuscany.sca + tuscany-host-jetty + ${pom.version} + test + + + javax.servlet + servlet-api + 2.5 + test + + + + commons-collections + commons-collections + 3.1 + + + log4j + log4j + 1.2.12 + provided + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + generate-sources + + unpack + + + + + org.apache.tuscany.sca + itest-databindings-common + ${project.version} + true + ${project.build.directory}/classes + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.0 + + + add-test-source + generate-sources + + add-test-source + + + + target/sdo-source + + + + + + + org.codehaus.mojo + exec-maven-plugin + + + generate-test-sdo-source + process-resources + + java + + + + + org.apache.tuscany.sca.itest.generate.Generate + + ${project.build.directory} + true + + + + + org.codehaus.mojo + exec-maven-plugin + + + generate-test-source + process-resources + + java + + + + + org.apache.tuscany.sca.itest.generate.Generate + + ${project.build.directory} + true + + + + + org.apache.tuscany.sdo + tuscany-sdo-plugin + 1.1-incubating + + + generate-sdo + process-resources + + + + ${project.build.directory}/classes/wsdl/Greeter.wsdl + org.apache.tuscany.sca.itest.databinding.services + + + true + true + true + + + generate + + + + + + + diff --git a/branches/sca-java-1.3.2/itest/databindings/sdogen/src/main/resources/generate/generate.xml b/branches/sca-java-1.3.2/itest/databindings/sdogen/src/main/resources/generate/generate.xml new file mode 100644 index 0000000000..3f9926604d --- /dev/null +++ b/branches/sca-java-1.3.2/itest/databindings/sdogen/src/main/resources/generate/generate.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + 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/branches/sca-java-1.3.2/itest/databindings/sdogen/src/main/resources/generate/greeter.composite.vm b/branches/sca-java-1.3.2/itest/databindings/sdogen/src/main/resources/generate/greeter.composite.vm new file mode 100644 index 0000000000..9494d70f96 --- /dev/null +++ b/branches/sca-java-1.3.2/itest/databindings/sdogen/src/main/resources/generate/greeter.composite.vm @@ -0,0 +1,56 @@ + + + + + + + #foreach( $file in $fileList ) + + #end + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3