我在 esb 中编写了一个代理服务来读取我存储在配置注册表中的文件,我的代理是:
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="deleteme"
transports="https http"
startOnLoad="true"
trace="disable">
<description/>
<target>
<inSequence>
<property xmlns:p="http://tempuri.org/" name="SourceID" expression="//p:SourceID" scope="default" type="STRING"/>
<property name="test"
expression="get-property('registry','conf:/test.xml')"
scope="default"
type="OM"/>
<property name="test.AddressEP" expression="$ctx:test//AddressEP"/>
<log level="custom">
<property name="test.AddressEP" expression="$ctx:test//AddressEP"/>
</log>
<header name="To" expression="get-property('test.AddressEP')"/>
<send/>
</inSequence>
</target>
<publishWSDL uri="http://pc241059:8281/services/echo?wsdl"/>
</proxy>
现在不再在属性中提供硬编码数据AddressEP:
<property name="test.AddressEP" expression="$ctx:test//AddressEP"/>
我想传递属性的值:
<property xmlns:p="http://tempuri.org/" name="SourceID" expression="//p:SourceID"/>
喜欢
<property name="test.AddressEP" expression="$ctx:test//get-property('SourceID')"/>
但我无法做到这一点?请帮助我。期待您的回答。提前致谢