Error while writing Xpath expression for a json response in soapUI
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2020
04:58 AM
10-30-2020
04:58 AM
Error while writing Xpath expression for a json response in soapUI
Hi,
I have been trying to extract value from the json repsonse using Xpath in the property transfer step. I could do it using json path match but not Xpath. For some reasons I need to extract it using Xpath only.
PFA for the json path match which is giving response. I have already tried this "/response/data[0]/number[0]/tNumber". Used Property as ResponseAsXml and Path languae as Xpath.
Please guide me on how to resolve this.
Thank you in advance
1 REPLY 1
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2020
07:20 AM
10-30-2020
07:20 AM
Hey @roja,
You could try adding the 'Accept' header with value set as 'application/xml' to your request.
This will convert the response into xml, rather than relying on the responseAsXML convert?
Cheers,
Rich
You could try adding the 'Accept' header with value set as 'application/xml' to your request.
This will convert the response into xml, rather than relying on the responseAsXML convert?
Cheers,
Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
