我正在尝试上传一个在注册表中导入另一个现有架构的架构,我想上传它而不必压缩两个架构的zip,但总是会导致错误“无法读取XML Schema Definition文件.this.schema.needs “。
作为概念证明,我上传了一个commons.xsd,它存储在注册表中: / _ system / governance / trunk / schemas / _1 / commons / commons.xsd ,位于“urn:commons:1”名称空间下。
现在,我想上传一个包含此导入的example.xsd:
<xsd:import namespace="urn:commons:1" schemaLocation="../commons/commons.xsd"/>
如果我将这两个模式打包并上传它们,它会按预期工作,但我想要的只是上传example.xsd模式,因为commons.xsd已经在注册表中,它失败了:
[2015-08-23 16:24:49,310] ERROR {org.wso2.carbon.registry.resource.ui.processors.AddResourceProcessor} - File upload failed.
org.apache.axis2.AxisFault: Failed to add resource /_system/governance/example.xsd. Could not read the XML Schema Definition file. this.schema.needs
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:367)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:413)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:224)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.wso2.carbon.registry.resource.stub.ResourceAdminServiceStub.addResource(ResourceAdminServiceStub.java:4818)
at org.wso2.carbon.registry.resource.ui.clients.ResourceServiceClient.addResource(ResourceServiceClient.java:679)
at org.wso2.carbon.registry.resource.ui.processors.AddResourceProcessor.execute(AddResourceProcessor.java:179)
at org.wso2.carbon.ui.transports.fileupload.AbstractFileUploadExecutor.executeGeneric(AbstractFileUploadExecutor.java:104)
at org.wso2.carbon.ui.transports.fileupload.FileUploadExecutorManager$CarbonXmlFileUploadExecHandler.execute(FileUploadExecutorManager.java:392)
正如我所看到的,如果上传者将新文件放在 / _ system / governance / trunk / schemas / _1 / example / example.xsd 下,尊重其命名空间“urn:example: 1“它在指定的相对路径上找到了commons.xsd,但似乎把它放在根管理文件夹中。
这是一个错误吗?
你知道任何可行的工作方法吗?
WSO2 Governance注册表版本为4.6.0
答案 0 :(得分:0)