You are viewing a plain text version of this content. The canonical link for it is here.
Posted to woden-dev@ws.apache.org by ry...@apache.org on 2006/04/15 05:33:04 UTC

svn commit: r394250 - in /incubator/woden/java: .classpath ant-test/test.wsdl ant-test/test.xml src/org/apache/woden/ant/WsdlCm.java

Author: ryman
Date: Fri Apr 14 20:32:58 2006
New Revision: 394250

URL: http://svn.apache.org/viewcvs?rev=394250&view=rev
Log:
Filtered out non-built-in XSD components. Updated test.wsdl.

Added:
    incubator/woden/java/ant-test/test.xml
Modified:
    incubator/woden/java/.classpath
    incubator/woden/java/ant-test/test.wsdl
    incubator/woden/java/src/org/apache/woden/ant/WsdlCm.java

Modified: incubator/woden/java/.classpath
URL: http://svn.apache.org/viewcvs/incubator/woden/java/.classpath?rev=394250&r1=394249&r2=394250&view=diff
==============================================================================
--- incubator/woden/java/.classpath (original)
+++ incubator/woden/java/.classpath Fri Apr 14 20:32:58 2006
@@ -7,7 +7,7 @@
 	<classpathentry kind="var" path="JUNIT_HOME/junit.jar"/>
 	<classpathentry kind="lib" path="downloads/lib/xercesImpl.jar"/>
 	<classpathentry kind="lib" path="downloads/lib/xml-apis.jar"/>
-	<classpathentry kind="lib" path="downloads/lib/XmlSchema-1.0.jar"/>
 	<classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.apache.ant_1.6.5/lib/ant.jar"/>
+	<classpathentry kind="lib" path="downloads/lib/XmlSchema-1.0-SNAPSHOT.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>

Modified: incubator/woden/java/ant-test/test.wsdl
URL: http://svn.apache.org/viewcvs/incubator/woden/java/ant-test/test.wsdl?rev=394250&r1=394249&r2=394250&view=diff
==============================================================================
--- incubator/woden/java/ant-test/test.wsdl (original)
+++ incubator/woden/java/ant-test/test.wsdl Fri Apr 14 20:32:58 2006
@@ -37,16 +37,16 @@
 		</wsdl:operation>
 	</wsdl:interface>
 
-	<wsdl:binding name="NamesBinding" interface="name:NameInterface"
+	<wsdl:binding name="NameBinding" interface="name:NameInterface"
 		type="http://www.w3.org/2006/01/wsdl/soap"
 		wsoap:protocol="http://www.w3.org/2003/05/soap/bindings/HTTP">
 		<wsdl:operation ref="name:getNameFromSIN"
 			wsoap:mep="http://www.w3.org/2003/05/soap/mep/request-response" />
 	</wsdl:binding>
 
-	<wsdl:service name="NamesService" interface="name:NameInterface">
-		<wsdl:endpoint name="NamesSOAPHTTPEndpoint"
-			binding="name:NamesBinding" />
+	<wsdl:service name="NameService" interface="name:NameInterface">
+		<wsdl:endpoint name="NameSOAPHTTPEndpoint"
+			binding="name:NameBinding" />
 	</wsdl:service>
 
 </wsdl:description>

