将注册表项加载到 wso2 属性介体中 [英] Loading a registry entry into a wso2 property mediator
问题描述
我目前正在使用以下语句从 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:
然而,它抛出了一个异常:
However, it throws an exception:
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?
问候,尼基尔
推荐答案
我解决了我的问题.对于对解决方案感兴趣的任何人,它实际上非常简单.以下代码将存储在注册表中的资源加载到可以在中介者/序列/等中引用的属性中.
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')" />
问候,尼基尔
这篇关于将注册表项加载到 wso2 属性介体中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!