calling webservice in console app error
I created webservice with one webmothod like below
namespace X.Y.Z
{
[WebMethod]
public bool doCreate(Myobj amyobj)
{
return(amyobj.Create());
}
}
here Myobj is a class existing in one of my class Library
when i call this from ASP.NET client (means Webform1.aspx) its working fine.
but when i try to call the Webservice from my console aplication i am getting error
I created web reference in my console application.and calling webservice like below
here my class also belongs to namespace X.Y.Z
localhost.DBWebService aDBWebService=new localhost.DBWebService ();
'here localhost is name of web reference and DBWebService is name of my webservice.
return(aDBWebService.doCreate(amyobj));
above line i am getting problem
its expecting the parameter X.Y.Z.localhost.Myobj INSTEADOF X.Y.Z.Myobj for my doCreate method.
pl advice me where is the problem.
|