Web Services Part II
By lsk123In my last post, I had given a brief overview of web services and it many components.
From my perspective, web services are very useful when
provided by a database and it is a safe way to indirectly expose
data to an external source without having to provide direct
access to the data.
The following is a great article which describes how web services
can be hosted by sql server 2005/2008
http://www.developer.com/net/asp/article.php/3767311/Creating-Native-Web-Services-in-SQL-Server.htm
An Overview of Web Services Technologies
By lsk123Web services provide a means of distributed computing over the internet, by allowing clients and servers to invoke server processes on other machines. They are software applications that can be accessed remotely by clients by sending and/or receiving XML messages that typically follow the SOAP standard.
A web service can be thought of as a server program with one or more procedures/methods with input and output parameters. These procedures can be accessed by clients by sending a SOAP message to a URL. A SOAP message is an XML message which follows the SOAP standard. The SOAP message will specify which procedure has to be executed and contain the value of the input parameters. The program then executes the procedure and if there are any output parameters, respond back to the client with a SOAP message containing these parameters. The server and the client will need a SOAP message generator as well as a SOAP message parser.
An alternative to the SOAP approach is to use REST (representational state transfer) in which clients uses URL’s and the HTTP operations GET, PUT etc. to manipulate resources that are represented in XML.
Web services can use a variety of communication patterns like request-reply, solicit-response, one-way, notification etc. and can either be synchronous or asynchronous.
Web services are designed to support distributed computing over the internet, in which a variety of programming languages are used. They are independent of any particular programming paradigm. They differ from the distributed object model in that remote objects cannot be instantiated and therefore remote object references cannot be returned back to the client.
The main advantage of web services is in the area of interoperability. Since the web services model is based on sending and receiving XML messages in the SOAP format, the hardware , operating system on which the client and the service runs do not have to be compatible. The location of the client or the server doesn’t matter since the communication is over the internet and neither does the language in which either is programmed in.
The components of Web Services are
SOAP
SOAP originally was an acronym for Simple Object Access Protocol, but now is considered a specification name and no longer as an acronym.
SOAP is designed to enable synchronous as well as asynchronous interaction over a network like the internet. It is a specification for using XML to represent the contents of request and reply messages as well as a scheme for communication of documents.
There are various SOAP Engines (Software that creates and parses SOAP messages) available with a free license.
XML (Extensible Markup Language)
XML is the language on which all Web services Languages are built on. XML is a tool for constructing self-describing documents. SOAP, WSDL, UDDI are all XML based languages.
In addition XSD (XML Schema definition) is the XML schema used in SOAP, WSDL and UDDI
And it is a set of rules to which an XML document should conform to, to be considered valid according to the schema.
WSDL (Web Services Definition Language)
Interface definitions allow clients to allow to communicate with services. A service description provides an agreement between the client and the server about the services on offer. It assembles all the facts concerning a service that are relevant to the client and is generally used to create client stubs that implement the correct behavior for the client. The interface definition language for a web service (similar to IDL for CORBA) that is most commonly used is the WSDL specification.
The Web Services definition language is a specification which describes web services in a structured way. A WSDL document is an XML document that describes in a machine understandable way all the information that is required to connect to a web service. These include definitions, types, message, interface, bindings, services etc.
The WSDL document is logically divided into two different groupings – the concrete and the abstract descriptions. The concrete description consists of those elements that are used to bind the client to the service physically. The abstract description consists of the elements that describe the capabilities of the web service.
UDDI (Universal Discovery Description Integration)
The Universal Discovery Description Integration specification describes how a client of a web service can learn about its capabilities. The WSDL for the web service is available to be downloaded here. UDDI registries can be public where there is no restriction on anyone to do a lookup, private where it exists in an organization’s network behind a firewall and is only accessible to clients who have access to the network or semi-private where it available to a limited number of outsiders.
