I'm trying to access Sharepoint 2010's Lists.asmx web service. I've created new console project in C#, added reference to a web service (http://[SITE]/_Vti_Bin/Lists.asmx) and it found the Lists web service all right. However, when I try to do
ListsService.Lists objLists = new ...
It says that Lists does not exist! In object viewer, I see all sorts of things in the ListsService namespace:
AddAttachmentRequest
AddAttachmentRequestBody
....
but I don't see Lists. However, every example I found online says that after I add a reference, I should have Lists in the namespace...
What am I doing wrong?
EDIT: app.config
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="ListsSoap" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://SITE/_Vti_Bin/Lists.asmx"
binding="basicHttpBinding" bindingConfiguration="ListsSoap"
contract="ListsService.ListsSoap" name="ListsSoap" />
</client>
</system.serviceModel>
</configuration>