Beruflich Dokumente
Kultur Dokumente
Web Services
WEB SERVICES
Abstract
The concept of web services has acquired a strong presence lately, and it has been even said that it would change the programming of those applications oriented to the Internet towards a service oriented architecture. This idea becomes more powerful after Microsoft announcement of its new .NET strategy, based on the web services model. This document describes the web services and the general structure of the model. Besides, there is an introduction to the standards on which this model is based such as SOAP, WSDL y UDDI.
In view of all the above, there are certain requirements at the time of developing or consuming web services: A standard manner of representing data. gxtechnical.com//Web_Services.htm 1/8
16-11-2010
p gWeb Services XML is the obvious option for this requirement. A common and extensible messages format. SOAP is the one chosen in this case; SOAP is a light protocol for information exchange. We will see it in more detail further on in this document A common and extensible language to describe services. In this case, the option is WSDL. This is an XML based language, jointly developed by IBM and Microsoft. We will see it in more detail further on in this document. A way to discover services in the Internet. UDDI is used in this case; it specifies a mechanism allowing suppliers and consumers publishing and locating the services, respectively. We will see it in more detail, further on in this document.
16-11-2010
Web Services If the web service is not freely accessed, how can I define the number of times a consumer can access a web service once hired? How do we charge their use? How do we indicate that a product is no longer on-line?
Associated Technologies
The web services model is based on certain emerging technologies resulting from the work of several companies and organizations such as IBM and Microsoft. These technologies are SOAP, WSDL and UUDI.
All the above is a request/response messages model with a manner to describe a group of methods and transfer parameters to them. This seems to be the basis of the RPC protocol and, in fact, is the most common way of using SOAP. The potential issue is to deliver this on the Internet using HTTP to develop communications between organizations, allowing communications
gxtechnical.com//Web_Services.htm 3/8
16-11-2010
Web Services between applications with different platforms, operative systems and programming languages.
This example calls the StockQuote service by calling the GetLastTradePrice method with the DIS symbol as parameter. This is the response to the previous requirement, and returns the price of the required action:
If you are surprised by the apparent complexity of the SOAP protocol, and are thinking how difficult would it be to assemble requirement messages and parse response messages, do not worry; most programming languages provide, or will provide support to carry out these procedures. The fundamental idea is using some object, providing it with a WSDL and indicating it what method will be called and what parameters will be used to call it. This allows assembling the SOAP message in runtime, sending it and parsing the result assigning it to some variable in a transparent manner for the user, as it he would have made a common call.
16-11-2010
Web Services requirement with a specific format. This is the principal document at the time of documenting a Web Service, but it may not be the only one. In most cases it is advisable to accompany this document with a document written in a natural language, providing information on what does each method provided by the Web Service do, as well as examples such as the SOAP messages the service accepts and responds.
To
sum up, we can say that a WSDL file describes the following: Messages that the service accepts and messages that the service responds. Protocols that the service supports. Where to send the messages.
gxtechnical.com//Web_Services.htm
5/8
16-11-2010
Web Services
16-11-2010
Web Services make, for instances, purchase orders that can be reused and implemented by all the companies, without the need to redefine each of them in the interface.
If, like in the case of SOAP, you feel worried about the complexity of the WSDL files, again, do not worry; most language programs provide tools to generate the WSDL file automatically, with a specific method or function.
UDDI SCHEME
The basic information model used by the UDDI registers is defined in an XML scheme. This scheme defines four basic types of information, each of which provides the class of information a user needs to know, to use a web service of another company. The four types of information are: Information on the business. This type of information is defined as the businessEntity element. It contains information about the company, such as its name, contacts, type of company, etc. Information on the service: The businessServices elements are within the businnessEntity element. These elements contain information about the web services usually grouped by business processes or services categories. Information on the binding. The bindingTemplate elements are within each businessServices element. Each of them provides a physical address to make contact with the services described above. Information on the service specifications. Each bindingTemplate has an associated tModel that provides information on the service specifications; e.g: how should the messages the service accepts and responds look, etc. A tModel can be associated to bindingTemplate elements of different companies providing the same service specification. Thus, using the tModels, it is possible to find all the companies providing such service.
16-11-2010
API UDDI
The access to the UDDI register, both to make searches or to enter or modify a register, can be made through a web page implementing the access or using certain interfaces (web services) providing the UDDI specification. These interfaces are described in an API that can be divided in two logical parts, the queries API and the publication API. For further information on the UDDI API, please refer to: http://www.uddi.org/pubs/ProgrammersAPI-V2.00-Open-20010608.pdf
An example
The manners to do business using the web services are quite different. The consumer could pay to use the services provided by a supplier, or the supplier could pay so that the services offered by him appear in a specific consumer and, there are even cases where none of them pay to consume or provide the services, respectively. This is the case presented below. The example has been taken from real life and is about an airline: Southwest. In its portal http://www.southwest.com/, this airline allows making tickets reservations and also, as added value for its clients, it offers hotel bookings and car rental. The data to make these reservations are taken from web services provided by the different hotels and car rentals. This is an example about web services usage where neither the consumer nor the supplier pays; this exchange is useful for both of them, since the airline provides more added value to its clients and the hotels and car rentals have good exposure to potential clients. Furthermore, these companies did not publish their services for them to be used exclusively by the airline, its services can be discovered and used by any airline requiring them. This example shows clearly the great power of web services and the advantage companies that know how to use them may have regarding other companies. Imagine that you have to book air tickets and have the chance to choose between an airline that, besides booking your tickets, allows you making hotel bookings, and another airline that does not offer you this chance; what airline would you choose? Besides, imagine you are the owner of a car rental and you know that your competitor is providing services at an airline portal and you are not, what would you do?
gxtechnical.com//Web_Services.htm
8/8