Have a problem with a clients who is using .NET to access our rest service. A simple url query returns XML, but using .NET we keep getting JSON returned. I was wondering if anyone has seen this? Its bringing our work to a bit of a halt.
Here is their code. I have asked for the response data, but have not received yet. "test_cases" is the actual get request. The last two strings are part of the query. The addition of the request type has been added for testing and does not work, with or without. I am not a .NET person, so am at a bit of pickle here.
[code] string myurl = "https://url.com/servoy-service/rest_ws/solution/test_cases/MilwaukeeXXX/5966598";
WebRequest myrequest = WebRequest.Create(myurl);
myrequest.ContentType = "application/xml";
WebResponse myresponse = myrequest.GetResponse();
Stream objstream;
StreamReader objReader;
objstream = myresponse.GetResponseStream();
objReader = new StreamReader(objstream);
String results = objReader.ReadToEnd();
[/code]
Thanks for any help.
A little more detail. The request seems to be returning this to .NET. This is not what I return from Servoy, what I get when Browser query or
{\"request\":{\"cases\":{\"id\":\"1102232\",\"client_id\":\"5966598\",\"testsets\":{\"docket_number\":\"12PA000184\",\"date_reported\":\"03/13/2012\",\"parties\":{\"party\":[{\"testrole\":\"Mother\",\"id\":\"1102232-10\",\"lastname\":\"Amador*\",\"firstname\":\"Yesenia\"},{\"testrole\":\"Child\",\"id\":\"1102232-20\",\"lastname\":\"Garcia\",\"firstname\":\"Juan\"},{\"testrole\":\"Alleged Father\",\"id\":\"1102232-30\",\"lastname\":\"Olmedo\",\"firstname\":\"Juan\"}]},\"testid\":46638,\"client_id\":\"5966598\",\"percent_probability\":\"99.99999997%\",\"report_file_ext\":\"<link rel=\\\"self\\\" href=\\\"http://url.com/servoy-service/rest_ws/ddc_rest/files/doc/Milwaukeexxxx/495813.pdf/>\",\"report_file_flag\":\"true\"}},\"success\":\"1\"}}