RPfrimmer
12 years agoOccasional Contributor
JSON response msgs not converted to XML
Please forgive me but I'm new to working with JSON and REST web services.
I am currently running into an issue with one of the new web services we are developing. For some reason the JSON response received cannot be rendered as XML or in the Outline view in SoapUI.
I have checked this in both SoapUI Pro 4.6.4 as well as 5.0.0-beta. Other web services seem to be fine it is just this one service. I've tried taking the JSON content returned in the response and running it through a couple JSON validators to make sure that the content is well formed and it passed validation in each one I tried.
I have noticed on the forums that others have run into similar issues on occasion, and in some of the examples the response was not valid JSON and in others it was. I saw someone post a work around with the 'Replace Duplicate forward Slashes' option in the HTTP Settings, but when I try this it doesn't change how this behaves for me.
If I can't reliably access the XML or Outline views of the responses, it will create a significant challenge performing and maintaining the assertions against the response in my test cases.
Any assistance from the community would be greatly appreciated.
Below is a sample of the response i'm working with.
I am currently running into an issue with one of the new web services we are developing. For some reason the JSON response received cannot be rendered as XML or in the Outline view in SoapUI.
I have checked this in both SoapUI Pro 4.6.4 as well as 5.0.0-beta. Other web services seem to be fine it is just this one service. I've tried taking the JSON content returned in the response and running it through a couple JSON validators to make sure that the content is well formed and it passed validation in each one I tried.
I have noticed on the forums that others have run into similar issues on occasion, and in some of the examples the response was not valid JSON and in others it was. I saw someone post a work around with the 'Replace Duplicate forward Slashes' option in the HTTP Settings, but when I try this it doesn't change how this behaves for me.
If I can't reliably access the XML or Outline views of the responses, it will create a significant challenge performing and maintaining the assertions against the response in my test cases.
Any assistance from the community would be greatly appreciated.
Below is a sample of the response i'm working with.
{"GuestBookings": {"Folio": [
{
"$": {"app": "Hotel"},
"AppFolioId": ["5"],
"Location": [""],
"Customer": [ {
"CustomerId": ["115389"],
"Salutation": ["Mr."],
"FirstName": ["John"],
"LastName": ["Smith"]
}],
"ArrivalDate": ["2014-05-05000000"],
"DepartureDate": ["2014-05-09000000"],
"NumAdults": ["2"],
"NumYouth": ["2"],
"NumChildren": ["2"],
"TotalGuests": ["6"],
"RoomNumber": [""],
"RoomType": ["English - Room Type Desc"],
"RateType": ["English - Rate Name Field"],
"RateDescription": ["English - Rate Desc Field"],
"NetAmount": [" 1400.00"],
"GrossAmount": [" 1803.24"]
},
{
"$": {"app": "Golf"},
"AppFolioId": ["43723"],
"Location": ["Golf - 999"],
"Customer": [ {
"CustomerId": ["115389"],
"Salutation": ["Mr."],
"FirstName": ["John"],
"LastName": ["Smith"]
}],
"StartDate": ["2014-05-05095000"],
"FinishDate": [""],
"Details": ["Links"],
"NetAmount": [" .00"],
"GrossAmount": [""]
},
{
"$": {"app": "Golf"},
"AppFolioId": ["43723"],
"Location": ["Golf - 999"],
"Customer": [ {
"CustomerId": ["115389"],
"Salutation": ["Mr."],
"FirstName": ["John"],
"LastName": ["Smith"]
}],
"StartDate": ["2014-05-05095000"],
"FinishDate": [""],
"Details": ["Links"],
"NetAmount": [" .00"],
"GrossAmount": [""]
},
{
"$": {"app": "Golf"},
"AppFolioId": ["43725"],
"Location": ["Golf - 999"],
"Customer": [ {
"CustomerId": ["115389"],
"Salutation": ["Mr."],
"FirstName": ["John"],
"LastName": ["Smith"]
}],
"StartDate": ["2014-05-05131000"],
"FinishDate": [""],
"Details": ["Links"],
"NetAmount": [" .00"],
"GrossAmount": [""]
},
{
"$": {"app": "Golf"},
"AppFolioId": ["43725"],
"Location": ["Golf - 999"],
"Customer": [ {
"CustomerId": ["115389"],
"Salutation": ["Mr."],
"FirstName": ["John"],
"LastName": ["Smith"]
}],
"StartDate": ["2014-05-05131000"],
"FinishDate": [""],
"Details": ["Links"],
"NetAmount": [" .00"],
"GrossAmount": [""]
},
{
"$": {"app": "Golf"},
"AppFolioId": ["43725"],
"Location": ["Golf - 999"],
"Customer": [ {
"CustomerId": ["115389"],
"Salutation": ["Mr."],
"FirstName": ["John"],
"LastName": ["Smith"]
}],
"StartDate": ["2014-05-05131000"],
"FinishDate": [""],
"Details": ["Links"],
"NetAmount": [" .00"],
"GrossAmount": [""]
},
{
"$": {"app": "Golf"},
"AppFolioId": ["43725"],
"Location": ["Golf - 999"],
"Customer": [ {
"CustomerId": ["115389"],
"Salutation": ["Mr."],
"FirstName": ["John"],
"LastName": ["Smith"]
}],
"StartDate": ["2014-05-05131000"],
"FinishDate": [""],
"Details": ["Links"],
"NetAmount": [" .00"],
"GrossAmount": [""]
}
]}}