- Create Custom Service Application in SharePoint 2010 – Part 1
- Create Custom Service Application in SharePoint 2010 – Part 2
- Create Custom Service Application in SharePoint 2010 – Part 3
Create Service Application - Introduction
Next we will create a number of classes for the Hello service application. Each of these classes represents a key component for a service application, such as:
- Service Proxy
- Service Application
- Service Application Proxy
- Service Instance
Create a new class in the root folder of the project and call it “HelloServiceInstance.cs”. The following shows the code for the HelloServiceInstance class.
Next create a new class called HelloServiceApplication.cs. This class will implements IHelloService and contains the actual implementation of our Hello method.
Service Application Proxy
Next create a new class called HelloServiceApplicationProxy.cs:
Next create a new class called HelloService.cs and have the following code:
Lastly create a new class called "HelloServiceProxy.cs”. Note that it has a SupportedServiceApplication decorative and it is referencing the HelloServiceApplicationProxy by its Guid.
And we have completed our custom Hello service application implementation. But we are not there yet. We will need to create administration pages for service creation and management. And we also need to register the service application to the farm so that we can create an instance of it. More to come next.