I'm using asmx web service (ASP.NET) to save data.
In Options I use 'saveURL':
saveURL : 'http://localhost/SampleWS/SampleService.asmx/SaveNewSample'My Web Service can read all the sent data OK, but return json object automatically wrapped in xml by webservie.
Sample of return from web service:
<?xml version="1.0" encoding="utf-8" ?>
<string xmlns="http://www.mycompany/CAP/sampling/">{success : true,exception:''}</string> You can see
my problem here, the Json string is wrapped in Xml and using this web service in 'out of the box' way is not going to work.
1. Is there a way to modify recieved Response from WebService to extract proper json string? May be by using one of the Grid events that happens after Response came back.
I thought maybe 'saveResponseHandler' event will be usefull. But in it I need a way to modify Response object.
2. Is there a way to send a Save message using custom code? I can make my own ajax call and get proper response (converted to json). I just want to know how to plug this response back to Grid for proper work.
3. Any other suggestions?
Thanks,
OKL