Showing posts with label Web Service. Show all posts
Showing posts with label Web Service. Show all posts

Web Service Standards

WSDLWeb Services Description Language – WSDL is an XML based standard that specifies how a client can interact with a web service. It tells what methods are present in a web service, what parameters and return values each method uses, and how to communicate with them. It specifies what protocol (HTTP GET or HTTP POST or SOAP (over HTTP)) should be used for transmission over the internet.
The WSDL standard is fairly complex, but its underlying logic is hidden from the developer in ASP.NET programming. ASP.NET automatically creates WSDL documents for a web service. It can also create a proxy class based on a WSDL document. This proxy class allows a client to call a web service without worrying about networking or formatting issues.

SOAPSimple Object Access Protocol – A client can use three protocols to communicate with a web service in .NET:
a)       HTTP GET – It communicates with a web service by encoding information in the query string and retrieves information as a basic XML document.
b)       HTTP POST – It places parameters in the request body (as form values) and retrieves information as a basic XML document.
c)       SOAP – It uses XML for both request and response messages. Like HTTP GET and HTTP POST, SOAP works over HTTP, but it uses a more detailed XML-based language for bundling information.

SOAP messages are widely supported by many platforms.

Although .NET has the ability to support all three of these protocols, it restricts the first two for better security. By default, it disables HTTP GET, and it restricts HTTP POST to the local computer.

SOAP messages are not handled directly by our applications. Instead, .NET will translate the information in a SOAP message into the corresponding .NET data types before the data reaches our code. This allows us to interact with web services in the same way we interact with any other object.

DISCODiscovery (DISCO is short form for Discovery) – Disco is a Microsoft specific standard, that is used for discovering Web Services. A .disco file specifies the location of a web service on a web server. It provides a straight forward way to create a repository of web service links that can be used automatically by .NET.

Benefits of a .disco file:
a)       It is only used for web services.
b)       We can insert <disco> elements for as many web services as we want, including the ones that resides on the other web servers.

UDDIUniversal Description, Discovery and Integration – The goal of UDDI is to provide repositories where businesses can advertise all the web services they have. Generally groups of companies and consortiums band together to set up their own UDDI registries organized into specific industries. The web services are registered in the UDDI registry. Many of these UDDI registries are restricted and not publicly available.
The UDDI registry defines a complete programming interface that specifies how SOAP messages can be used to retrieve information about a business or register the web services for a business.

WS-Interoperability Basic Profile – It is a recent standard that sets out a broad range of rules and recommendations designed to guarantee interoperability across the web service implementations on the different vendors. It specifies a recommended sub-set of SOAP 1.1 and WSDL 1.1 specifications and lays out a few ground rules. WS – Interoperability is strongly backed by all web service vendors (including Microsoft, IBM, SUN and Oracle).

Web Services

Web Services are individual units of programming logic that exist on a web server. They can be integrated into all sorts of applications. It can convert our application into a Web Application, which can publish its content (function or message) to the rest of the world.

Web Services are built on a foundation of open standards. These standards allow web services to be created with .NET but consumed on other platforms or vice versa.

The root standard for all the individual web service standards is XML. Because XML is text-based, web service invocations can pass over normal HTTP channels. So, web services are governed by cross platform standards as well as easier to use.

Application programmers tend to treat a web service as a set of methods that can be called over the internet. XML gurus treat web services as a way to exchange XML messages.

Web Service Client: An application that uses a web service is called a Web Service Client.

Message: The information exchanged between the client application and the web service is called a message. Messages include the calls made by a client application to a Web Method and the data returned by the Web Method to the client.

When should Web Services be used?

Web Services should be used when our application needs to cross platform boundaries. Web Services are a perfect choice if we need to provide data to a Java Client running on a UNIX computer.
Web Services should also be used when our application needs to cross trust boundaries, which is crossed when our system incorporates applications from more than one company or organization. Web Services work well if we need to provide some information from a database to an application written by other developers.

When should Web Services not be used?

Web Services should not be used if we aren’t crossing platform or trust boundaries. Web Services are generally a poor way to share functionality between different types of applications in the same company.