Home > work > Creating Sharepoint web services

Creating Sharepoint web services

From a colleague

When generating classic .ASMX web services that are supposed to be context aware, i.e. the SPContext objects provides references to the correct SPSite and SPWeb object a wsdl.aspx and disco.aspx file is required.

This can be generated using a disco.exe utility as outlined in the following article:

http://msdn.microsoft.com/en-us/library/ms464040(v=office.14).aspx

This works the same way for SharePoint 2007 (article is for SP 2010).

For SharePoint 2007 a Codeplex Utility (SPDev | http://spdev.codeplex.com/ ) simplifies this process but that appears to not be compatible with SharePoint 2010.
In that case simply adding the web service assembly to the GAC (if CAS is not used) and running SPDev –o GenWS –URL http://localhost –asmx will result in the two files being created automatically.

Please note: In the above – localhost might require to be replaced with the hostname / host header – depending on how SharePoint has been setup with. The command will need to be run on the SharePoint server.

 

Here is another nice article on how to improve the above within visual studio

http://www.sharepoint-tips.com/2007/08/web-services-on-sharepoint-making-f5.html

Advertisements
Categories: work Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: