Unable to return an IList of Authors from a WebService

Discussion in 'ASP .Net Web Services' started by Surya Yadav, Sep 26, 2004.

  1. Surya Yadav

    Surya Yadav Guest

    I have a webservice method that is unable to return an
    IList of authors. Even XmlInclude does
    not seem to work.
    My webservice method calls Author.GetAuthors() to build
    and return an IList of authors.
    The webservice method is defined as:
    [WebMethod]
    public IList GetAllAuthors()
    {
    Author author=new Author();
    return author.GetAuthors();
    }
    The Author class is defined in a separate class library
    called AuthPubsDAL. Author.GetAuthors() is defined as
    public IList GetAuthors()
    {
    ....}
    which accesses the pubs database and builds an arraylist
    of author objects.

    I added [XmlInclude (typeof(Author))] to the webservice
    class, to the Author class and to the WebMethod
    GetAllAuthors() which is part of the webservice class
    with no luck. I am not sure as to what's the proper use
    of XmlInclude and where it should be added. Please help.

    Note: I have already seen the responses to a similar
    subject " still having problem in returning arraylist of
    objects in webservice". None of the suggestions make any
    difference.
    Surya
     
    Surya Yadav, Sep 26, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. frank

    Implement IList Interface

    frank, Jul 11, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    569
    frank
    Jul 11, 2003
  2. DaveF

    Need to pass a method an Ilist

    DaveF, Dec 8, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    323
    Karl Seguin
    Dec 8, 2004
  3. Flip
    Replies:
    1
    Views:
    474
    Brock Allen
    Mar 28, 2005
  4. =?Utf-8?B?Tmljaw==?=
    Replies:
    6
    Views:
    25,042
    =?Utf-8?B?Tmljaw==?=
    Jul 19, 2006
  5. bruce barker
    Replies:
    1
    Views:
    448
    =?Utf-8?B?VFo=?=
    Dec 19, 2006
Loading...

Share This Page