Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Invalid
-
Java-SDO-beta1
-
None
Description
package com.hollycrm.sdo;
import java.io.FileWriter;
import java.io.Writer;
import java.util.Iterator;
import java.util.List;
import org.apache.tuscany.samples.sdo.SdoSampleConstants;
import org.apache.tuscany.sdo.util.SDOUtil;
import commonj.sdo.Type;
import commonj.sdo.helper.HelperContext;
import commonj.sdo.helper.TypeHelper;
import commonj.sdo.helper.XMLHelper;
import commonj.sdo.helper.XSDHelper;
public class POXSDTest {
public static void main(String[]argv)throws Exception
/**
- eliminate a bug
- @param allTypes
*/
private static void removeDocumentRootType(List allTypes) {
for (Iterator iter = allTypes.iterator(); iter.hasNext() {
Type t = (Type) iter.next();
if ("DocumentRoot".equals(t.getName())) { iter.remove(); continue; }
}
}
}
---------------------------console out----------------------------------
Exception in thread "main" java.lang.IllegalArgumentException: Cannot generate XSD since SDO Type 'item' was orginally generated from XSD. Use original XSD
at org.apache.tuscany.sdo.helper.XSDHelperImpl.generate(XSDHelperImpl.java:291)
at org.apache.tuscany.sdo.helper.XSDHelperImpl.generate(XSDHelperImpl.java:235)
at com.hollycrm.sdo.POXSDTest.main(POXSDTest.java:24)