web services

30
WEB SERVICES Prepared By: Mehta Ishani 130040701003 1

Upload: ishmecse13

Post on 02-Jun-2015

120 views

Category:

Engineering


2 download

DESCRIPTION

Web services

TRANSCRIPT

Page 1: Web services

1

WEB SERVICES

Prepared By:

Mehta Ishani

130040701003

Page 2: Web services

2

INTRODUCTION

“A Web Service is an application component accessible over open protocols”.

Software Developers tries to develop software component which can be called over local networks or global networks

Accessed Over The Internet

Web Services are objects and methods that can be invoked from any client over HTTP.

Page 3: Web services

3

OVERVIEW

HTML pages (or the HTML output generated by ASP.NET web forms) are meant to be read by the end user, web services are used by other applications.

They are pieces of business logic that can be accessed over the Internet.

For example, e-commerce sites can use the web service of a shipping and packaging company to calculate the cost of a shipment.

Page 4: Web services

4

OVERVIEW

A news site can retrieve the news headlines and articles produced by external news providers and expose them on its own pages in real time.

A company can even provide the real-time value of their stock options, reading it from a specialized financial or investment site.

All of these scenarios are already taking place on the Web, and major Internet companies such as Amazon, Google, and eBay are providing their own web service offerings to third-party developers.

Page 5: Web services

5

OVERVIEW

With web services, you can reuse someone else’s business logic instead of replicating it yourself, using just a few lines of code.

This technique is similar to what programmers currently do with libraries of APIs, classes, and components.

The main difference is that web services can be located remotely on another server and managed by another company.

Page 6: Web services

6

WHY WS? Web Services were intended to solve three

main problems: Interoperability Firewall traversal Complexity

Page 7: Web services

7

INTEROPERABILITY

Earlier distributed systems suffered from interoperability issues because each vendor implemented its own on-wire format for distributed object messaging.

Development of DCOM apps strictly bound to Windows Operating system.

Development of RMI bound to Java programming language.

Page 8: Web services

8

FIREWALL

Collaboration across corporations was an issue because distributed systems such as CORBA and DCOM used non-standard ports.

Web Services use HTTP as a transport protocol and most of the firewalls allow access though port 80 (HTTP), leading to easier and dynamic collaboration.

Page 9: Web services

9

COMPLEXITY

Web Services is a developer-friendly service system.

Most of the above-mentioned technologies such as RMI, COM, and CORBA involve a whole learning curve.

New technologies and languages have to be learnt to implement these services.

Page 10: Web services

10

BENEFITS

Web services represent the next logical step in the evolution of component-based distributed technologies. Some key advantages include the following:

Web services are simple: That simplicity means they can be easily supported on a wide range of platforms.

Web services are loosely coupled: The web service may extend its interface and add new methods without affecting the clients as long as it still provides the old methods and parameters.

Page 11: Web services

11

BENEFITS Web services are stateless: A client makes a

request to a web service, the web service returns the result, and the connection is closed.

There is no permanent connection. This makes it easy to scale up and out to many clients and use a server farm to serve the web services. The underlying HTTP used by web services is also stateless.

Web services are firewall-friendly: Firewalls can cause a challenge for distributed object technologies. The only thing that almost always gets through firewalls is HTTP traffic on ports 80 and 443. Because web services use HTTP, they can pass through firewalls without explicit configuration.

Page 12: Web services

12

WEB SERVICE STACK

Page 13: Web services

13

FINDING WEB SERVICES

In a simple application URL of the web service have to place it in a configuration file. No other steps are required.

In other situations, search for the web service.

Page 14: Web services

14

DISCO

Stands for Discovery Of Services creates a file that groups a list of related

web services. A company can publish a DISCO file on its

server that contains links to all the web services it provides.

Clients simply need to request and find all these web services

Page 15: Web services

15

UDDI UDDI - Universal Description, Discovery, and

Integration Centralized Directory for web services UDDI registries Web Services Interface

Page 16: Web services

16

WSDL WSDL - Web Service Description Language How to access a web service. Contain what methods are available, what

parameters each method uses, and what the data type of each parameter is.

XML-based language. Describes Request and Response message.

Page 17: Web services

17

SOAP SOAP - The Simple Object Access Protocol. Industry-standard message format that

enables message-based communication. Proxy class Implements a message format based on

XML to exchange function requests and responses(HTTP POST).

Using XML as the basis for SOAP understandable and transportable using any system and any Transport Protocol(HTTP).

Page 18: Web services

18

WEB SERVICE LIFE CYCLE

Page 19: Web services

19

IMPLEMENTATION Webservice1.asmx.cs

Page 20: Web services

20

TESTING A WEB SERVICE

To try the test page, request the WebService.asmx file in your browser.

Page 21: Web services

21

TESTING…

Click On Add and enter value and click invoke you will get output in XML like <int>15</int>

Page 22: Web services

22

CONSUMING A WEB SERVICE

Page 23: Web services

23

NAMESPACES

System.Web.Services

System.Web.Services.Protocols

Page 24: Web services

24

WEB SERVICES IN THIS SOLUTION

Page 25: Web services

25

TEST.ASPX(DESIGN)

Page 26: Web services

26

TEST.ASPX.CS

Page 27: Web services

27

OUTPUT

Page 28: Web services

28

LIMITATION

We can not add our implementation to web services

If any web service provider stop his web service than we can not get output that we want.

We can not get any coding about web services

Page 29: Web services

29

CONCLUSION

Constructing application-to-application Web services are simple, in principle.

By using web service we can get methods which we do not need to implement and also can provide methods to users on local server without showing our implementation code to them.

Page 30: Web services

30

Thanks You !!!