We are building a new experience for our SmartBear Community.
This site is now read-only. You can still browse and search as usual. Learn More
This site is now read-only. You can still browse and search as usual. Learn More
Hi,
I am using the GOOGLE API to learn about SOAP UI.
https://www.soapui.org/tutorials/google-maps.html
When I imported the project and run the sample request, I dont see an xml response. Instead I see the response in text as "The content you are trying to view cannot be viewed as xml". Note that I see a json response.
Where am I going wrong? How to get the xml response correctly?
The api support both xml / json formats.
User needs to provide it thru query parameter.
In the resource, define a parameter format of TEMPLATE type.
In the requests, provide the value for format.
Please see the attachment for details.
Hope this is clear.
The api support both xml / json formats.
User needs to provide it thru query parameter.
In the resource, define a parameter format of TEMPLATE type.
In the requests, provide the value for format.
Please see the attachment for details.
Hope this is clear.
These view options are just for the sake of pretty-printing the response to you (as the SoapUI user). Meaning it just applies colors, and alignment etc to make it easy to read. But it is not actually converting anything. And since the content is not XML, SoapUI won't try to pretty-print it as if it were.
It is possible to convert the response to XML using Groovy. Here's one way to do it:
Add an Assertion to the Test Request. Choose Script Assertion as the assertion type, and enter:
log.info messageExchange.responseContentAsXml
Then press the green Play button. The converted response will appear in the Script Log (at the bottom of your SoapUI workspace).