You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2006/05/31 11:37:10 UTC

svn commit: r410484 [2/2] - in /incubator/tuscany/sandbox/tools: ./ xmlfromxsd/ xmlfromxsd/src/ xmlfromxsd/src/main/ xmlfromxsd/src/main/java/ xmlfromxsd/src/main/java/org/ xmlfromxsd/src/main/java/org/apache/ xmlfromxsd/src/main/java/org/apache/tuscan...

Added: incubator/tuscany/sandbox/tools/xmlfromxsd/src/main/java/org/apache/tuscany/tools/xmlfromxsd/generate/XMLfromXSDGenerator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/tools/xmlfromxsd/src/main/java/org/apache/tuscany/tools/xmlfromxsd/generate/XMLfromXSDGenerator.java?rev=410484&view=auto
==============================================================================
--- incubator/tuscany/sandbox/tools/xmlfromxsd/src/main/java/org/apache/tuscany/tools/xmlfromxsd/generate/XMLfromXSDGenerator.java (added)
+++ incubator/tuscany/sandbox/tools/xmlfromxsd/src/main/java/org/apache/tuscany/tools/xmlfromxsd/generate/XMLfromXSDGenerator.java Wed May 31 02:37:08 2006
@@ -0,0 +1,87 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation or its licensors as applicable
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.tuscany.tools.xmlfromxsd.generate;
+
+/**
+ * This class provides a command line tooling functinality for creating an
+ * XML instance from an input XSD.
+ *
+ */
+public class XMLfromXSDGenerator
+{
+	public static int generatorType = XMLGenerator.SDO_BASED;
+	/**
+	 * @param args
+	 */
+	public static void main(String[] args)
+	{
+		try
+		{
+			new XMLfromXSDGenerator().generateXMLInstance(args);
+		}
+		catch ( Exception e )
+		{
+			e.printStackTrace();
+			System.out.println(getPrintUsageMessage());
+		}
+	}
+	
+	public void generateXMLInstance(String args[]) throws Exception 
+	{
+		//create a configuration object to hold settings for this generation
+		XMLfromXSDConfiguration config = new XMLfromXSDConfiguration();
+		
+		//create an argument processor to process the input arguments 
+		CmdLineArgsProcessor argsProcessor = new CmdLineArgsProcessor();
+		
+		//configure the args processor with the 'config' object that must be populated
+		//with values from the proecessed input arguments
+		argsProcessor.setArgsHandler(config);
+		
+		//set the usage message to be output by the args processor if input arguments are not proper
+		argsProcessor.setPrintUsageMessage(getPrintUsageMessage());
+		
+		//start processing the arguments
+		argsProcessor.processArgs(args);
+		
+		//now that the configuration settings are populated from the input arguments
+		//instantiate the xmlfromsdogenerator with this config object
+		
+		XMLGenerator generator = new XMLGeneratorFactory().createGenerator(generatorType);
+		//XBbasedXMLGenerator generator = new XBbasedXMLGenerator(config);
+		
+		//generate the xml instance 
+		generator.generateXML(config);
+	}
+	
+	protected static String getPrintUsageMessage()
+	{
+		StringBuffer strBuffer = new StringBuffer();
+		strBuffer.append("Usage arguments:\n");
+		strBuffer.append("  [ -rns <root element namespace URI> ]\n");
+		strBuffer.append("  [ -rn <root element name> ]\n");
+		strBuffer.append("  [ -xsd <xsd file> ]\n");
+		strBuffer.append("  [ -of <output xml filename> ]\n");
+		strBuffer.append("  [ -o <output location> ]\n");
+		strBuffer.append("  [ -st <name of the schema type to be instantiated as xml> ]\n");
+		strBuffer.append("  [ -stn <namespace URI of the schema type> ]\n");
+		strBuffer.append("  [ -sd (provide this flag if sample data is to be generated)\n");
+		
+		return strBuffer.toString();
+	}
+
+}

