Yesterday, I had a customer that queried me about using the SharePoint API from a non-SharePoint machine. A fairly legitimate question. From the developer's perspective, SharePoint contains many capabilities and libraries that could be used in applications outside the SharePoint world. In our scenario, the customer created a Silverlight application on a different web server and wanted to retrieve personal user data stored in one of the HR MOSS Lists.
The solution in this case is very straight forward: SOA. Instead of copying DLL's like crazy (won't work by the way), you should definitely consider SharePoint's Web Services.
Remember: when we want to perform remote operations on your MOSS Farm or retrieve any information from it, this should probably be our first choice. Obviously, we can create our own web services and deploy it to the SharePoint server but in most cases, there will be no need for this. SharePoint provides more than 10 Out-Of-the-Box web services that are used to accomplish various requirements and data retrieval without any additional coding necessary.
I'm not talking about the famous ones (Search anyone?). I'd rather write about the least common ones. The following list is of my favorite hidden OOTB Web Services of MOSS with a small explanation about their functionalities:
- http://server:AdminPort/_vti_adm/Admin.asmx – Administrative methods such as creating and deleting sites
- http://server/_vti_bin/Alerts.asmx – Methods for working with alerts
- http://server/_vti_bin/DspSts.asmx – Methods for retrieving schemas and data
- http://server/_vti_bin/DWS.asmx – Methods for working with Document Workspaces
- http://server/_vti_bin/Forms.asmx – Methods for working with user interface forms
- http://server/_vti_bin/Imaging.asmx – Methods for working with picture libraries
- http://server/_vti_bin/Lists.asmx – Methods for working with lists
- http://server/_vti_bin/Meetings.asmx – Methods for working with Meeting Workspaces
- http://server/_vti_bin/Permissions.asmx – Methods for working with SharePoint Services security
- http://server/_vti_bin/SiteData.asmx – Methods used by Windows SharePoint Portal Server
- http://server/_vti_bin/Sites.asmx – Contains a single method to retrieve site templates
- http://server/_vti_bin/UserGroup.asmx – Methods for working with users and groups
- http://server/_vti_bin/versions.asmx – Methods for working with file versions
- http://server/_vti_bin/Views.asmx – Methods for working with views of lists
- http://server/_vti_bin/WebPartPages.asmx – Methods for working with Web Parts
- http://server/_vti_bin/Webs.asmx – Methods for working with sites and sub sites
Those are some powerful web services. Keep them in mind. It could provide a very elegant way to code against SharePoint from a non-SharePoint machine and for a non-SharePoint application.