使用注册表资源的WSO2 ESB代理具有无效的架构引用

时间:2016-04-26 16:58:45

标签: xsd wsdl wso2 wso2esb wso2greg

我正在尝试通过WSO2 ESB中的代理发布在Governance Registry中注册的SOAP服务。由于WSDL中引用的资源的模式位置不正确,我收到了保存代理的错误。

特别是我得到了:

Caused by: javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:types/xsd:schema): faultCode=PARSER_ERROR: Problem parsing '../../../../schemas/org/tempuri/1.0.0/TestSoap1.xsd'.: java.io.FileNotFoundException: /../schemas/org/tempuri/1.0.0/TestSoap1.xsd (No such file or directory)

当我在Governance Registry中搜索WSDL时,导入的模式有一个位置指向使用" ../../../ {xsd name}"的相对路径,显然是导致错误。解决方案似乎是将所有模式位置重新映射到注册表内部密钥(也就是gov:/ trunk / ...等等)。

这种行为对我来说没有意义。在创建代理时,ESB和GREG之间的集成对于使用以前的GREG导入的WSDL非常有用。我错过了什么吗?

1 个答案:

答案 0 :(得分:0)

当您选择具有依赖项的注册表资源时,您需要在正在构建的代理服务中指定它们。在下面的示例中,我将向您展示基于具有XSD作为依赖关系的WSDL在代理中执行的配置,并且这两个配置都在GREG中注册。

<publishWSDL key="gov:/trunk/wsdls/org/example/www/util/auditoria/1.0.0/Auditoria.wsdl">
      <resource key="gov:/trunk/schemas/org/example/www/util/auditoria/1.0.0/Auditoria.xsd"
                location="../../../../../../../schemas/org/example/www/util/auditoria/1.0.0/Auditoria.xsd"/>
   </publishWSDL>