I am new to the WSO2 esb,Am working with wso2esb 4.7.0,wso2dss 3.0.0.
I want to create a global variable and call that variable into my proxy services
My proxy is as shown below
<proxy xmlns="http://ws.apache.org/ns/synapse" name="Get_details" transports="https,http" statistics="disable" trace="disable" startOnLoad="true">
<target endpoint="Endpoint">
<inSequence>
<property name="messageType" value="application/json" scope="axis2" type="STRING"/>
<property name="username" expression="//username/text()" scope="default" type="STRING"/>
<property name="password" expression="//password/text()" scope="default" type="STRING"/>
<log>
<property name="username" expression="get-property('username')"/>
<property name="password" expression="get-property('password')"/>
</log>
<payloadFactory media-type="xml">
<format>
<p:select_login_op xmlns:p="http://ws.wso2.org/dataservice">
<p:username>$1</p:username>
<p:password>$2</p:password>
</p:select_login_op>
</format>
<args>
<arg evaluator="xml" expression="get-property('username')"/>
<arg evaluator="xml" expression="get-property('password')"/>
</args>
</payloadFactory>
<property name="Get" expression="fn:concat('http://192.168.1.201:9764/services/', 'Get_details')"/>
<header name="To" expression="get-property('Get')"/>
<send>
<endpoint>
<default/>
</endpoint>
</send>
</inSequence>
<outSequence>
<send/>
</outSequence>
</target>
<description/>
</proxy>
In the above proxy i have used concat function to combine my Url and Service name,here what i want to do is i want to use a variable instead of url by creating a global variable and assign the url as its value and use that variable in the concat function instead of url in this proxy and several other proxy also.
How can this be done?
You can save the value as a Local Registry Entry and use it from inside proxy services. For example if I have a Local Entry called 'MyURL' I can use it as below
Another example;