Procedure
-
Click the Code tab at the
bottom of the design workspace to look at the generated code.
As shown in the code, a message Route is built
from
one endpoint.to
another, and while in routing, the source message is split according to the conditionxpath("/people/person")
bycSplitter_1
, and each sub-message is given a header namedCamelFileName
, the value of which is returned by.method(beans.setFileNames.class)
. -
Click the Run view to display it and
click the Run button to launch the
execution of your Route. You can also press F6 to execute it.
RESULT: The source file message is split into sub-messages and each sub-message is renamed after the city name it contains and routed to the receiving endpoint.