Howto access registry in WSO2 ESB

笑着哭i 提交于 2019-11-28 11:50:57

I think you are referring to the registry here. The Registry space in each product contains three major partitions.

  • Local
  • Configuration
  • Governance

The configuration registry contains product specific configuration that can be shared across multiple instances of the same product (a cluster of ESB nodes for example). So you can create the WSDL collection inside the Config registry and refer to it like..
"conf:/wsdl/MyServiceSOAP.wsdl"

By uploading the resources to Registry, you can pick them easily when creating the proxy service too.

I think you can refer to resources as "file:/wsdl/MyServiceSOAP.wsdl" only when they are inside a directory named 'wsdl' in the local file system. BTW, about the error messages.. If you look at ESB server logs you'll see the following error when you try to update the proxy referring to a non existing file.

Caused by: java.io.FileNotFoundException: ./wsdl/MyServiceSOAP.wsdl (No such file or directory)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:120)
    at java.io.FileInputStream.<init>(FileInputStream.java:79)
    at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
    at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
    at org.apache.synapse.config.SynapseConfigUtils.getObject(SynapseConfigUtils.java:197)
    ... 46 more

I found a simple solution for it from a blog: In my Scenario I had a wsdl, that imported another wsdl that imported a xsd. The actual structures were in the second wsdl.

Import line in the original wsdl:

    <wsdl:import namespace="http://www.somedomain.com/interface/v1_0" location="service_interface_1_0.wsdl"/>

Import line in the second wsdl:

    <xsd:import namespace="http://www.somedomain.com/data/v1_0" schemaLocation="data_types_1_0.xsd"/>

Required xml on the proxy:

    <publishWSDL key="file_required_service_1_0.wsdl">
  <resource location="service_interface_1_0.wsdl"
            key="file_service_interface_1_0.wsdl"/>
  <resource location="data_types_1_0.xsd"
            key="file_data_types_1_0.xsd"/>

Where I have local entries for "file_required_service_1_0.wsdl" etc named local entries that contain the original wsdl and xsd files.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!