SOAP UI 5.2 is throwing JSON invalid error while property transfer although JSON is valid
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
SOAP UI 5.2 is throwing JSON invalid error while property transfer although JSON is valid
Hi,
I am getting proper collection JSON response as part of Rest API call. I have validated it using jsonlint.com. But when i am performing a property transfer from Response to next request, SOAP UI 5.2 gives me invalid JSON.
Could anyone please help? I have attached only the structure of my JSON response and have removed the values.
Thanks
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Piyu_sarda,
If you provided us with a sample project where this issue is reproduced, I would pass it to our Dev Team so that they could investigate this.
Tanya Yatskovskaya
SmartBear Community and Education Manager
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be you can use script assertion to see if that works as posted in
You may need, additionall statement, to set the test case property in order to be able to use the retrieved value from the response to other steps
If you look at the above thread value retrieved is in expectedValue variable.
The same value is need another (from your description as you are doing property transfer), add below line of code at the end:
context.testCase.setPropertyValue('PROPERTY_NAME', expectedValue)
and use property expansion in the later steps as ${#TestCase#PROPERTY_NAME}
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ,
I should be able to extract any value. For now you can look into href element under collection.
Thanks
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you looked into the sample provided
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have same problem getting properties from JSON with SoapUI 5.2.0. This is my response object
{
"code": 0,
"message": "OK",
"sessionId": "3122d0bd-9f21-400a-b95d-87217adeab02"
}
When try to get one of them from property tranfer (Property: ResponseAsXml; Path language: JSONPath) I have error:
Mon Sep 21 13:42:34 CEST 2015 sessionID [Invalid JSON: <Response xmlns="http://localhost/...">
<code>0</code>
<message>OK</message>
<sessionId>3122d0bd-9f21-400a-b95d-87217adeab02</sessionId>
</Response>]
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Regards,
Rao.
