Forum Discussion
7 Replies
- MarcusJ
Staff
Hi,
XPATH is a query language to get xml nodes. It is only for XML and is independent of SoapUI.
I doubled checked your screen shot and I see that you have "Response" as the property in the source for property transfer. You should select "ResponseAsXml" instead. Then you can use property transfer as usually and select an XPATH. - MarcusJ
Staff
Hi,
As a reminder if you are a SoapUI Pro user you can post in the Pro forum.
I'm not able to reproduce that problem using a REST request.
When you use the XPATH editor in the property transfer teststep do you see any CDATA tags appearing in the editor?
Are you able to post a project reproducing this issue? - johntautomationOccasional ContributorThanks Marcus.
I tried to post this in pro support first, but did not see the option to post a issue.
almost all the time when I have tried to click the xpath editor , I get this error message. (It worked fine just once)
Failed to select XPath for source property value [{"id":"123456789123456789","user":{"id":"888888888888888888","key":"myemail@mycompany.com","passwordUpdateId":111111111111111111,"permissions":[".*"],"status":"ENABLED","type":"APP_USER","organizationKey":"mycompany","updateId":"222222222222222222","daysSincePasswordChange":0},"permissions":[".*"],"type":"NORMAL"}]
(I have changed data values for confidential reasons)
there is no CDATA tag in this or the actual response in the REST step. - MarcusJ
Staff
Hi,
Open a support ticket at http://www.soapui.org/Support/support-overview.html to have your user credentials updated to be able to post in Pro forum.
The problem is your using JSON data. XPATH is for XML data and not JSON.
That also probably explains why your seeing that CDATA error message (even though a better error message would help). - johntautomationOccasional ContributorSo how do I get my issue fixed. Is there a way to change preference in the soapUI ? Thanks
- johntautomationOccasional Contributoror just specify xpath for json
- johntautomationOccasional ContributorAs you suggested I changing it to ResponseAsXml fixed my issue.
Thanks Marcus for your super prompt support