Added: incubator/tuscany/sandbox/tools/xmlfromxsd/src/test/java/org/apache/tuscany/tools/xmlfromxsd/generate/XMLfromXSDGeneratorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/tools/xmlfromxsd/src/test/java/org/apache/tuscany/tools/xmlfromxsd/generate/XMLfromXSDGeneratorTestCase.java?rev=410484&view=auto
==============================================================================
--- incubator/tuscany/sandbox/tools/xmlfromxsd/src/test/java/org/apache/tuscany/tools/xmlfromxsd/generate/XMLfromXSDGeneratorTestCase.java (added)
+++ incubator/tuscany/sandbox/tools/xmlfromxsd/src/test/java/org/apache/tuscany/tools/xmlfromxsd/generate/XMLfromXSDGeneratorTestCase.java Wed May 31 02:37:08 2006
@@ -0,0 +1,125 @@
+package org.apache.tuscany.tools.xmlfromxsd.generate; 
+
+import junit.framework.TestCase;
+
+public class XMLfromXSDGeneratorTestCase extends TestCase
+{
+
+	protected void setUp() throws Exception
+	{
+		super.setUp();
+	}
+
+	protected void tearDown() throws Exception
+	{
+		super.tearDown();
+	}
+	
+	public void testXMLInstance_SDO_based_1()
+	{
+		String[] arguments = new String[] { "-xsd", "F:\\TuscanySVN\\sca\\tools\\src\\test\\resources\\sequences.xsd",
+											"-st", "MixedQuote",
+											"-stn", "http://www.example.com/sequences",
+											"-o", "target/xmlFromxsd-source",
+											"-of", "sequences_sdo.xml"
+										};
+		
+		XMLfromXSDGenerator.main(arguments);
+		/*File file = new File("target/java2wsdl-source/CustomerValue.wsdl");
+		assertTrue(file.exists() && file.isFile());*/
+	}
+	
+	public void testXMLInstance_SDO_based_2()
+	{
+		try
+		{
+			XMLfromXSDConfiguration config = new XMLfromXSDConfiguration();
+			config.setXsdFileName("interopdoc.wsdl");
+			config.setSchemaTypeName("ComplexDocument");
+			config.setSchemaTypeNamespaceURI("http://soapinterop.org/");
+			config.setXmlOutputLocation("target/xmlFromxsd-source");
+			config.setXmlFileName("interopdoc_sdo.xml");
+			
+			XMLGeneratorFactory.getInstance().createGenerator(XMLGenerator.SDO_BASED).generateXML(config);
+			//XMLGeneratorFactory.getInstance().createGenerator(XMLGenerator.XMLBEANS_BASED).generateXML(config);
+		}
+		catch ( Exception e )
+		{
+			e.printStackTrace();
+		}
+	}
+	
+	public void testXMLInstance_SDO_based_3()
+	{
+		try
+		{
+			XMLfromXSDConfiguration config = new XMLfromXSDConfiguration();
+			config.setXsdFileName("helloworld.wsdl");
+			//config.setSchemaTypeName("getGreetings");
+			config.setSchemaTypeName("ComplexGreetings");
+			config.setSchemaTypeNamespaceURI("http://helloworldaxis.samples.tuscany.apache.org");
+			config.setXmlOutputLocation("target/xmlFromxsd-source");
+			config.setXmlFileName("helloworld_sdo.xml");
+			
+			XMLGeneratorFactory.getInstance().createGenerator(XMLGenerator.SDO_BASED).generateXML(config);
+		}
+		catch ( Exception e )
+		{
+			e.printStackTrace();
+		}
+	}
+	
+	public void testXMLInstance_XB_based_1()
+	{
+		String[] arguments = new String[] { "-xsd", "F:\\TuscanySVN\\sca\\tools\\src\\test\\resources\\sequences.xsd",
+											"-st", "mixedStockQuote",
+											"-stn", "http://www.example.com/sequences",
+											"-o", "target/xmlFromxsd-source",
+											"-of", "sequences_xb.xml"
+										};
+		
+		XMLfromXSDGenerator.generatorType = XMLGenerator.XMLBEANS_BASED;
+		XMLfromXSDGenerator.main(arguments);
+		/*File file = new File("target/java2wsdl-source/CustomerValue.wsdl");
+		assertTrue(file.exists() && file.isFile());*/
+	}
+	
+	public void testXMLInstance_XB_based_2()
+	{
+		try
+		{
+			XMLfromXSDConfiguration config = new XMLfromXSDConfiguration();
+			config.setXsdFileName("interopdoc.wsdl");
+			config.setSchemaTypeName("ComplexDocument");
+			config.setSchemaTypeNamespaceURI("http://soapinterop.org/");
+			config.setXmlOutputLocation("target/xmlFromxsd-source");
+			config.setXmlFileName("interopdoc_xb.xml");
+			
+			XMLGeneratorFactory.getInstance().createGenerator(XMLGenerator.XMLBEANS_BASED).generateXML(config);
+		}
+		catch ( Exception e )
+		{
+			e.printStackTrace();
+		}
+	}
+	
+	public void testXMLInstance_XB_based_3()
+	{
+		try
+		{
+			XMLfromXSDConfiguration config = new XMLfromXSDConfiguration();
+			config.setXsdFileName("helloworld.wsdl");
+			config.setSchemaTypeName("getGreetings");
+			//config.setSchemaTypeName("ComplexGreetings");
+			config.setSchemaTypeNamespaceURI("http://helloworldaxis.samples.tuscany.apache.org");
+			config.setXmlOutputLocation("target/xmlFromxsd-source");
+			config.setXmlFileName("helloworld_xb.xml");
+			
+			XMLGeneratorFactory.getInstance().createGenerator(XMLGenerator.XMLBEANS_BASED).generateXML(config);
+		}
+		catch ( Exception e )
+		{
+			e.printStackTrace();
+		}
+	}
+}

