如何访问WSO2 ESB中的注册表 [英] Howto access registry in WSO2 ESB

查看:126
本文介绍了如何访问WSO2 ESB中的注册表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在定义新的代理服务时如何从注册表中引用WSDL文件?我正在使用WSO2 ESB。

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

第一季度:我可以使用 localEntry 元素在代理中定义WSDL吗?服务?例如:

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"

提供了我以前使用过的管理控制台> 添加集合>创建 wsdl和添加资源> MyServiceSOAP.wsdl。
我的 src值有问题,都是

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" 


不起作用。我遵循文档,但它们没有显示如何将WSDL上传到注册表。

do not work. I follow the documentation but they do not show howto upload WSDLs into the registry.

第二季度:如果MyServiceSOAP.wsdl导入MyService.wsdl怎么办?我还需要为MyService.wsdl使用添加资源,但是我需要做其他任何事情来使Proxy编译吗?

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?

推荐答案

我认为您在这里指的是注册表。每个产品中的注册表空间包含三个主要分区。

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


  • Local

  • 配置

  • 治理


配置注册表包含特定于产品的配置,可以在同一产品的多个实例(例如,ESB节点群集)之间共享这些配置。因此,您可以在Config注册表中创建WSDL集合,并按如下方式引用它。.

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认为仅当资源位于本地文件系统中名为 wsdl的目录中时,您才可以将它们称为 file:/wsdl/MyServiceSOAP.wsdl。
BTW,有关错误消息。.如果您查看ESB服务器日志,则尝试更新引用不存在的文件的代理时会看到以下错误。

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

这篇关于如何访问WSO2 ESB中的注册表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