16
Web Services • Web services are small units of code • Web services are designed to handle a limited set of tasks • Web Services can convert your applications into Web-applications. • Web Services are published, found, and used through the Web.

Web service

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Web service

Web Services

• Web services are small units of code • Web services are designed to handle a limited

set of tasks • Web Services can convert your applications

into Web-applications.• Web Services are published, found, and used

through the Web.

Page 2: Web service

Web Service

• Web services use XML based communicating protocols.

• Web services are independent of operating systems.

• Web services are independent of programming languages.

• Web services connect people, systems and devices.

Page 3: Web service

What are Web Services?• Web services are application components• Web services communicate using open

protocols• Web services are self-contained and self-

describing• Web services can be discovered using UDDI• Web services can be used by other

applications• XML is the basis for Web services

Page 4: Web service

Work• The basic Web services platform is XML + HTTP.

• XML provides a language which can be used between different platforms and programming languages and still express complex messages and functions.

• The HTTP protocol is the most used Internet protocol.

• Web services use the standard web protocols HTTP, XML, SOAP, WSDL, and UDDI.

Page 5: Web service

Web service• Each XML Web service needs a unique

namespace in order for client applications to distinguish it from other services on the Web.

• Your XML Web service should be identified by a namespace that you control. For example, you can use your company's Internet domain name as part of the namespace. Although many XML Web service namespaces look like URLs, they need not point to actual resources on the Web. (XML Web service namespaces are URIs.)

Page 6: Web service

Web service• For XML Web services creating using ASP.NET,

the default namespace can be changed using the WebService attribute's Namespace property.

• The WebService attribute is an attribute applied to the class that contains the XML Web service methods.

• Below is a code example that sets the namespace to "http://microsoft.com/webservices/":

Page 7: Web service

Example

[WebService(Namespace="http://microsoft.com/webservices/")]

public class MyWebService{

// implementation }

Page 8: Web service

Benefits of Web Services

• Easier to communicate between applications • Easier to reuse existing services • Easier to distribute information to more

consumers • Rapid development

Page 9: Web service

Web services architecture • The Web services architecture is based upon the

interactions between three primary roles: service provider, service registry, and service requestor. These roles interact using publish, find, and bind operations.

• The service provider is the business that provides access to the Web service and publishes the service description in a service registry. The service requestor finds the service description in a service registry and uses the information in the description to bind to a service.

Page 10: Web service

• A logical view of the Web services architecture is shown in below.

• In this view of the Web services architecture, the service registry provides a centralized location for storing service descriptions.

• A UDDI registry is an example of this type of service registry.

Page 11: Web service

logical view of the Web services architecture

Page 12: Web service

• Although it is important, the centralized service registry is not the only model for Web service discovery.

• The simplest form of service discovery is to request a copy of the service description from the service provider. After receiving the request, the service provider can simply e-mail the service description as an attachment or provide it to the service requestor on a transferable media, such as a diskette.

• it requires prior knowledge of the Web service, as well as the contact information for the service provider.

Page 13: Web service

• there is a need for a distributed service discovery method that provides references to service descriptions at the service provider's point-of-offering.

• The Web Services Inspection Language provides this type of distributed discovery method, by specifying how to inspect a Web site for available Web services. The WS-Inspection specification defines the locations on a Web site where you could look for Web service descriptions.

Page 14: Web service

WSDL • WSDL completely describes Web services, the methods

available, and the various ways of calling these methods.

• Web Service Description Language (WSDL)is a W3C specification which defines XML grammar for describing Web Services.

• XML Grammar describes details such as:- • Where we can find the Web Service (its URI)? • What are the methods and properties that service

supports? • Data type support. Supported protocols In short its a

bible of what the webservice can do. Clients can consume this WSDL and build proxy objects that clients use to communicate with the Web Services.

Page 15: Web service

UDDI • UDDI Full form of UDDI is Universal Description,

Discovery and Integration. It is a directory that can be used to publish and discover public Web Services.

• It hopes to provide a central database where developers can look to find XML Web services located all over the globe.

• UDDI is an XML Web service that your applications can query and receive information from on other services.

Page 16: Web service

DISCO• Web servers that host XML Web services support a

process called discovery, which enables these Web servers to automatically detect installed Web Services and provide visitors with a list of available services.

• Visual Studio gathers information through a process called discovery.

• DISCO is the abbreviated form of Discovery. It is basically used to club or group common services together on a server and provides links to the schema documents of the services it describes may require.