Contributions
Re: On property transfer, getting invalid JSON although is valid & response is printed in the JSON tab
Hi Rao, I have checked with the developer and the APIs are being widely used by various applications with the empty line at the top for a number of releases now and no other delivery teamshave reported this issue. So Ibelieve, using other frameworks this is not an issue otherwise would have been flagged high time. Therefore convincing and getting this changed from dev will not be possible. In Soap UI also, the proper JSON is picked up and shown on JSON tab of response but unfortunately cannot be processed on property transfer. I think SOAP UI uses raw response for property transfer rather than JSON which is picked up. I have even tried script assertion and that also throws the same error. I will be surprised if we dont have a solution for this in SOAP UI and had to unfortunately move to other tool for this automation. :( Regards, Piyu3.5KViews0likes1CommentRe: On property transfer, getting invalid JSON although is valid & response is printed in the JSON tab
Hi Rao, In the application I am going to automate will contain the collection json as the content type. Also if you notice in the screenshot the JSON is picked up properly and shown under JSON tab, so the response is processed properly. In the JSON response i have attached, there is an empty line at the top. If Iremove that, it all works properly with the same content type and does not throw an error on property transfer. There should be an option in SOAP UI to process the response by stripping the empty spaces before and after the JSON as it can be done withthe request. It should not restrict the downstream components for the empty spaces. Could you please check this? Thanks, Piyu3.5KViews0likes3CommentsOn property transfer, getting invalid JSON although is valid & response is printed in the JSON tab
Hi , I have posted this issue earlier as well but did not get a solution to this problem. Hencereposting the same. I have created a sample project for the error. On hitting the request, i am able to see the JSON Response getting printed on the JSON tab. But when i am trying to extract a property, SOAP UI is throwing an error. I have attached screenshots of both the steps here. I have tried using groovy script as it was suggested on my earlier post but no luck. PFA the sample project with the JSON response as well. It looks like a bug to me but ifsomeone could pleasehelp, that would be really helpful. Regards, Piyu3.5KViews0likes5CommentsRe: SOAP UI 5.2 is throwing JSON invalid error while property transfer although JSON is valid
Hi Rao, I have already followed your suggestions of using script assertion but that does not work either. I think someone from SoapUI development team should look into this issue and fix it. Thanks, Piyu3.2KViews0likes1CommentRe: SOAP UI 5.2 is throwing JSON invalid error while property transfer although JSON is valid
Hi Rao, Its not an invalid response. SOAP UI is able to process the response. Since itis able to parse and show the responsein JSON view, it proves thatresponse is valid. Its throwing an error only when trying to do a property transfer directly or via a groovy code. I have attached a simple json file which you can call from a sample project and try to extract a value using property transfer. It will show the JSON response in the view but property transfer will fail.So this definitely looks like a bug which needs to be fixed. If it was a problem with the response, then SOAP UI should not have picked up JSON in first place and display in JSON tab of response. Could you please check again? Regards, Piyu3.3KViews0likes3CommentsRe: SOAP UI 5.2 is throwing JSON invalid error while property transfer although JSON is valid
Hi Tanya, Finally after a good number of hours, I came to know the root cause of this issue. The response JSON contains a empty line at the top which SOAP UI is not able to process. Although the JSON view of Response in the Test Step shows a valid JSON but when performing a property transfer, it looks like it is picking up from raw response which has an empty line at the top. My dev team is not going to definitely fix this in a shorter term as the ourAPIs are used by other applicationsand no one complained about it. Is there a way in SOAP UI to get around it? I have replicated this issue with a sample project. Do you still need it or the details are sufficient to replicate this? Thanks, Piyu3.3KViews0likes0CommentsRe: SOAP UI 5.2 is throwing JSON invalid error while property transfer although JSON is valid
Hi Rao, Sorry I could not reply earlier.I have looked at your answer and i tried it using groovy but it still says invalid JSON. I was completely lost after and tried various permutations. After banging my head for a good number of hours, finally I came to know the root cause of this silly issue. The response JSON contains a empty line at the top which SOAP UI is not able to process. Although the JSON view of Response in the Test Step shows a valid JSON but when performing a property transfer, it looks like it is picking up from raw response which has an empty line at the top. My dev team is not going to definitely fix this in a shorter term as the ourAPIs are used by other applicationsand no one complained about it. Is there a way in SOAP UI to get around it? Thanks, Piyu3.3KViews0likes5CommentsSOAP 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 anyoneplease help? I have attached onlythestructure of my JSON response and have removed the values. ThanksSolved12KViews0likes16Comments