I noticed the new DslHelper, very nice Daniel. This inspired me to propose the following
addition to the XPathLanguage.dsl
Add:
[then]SetAsString : "{key}",
"{xpath}"=msg.getBody().add("{key}",org.jboss.internal.soa.esb.services.routing.cbr.DslHelper.selectAsString(msg,
"{xpath}") );
This will allow the user to write rules that can extract some fields from the XML and set
them as named parameters on the Message.Body.
For example the rule:
| when
| xpathGreaterThan "/price", "1.00"
| then
| Log : "XPath Greater Then";
| Destination : "XML_XPath_GreaterThan_Destination";
| SetAsString : "priceInDollars", "/price";
|
would add the named parameter "priceInDollars" to the ESBMessage with a value of
"1.00"
I guess you can also consider adding SetAsNumber etc.
Cheers,
--Kurt
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4216024#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...