I am trying to route a message based on information in a XML snippet stored as a local entry (key=mapping_id_ep_v1.xml). The id used to look-up the correct endpoint and it
I solved my question using a different approach. It is in line with the answer given bij fipries.
In the proxy I added the following:
This is the contents of mapping_id_ep_v1:
http://localhost:8280/services/ep_1
http://localhost:8280/services/ep_2
http://localhost:8280/services/ep_3
This is the code in TestScript_2:
function getEndpointByID(mc) {
var xml = new XML(mc.getProperty('MAPPING'));
var look_up = new XML(mc.getProperty('LOOK_UP'));
var ep = xml..mapping.(@id == look_up);
mc.setProperty('EP', ep + '');
}
The proxy loads the mapping xml into a property. This property is converted to XML in the javascript code and then using LOOK_UP the correct endpoint is retrieved.
Hope this helps someone else.
Regards, nidkil