Added: incubator/woden/java/ant-test/test.xml
URL: http://svn.apache.org/viewcvs/incubator/woden/java/ant-test/test.xml?rev=394250&view=auto
==============================================================================
--- incubator/woden/java/ant-test/test.xml (added)
+++ incubator/woden/java/ant-test/test.xml Fri Apr 14 20:32:58 2006
@@ -0,0 +1,387 @@
+<descriptionComponent xmlns='http://www.w3.org/2002/ws/desc/wsdl/component' xml:id='id-2228437'>
+  <interfaces>
+    <interfaceComponent xml:id='id-19551658'>
+      <name>
+        <namespaceName>http://example.org/name</namespaceName>
+        <localName>NameInterface</localName>
+      </name>
+      <interfaceOperations>
+        <interfaceOperationComponent xml:id='id-6149506'>
+          <name>
+            <namespaceName>http://example.org/name</namespaceName>
+            <localName>getNameFromSIN</localName>
+          </name>
+          <messageExchangePattern>http://www.w3.org/2006/01/wsdl/in-out</messageExchangePattern>
+          <interfaceMessageReferences>
+            <interfaceMessageReferenceComponent xml:id='id-18655235'>
+              <messageLabel>In</messageLabel>
+              <direction>in</direction>
+              <messageContentModel>#element</messageContentModel>
+              <elementDeclaration ref='id-5924809'/>
+              <parent ref='id-6149506'/>
+            </interfaceMessageReferenceComponent>
+            <interfaceMessageReferenceComponent xml:id='id-22266741'>
+              <messageLabel>Out</messageLabel>
+              <direction>out</direction>
+              <messageContentModel>#element</messageContentModel>
+              <elementDeclaration ref='id-4536327'/>
+              <parent ref='id-6149506'/>
+            </interfaceMessageReferenceComponent>
+          </interfaceMessageReferences>
+          <parent ref='id-19551658'/>
+        </interfaceOperationComponent>
+      </interfaceOperations>
+    </interfaceComponent>
+  </interfaces>
+  <bindings>
+    <bindingComponent xml:id='id-7987972'>
+      <name>
+        <namespaceName>http://example.org/name</namespaceName>
+        <localName>NameBinding</localName>
+      </name>
+      <interface ref='id-19551658'/>
+      <type>http://www.w3.org/2006/01/wsdl/soap</type>
+      <bindingOperations>
+        <bindingOperationComponent xml:id='id-7122710'>
+          <interfaceOperation ref='id-6149506'/>
+          <parent ref='id-7987972'/>
+        </bindingOperationComponent>
+      </bindingOperations>
+    </bindingComponent>
+  </bindings>
+  <services>
+    <serviceComponent xml:id='id-8970973'>
+      <name>
+        <namespaceName>http://example.org/name</namespaceName>
+        <localName>NameService</localName>
+      </name>
+      <interface ref='id-19551658'/>
+      <endpoints>
+        <endpointComponent xml:id='id-2112561'>
+          <name>NameSOAPHTTPEndpoint</name>
+          <binding ref='id-7987972'/>
+          <parent ref='id-8970973'/>
+        </endpointComponent>
+      </endpoints>
+    </serviceComponent>
+  </services>
+  <elementDeclarations>
+    <elementDeclarationComponent xml:id='id-4536327'>
+      <name>
+        <namespaceName>http://example.org/name</namespaceName>
+        <localName>Name</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </elementDeclarationComponent>
+    <elementDeclarationComponent xml:id='id-5924809'>
+      <name>
+        <namespaceName>http://example.org/name</namespaceName>
+        <localName>SIN</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </elementDeclarationComponent>
+  </elementDeclarations>
+  <typeDefinitions>
+    <typeDefinitionComponent xml:id='id-17153368'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>ENTITIES</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-30533424'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>ENTITY</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-27334345'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>ID</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-14620722'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>IDREF</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-11372121'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>IDREFS</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-5195164'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>NCName</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-6504030'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>NMTOKEN</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-22507120'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>NMTOKENS</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-18055655'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>NOTATION</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-28678543'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>Name</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-13884241'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>QName</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-14927396'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>anyURI</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-31817359'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>boolean</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-30931963'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>byte</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-14688457'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>date</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-8949356'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>dateTime</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-20863188'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>decimal</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-3794357'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>double</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-18346782'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>duration</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-22700073'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>float</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-6251267'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>gDay</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-15081425'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>gMonth</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-3346521'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>gMonthDay</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-7760420'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>gYear</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-3307594'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>gYearMonth</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-24595355'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>hexBinary</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-17089909'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>int</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-4171180'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>integer</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-9818046'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>language</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-24763620'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>long</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-26542488'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>negativeInteger</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-26980954'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>nonNegativeInteger</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-14314484'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>nonPositiveInteger</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-31820984'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>normalizedString</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-24744797'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>positiveInteger</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-12182618'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>short</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-4126736'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>string</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-1049443'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>time</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-21925102'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>token</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-421988'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>unsignedByte</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-12376621'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>unsignedInt</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-9949215'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>unsignedLong</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+    <typeDefinitionComponent xml:id='id-14721926'>
+      <name>
+        <namespaceName>http://www.w3.org/2001/XMLSchema</namespaceName>
+        <localName>unsignedShort</localName>
+      </name>
+      <system>http://www.w3.org/2001/XMLSchema</system>
+    </typeDefinitionComponent>
+  </typeDefinitions>
+</descriptionComponent>

Modified: incubator/woden/java/src/org/apache/woden/ant/WsdlCm.java
URL: http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/ant/WsdlCm.java?rev=394250&r1=394249&r2=394250&view=diff
==============================================================================
--- incubator/woden/java/src/org/apache/woden/ant/WsdlCm.java (original)
+++ incubator/woden/java/src/org/apache/woden/ant/WsdlCm.java Fri Apr 14 20:32:58 2006
@@ -17,9 +17,10 @@
 package org.apache.woden.ant;
 
 /**
- * This class writes a Woden WSDL 2.0 component model instance in the W3C interchange format
- * which is an XML vocabulary for serializing component model instances in a canonical way so
- * that different implementations can be easily compared for interoperability.
+ * This class writes a Woden WSDL 2.0 component model instance in the W3C
+ * interchange format which is an XML vocabulary for serializing component model
+ * instances in a canonical way so that different implementations can be easily
+ * compared for interoperability.
  * 
  * The schema for this format is available at the following URL:
  * 
@@ -28,7 +29,6 @@
  * @author ryman@ca.ibm.com, aka arthur-ryman@gmail.com
  */
 
-
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
@@ -37,6 +37,7 @@
 import java.util.Arrays;
 import java.util.Comparator;
 import java.util.Stack;
