How to Draw SoaML Service Contract Diagram?

SoaML supports both a contract and an interface-based approach to SOA. They differ in the way services are specified.

The service contract approach defines the contract that specify how providers and consumers work together to achieve a goal, through the use of service. The service contract represents an agreement between parties for how the service is to be provided and consumed. Such agreement includes the interfaces, choreography and other terms and conditions.

Service contract diagram is designed for the specification of service contract. Modelers usually combines the use of sequence diagram and activity diagram in representing the choreography of a service contract.

A sample service contract diagram
A sample service contract diagram

Creating service contract diagram

  1. Select Diagram > New from the application toolbar.
  2. In the New Diagram window, select Service Contract Diagram.
  3. Click Next.
  4. Enter the diagram name and description. The Location field enables you to select a model to store the diagram.
  5. Click OK.


The description of notations is either extracted or derived from the OMG SoaML Specification v1.0.1.

Name Representation
Service Contract

A ServiceContract is the specification of the agreement between providers and consumers of a service as to know what information, products, assets, value, and obligations will flow between the providers and consumers of that service. It specifies the service without regard for realization, capabilities, or implementation. A ServiceContract does not require the specification of who, how, or why any party will fulfill their obligations under that ServiceContract, thus providing for the loose coupling of the SOA paradigm. In most cases, a ServiceContract will specify two roles (provider and consumer) but other service roles may be specified as well. The ServiceContract may also own a behavior that specifies the sequencing of the exchanges between the parties as well as the resulting state and delivery of the capability. The owned behavior is the choreography of the service and may use any of the standard UML behaviors such as an interaction, timing, state, or activity diagram.
ServiceContract captures an agreement between the roles played by consumers and providers of the service, their capabilities and needs and the rules for how the consumers and
providers must interact. The roles in a ServiceContract are typed by Interfaces that specify Operations and events which comprise the choreographed interactions of the services.
A "Provider" models the interface provided by the provider of a service. The provider of the service delivers the results of the service interaction. The provider will normally be the one that responds to the service interaction. Provider interfaces are used as the type of a "ServiceContract" and are bound by the terms and conditions of that service contract.

A «Consumer» models the interface provided by the consumer of a service. The consumer of the service receives the results of the service interaction. The consumer will normally be the one that initiates the service interaction. Consumer interfaces are used as the type of a «ServiceContract» and are bound by the terms and conditions of that service contract.
Connector  Connect roles, if any, in a participant.
The Provider may also have a uses dependency on the consumer interface, representing the fact that the provider may call the consumer as part of a bi-directional interaction. These are also known as "callbacks" in many technologies.
A list of supported notations in service participant diagram

Related Resources

The following resources may help you to learn more about the topic discussed in this page.

Chapter 3. Service contract diagram Table of Contents Chapter 4. Services architecture diagram

We use cookies to offer you a better experience. By visiting our website, you agree to the use of cookies as described in our Cookie Policy.OK