Added: incubator/tuscany/sandbox/tools/xmlfromxsd/src/test/resources/helloworld.wsdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/tools/xmlfromxsd/src/test/resources/helloworld.wsdl?rev=410484&view=auto
==============================================================================
--- incubator/tuscany/sandbox/tools/xmlfromxsd/src/test/resources/helloworld.wsdl (added)
+++ incubator/tuscany/sandbox/tools/xmlfromxsd/src/test/resources/helloworld.wsdl Wed May 31 02:37:08 2006
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+ -->
+<wsdl:definitions targetNamespace="http://helloworldaxis.samples.tuscany.apache.org" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://helloworldaxis.samples.tuscany.apache.org" xmlns:intf="http://helloworldaxis.samples.tuscany.apache.org" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="stockquote">
+    <!--WSDL created by Apache Axis version: 1.2.1
+Built on Jun 14, 2005 (09:15:57 EDT)-->
+    <wsdl:types>
+        <schema elementFormDefault="qualified" 
+        	xmlns:hello="http://helloworldaxis.samples.tuscany.apache.org" 
+        	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+        	targetNamespace="http://helloworldaxis.samples.tuscany.apache.org" xmlns="http://www.w3.org/2001/XMLSchema">
+        	<complexType name="ComplexGreetings">
+                <sequence>
+                    <element name="greet1" type="xsd:string"/>
+                    <element name="greet2" type="xsd:double"/>
+                </sequence>
+        	</complexType>
+        	<element name="getGreetings">
+                <complexType>
+                    <sequence>
+                        <element name="in0" type="xsd:string"/>
+                        <element name="in1" type="xsd:double"/>
+                        <element name="in2" type="hello:ComplexGreetings"/>
+                    </sequence>
+                    <xsd:attribute name="language" type="xsd:string"/>
+                </complexType>
+            </element>
+            <element name="getGreetingsResponse">
+                <complexType>
+                    <sequence>
+                        <element name="getGreetingsReturn" type="xsd:string"/>
+                    </sequence>
+                </complexType>
+            </element>
+        </schema>
+    </wsdl:types>
+
+    <wsdl:message name="getGreetingsRequest">
+
+        <wsdl:part element="impl:getGreetings" name="parameters"/>
+
+    </wsdl:message>
+
+    <wsdl:message name="getGreetingsResponse">
+
+        <wsdl:part element="impl:getGreetingsResponse" name="parameters"/>
+
+    </wsdl:message>
+
+    <wsdl:portType name="HelloWorldServiceImpl">
+
+        <wsdl:operation name="getGreetings">
+
+            <wsdl:input message="impl:getGreetingsRequest" name="getGreetingsRequest"/>
+
+            <wsdl:output message="impl:getGreetingsResponse" name="getGreetingsResponse"/>
+
+        </wsdl:operation>
+
+    </wsdl:portType>
+
+    <wsdl:binding name="helloworldSoapBinding" type="impl:HelloWorldServiceImpl">
+
+        <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+        <wsdl:operation name="getGreetings">
+
+            <wsdlsoap:operation soapAction=""/>
+
+            <wsdl:input name="getGreetingsRequest">
+
+                <wsdlsoap:body use="literal"/>
+
+            </wsdl:input>
+
+            <wsdl:output name="getGreetingsResponse">
+
+                <wsdlsoap:body use="literal"/>
+
+            </wsdl:output>
+
+        </wsdl:operation>
+
+    </wsdl:binding>
+
+    <wsdl:service name="HelloWorldServiceImplService">
+
+        <wsdl:port binding="impl:helloworldSoapBinding" name="helloworld">
+
+            <!-- Tuscany SCA Service -->
+<!--
+            <wsdlsoap:address location="http://localhost:8080/tuscany-samples-helloworldws-service/services/HelloWorldService"/>
+-->
+            <wsdlsoap:address location="http://localhost:9876/tuscany-samples-helloworldws-service/services/HelloWorldService"/>
+
+            <!-- Axis Web Service -->
+            <!--
+            <wsdlsoap:address location="http://localhost:8081/helloworldaxissvc-incubating-M1/services/helloworld"/>
+            -->
+
+        </wsdl:port>
+
+    </wsdl:service>
+
+</wsdl:definitions>

