Unable to return an IList of Authors from a WebService

S

Surya Yadav

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top