ID_001

How to create an array of properties in wso2 ESB?

I have a request body:

<tns:InputRequest xmlns:tns="http://tempuri.org/"> <tns:ID>ID_001</tns:ID> <tns:ID>ID_002</tns:ID> <tns:Description>Description for ID_001</tns:Description> <tns:Description>Description for ID_002</tns:Description> </tns:InputRequest> 

and to get the ID and Description value, I created the property as:

 <property xmlns:tns="http://tempuri.org/" name="ID" expression="//tns:ID" scope="default" type="STRING"/> <property xmlns:tns="http://tempuri.org/" name="Description" expression="//tns:Description" scope="default" type="STRING"/> 

But that gives me only one meaning. How can I create an array of properties so that I can store several identifier and description values ​​in it and how to deviate from this property of the array? Looking forward to your reply. thanks in advance

+4
source share
1 answer

You should be able to retrieve these values ​​using XPATH (// node / child :: node ()) and then set the property.

The flow below will help you retrieve the necessary nodes and set the property. You need to set the type as "OM" to keep the XML as it is.

how to catch an array of nodes for a property

+4
source

Source: https://habr.com/ru/post/1480462/


All Articles