This guide intend to show how to set up the Camelot WCF Service for SharePoint.
- An IIS Server
- Microsoft SharePoint 2007/2010 (WSS or Server versions)
- A valid license of Camelot .NET Connector installed on the same server that will be running the Camelot WCF Service
- The Camelot.SharePointIntegration.dll library
About Camelot WCF Service and WCF in general
Windows Communication Foundation (WCF) is a framework for building service-oriented applications. Using WCF, you can send data as asynchronous messages from one service endpoint to another. A service endpoint can be part of a continuously available service hosted by IIS, or it can be a service hosted in an application. Any SOAP compatible client can make use of the WCF service, the PHP SoapClient for example, on which the Camelot PHP Tools integration towards the Camelot WCF Service is built. Further on an endpoint can be a client of a service that requests data from a service endpoint. The messages can be as simple as a single character or word sent as XML, or as complex as a stream of binary data.
The Camelot WCF Service make use of of the Camelot .NET Connector when communicating with SharePoint.
Begin by downloading the Deployment Package at http://www.bendsoft.com/downloads/camelot-wcf-service/
Add a new web site in the IIS Management console
This step is optional, you can use an existing site as well
Deploy the package
- Right click on your web site and select Deploy > Import Application
- Make sure that all select boxes are checked in the “Select the Contents of the Package” dialog
- Enter Application Package Information
It is very important that the Connection String is correct, you can read more about the connection string properties in the Camelot .NET Connector for SharePoint documentation.
Mine is as follows
The database we select here represents the SharePoint Site you want to connect to. You are able to edit this in the web.config file and add more connection strings.
Open the web.config and look for<appSettings>, set the SHARED_KEY value to your preferred value
<appSettings> <add key="SHARED_KEY" value="MySharedKey" /> </appSettings>
This is where you will be able to edit your connection strings, or add new ones if needed
<connectionStrings> <add name="sharepoint_sales" connectionString="Server=dev1.spfarm.bendsoft.com; Database=sales;User=sharepointdemo;Password=demopassword;Authentication=Ntlm;TimeOut=60;" /> <add name="sharepoint_transport" connectionString="Server=dev1.spfarm.bendsoft.com; Database=transport;User=sharepointdemo;Password=demopassword;Authentication=Ntlm;TimeOut=60;" /> <add name="sharepoint_customers" connectionString="Server=dev1.spfarm.bendsoft.com; Database=customers;User=sharepointdemo;Password=demopassword;Authentication=Ntlm;TimeOut=60;" /> </connectionStrings>
Thats it, you are done
As seen on the image there is a new wcf application installed in your web site. To connect to it simply type http://yourserverurl.com/wcf/Camelot.svc and something like this should show up
When clicking the link displayed, or by adding ?wsdl at the end of the url a blank page will be displayed. This is a correct behavior, what you should do is check whats under the surface. Right click and view the source
In the XML displayed above we can actually see the methods enclosed within the wcf service.
Using the WcfTestClient
If you are a developer you might have the WcfTestClient.exe installed, check the folder “C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\”.
The WcfTestClient is a simple suite to check if WCF services really is up and running
The WCF service will install and run without the Camelot.SharepointIntegration library, it’s not until you try to fetch data from SharePoint stuff will break. Follow the installation instructions, if you’re not able to deploy it to the GAC or for some reason dont want to you can simply drop the dll file in the bin folder in your svc service.
Get started today. Download the Camelot WCF Service, it’s free!