+import java.util.Vector;
 
 import javax.xml.namespace.QName;
 
@@ -72,8 +73,26 @@
 
 	private Stack tags = new Stack();
 
-	/** XML namespace */
-	public static String NS = "http://www.w3.org/2002/ws/desc/wsdl/component";
+	/** WSDL CM namespace */
+	private static String WSDLCM_NS = "http://www.w3.org/2002/ws/desc/wsdl/component";
+
+	/** XML Schema namespace */
+	private static String XSD_NS = "http://www.w3.org/2001/XMLSchema";
+
+	/** build-in simple types */
+	private static String[] XSD_TYPES = { "string", "boolean", "decimal",
+			"float", "double", "duration", "dateTime", "time", "date",
+			"gYearMonth", "gYear", "gMonthDay", "gDay", "gMonth", "hexBinary",
+			"base64", "Binary", "anyURI", "QName", "NOTATION",
+			"normalizedString", "token", "language", "NMTOKEN", "NMTOKENS",
+			"Name", "NCName", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES",
+			"integer", "nonPositiveInteger", "negativeInteger", "long", "int",
+			"short", "byte", "nonNegativeInteger", "unsignedLong",
+			"unsignedInt", "unsignedShort", "unsignedByte", "positiveInteger" };
+
+	{
+		Arrays.sort(XSD_TYPES);
+	}
 
 	public WsdlCm(PrintWriter out) {
 
@@ -130,8 +149,8 @@
 		// simple program to read a WSDL 2.0 file and then poke at the component
 		// model.
 
-		String wsdlLoc = "file:///D:/workspaces/woden-m4-test/test-project/test.wsdl";
-		String wsdlCmLoc = "D:\\workspaces\\woden-m4-test\\test-project\\test.xml";
+		String wsdlLoc = "file:///D:/workspaces/Woden/woden-java/ant-test/test.wsdl";
+		String wsdlCmLoc = "D:\\workspaces\\Woden\\woden-java\\ant-test\\test.xml";
 
 		System.out.println("Starting: " + wsdlLoc);
 
@@ -170,7 +189,8 @@
 
 	public void write(Description component) {
 
-		String attributes = "xmlns='" + NS + "'" + " " + idAttribute(component);
+		String attributes = "xmlns='" + WSDLCM_NS + "'" + " "
+				+ idAttribute(component);
 		beginElement("descriptionComponent", attributes);
 
 		write("interfaces", component.getInterfaces());
@@ -593,7 +613,8 @@
 
 		beginElement(tag, idAttribute(component));
 
-		writeRef("interfaceFaultReference", component.getInterfaceFaultReference());
+		writeRef("interfaceFaultReference", component
+				.getInterfaceFaultReference());
 		write("features", component.getFeatures());
 		write("properties", component.getProperties());
 		writeRef("parent", component.getParent());
@@ -676,6 +697,15 @@
 
 	private void write(String tag, ElementDeclaration[] components) {
 
+		// filter out the XSD elements until Woden fixes the bug
+		Vector filteredElements = new Vector();
+		for (int i = 0; i < components.length; i++) {
+			if (!XSD_NS.equals(components[i].getName().getNamespaceURI()))
+				filteredElements.addElement(components[i]);
+		}
+		components = new ElementDeclaration[filteredElements.size()];
+		filteredElements.copyInto(components);
+
 		if (components.length == 0)
 			return;
 
@@ -708,6 +738,19 @@
 
 	private void write(String tag, TypeDefinition[] components) {
 
+		// filter out the XSD non-built-in types until Woden fixes the bug
+		Vector filteredTypes = new Vector();
+		for (int i = 0; i < components.length; i++) {
+			if (!XSD_NS.equals(components[i].getName().getNamespaceURI())) {
+				filteredTypes.addElement(components[i]);
+			} else {
+				if (Arrays.binarySearch(XSD_TYPES, components[i].getName().getLocalPart()) >= 0)
+					filteredTypes.addElement(components[i]);
+			}
+		}
+		components = new TypeDefinition[filteredTypes.size()];
+		filteredTypes.copyInto(components);
+
 		if (components.length == 0)
 			return;
 
@@ -754,7 +797,7 @@
 	private void write(String tag, Feature component) {
 
 		beginElement(tag, idAttribute(component));
-		
+
 		write("ref", component.getRef());
 		write("required", component.isRequired());
 		writeRef("parent", component.getParent());
@@ -803,9 +846,9 @@
 
 		element(tag, content);
 	}
-	
+
 	private void write(String tag, boolean value) {
-		
+
 		element(tag, value ? "true" : "false");
 	}
 
@@ -821,7 +864,7 @@
 
 		endElement();
 	}
-	
+
 	private void write(String tag, URI uri) {
 
 		if (uri == null)
@@ -831,9 +874,10 @@
 	}
 
 	private void writeAny(String tag, Object o) {
-		
-		if (o == null) return;
-		
+
+		if (o == null)
+			return;
+
 		// TODO: write element content correctly
 		element(tag, o.toString());
 	}



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