Added: incubator/tuscany/sandbox/tools/xmlfromxsd/src/test/resources/interopdoc.wsdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/tools/xmlfromxsd/src/test/resources/interopdoc.wsdl?rev=410484&view=auto
==============================================================================
--- incubator/tuscany/sandbox/tools/xmlfromxsd/src/test/resources/interopdoc.wsdl (added)
+++ incubator/tuscany/sandbox/tools/xmlfromxsd/src/test/resources/interopdoc.wsdl Wed May 31 02:37:08 2006
@@ -0,0 +1,177 @@
+<?xml version="1.0"?>
+<!--
+  Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+ -->
+<definitions name="InteropTestDoc" targetNamespace="http://soapinterop.org/"
+	xmlns="http://schemas.xmlsoap.org/wsdl/"
+	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+	xmlns:tns="http://soapinterop.org/"
+	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+
+	<types>
+
+		<xsd:schema elementFormDefault="qualified" targetNamespace="http://soapinterop.org/" xmlns:interop="http://soapinterop.org/">
+
+			<xsd:element name="SingleTag">
+				<xsd:complexType>
+					<xsd:sequence>
+						<xsd:element minOccurs="0" maxOccurs="1" name="SingleTag" type="interop:SingleTag"/>
+					</xsd:sequence>
+				</xsd:complexType>
+			</xsd:element>
+
+			<xsd:complexType name="SingleTag"/>
+			<xsd:element name="SingleTagResponse">
+				<xsd:complexType>
+					<xsd:sequence>
+						<xsd:element minOccurs="0" maxOccurs="1" name="SingleTag" type="interop:SingleTag"/>
+					</xsd:sequence>
+				</xsd:complexType>
+			</xsd:element>
+			<xsd:element name="SimpleDocument">
+				<xsd:complexType>
+					<xsd:sequence>
+						<xsd:element minOccurs="0" maxOccurs="1" name="SimpleDocument" type="interop:SimpleDocument"/>
+					</xsd:sequence>
+				</xsd:complexType>
+			</xsd:element>
+			<xsd:complexType name="SimpleDocument">
+				<xsd:simpleContent>
+					<xsd:extension base="xsd:string"/>
+				</xsd:simpleContent>
+			</xsd:complexType>
+			<xsd:element name="SimpleDocumentResponse">
+				<xsd:complexType>
+					<xsd:sequence>
+						<xsd:element minOccurs="0" maxOccurs="1" name="SimpleDocument" type="interop:SimpleDocument"/>
+					</xsd:sequence>
+				</xsd:complexType>
+			</xsd:element>
+			<xsd:element name="ComplexDocument">
+				<xsd:complexType>
+					<xsd:sequence>
+						<xsd:element minOccurs="0" maxOccurs="1" name="ComplexDocument" type="interop:ComplexDocument"/>
+					</xsd:sequence>
+				</xsd:complexType>
+			</xsd:element>
+			<xsd:complexType name="ComplexDocument">
+				<xsd:sequence>
+					<xsd:element minOccurs="0" maxOccurs="1" name="simpleDoc" type="interop:ArrayOfSimpleDocument"/>
+					<xsd:element minOccurs="0" maxOccurs="1" name="child" type="interop:ChildDocument"/>
+				</xsd:sequence>
+				<xsd:attribute name="AnAttribute" type="xsd:string"/>
+			</xsd:complexType>
+			<xsd:complexType name="ArrayOfSimpleDocument">
+				<xsd:sequence>
+					<xsd:element minOccurs="0" maxOccurs="unbounded" name="SimpleDocument" nillable="true" type="interop:SimpleDocument"/>
+				</xsd:sequence>
+			</xsd:complexType>
+			<xsd:complexType name="ChildDocument">
+				<xsd:sequence>
+					<xsd:element minOccurs="0" maxOccurs="1" name="childSimpleDoc" type="interop:ArrayOfSimpleDocument"/>
+				</xsd:sequence>
+			</xsd:complexType>
+			<xsd:element name="ComplexDocumentResponse">
+				<xsd:complexType>
+					<xsd:sequence>
+						<xsd:element minOccurs="0" maxOccurs="1" name="ComplexDocument" type="interop:ComplexDocument"/>
+					</xsd:sequence>
+				</xsd:complexType>
+			</xsd:element>
+
+		</xsd:schema>
+
+	</types>
+
+	<message name="SingleTagSoapIn">
+		<part name="parameters" element="tns:SingleTag"/>
+	</message>
+	<message name="SingleTagSoapOut">
+		<part name="outputDoc" element="tns:SingleTagResponse"/>
+	</message>
+	<message name="SimpleDocumentSoapIn">
+		<part name="parameters" element="tns:SimpleDocument"/>
+	</message>
+	<message name="SimpleDocumentSoapOut">
+		<part name="outputDoc" element="tns:SimpleDocumentResponse"/>
+	</message>
+	<message name="ComplexDocumentSoapIn">
+		<part name="parameters" element="tns:ComplexDocument"/>
+	</message>
+	<message name="ComplexDocumentSoapOut">
+		<part name="outputDoc" element="tns:ComplexDocumentResponse"/>
+	</message>
+
+	<portType name="DocTestPortType">
+
+		<operation name="SingleTag">
+			<input message="tns:SingleTagSoapIn"/>
+			<output message="tns:SingleTagSoapOut"/>
+		</operation>
+		<operation name="SimpleDocument">
+			<input message="tns:SimpleDocumentSoapIn"/>
+			<output message="tns:SimpleDocumentSoapOut"/>
+		</operation>
+		<operation name="ComplexDocument">
+			<input message="tns:ComplexDocumentSoapIn"/>
+			<output message="tns:ComplexDocumentSoapOut"/>
+		</operation>
+
+	</portType>
+
+	<binding name="doc_test_binding" type="tns:DocTestPortType">
+		<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+		<operation name="SingleTag">
+			<soap:operation soapAction="http://soapinterop.org/SingleTag"/>
+			<input>
+				<soap:body use="literal"/>
+			</input>
+			<output>
+				<soap:body use="literal"/>
+			</output>
+		</operation> 
+
+		<operation name="SimpleDocument">
+			<soap:operation soapAction="http://soapinterop.org/SimpleDocument"/>
+			<input>
+				<soap:body use="literal"/>
+			</input>
+			<output>
+				<soap:body use="literal"/>
+			</output>
+		</operation> 
+
+		<operation name="ComplexDocument">
+			<soap:operation soapAction="http://soapinterop.org/ComplexDocument"/>
+			<input>
+				<soap:body use="literal"/>
+			</input>
+			<output>
+				<soap:body use="literal"/>
+			</output>
+		</operation> 
+	</binding>
+
+	<service name="interopDocSvc">
+
+  		<port name="interopDocPort" binding="tns:doc_test_binding">
+    			<soap:address location="http://www.whitemesa.net/interopdoc"/>
+  		</port>
+
+	</service>
+
+</definitions>

