Web Method Returning a complex Custom data type.
-
Hi, I am facing a problem in capturing and retreving data from a webmethod response.I am calling web methods on remote server.So I have included the web reference of the webservice in my Vs2005 solution.But the main problem is the webmethods are returning custom Array datatypes.The coustom data types are the other class types.I am facing problem in accessing the returned data.I think my client side code is creating the main problem.Please find the Below code(Auto generated code).and Please help me. The Defination webmethod which I am calling.which is a part of a class called. public partial class hbcontent : System.Web.Services.Protocols.SoapHttpClientProtocol { -----Many other Parametrs/methods Below one is the sample--- [System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://remote.api", ResponseNamespace="http://remote.api")] [return: System.Xml.Serialization.SoapElementAttribute("getCountryDataReturn")] public Map getCountryData(string key, string language, string country) { object[] results = this.Invoke("getCountryData", new object[] { key, language, country}); return ((Map)(results[0])); } } ----Definition of the other classes :---- [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.2344")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.SoapTypeAttribute(Namespace="http://xml.apache.org/xml-soap")] public partial class Map { private mapItem[] itemField; /// public mapItem[] item { get { return this.itemField; } set { this.itemField = value; } } } /// [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.2344")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.SoapTypeAttribute(Namespace="http://xml.apache.org/xml-soap")] public partial class mapItem { private object keyField; private object valueField; /// [System.Xml.Serialization.SoapElementAttribu