After generating an XML Web Service proxy class using wsdl.exe, I added a proxy class to a new VS2005 project to consume my webservice.
I want to call the method ReturnCustomer() whose proxy details are below and assign the array of the object the return value of the function
Service s = new Service();
Customer[] = s.ReturnCustomer; or
object[] = s.ReturnCustomer();
The designtime debugger throws an error for s.ReturnCustomer() saying " No overload for method 'ReturnCustomer' takes '0' arguments"
Help anyone? Thank you. -hazz
************************************************** ************************************************** *****************************
public partial class Service : System.Web.Services.Protocols.SoapHttpClientProtoc ol
public Service()
{
this.Url = "http://localhost:6389/test/Service.asmx";
}
[System.Web.Services.Protocols.SoapDocumentMethodAt tribute("http://tempuri.org/ReturnCustomer", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Lit eral, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.W rapped)]
public object[] ReturnCustomer([System.Xml.Serialization.XmlElementAttribute(Names pace = "")] e e)
{
object[] results = this.Invoke("ReturnCustomer", new object[] {
e});
return ((object[])(results[0]));
}