This might be very easy, but What I am trying to do here is, I am trying to pass a Customer Object to a Web Service Method. Customer class is on Entity namespace and it is serializable, and I am adding reference to both of my ASP.NET application which calls web service and pass Entity.Customer Object and also in WebService which accepts Enity.Customer Object.
Web Service Method
[WebMethod]
public void AddCustomer(Entity.Customer c)
{}
ASP.NET Applcation
Entity.Customer c = new Entity.Customer;
webservice.AddCustomer(c);
Error
The best overloaded method match for 'TestApplication.localhost.Service1.AddCustomer(TestApplication.localhost.Customer)' has some invalid arguments
I tried changing the web service to accept Object and later cast that object to Customer.Entity, the Application compiles but I was getting XML generation errors.