SharePoint Developer Center >
SharePoint Products and Technologies Forums
>
SharePoint - Development and Programming
>
Call lists webservice from console application
Call lists webservice from console application
- Hi people!
I'm programming a console app that gets information of Lists' Sharepoint web service, using Visual Studio. I programmed this communication in a ASP.net webapp that accessed to this webservice. No problem.
But now, I try to call Lists webservice from a console app. When I try to add the web refference I only can choose "add service reference". When I add it, I cannot use a lot of classes such Lists class. I'm getting problems working with listssoapclient class so I want to use Lists.
Does anybody know how to add a web reference from a console application???
Thank you in advanced
Answers
- You can add a web reference by clicking on "Add Service Reference" and then clicking on the "Advanced" button. From this dialog click on the "Add Web Reference" button.
certdev.com- Marked As Answer byMike Walsh MVPMVP, ModeratorTuesday, June 16, 2009 5:53 PM
- Proposed As Answer bydaniel.larsonMVPTuesday, June 16, 2009 5:29 PM
All Replies
- please download the console app from this article and you can compare how it is using the reference to lists.asmx.
http://www.codeproject.com/KB/sharepoint/SharePointListsWebService.aspx
Moonis Tahir MCSD.net, MCTS Sharepoint 07 (Dev & Config), MCTS BizTalk 06, MCTS SQL 2005. - You can add a web reference by clicking on "Add Service Reference" and then clicking on the "Advanced" button. From this dialog click on the "Add Web Reference" button.
certdev.com- Marked As Answer byMike Walsh MVPMVP, ModeratorTuesday, June 16, 2009 5:53 PM
- Proposed As Answer bydaniel.larsonMVPTuesday, June 16, 2009 5:29 PM
- 3.5 apps use WCF web service technology. If you configure your console app as a 2.0 framework app, you can add a reference using ASMX web service technology (without WCF). (You can always add the web reference as a 2.0 app, and then switch to 3.5 framework if you want. ) So-- "add service reference" is DIFFERENT TECHNOLOGY than "add web service reference" in a 2.0 app. You MAY have better luck using ASMX web service proxies. NOT a recommendation, JUST something you should try out to see if you have better luck.
Daniel Larson, SharePoint MVP, MS Press Author, NewsGator Software Developer Check out my books on Amazon: - Inside Microsoft Windows SharePoint Services 3.0 (with Ted Pattson) - Developing Service Oriented AJAX Applications on the Microsoft Platform (.NET 3.5, WCF, Microsoft AJAX) - SWEET!!! Steve, I didn't know about that!!! That makes compatibility a lot easier. LOL, it's amazing the things that I DON'T know sometimes! :)
Daniel Larson, SharePoint MVP, MS Press Author, NewsGator Software Developer Check out my books on Amazon: - Inside Microsoft Windows SharePoint Services 3.0 (with Ted Pattson) - Developing Service Oriented AJAX Applications on the Microsoft Platform (.NET 3.5, WCF, Microsoft AJAX) - Absolutely true! Thank you so much people!


