I am working with the Rule Designer for the Business Rules service on Bluemix to create a BOM entry from an XML schema. When I select the XOM entry in the wizard, I see the error: "Invalid XOM entry, please check your log file"
The Eclipse log file contains the following stacktrace:
!MESSAGE An error occurred while loading the XML schema C:\mySchema.xsd.
!STACK 0
ERROR ERR011: in source file:C:/mySchema.xsd, after line 18, before lines ?, The type reference on MyType cannot be resolved.
ERROR ERR011: in source file:C:/mySchema.xsd, after line 21, before lines ?,
The type reference on MyType cannot be resolved.
at ilog.rules.xml.model.IlrXsdXomConvertorBase.convertSchema(IlrXsdXomConvertorBase.java:111) at com.ibm.rules.dynamic.xom.SchemaDriver.loadModel(SchemaDriver.java:159) at com.ibm.rules.dynamic.xom.XsdBuilder.buildXom(XsdBuilder.java:63) at ilog.rules.studio.model.xom.impl.IlrDynamicXOMPathEntryImpl.getXsdReflect(IlrDynamicXOMPathEntryImpl.java:676)
...
How do I resolve this?
I had multiple xsd:import statements for the same namespace. I put all the declarations for the namespace in a single file, and then used a single xsd:import for that namespace.
Another way is to add a new schema file that uses several xsd:include statements to include all the schema declarations for the namespace into this new file.