Alternativly, if you are trying to use the SPOM to get a list, try doing it this way:
using(SPSite spSite = new SPSite(SPContext.Current.Web.Url)) //get site instance
{
using(SPWeb spWeb = spSite.OpenWeb()) //get web instance
{
SPList spList = spWeb.Lists["YourListName"]; //get List
SPListItemCollection collection = spList.GetItems(); //get List Items
foreach(SPListItem item in collection) //loop through List Items
{
var title = item["Title"].ToString();//get a List Item title
}
}
}
List.List()
is not part of the SharePoint Object Model or the .NET Framework for that matter. If you are using a custom webservice, than you need to install that webservice. Why would you want to use a webservice when you have SPOM and CSOM to get your lists and list data?