Howto access registry in WSO2 ESB

前端 未结 2 434
慢半拍i
慢半拍i 2020-12-10 23:03

Howto reference WSDL files from the registry when defining a new proxy service? I am using WSO2 ESB.

Q1: Can I use the localEntry e

相关标签:
2条回答
  • 2020-12-10 23:50

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

    • Local
    • Configuration
    • Governance

    Registry Space in the ESB 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. enter image description here

    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
    
    0 讨论(0)
  • 2020-12-10 23:51

    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.

    0 讨论(0)
提交回复
热议问题