check below code
In web service module
public class CommonDataAccess
{
DataManagerDataContext manager = new DataManagerDataContext();
public List
{
List
select customer).ToList
return consolidatedList;
}
public List
{
return (from a in customerList from b in consolidatedList where a.FirstName == b.Name1 select a).ToList();
}
}
public class SanctionScreening : System.Web.Services.WebService
{
CommonDataAccess commonDAL = new CommonDataAccess();
[WebMethod]
public List
{
return commonDAL.scan(commonDAL.retrieveCustomers(), custlist);
}
}
Web service test Application
private localhost.SanctionScreening proxy = new TestAMLBridge.localhost.SanctionScreening();
DataManagerDataContext manager = new DataManagerDataContext();
protected void Page_Load(object sender, EventArgs e)
{
proxy.getConsolidatedList(customers());
//proxy.getConsolidatedList(customers());
//List
}
private List
{
return (from cus in manager.Customers select cus).ToList();
}
Error Messages
Error 1 The best overloaded method match for 'TestAMLBridge.localhost.SanctionScreening.getConsolidatedList(TestAMLBridge.localhost.Customer[])' has some invalid arguments C:\Users\Lasantha\Documents\Visual Studio 2008\Projects\HelloWorld\TestAMLBridge\TestAMLBridge\Default.aspx.cs 21 13 TestAMLBridge
Error 2 Argument '1': cannot convert from 'System.Collections.Generic.List
Here i'm going to pass customerlist to webservice from my test application. Please guide me solve this problem
thanks
Jignesh TrivediPosted Jan 5, 2012, 3:44 AM
mark your "Customers" class as "Serializable"
[Serializable]
public class customer
{
......
......
......
}
hope this help.
Praneeth KumarPosted Jun 3, 2011, 6:50 AM
VulpesPosted Jun 3, 2011, 6:47 AM
So, I'd try:
Customer[] cust = proxy.getConsolidatedList(customers().ToArray());