Duplicate type

M

Michael Holdgaard

Hi

I've a problem with a type, which is shown twice in the WSDL-file, when
I run my WebService. To simplify things, I have defined the following
type in a C#-unit:

public class User
{
...
}

public class UserList : IEnumerable
{
private ArrayList myuserlist;

...
}

and I have the following webmethods:

[WebMethod()]
[return:XmlArray()]
[return:XmlArrayItem(typeof(User))]
public UserList GetCurrentCourses()
{
...
return userlist;
}

[WebMethod]
[return:XmlElement(typeof(User))]
public User GetUser(string transactionToken, string userid)
{
...
return user;
}

The Userlist contains a list of users, obviously, by in the WSDL-file
User is defined twice. Anyone knows how to fix this problem?

/Michael
 

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

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,273
Latest member
DamonShoem

Latest Threads

Top