I have validation sequence that will validate incoming XML message using defined XSD. I have
使用本地注册表指定主 XSD 文件 (TP.xsd) 的文件位置。TP.xsd 定义是
导入位于同一物理位置的另一个 XSD (CORE.xsd)。所以当我尝试测试
代码,第一条消息验证失败,因为未找到数据元素定义
即使定义存在,也位于 CORE.xsd 中。但是在随后的传入消息中,消息
针对没有“未找到数据元素定义”错误的架构进行验证。可以有人
提供我如何在 ws02 esb 中加载 XSD?这是被缓存了吗?
This is the error thrown in ws02 server logs:
2013-01-15 18:53:39,922 [-] [HttpServerWorker-6] ERROR ValidateMediator Error creating a new schema objects for schemas : [TPXSD-KEY]
org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'DateTimeType' to a(n) 'type definition' component.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaError(Unknown Source)
at org.apache.xerces.impl.xs.traversers.XSDHandler.getGlobalDecl(Unknown Source)
at org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseNamedElement(Unknown Source)
at org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseGlobal(Unknown Source)
at org.apache.xerces.impl.xs.traversers.XSDHandler.traverseSchemas(Unknown Source)
at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
at org.apache.xerces.jaxp.validation.XMLSchemaFactory.newSchema(Unknown Source)
Snippet of Core.xsd file:
<xsd:complexType name="DateTimeType">
<xs:sequence>
<xs:element ref="Year"/>
<xs:element ref="Month"/>
<xs:element ref="Day"/>
<xs:element ref="Hour" minOccurs="0"/>
<xs:element ref="Minute" minOccurs="0"/>
<xs:element ref="Second" minOccurs="0"/>
<xs:element ref="Fraction" minOccurs="0"/>
<xs:element ref="TimeZone" minOccurs="0"/>
</xs:sequence>
</xs:complexType>