Added: incubator/tuscany/sandbox/tools/xmlfromxsd/src/test/resources/sequences.xsd
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/tools/xmlfromxsd/src/test/resources/sequences.xsd?rev=410484&view=auto
==============================================================================
--- incubator/tuscany/sandbox/tools/xmlfromxsd/src/test/resources/sequences.xsd (added)
+++ incubator/tuscany/sandbox/tools/xmlfromxsd/src/test/resources/sequences.xsd Wed May 31 02:37:08 2006
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+ -->
+<xsd:schema xmlns:seq="http://www.example.com/sequences"
+	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+	targetNamespace="http://www.example.com/sequences">
+
+	<xsd:element name="mixedStockQuote" type="seq:MixedQuote" />
+	<xsd:element name="rc" type="seq:RepeatingChoice" />
+	<xsd:element name="mrc" type="seq:MixedRepeatingChoice" />
+	<xsd:element name="rc2" type="seq:TwoRCs" />
+	<xsd:element name="mrc2" type="seq:TwoRCsMixed" />
+
+
+
+	<xsd:complexType mixed="true" name="MixedQuote">
+		<xsd:sequence>
+			<xsd:element name="symbol" type="xsd:string" />
+			<xsd:element name="companyName" type="xsd:string" />
+			<xsd:element name="price" type="xsd:decimal" />
+			<xsd:element name="open1" type="xsd:decimal" />
+			<xsd:element name="high" type="xsd:decimal" />
+			<xsd:element name="low" type="xsd:decimal" />
+			<xsd:element name="volume" type="xsd:double" />
+			<xsd:element name="change1" type="xsd:double" />
+			<xsd:element maxOccurs="unbounded" minOccurs="0"
+				name="quotes" type="seq:MixedQuote" />
+		</xsd:sequence>
+	</xsd:complexType>
+
+
+	<xsd:complexType name="RepeatingChoice">
+		<xsd:choice maxOccurs="unbounded" minOccurs="0">
+			<xsd:element name="a" type="xsd:string" />
+			<xsd:element name="b" type="xsd:int" />
+		</xsd:choice>
+	</xsd:complexType>
+
+
+	<xsd:complexType mixed="true" name="MixedRepeatingChoice">
+		<xsd:choice maxOccurs="unbounded" minOccurs="0">
+			<xsd:element name="a" type="xsd:string" />
+			<xsd:element name="b" type="xsd:int" />
+		</xsd:choice>
+	</xsd:complexType>
+
+
+	<xsd:complexType name="TwoRCs">
+		<xsd:sequence>
+
+			<xsd:choice maxOccurs="unbounded" minOccurs="0">
+				<xsd:element name="a" type="xsd:string" />
+				<xsd:element name="b" type="xsd:int" />
+			</xsd:choice>
+
+			<xsd:element name="split" type="xsd:string" />
+
+			<xsd:choice maxOccurs="unbounded" minOccurs="0">
+				<xsd:element name="y" type="xsd:string" />
+				<xsd:element name="z" type="xsd:int" />
+			</xsd:choice>
+
+		</xsd:sequence>
+	</xsd:complexType>
+
+	<xsd:complexType mixed="true" name="TwoRCsMixed">
+		<xsd:sequence>
+
+			<xsd:choice maxOccurs="unbounded" minOccurs="0">
+				<xsd:element name="a" type="xsd:string" />
+				<xsd:element name="b" type="xsd:int" />
+			</xsd:choice>
+
+			<xsd:element name="split" type="xsd:string" />
+
+			<xsd:choice maxOccurs="unbounded" minOccurs="0">
+				<xsd:element name="y" type="xsd:string" />
+				<xsd:element name="z" type="xsd:int" />
+			</xsd:choice>
+
+		</xsd:sequence>
+	</xsd:complexType>
+
+</xsd:schema>



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org