Hello.
My goal is to process some XML like
And convert it to a List of my beans that could be created with static MyBean.create(String).Code:<items> <item>value1</item> <item>value2</item> <item>value3</item> </items>
Here is a context fragment:
It works quite well when the input message contains some items. But I'm failed to get an empty list when the message doesn't contains any items.Code:<int:chain input-channel="..." output-channel="..."> <int-xml:xpath-splitter> <int-xml:xpath-expression expression="/items/item" /> </int-xml:xpath-splitter> <int-xml:xpath-transformer evaluation-type="STRING_RESULT" xpath-expression="/" /> <int:transformer expression="T(MyBean).create(payload)" /> <int:aggregator /> </int:chain>
As far as I understand from code, XPathMessageSplitter throws an exception when the result collection is empty. Is there any way to work around that?
Regards,
-- Alexey


Reply With Quote
