Forum Discussion

roja1's avatar
roja1
Contributor
4 years ago

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

  • richie's avatar
    richie
    Community Hero
    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