Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. Web Method Returning a complex Custom data type.

Web Method Returning a complex Custom data type.

Scheduled Pinned Locked Moved XML / XSL
xmljsonhelpapachewcf
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nagankota
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups