将注册表项加载到 wso2 属性中介 [英] Loading a registry entry into a wso2 property mediator

查看:10
本文介绍了将注册表项加载到 wso2 属性中介的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用以下语句从 wso2 esb 中的本地条目加载数据:

I am currently loading data from a local entry in the wso2 esb using the following satement:

<property name="MAPPING" expression="get-property('mapping_id_ep_v1')" />

它会加载以下名为 mapping_id_ep_v1 的本地条目:

It loads the following local entry with the name mapping_id_ep_v1:

<mappings>
    <mapping id="ep_1">http://localhost:8280/services/ep_1</mapping>
    <mapping id="ep_2">http://localhost:8280/services/ep_2</mapping>
    <mapping id="ep_3">http://localhost:8280/services/ep_3</mapping>
<mappings>

我想从注册表项加载数据.我认为以下方法会起作用:

I would like to load the data from a registry entry. I thought the following would work:

但是,它会引发异常:

Evaluation of the XPath expression conf:/custom/inspectieview/routing.xml') resulted in an error {org.apache.synapse.util.xpath.SynapseXPath}
org.jaxen.UnresolvableException: Cannot resolve namespace prefix 'conf'

有人知道是否可以将注册表中的值加载到属性调解器中吗?

Anyone know if it is possible to load a value from the registry into a property mediator?

问候,nidkil

推荐答案

我解决了我的问题.对于任何对解决方案感兴趣的人来说,它实际上非常简单.以下代码将存储在注册表中的资源加载到可以在调解器/sequence/等中引用的属性中.

I solved my question. For anyone interested in the solution it is actually very simple. The following code loads a resource stored in the registry into a property that can be referenced in a mediator /sequence / etc.

<property name="MAPPING" expression="get-property('gov:/custom/service/resource')" />

问候,nidkil

这篇关于将注册表项加载到 wso2 属性中介的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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