Forum Discussion

joeybear's avatar
joeybear
Contributor
15 years ago

JSON Response not Rendering in XML or Outline

More often than not, my JSON responses are not rendered into XML or Outline for viewing / generating assertions / transferring properties (see below request / response). Why is this? It is important to me, because I need to transfer properties from this response to several later executed test steps after this step. Below is the request / response and several screen captures.

Here's the raw for both request and response:

POST http://mywebservice/auth/login/api?ft=json&username=automation-username&password=automation-password&lang=en HTTP/1.1
Accept-Encoding: gzip,deflate
Accept: application/json
Content-Type: application/x-www-form-urlencoded
User-Agent: Jakarta Commons-HttpClient/3.1
Host: mywebservice
Content-Length: 0



HTTP/1.0 200 OK
Date: Tue, 13 Jul 2010 23:04:46 GMT
Server: Apache/2.2.12 (Ubuntu)
Vary: Accept-Language,Cookie
Content-Language: en
Content-Type: application/json
Set-Cookie: sessionid=5d4a588baaaaf9bb11aa78a04e224a54; expires=Tue, 27-Jul-2010 23:04:46 GMT; Max-Age=1209600; Path=/
Via: 1.0 mywebservice
X-Cache: MISS from myhomemachine.home
X-Cache-Lookup: MISS from myhomemachine.home:3128
Connection: close

{"username": "automation-username", "warning": {"3600": "Could not update user"}, "last_login": "You last logged in on 7/13/10 5:04 PM", "session_id": "5d4a588baaaaf9bb11aa78a04e224a54"}


I am using soapUI-Pro-3.5.1 on Mac OSX 10.6.4 (hence all the tabs' text looking horrible)

Here is the response from the JSON tab:


Here is the response from the Outline tab:


Here is the response from the XML tab:


Thanks in advance!!

4 Replies

  • DDS_Inc__Suppor's avatar
    DDS_Inc__Suppor
    Occasional Contributor
    Does anyone have a response for this issue? I am having this problem myself with a new service being added.
  • DDS_Inc__Suppor's avatar
    DDS_Inc__Suppor
    Occasional Contributor
    Are you using 3.6.2 or 4? If so, see how the global preference "HTTP Settings - Normalize Forward Slashes" option is set. This is a new option and appears to be set by default oppositely (unchecked) of how 3.6.1 works.

    I was having the same problem. I would get JSON messages but they were not converted to XML. Turning the option on seemed to fix it.
  • Hi,

    I have tried the option given above, Still I am unable to get the json response as the XML or outline.
    I'm using SoapUI Pro 4.0.

    Any ideas please ?

    Thanks