Service Contract Model Activities

Retired Content

The Web Service Software Factory is now maintained by the community and can be found on the Service Factory site.

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies.
This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Retired: November 2011

Figure 1 shows the activities that you can perform on the Service Contract Model.

Ff647132.99001801-4418-4018-afaa-c4c93e7d72f9(en-us,PandP.10).png

Figure 1
Service Contract Model activities

The following are the main activities performed after you add the Service Contract model to the solution. Many of these activities are represented in the Building a Service Hands-on Lab. You are encouraged to perform this hands-on lab to become more familiar with the models and the activities. Next to each activity, in parentheses, we provided the related exercise number.

Design Activities:

Add an operation to service contract (see Exercise 1).

Add a fault contract to service operation (see Exercise 1).

Add a message to operation (see Exercise 1).

  1. Add a primitive message part to a message.
  2. Add a data contract message part to a message.
  3. Add an XSD message.

Associate a request message with an operation (see Exercise 1).

Associate a response message with an operation (see Exercise 1).

Add a service contract (see Exercise 1).

Associate a service operation with a service contract (see Exercise 1).

Add a service, which represents the service's implementation (see Exercise 1).

Associate a service with a service contract (see Exercise 1).

Associate a data contract part of the message with a data contract elements on the Data Contract Model (see Exercise 3). You must have already defined your data contract elements on the Data Contract Model to complete this step.

Associate a fault contract element on the service operation with a fault contract element on the Data Contract Model (see Exercise 3). You must have already defined a fault contract on the Data Contract Model to complete this step.

Implementation Activities:

Select the implementation technology (see Exercise 4 or 6). This allows you to select either WCF or ASMX as the implementation technology. For more information, see Choosing a Technology.

Add technology specific properties to model elements (see Exercise 4 or 6). For more information, see “Service Contract Model” in Choosing a Technology.

Validate the Service Contract Model (this may be done at anytime).

  1. Validate a selected element (will also validate child and dependent elements).
  2. Validate the entire model.

Create implementation projects for WCF or ASMX service implementation (see Exercise 5 or 6).

Associate the Service Contract Model with a project mapping table (see Exercise 5 or 6). A project mapping table maps from solution projects to a set of predefined roles to give you more flexibility about which projects the generated code should be added to. For more information about the project mapping table, see Generating the Implementation and “Code Generation Extensions” in the Service Factory Architecture.

Generate code for the service contract implementation (see Exercise 5 or 6). For more information about generating code, see Generating the Implementation.

  1. Generate code for a selected element.
  2. Generate code for the entire model.

Additional optional steps:

  • Create message translators (see Exercise 8).
  • Add XSD Faults. These only apply to services that will be built using the WCF extension. The Data Contract serializer option must be used on the model and the XSD file must be compatible with the Data Contract serializer.

For more information about the specific elements on the Service Contract Model, see “Service Contract Model” in Designing with the Models.