Forum Discussion
SmartBear_Suppo
11 years agoSmartBear Alumni (Retired)
Hi,
The problem is converting the numbers for the JSON object names "1","2", "3", "4","6", and "-1" to XML. Element names can not be numbers in XML. That will result in the error you are seeing. As a workaround you can change the object names before they are converted with the event handler RequestFilter.afterRequest and code below.
http://www.soapui.org/Scripting-Propert ... dlers.html
Development is aware of the issues with converting XML to JSON and these should be addressed in future releases of SoapUI Pro.
Regards,
Marcus
SmartBear Support
The problem is converting the numbers for the JSON object names "1","2", "3", "4","6", and "-1" to XML. Element names can not be numbers in XML. That will result in the error you are seeing. As a workaround you can change the object names before they are converted with the event handler RequestFilter.afterRequest and code below.
context.httpResponse.responseContent = context.httpResponse.responseContent.replace("\"1\"","\"a\"")
context.httpResponse.responseContent = context.httpResponse.responseContent.replace("\"2\"","\"b\"")
context.httpResponse.responseContent = context.httpResponse.responseContent.replace("\"3\"","\"c\"")
context.httpResponse.responseContent = context.httpResponse.responseContent.replace("\"4\"","\"d\"")
context.httpResponse.responseContent = context.httpResponse.responseContent.replace("\"6\"","\"e\"")
context.httpResponse.responseContent = context.httpResponse.responseContent.replace("\"-1\"","\"f\"")
log.info context.httpResponse.responseContent
http://www.soapui.org/Scripting-Propert ... dlers.html
Development is aware of the issues with converting XML to JSON and these should be addressed in future releases of SoapUI Pro.
Regards,
Marcus
SmartBear Support
Related Content
- 5 years ago
- 2 years ago
- 11 years ago
- 4 years ago
Recent Discussions
- 17 hours ago
- 17 days ago