Forum Discussion

Clear_Capital__'s avatar
Clear_Capital__
Contributor
11 years ago

REST "Response" contains xml value instead of JSON

Hi,

My JsonSlurper Assertion teststep for a REST response is failing with following error

“FAILED: Lexing failed on line: 1, column: 1, while reading ‘<‘ , no possible json value or punctuation could be recognized.

My guess is its because the Response contains xml instead of JSON. As you can see the enclosed screen shot, both ResponseAsXML and Response has xml value. I know my REST service returns the JSON, so not sure if SoapUI is turning that in to xml ? Any settings in SoapUI I can use to change it to JSON ?

Thanks

Jignesh

4 Replies

  • Temil,

    I am not sure if have made the issue clear to you. This is not a google geocode service. Not all the service will take that option in the resource part. Service I am trying to test always returns json. I believe soapUI is converting that Response in to xml instead.
    Please suggest any other solution.

    Thanks
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi Jignesh,

    I believe you may have been bitten by a bug that was reported recently, where JSON is sometimes converted to XML when the Form view is loaded.

    The fix for this bug has been included in the so called maintenance build, which is available for download on this page:

    http://www.soapui.org/Downloads/soapui- ... uilds.html

    Could you try it out and see if it solves your problem?

    Kind regards,
    Manne, SoapUI developer