5

I have my request body as:

<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 value of ID and Description, i Have created 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 this gets me only one value. How can i make a property array so that i can store multiple values of ID and description in it and how to retreive from this array property?Looking forward to your reply.Thanks in advance

Community
  • 1
  • 1
Roy
  • 1,231
  • 1
  • 24
  • 61

1 Answers1

4

You should be able to extract those values using XPATH (//node/child::node()) and then set to property.

Below thread will help you to extract required nodes and set to property. You need to set the type as 'OM' to preserve XML as it is.

how to catch an array of nodes to a property

Community
  • 1
  • 1
Shelan Perera
  • 1,753
  • 1
  • 11
  • 10
  • the above example returns me data of all childs in string format like:ID_001ID_002 like this. i want to create a property array – Roy May 13 '13 at 13:54