Hi All,
I'm facing issues while trying to assign value to VariablePrefix from the xml payload, below is the my configuration:
XML Payload:
<root> <parent> <fname>John</fname> <age>22</age> </parent> <parent> <fname>Paul</fname> <age>21</age> </parent> <parent> <fname>Sudhan</fname> <age>16</age> </parent> <parent> <fname>Pinky</fname> <age>60</age> </parent> </root>
Extract Policy:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ExtractVariables async="false" continueOnError="false" enabled="true" name="extract_service"> <DisplayName>extract_service</DisplayName> <Properties/> <Source clearPayload="false">calloutResponse</Source> <VariablePrefix>detailResponse</VariablePrefix> <XMLPayload stopPayloadProcessing="false"> <Variable name="parent" type="nodeset"> <XPath>//root/parent</XPath> </Variable> </XMLPayload> </ExtractVariables>
In the above "Extract Policy":
when <VariablePrefix>detailResponse</VariablePrefix> is mentioned, I'm not getting any response in trace. It's always empty.
When I remove <VariablePrefix>detailResponse</VariablePrefix>, I'm getting response from the XML payload for key "parent".
I don't want to have the response to parent but to detailResponse. I'm not getting any error when I hit the service.
Please help me out.
It's an error in Trace. The variable is being set correctly. It's just not being displayed.
@Dino: Thank you for your help. It's actually an issue with trace, I'm able to get the response assigned to VariablePrefix.