Doesn't work. What happens is that instead of getting multiple messages, I get one big message (the original input message) in which all of the XML tags have been stripped out. I see the same behavior if I explicitly set a result type of String on an xpath query, by the way.
Here's some more information, in case I'm simply doing something wrong with the expression. My messages basically look like this:
component, but I need to switch to xquery to do some more complex processing.
So according to the splitter component documentation, a method that is used as the expression in a splitter should return an iterable value such as java.util.Collection. If I try setting the return type of my xquery expression to java.util.Collection, I do get the correct number of messages coming out of the splitter, but they appear to be empty and the following error is printed for each one:
ERROR: 'Source object passed to '''' has no contents.'