Could you please share the trace logs? with the above code snippet its difficult to assume what is the execution flow and what data you were getting where.
Hi @Arun Prasath Sivanesan, I have created a demo proxy for you where I have implemented your use cases with some mock response (hardcoded in assign message). which returns the correct result.
You just need to import. deploy and see the result then check the proxies. so overall your extract variable policy seems fine but placement or response from target server might differ in terms of type casting. please validate those as well In the trace, please check if “id” is string or integer based on that decide single quote or double quote.
If that still doesn’t work, please check if you can share the proxy bundle.
Since you have multiple extract variable policy, i suggest you to use variable prefix tag in extract variable policy & then use that to get the values in assign message policy.
I understand that. But I tried with a different API. The problem remains the same. Tried everything you suggested. Also, the content type is application/json.fei-sample-rev5-2019-08-26.zip
Not according to my direct observation. Check your assumption.
If you disagree, show a trace that proves this, please. (Not the proxy) Or even show a screenshot of the Trace UI showing the content-type header. Your previous screenshots did not show the header.
yes, and I can see that the data is json. I said this in my answer above, and I will repeat it here: the content-type is not consistent with the payload, and the ExtractVariables / JSONPayload will not work if your content-type header is not application/json.
Re-read my answer above. I gave you two ways to solve the problem. If you didn’t understand the answer, ask for clarification. My answer is still right. It will help you. Trust me on this.