Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
368 views
in Technique[技术] by (71.8m points)

wsdl - Howto access registry in WSO2 ESB

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

Q1: Can I use the localEntry element to define the WSDL in my proxy service? For example:

localEntry key="my_wsdl" src="file:/wsdl/MyServiceSOAP.wsdl"

Provided that I have previously used Management Console > Add Collection > create "wsdl", and Add Resource > MyServiceSOAP.wsdl. I have a problem with the "src" value, both

"/wsdl/MyServiceSOAP.wsdl" 
and
"wsdl/MyServiceSOAP.wsdl" 
do not work. I follow the documentation but they do not show howto upload WSDLs into the registry.

Q2: What if MyServiceSOAP.wsdl imports MyService.wsdl? I need to use Add Resource for MyService.wsdl as well but do I need to do anything else to make the Proxy compile?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...