SoapUI 5.2.1-REST Service's JSON response not displayed in JSON view
Hi,
When I execute REST service in Soap UI 5.2.1 Open source, the respective JSON response is not displayed in JSON view and instead below message is displayed.
"The content you are trying to view cannot be viewed as JSON".
Please suggest me if I have to change SoapUI settings to see JSON response in JOSON view
Please find below other views that I see.
XML View:
<data contentType="text/plain;charset=ISO-8859-1" contentLength="140"><![CDATA[{"status":{"resultCode":0,"developerMessage":"Hint question retrived successfully [Time Taken: 1103 millisec]"},"data":{"hintQuestion":"7"}}]]></data>
HTML View:
{"status":{"resultCode":0,"developerMessage":"Hint question retrived successfully [Time Taken: 1103 millisec]"},"data":{"hintQuestion":"7"}}
Raw view:
HTTP/1.1 200 OK
Date: Mon, 09 Nov 2015 20:57:50 GMT
Content-Type: text/plain;charset=ISO-8859-1
X-Powered-By: Servlet/2.5 JSP/2.1
Set-Cookie: JSESSIONID=RF4JWBHpJvGVGQmnGqDlyTP2121pBQgVpn2sf8PtQJsDBFT5TYMf!1112697720; path=/; HttpOnly
Set-Cookie: sto-id-16671=GCJIKIMAEBBP; Expires=Mon, 09-Nov-2015 21:23:10 GMT; Path=/
Connection: close
Transfer-Encoding: chunked
Set-Cookie: nwp_1-47873-%3FVFSIN_PUB%3Fsg_nhlweb_qa1_8080=BPJGKIMAJABP; Expires=Mon, 09-Nov-2015 21:32:10 GMT; Path=/
{"status":{"resultCode":0,"developerMessage":"Hint question retrived successfully [Time Taken: 1103 millisec]"},"data":{"hintQuestion":"7"}}
Hi Dezza,
You'll need to call the Run Code Snippet operation and specify there the following:
Runner.CallMethod("Unit1.theTest", Runner.CallMethod("Unit1.generateRef"), Runner.CallMethod("Unit1.generateMagicNumber"))
*Unit1 is the name of the unit with your script files.
Not a very elegant way, but it should work, though.