.net generate proxy classes problem (wsdl/svchost) by soapHeader
Posted
by Oguzhan
on Stack Overflow
See other posts from Stack Overflow
or by Oguzhan
Published on 2010-04-07T08:25:25Z
Indexed on
2010/04/10
22:03 UTC
Read the original article
Hit count: 409
I'm using a web service from .Net C# client application. My web service has a method which return generic list and in my client application I use Configuration Service Reference to change array to generic list.Its working correctly. But when I add a soapHeader to my web service Configuration Service Reference to change array to generic list its not working and return Array instead of generic list.
public class Service1 : System.Web.Services.WebService
{
public Authentication authentication = new Authentication();
[SoapHeader("authentication")]
[WebMethod]
public List<string> HelloWorld()
{
List<string> result = new List<string>();
result.Add("oguzhan");
return result;
}
}
public class Authentication : SoapHeader
{
public string username;
public string password;
}
© Stack Overflow or respective owner