Web Service Contract


The success of an SOA is the sharing of services at several levels within the entire company. To do this we must of course that the “consumer” of the service know exactly  how the service should use. This exchange of information requires that the “consumer” and who “exposes” the service speak to each other through a “contract” setting out the functions and procedures to use the service.

Anatomy of a Web Service Contract

A Web Service Contract is essentially a collection of metadata that describe a series of basic aspects of the service that should be used including:

  • The purpose and functionality of each operation
  • The message he needs to do
  • The data model used in the message
  • The set of conditions necessary to carry out the operation
  • Information on how to access the service

A Web Service Contract is organized in a structure that exactly meets “Questions” that must be answered and that is:

  • “what” offers that particular service
  • “how” can I use that particular service
  • “where” I find that particular service

When a potential consumer wants to know our service will analyze what the service is capable of doing and under what conditions, where and how they can access the service. This information is basic to the orchestration of services and consequently vital for the success of SOA. There are formal terms to describe the structure of a Web Service Contract, these are:

  • Abstract Description
  • Concrete Description

The “abstract description” describes the interface of the service regardless of its implementation, while the “concrete description” contains specific details implementation of how and where to access the service. Parts of a Web Service Contract let us now describe some of the parts that make up the Web Service Contract, as we have already said is made up of two distinct sections to the “Abstract description” and “Concrete Description” the first thing we see, therefore, identify the parts that are description contained in the Abstract.

Constitution of the “abstract description”

In this section we find the Port Type (Interface) This is the interface for connect to the service, the Port Type Operations This section contains the points operation that the service can perform. Within the Operations section we find the Message that contains three different types of messages:

  • Input the message sent to the service from the service consumer
  • Output the message sent by the service consumer of the service
  • Fault message sent by the service to the consumer in the event of bankruptcy or error

In this way, the consumer of the service is able to establish all the features offered by the service and then decide if this is the service to use or not.

Constitution of the “Description of Concrete”

The “concrete description” complete the “Description Abstract” by providing the implementation features presented in the “Description Abstract”, this provides details specific on how to call from the Service Consumer. Inside of course find the same subdivision that was present in the “Division Abstract “the difference between the two is that in this section provides service implementations. We find then the Port Type (Interface) Binding, in this section we find the details to reach and use the service, are in the section Operation Binding inside that contains three sections:

• Input Message Binding

• Binding Outpu Message

• Binding Fault Message

The three sections correspond to the physical operations that are described in section “Description Abstract”, these sections are then used to indicate “how” and “where” run operations described in the service. The section where it is represented by the Service that contains within it the Port section, Port section contains the “where” to find the service, this may be a local server or remote, is not important, what matters in this section is to indicate precisely the address where to find the service.

Conclusion

We talked about what the service contract, that is how they serve a consumer to use a service, we will return in the following articles on the subject deepened and presented in more detail the language for the definition of services the WSDL.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: