Hi,
I'm trying to consume an ASP.NET web service, using jQuery's Ajax methods. I want the return type of the web service method to be JSON-formatted data, and I'm marking the method with these attributes:
[WebMethod(EnableSession = true)]
[ScriptMethod(UseHttpGet = false, ResponseFormat = ResponseFormat.Json)]
public MyObject[] GetMyObjects(int pageIndex) {/*...*/}
I want to also return from the method some sort of value that would indicate whether the session has expired, either in the SOAP headers an output parameter. How would I do this with jQuery syntax? Should I wrap my MyObject[]
array in a serializable ResponseType object that contains a SessionValid property and the payload? Or is it possible to use SOAP headers and output parameters with jQuery?
Thanks.