Share via


Web Service Providers

In CCF, Web services follow the Provider design pattern. A provider is the implementation of the API, separated from the API itself. For example, the Application Web class has a static method called instance (). You can use the Web Service Providers to extend or overwrite the existing providers code. The Application class itself contains no business logic. Instead, it forwards the call to the configured provider. It is the responsibility of the provider class to contain the implementation for that method, and to call whatever business logic layer (BLL) or data access layer (DAL) is necessary.

For each Web service, the Web method definitions are re-factored into an abstract provider class definition—for example, AgentCredentialsProvider. Current implementations are re-factored into a provider implementation class— for example, EssoAgentCredentialsProvider. The Web services class is the current provider from the Web.config file. The Singleton design pattern is used to ensure that the instantiation of the current provider is thread-safe and efficient. For a sample implementation of the Web Service Provider, see the project Microsoft.Ccf.Csr.WebServices.Customer.Provider in the reference implementation project <InstallDir>\Program Files\Microsoft CCF 2009\Reference Implementations\ AgentDesktop.