diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-11 23:05:59 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-11 23:05:59 +0000 |
commit | 5e520b1b65c79cd828057cb628b9367acb266880 (patch) | |
tree | 645361ececb1a50c2fe0260beca5c1169d0e197b /sca-java-1.x/branches/sca-android/itest/databindings/jaxbgen/src/main/resources | |
parent | 00c625535fe93a57d605c8988147b77207d43fad (diff) |
Moving 1.x branches
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835117 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-1.x/branches/sca-android/itest/databindings/jaxbgen/src/main/resources')
2 files changed, 221 insertions, 0 deletions
diff --git a/sca-java-1.x/branches/sca-android/itest/databindings/jaxbgen/src/main/resources/generate/generate.xml b/sca-java-1.x/branches/sca-android/itest/databindings/jaxbgen/src/main/resources/generate/generate.xml new file mode 100644 index 0000000000..8381a164ea --- /dev/null +++ b/sca-java-1.x/branches/sca-android/itest/databindings/jaxbgen/src/main/resources/generate/generate.xml @@ -0,0 +1,172 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +--> +<tns:Generate xmlns:tns="http://www.apache.org/tuscany/generate" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.example.org/generate generate.xsd "> + + + <Template> + <TemplateName>GreeterService.java.vm</TemplateName> + <TemplateTargetDir>../src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding</TemplateTargetDir> + <JavaPackage>org.apache.tuscany.sca.itest.jaxbdatabinding</JavaPackage> + </Template> + <Template> + <TemplateName>GreeterServiceImpl.java.vm</TemplateName> + <TemplateTargetDir>../src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding</TemplateTargetDir> + <JavaPackage>org.apache.tuscany.sca.itest.jaxbdatabinding</JavaPackage> + </Template> + <Template> + <TemplateName>GreeterServiceClient.java.vm</TemplateName> + <TemplateTargetDir>../src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding</TemplateTargetDir> + <JavaPackage>org.apache.tuscany.sca.itest.jaxbdatabinding</JavaPackage> + </Template> + <Template> + <TemplateName>GreeterServiceClientImpl.java.vm</TemplateName> + <TemplateTargetDir>../src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding</TemplateTargetDir> + <JavaPackage>org.apache.tuscany.sca.itest.jaxbdatabinding</JavaPackage> + </Template> + <Template> + <TemplateName>DatabindingTestCase.java.vm</TemplateName> + <TemplateTargetDir>../src/test/java/org/apache/tuscany/sca/itest/jaxbdatabinding</TemplateTargetDir> + <JavaPackage>org.apache.tuscany.sca.itest.jaxbdatabinding</JavaPackage> + </Template> + <Template> + <TemplateName>Greeter.wsdl.vm</TemplateName> + <TemplateTargetDir>classes/wsdl</TemplateTargetDir> + </Template> + <InputFile> + <FileName>Person.xsd</FileName> + <FilePath>xsd</FilePath> + <JavaPackage>org.apache.tuscany.sca.itest.jaxbdatabinding.generated</JavaPackage> + <Factory>ObjectFactory</Factory> + <Namespace>http://apache.org/tuscany/sca/itest/databinding/types</Namespace> + <Prefix>p</Prefix> + <Type> + <TypeName>PersonType</TypeName> + <CreateTypeCode> + ObjectFactory factory = new ObjectFactory(); + 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> + <InputFile> + <FileName>Interop.xsd</FileName> + <FilePath>xsd</FilePath> + <JavaPackage>org.apache.tuscany.sca.itest.jaxbdatabinding.generated</JavaPackage> + <Factory>ObjectFactory</Factory> + <Namespace>http://www.apache.org/tuscany/interop</Namespace> + <Prefix>i</Prefix> + <!-- Type> + <TypeName>AnnotationComplexType</TypeName> + <CreateTypeCode> + ObjectFactory factory = new ObjectFactory(); + param = factory.createAnnotationComplexType(); + param.setSimpleTypeWithNameElement("SomeText"); + </CreateTypeCode> + <ModifyTypeCode> + param.setSimpleTypeWithNameElement("SomeChangedText");; + </ModifyTypeCode> + <ResultComparison> + assertEquals("data not changed corretly", "SomeChangedText", result.getSimpleTypeWithNameElement()); + </ResultComparison> + </Type--> + <Type> + <TypeName>AttributeComplexType</TypeName> + <CreateTypeCode> + ObjectFactory factory = new ObjectFactory(); + org.apache.tuscany.sca.itest.jaxbdatabinding.generated.AttributeType attrib = factory.createAttributeType(); + attrib.setAttribute("SomeText"); + param = factory.createAttributeComplexType(); + param.setAttributeElement(attrib); + </CreateTypeCode> + <ModifyTypeCode> + param.getAttributeElement().setAttribute("SomeChangedText");; + </ModifyTypeCode> + <ResultComparison> + assertEquals("data not changed corretly", "SomeChangedText", result.getAttributeElement().getAttribute()); + </ResultComparison> + </Type> + <Type> + <TypeName>AttributeReferenceComplexType</TypeName> + <CreateTypeCode> + ObjectFactory factory = new ObjectFactory(); + param = factory.createAttributeReferenceComplexType(); + + param.setReferencedAttribute("SomeText"); + </CreateTypeCode> + <ModifyTypeCode> + param.setReferencedAttribute("SomeChangedText");; + </ModifyTypeCode> + <ResultComparison> + assertEquals("data not changed corretly", "SomeChangedText", result.getReferencedAttribute()); + </ResultComparison> + </Type> + <Type> + <TypeName>SimpleTypeWithAbstractComplexType</TypeName> + <CreateTypeCode> + ObjectFactory factory = new ObjectFactory(); + param = factory.createSimpleTypeWithAbstractComplexType(); + param.setSimpleTypeWithAbstractExtensionElement("SomeText"); + </CreateTypeCode> + <ModifyTypeCode> + param.setSimpleTypeWithAbstractExtensionElement("SomeChangedText");; + </ModifyTypeCode> + <ResultComparison> + assertEquals("data not changed corretly", "SomeChangedText", result.getSimpleTypeWithAbstractExtensionElement()); + </ResultComparison> + </Type> + <Type> + <TypeName>SimpleTypeWithNameComplexType</TypeName> + <CreateTypeCode> + ObjectFactory factory = new ObjectFactory(); + param = factory.createSimpleTypeWithNameComplexType(); + param.setSimpleTypeWithNameElement("SomeText"); + </CreateTypeCode> + <ModifyTypeCode> + param.setSimpleTypeWithNameElement("SomeChangedText");; + </ModifyTypeCode> + <ResultComparison> + assertEquals("data not changed corretly", "SomeChangedText", result.getSimpleTypeWithNameElement()); + </ResultComparison> + </Type> + <Type> + <TypeName>ComplexTypeWithContentType</TypeName> + <CreateTypeCode> + ObjectFactory factory = new ObjectFactory(); + param = factory.createComplexTypeWithContentType(); + param.setSimpleTypeWithName("SomeText"); + </CreateTypeCode> + <ModifyTypeCode> + param.setSimpleTypeWithName("SomeChangedText");; + </ModifyTypeCode> + <ResultComparison> + assertEquals("data not changed corretly", "SomeChangedText", result.getSimpleTypeWithName()); + </ResultComparison> + </Type> + </InputFile> +</tns:Generate> diff --git a/sca-java-1.x/branches/sca-android/itest/databindings/jaxbgen/src/main/resources/greeter.composite b/sca-java-1.x/branches/sca-android/itest/databindings/jaxbgen/src/main/resources/greeter.composite new file mode 100644 index 0000000000..ae0740e6fe --- /dev/null +++ b/sca-java-1.x/branches/sca-android/itest/databindings/jaxbgen/src/main/resources/greeter.composite @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
+ name="JAXBGreeterService">
+
+ <!-- Clients to test the services -->
+ <component name="DefaultGreeterServiceClient">
+ <implementation.java class="org.apache.tuscany.sca.itest.jaxbdatabinding.GreeterServiceClientImpl" />
+ <reference name="greeterService" target="JAXBGreeterServiceComponent"/>
+ </component>
+
+ <component name="WSGreeterServiceClient">
+ <implementation.java class="org.apache.tuscany.sca.itest.jaxbdatabinding.GreeterServiceClientImpl" />
+ </component>
+
+ <reference name="JAXBGreeterServiceWSReference" promote="WSGreeterServiceClient/greeterService">
+ <interface.wsdl interface="http://apache.org/tuscany/sca/itest/databinding/services#wsdl.interface(GreeterPortType)"/>
+ <binding.ws wsdlElement="http://apache.org/tuscany/sca/itest/databinding/services#wsdl.port(GreeterService/GreeterPort)"/>
+ </reference>
+
+ <!-- The greeter service -->
+ <service name="JAXBGreeterService" promote="JAXBGreeterServiceComponent">
+ <interface.wsdl interface="http://apache.org/tuscany/sca/itest/databinding/services#wsdl.interface(GreeterPortType)"/>
+ <binding.ws wsdlElement="http://apache.org/tuscany/sca/itest/databinding/services#wsdl.port(GreeterService/GreeterPort)"/>
+ </service>
+
+ <!-- Components used to implement the services -->
+ <component name="JAXBGreeterServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.jaxbdatabinding.GreeterServiceImpl" />
+ </component>
+</composite>
|