ViagraClasics
New Member
This problem a little bit more complicated than just calling a web method from the Js.Here's the code I got on the ASP.Net side:\[code\][WebService(Namespace = "http://tempuri.org/")][WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)][ScriptService]public class WebService : System.Web.Services.WebService{ [WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Xml)] public KError GetAppServer(int version, ref KServerInfo serv, ref KUserMessage msg) { ...... }}\[/code\]Where \[code\]KError\[/code\], \[code\]KServerInfo\[/code\] and \[code\]KUserMessage\[/code\] are simple serializable classes with only strings and ints in it.When this service is used in .Net environment, there's no problems passing references to the complex types, but it doesn't work from the Js.I've tried a lot of options (google doesn't really help on this matter) passing references to the serv and msg, but service keeps replying with 500 - Internal server error. Error description says that ASP.Net is failing to instantiate serv and msg from json data.