WEB SERVICES
Prepared By:
Mehta Ishani
130040701003
1
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. 2
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.
3
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.
4
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.
5
WHY WS?
 Web Services were intended to solve three main
problems:
 Interoperability
 Firewall traversal
 Complexity
6
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.
7
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.
8
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.
9
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. 10
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. 11
WEB SERVICE STACK
12
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.
13
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
14
UDDI
 UDDI - Universal Description, Discovery, and
Integration
 Centralized Directory for web services
 UDDI registries
 Web Services Interface
15
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.
16
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).
17
WEB SERVICE LIFE CYCLE
18
IMPLEMENTATION
 Webservice1.asmx.cs
19
TESTING A WEB SERVICE
 To try the test page, request the WebService.asmx
file in your browser.
20
TESTING…
 Click On Add and enter value and click invoke
you will get output in XML like <int>15</int>
21
CONSUMING A WEB SERVICE
22
NAMESPACES
 System.Web.Services
 System.Web.Services.Protocols
23
WEB SERVICES IN THIS SOLUTION
24
TEST.ASPX(DESIGN)
25
TEST.ASPX.CS
26
OUTPUT
27
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
28
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.
29
Thanks You !!!
30

Web services

  • 1.
    WEB SERVICES Prepared By: MehtaIshani 130040701003 1
  • 2.
    INTRODUCTION  “A WebService 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. 2
  • 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. 3
  • 4.
    OVERVIEW  A newssite 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. 4
  • 5.
    OVERVIEW  With webservices, 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. 5
  • 6.
    WHY WS?  WebServices were intended to solve three main problems:  Interoperability  Firewall traversal  Complexity 6
  • 7.
    INTEROPERABILITY  Earlier distributedsystems 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. 7
  • 8.
    FIREWALL  Collaboration acrosscorporations 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. 8
  • 9.
    COMPLEXITY  Web Servicesis 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. 9
  • 10.
    BENEFITS  Web servicesrepresent 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. 10
  • 11.
    BENEFITS  Web servicesare 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. 11
  • 12.
  • 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. 13
  • 14.
    DISCO  Stands forDiscovery 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 14
  • 15.
    UDDI  UDDI -Universal Description, Discovery, and Integration  Centralized Directory for web services  UDDI registries  Web Services Interface 15
  • 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. 16
  • 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). 17
  • 18.
  • 19.
  • 20.
    TESTING A WEBSERVICE  To try the test page, request the WebService.asmx file in your browser. 20
  • 21.
    TESTING…  Click OnAdd and enter value and click invoke you will get output in XML like <int>15</int> 21
  • 22.
    CONSUMING A WEBSERVICE 22
  • 23.
  • 24.
    WEB SERVICES INTHIS SOLUTION 24
  • 25.
  • 26.
  • 27.
  • 28.
    LIMITATION  We cannot 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 28
  • 29.
    CONCLUSION  Constructing application-to-applicationWeb 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. 29
  • 30.