Monday, February 12, 2007

How to consume a Share Point web service in ASP.Net web ?

It is always an appreciable effort if we consume an existing system as primary reference instead of storing same data here and there

Follow the steps below:

1. Add web reference in the IDE with URL of SPS site
2. Create a proxy class with WSDL.exe utility (available in the VS.Net Tools menu)
Go to command prompt and type as below
wsdl /out: c:\ProxyClass.cs http://server:90/_vti_bin/lists.asmx
Find more options of wsdl here
3. Consume the webservice via proxy class (shouled be added to the project)
4. Now you should get all the published methods in web service via proxy class


No comments: