Monday, 26 August 2013

How do I access a nested arraylist value that was created using datamapper?

How do I access a nested arraylist value that was created using datamapper?

i have a flow ftp --> datamapper --> logger --> database endpoint
the ftp waits for an xml file.
the datamapper has a mapping of an xml file, the schema was generated from
a sample xml file using generate file schema to a map using the generate
default, and then clicking create mapping.
now i send the payload to a logger.
when i print the payload in the console, the map looks like this:
: OrderIssueDate is {OrderHeader={OrderNumber={BuyerOrderNumber=11111},
OrderIssueDate=Fri Jun 28 00:00:00 EDT 2013,...
edit
What is the mule expression to extract the BuyerOrderNumber from that
arraylist.
I have tried to use xpath, and it doesnt seem to work.
I have tried #[xpath('/OrderHeader/OrderNumber//BuyerOrderNumber') but
that doesn't work because it is a map, but looking at the docs from
mulesoft, it says xpath can be used directly on the payload to retrieve
values.
I have tried #[payload[ 'BuyerOrderNumber' ] ]. but how can i get the
nested level buyerordernumber. Thanks.

No comments:

Post a Comment