Building a DCS Stub

A DCS Stub project lets you separate the design of operations for a service from the implementation of those operations. You add operations to a stub in the same way as you add operations to the BLSpecific or BLCategory projects, but the wizard does not create the workflow or envelope class. (The workflow and envelope classes are specific to the task implementation.) You continue adding operations to the project until you have defined all of the operations that you require, and then build and deploy the service instance. At this point, one developer can begin writing the client application that will invoke the operations while another can write the code that implements the functionality for the operations.

To create a stub project

  1. In your DCS solution, right-click the Stub folder, point to Add, and then click Stub.
  2. In the Add New Project dialog box, select the Stub template, provide a name and location for the project, and then click OK.
  3. In the Create New Stub Project dialog box, provide a namespace and service name for the stub service implementation, and then click Finish.

After you create a stub project, you can add operations to the project to build your service operation contract.

To add an operation to the project

  1. Right-click the project node, and then click one of the new operation options:

    • Add New Operation Request/Response
    • Add New Operation OneWay
    • Add New Operation from WF Assembly
  2. In the Add New Operation Request/Response, Add New Operation OneWay, or Add New Operation from WF Assembly dialog box, on the OperationConfiguration page, provide a name for the operation, and then click Next.

  3. If you are adding a new request/response or oneway operation:

    1. On the Messages Selector page, define the message types to use for the operation, and then click Next.
    2. On the Messages Assemblies References page, verify that the correct references are to be included, and then click Finish.
  4. If you are adding a new operation from a WF assembly:

    1. On the Assembly or Project page, specify the assembly or project that contains the workflow.
    2. Select the workflow in the specified assembly, and then click Finish.

After you create the required operation headers in the class, you can build and deploy the implementation. For more information, see Deploying DCS Services.

When you deploy your service, you can continue to develop the service functionality by implementing tasks to respond to operations. For more information, see Building a DCS Task.

See Also

Walkthrough: Implementing a DCS Stub

Building a DCS Task

Deploying DCS Services