Resolving the Repeating Elements in Response XML
If the response XML has repeating elements, the value embedded within the repeating elements is retrieved as follows:
<ContactDetails>
<Phone> 123-456-7890 </Phone>
<Phone>234-567-8901 </Phone>
<email> joe@oracle.com </email>
</ContactDetails>
- If building a custom component, you can use the WS-SETVARIABLEFROMRESPONSE keyword to retrieve the response of the web service invocation into the global variable. gVar1 is defined in the Output Parameter column.
The keyword resolves all occurrences of the Phone element and stores all values in the gVar1 variable separated by comma. gVar1 will be set to “123-456-7890,234-567-8901”.
Or, you can use the FUNCTIONCALL keyword and use appropriate functions from the base delivered function libraries, such as coreResponseUtillib library.
- If trying to retrieve a value from the response XML for a component in a flow, in the post validations sections, use the FUNCTIONCALL keyword to call the appropriate function available in the coreResponseUtillib libraries.
For more information, refer to Function Library Reference.