fuseesb - In a blueprint.xml route, call a propertyplaceholder using an xpath returned value -
i have blueprint.xml in write routes esb. want values xml file passed route. want use these values make dynamic property key name , call properties file , matching property (all within route). want avoid having create java processor due overhead of instantiating each time. want this:
<from uri="file:c:/myfilelocation?"/> <to uri= {{<xpath>//company</xpath>+<xpath>//branch</xpath>}}/>
so in blueprint call property using {{}} trying place xpath values property key inside of property {{}} tags. in properties file have mapping each company/branch combination so:
company1branch1=http://thiscompany.com company2branch2=http://someothercompany.com
any way this, e.g. sort of escape characters?
the < > static uris, if want use dynamic runtime computed uris, should use recipient list eip: http://camel.apache.org/recipient-list.html allows send message recipient calculcated @ runtime.
this describer in faq: http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
though xpath, need set them headers first. like:
<setheader headername="company"> <xpath resulttype="java.lang.string">/xxxx</xpath> </setheader> ... <recipientlist><simple>{{${header.company}${header.branch}}}</simple></recipientlist>
also recipient list can send 2+ destinations, separator default comma. can configure that. see links above.