SlideShare a Scribd company logo
INTRODUCTION TO WEBINTRODUCTION TO WEB
SERVICESSERVICES
CS 795CS 795
What is a Web Service ?What is a Web Service ?
Web service is a means by which computers talk to each other over theWeb service is a means by which computers talk to each other over the
web using HTTP and other universally supported protocols.web using HTTP and other universally supported protocols.
A Web service is an application that:A Web service is an application that:
• Runs on a Web serverRuns on a Web server
• Exposes Web methods to interested callersExposes Web methods to interested callers
• Listens for HTTP requests representing commands to invoke WebListens for HTTP requests representing commands to invoke Web
methodsmethods
• Executes Web methods and returns the resultsExecutes Web methods and returns the results
Web Services is based on:Web Services is based on:
• HTTP (Hypertext Transport Protocol)HTTP (Hypertext Transport Protocol)
• SOAP (Simple Object Access Protocol)SOAP (Simple Object Access Protocol)
• UDDI (Universal Description, Discovery and Integration)UDDI (Universal Description, Discovery and Integration)
• WS-POLICY (Web Services Policy)WS-POLICY (Web Services Policy)
Most Web services expect their Web methods to be invoked usingMost Web services expect their Web methods to be invoked using
HTTP requests containing SOAP messages. SOAP is an XML-basedHTTP requests containing SOAP messages. SOAP is an XML-based
vocabulary for performing remote procedure calls using HTTP andvocabulary for performing remote procedure calls using HTTP and
other protocols.other protocols.
Sample web serviceSample web service
Calc.asmxCalc.asmx
<%@ WebService Language="C#" CodeBehind="~/App_Code/WebService.cs" Class="WebService"<%@ WebService Language="C#" CodeBehind="~/App_Code/WebService.cs" Class="WebService"
%>%>
using System;using System;
using System.Web.Services;using System.Web.Services;
[WebService (Name="Calculator Web Service",[WebService (Name="Calculator Web Service",
Description = "Perform simple math over the Web")]Description = "Perform simple math over the Web")]
class CalcServiceclass CalcService
{{
[WebMethod (Description = "Computes the sum of two integers")][WebMethod (Description = "Computes the sum of two integers")]
public int Add (int a, int b) { return a+b;}public int Add (int a, int b) { return a+b;}
[WebMethod (Description = "Computes the difference between two integers")][WebMethod (Description = "Computes the difference between two integers")]
public int Subtract (int a, int b) { return a-b;}public int Subtract (int a, int b) { return a-b;}
}}
The example demonstrates several important principles of Web service programmingThe example demonstrates several important principles of Web service programming
using the .NET Framework:using the .NET Framework:
• Web services are implemented in ASMX files. ASMX is a special file name extensionWeb services are implemented in ASMX files. ASMX is a special file name extension
registered to ASP.NET (specifically, to an ASP.NET HTTP handler) in Machine.config.registered to ASP.NET (specifically, to an ASP.NET HTTP handler) in Machine.config.
• ASMX files begin with @ WebService directives. At a minimum, the directive mustASMX files begin with @ WebService directives. At a minimum, the directive must
contain a Class attribute identifying the class that makes up the Web service.contain a Class attribute identifying the class that makes up the Web service.
• Web service classes can be attributed with optional WebService attributes. The one inWeb service classes can be attributed with optional WebService attributes. The one in
the previous example assigns the Web service a name and a description that show up inthe previous example assigns the Web service a name and a description that show up in
the HTML page generated when a user calls up Calc.asmx in his or her browser.the HTML page generated when a user calls up Calc.asmx in his or her browser.
• Web methods are declared by tagging public methods in the Web service class withWeb methods are declared by tagging public methods in the Web service class with
WebMethod attributes. You can build helper methods into a Web service—methods thatWebMethod attributes. You can build helper methods into a Web service—methods that
are used internally by Web methods but that are not exposed as Web methodsare used internally by Web methods but that are not exposed as Web methods
themselves—by omitting the Webmethod attribute.themselves—by omitting the Webmethod attribute.
Testing a Web Service :Testing a Web Service :
How do you test an ASMX Web service? Simple: just call it up in your browser.How do you test an ASMX Web service? Simple: just call it up in your browser.
ASP.NET responds to the HTTP request for Calc.asmx by generating an HTML pageASP.NET responds to the HTTP request for Calc.asmx by generating an HTML page
that describes the Web service.that describes the Web service.
• The name and description in the ASMX file’s WebService attribute appear at the top ofThe name and description in the ASMX file’s WebService attribute appear at the top of
the page.the page.
• Underneath is a list of Web methods that the service exposes, complete with theUnderneath is a list of Web methods that the service exposes, complete with the
descriptions spelled out in the WebMethod attributes.descriptions spelled out in the WebMethod attributes.
Click “Add” near the top of the page, and ASP.NET displays a page that you can use toClick “Add” near the top of the page, and ASP.NET displays a page that you can use to
test the Add method .test the Add method .
• ASP.NET knows the method name and signature because it reads them from theASP.NET knows the method name and signature because it reads them from the
metadata in the DLL it compiled from Calc.asmx. It even generates an HTML form thatmetadata in the DLL it compiled from Calc.asmx. It even generates an HTML form that
you can use to call the Add method with your choice of inputs.you can use to call the Add method with your choice of inputs.
• The XML returned by the Web method appears in a separate browser windowThe XML returned by the Web method appears in a separate browser window
The forms that ASP.NET generates on the fly from ASMX files enable you toThe forms that ASP.NET generates on the fly from ASMX files enable you to
test the Web services that you write without writing special clients to test themtest the Web services that you write without writing special clients to test them
with.with.
Suppose you write a Web service that publishes Web methods named Add and SubtractSuppose you write a Web service that publishes Web methods named Add and Subtract
that callers can use to add and subtract simple integers. If the service’s URL isthat callers can use to add and subtract simple integers. If the service’s URL is
www.wintellect.com/calc.asmxwww.wintellect.com/calc.asmx, here’s how a client would invoke the Add method by, here’s how a client would invoke the Add method by
transmitting atransmitting a SOAP envelopeSOAP envelope in an HTTP request. This example adds 2 and 2:in an HTTP request. This example adds 2 and 2:
POSTPOST /calc.asmx HTTP/1.1/calc.asmx HTTP/1.1
Host: www.wintellect.comHost: www.wintellect.com
Content-Type: text/Content-Type: text/xmlxml; charset=utf-8; charset=utf-8
Content-Length: 338Content-Length: 338
SOAPActionSOAPAction:: http://tempuri.org/Addhttp://tempuri.org/Add
<?xml version="1.0" encoding="utf-8"?><?xml version="1.0" encoding="utf-8"?>
<<soap:Envelopesoap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema instance"xmlns:xsi="http://www.w3.org/2001/XMLSchema instance"
xmlns: xsd=http://www.w3.org/2001/XMLSchemaxmlns: xsd=http://www.w3.org/2001/XMLSchema
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<<soap:Bodysoap:Body>>
<<AddAdd xmlns="http://tempuri.org/">xmlns="http://tempuri.org/">
<a>2</a><a>2</a>
<b>2</b><b>2</b>
</Add></Add>
</soap:Body></soap:Body>
</soap:Envelope></soap:Envelope>
And here’s how the Web service would respond:And here’s how the Web service would respond:
HTTP/1.1 200 OKHTTP/1.1 200 OK
Content-Type: text/Content-Type: text/xmlxml; charset=utf-8; charset=utf-8
Content-Length: 353Content-Length: 353
<?xml version="1.0" encoding="utf-8"?><?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance<soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
xmlns:xsd=http://www.w3.org/2001/XMLSchemaxmlns:xsd=http://www.w3.org/2001/XMLSchema
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body><soap:Body>
<<AddResponseAddResponse xmlns="http://tempuri.org/">xmlns="http://tempuri.org/">
<<AddResultAddResult>4</AddResult>>4</AddResult>
</AddResponse></AddResponse>
</soap:Body></soap:Body>
</soap:Envelope></soap:Envelope>
The Web service’s job is to parse the SOAP envelope containing the inputs, add 2The Web service’s job is to parse the SOAP envelope containing the inputs, add 2
and 2, formulate a SOAP envelope containing the sum of 2 and 2, and return it to theand 2, formulate a SOAP envelope containing the sum of 2 and 2, and return it to the
client in the body of the HTTP response. This, at the most elemental level, is what Webclient in the body of the HTTP response. This, at the most elemental level, is what Web
services are all about.services are all about.
Web services written with the .NET Framework also allow their Web methods toWeb services written with the .NET Framework also allow their Web methods to
be invoked using ordinary HTTP GET and POST commands. The followingbe invoked using ordinary HTTP GET and POST commands. The following GETGET
command adds 2 and 2 by invoking the Web service’s Add method:command adds 2 and 2 by invoking the Web service’s Add method:
GETGET /calc.asmx/Add?a=2&b=2 HTTP/1.1/calc.asmx/Add?a=2&b=2 HTTP/1.1
Host: www.wintellect.comHost: www.wintellect.com
The Web service responds as follows:The Web service responds as follows:
HTTP/1.1 200 OKHTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8Content-Type: text/xml; charset=utf-8
Content-Length: 80Content-Length: 80
<?xml version="1.0" encoding="utf-8"?><?xml version="1.0" encoding="utf-8"?>
<<intint xmlns="http://tempuri.org/">4</int>xmlns="http://tempuri.org/">4</int>
Here’s a POST command that adds 2 and 2:Here’s a POST command that adds 2 and 2:
POSTPOST /calc.asmx/Add HTTP/1.1/calc.asmx/Add HTTP/1.1
Host: www.wintellect.comHost: www.wintellect.com
Content-Type: application/x-www-form-urlencodedContent-Type: application/x-www-form-urlencoded
Content-Length: 7Content-Length: 7
a=2&b=2a=2&b=2
And here’s the Web service’s response:And here’s the Web service’s response:
HTTP/1.1 200 OKHTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8Content-Type: text/xml; charset=utf-8
Content-Length: 80Content-Length: 80
<?xml version="1.0" encoding="utf-8"?><?xml version="1.0" encoding="utf-8"?>
<<intint xmlns="http://tempuri.org/">4</int>xmlns="http://tempuri.org/">4</int>
The hard part of writing a Web service is parsing HTTP requests and generating HTTPThe hard part of writing a Web service is parsing HTTP requests and generating HTTP
responses. The .NET Framework insulates developers from the low-level details of HTTP,responses. The .NET Framework insulates developers from the low-level details of HTTP,
SOAP, and XML and provides a high-level framework for writing Web services and WebSOAP, and XML and provides a high-level framework for writing Web services and Web
service clients alike.service clients alike.
Web Services Description Language - WSDLWeb Services Description Language - WSDL
If other developers are to consume (that is, write clients for) a Web service that youIf other developers are to consume (that is, write clients for) a Web service that you
author, they need to know :author, they need to know :
• What Web methods your service publishesWhat Web methods your service publishes
• What protocols it supportsWhat protocols it supports
• The signatures of its methodsThe signatures of its methods
• The Web service’s location (URL)The Web service’s location (URL)
All this information and more can be expressed in a language called the WebAll this information and more can be expressed in a language called the Web
Services Description Language, or WSDL for short.Services Description Language, or WSDL for short.
WSDL is an XML vocabularyWSDL is an XML vocabulary http://www.w3.org/TR/wsdlhttp://www.w3.org/TR/wsdl..
Web Service Discovery—DISCO and UDDIWeb Service Discovery—DISCO and UDDI
Once a client has a WSDL contract describing a Web service, it has all theOnce a client has a WSDL contract describing a Web service, it has all the
information it needs to make calls to that Web service.information it needs to make calls to that Web service.
But when you publish a Web service by making it available on a Web server,But when you publish a Web service by making it available on a Web server,
how do clients find out where to get a WSDL contract? For that matter, how dohow do clients find out where to get a WSDL contract? For that matter, how do
clients know that your Web service exists in the first place?clients know that your Web service exists in the first place?
The answer comes in two parts:The answer comes in two parts:
DISCO and Universal Description, Discovery, and Integration (UDDI)DISCO and Universal Description, Discovery, and Integration (UDDI)
• DISCO is a file-based mechanism for local Web service discovery—that is, forDISCO is a file-based mechanism for local Web service discovery—that is, for
getting a list of available Web services from DISCO files deployed on Web servers.getting a list of available Web services from DISCO files deployed on Web servers.
• UDDI is a global Web service directory that is itself implemented as a Web service.UDDI is a global Web service directory that is itself implemented as a Web service.
Ad

More Related Content

What's hot (20)

OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...
Maarten Balliauw
 
Web API or WCF - An Architectural Comparison
Web API or WCF - An Architectural ComparisonWeb API or WCF - An Architectural Comparison
Web API or WCF - An Architectural Comparison
Adnan Masood
 
HTML5 Server Sent Events/JSF JAX 2011 Conference
HTML5 Server Sent Events/JSF  JAX 2011 ConferenceHTML5 Server Sent Events/JSF  JAX 2011 Conference
HTML5 Server Sent Events/JSF JAX 2011 Conference
Roger Kitain
 
ASP.NET Web API and HTTP Fundamentals
ASP.NET Web API and HTTP FundamentalsASP.NET Web API and HTTP Fundamentals
ASP.NET Web API and HTTP Fundamentals
Ido Flatow
 
Break out of The Box - Part 2
Break out of The Box - Part 2Break out of The Box - Part 2
Break out of The Box - Part 2
Karl-Henry Martinsson
 
AD102 - Break out of the Box
AD102 - Break out of the BoxAD102 - Break out of the Box
AD102 - Break out of the Box
Karl-Henry Martinsson
 
Web Server-Side Programming Techniques
Web Server-Side Programming TechniquesWeb Server-Side Programming Techniques
Web Server-Side Programming Techniques
guest8899ec02
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. REST
Sam Brannen
 
Apache web server
Apache web serverApache web server
Apache web server
Rishabh Bahukhandi
 
Common Gateway Interface
Common Gateway InterfaceCommon Gateway Interface
Common Gateway Interface
Balu Masulkar
 
40+ tips to use Postman more efficiently
40+ tips to use Postman more efficiently40+ tips to use Postman more efficiently
40+ tips to use Postman more efficiently
postmanclient
 
Understanding the Web through HTTP
Understanding the Web through HTTPUnderstanding the Web through HTTP
Understanding the Web through HTTP
Olivia Brundage
 
Building Web Services
Building Web ServicesBuilding Web Services
Building Web Services
Jussi Pohjolainen
 
Class 1 - World Wide Web Introduction
Class 1 - World Wide Web IntroductionClass 1 - World Wide Web Introduction
Class 1 - World Wide Web Introduction
Ahmed Swilam
 
Simple Object Access Protocol (SOAP)
Simple Object Access Protocol (SOAP)Simple Object Access Protocol (SOAP)
Simple Object Access Protocol (SOAP)
Mehul Boricha
 
Overview of java web services
Overview of java web servicesOverview of java web services
Overview of java web services
Todd Benson (I.T. SPECIALIST and I.T. SECURITY)
 
HTTP fundamentals for developers
HTTP fundamentals for developersHTTP fundamentals for developers
HTTP fundamentals for developers
Mario Cardinal
 
About Http Connection
About Http ConnectionAbout Http Connection
About Http Connection
Jussi Pohjolainen
 
Comet from JavaOne 2008
Comet from JavaOne 2008Comet from JavaOne 2008
Comet from JavaOne 2008
Joe Walker
 
Cgi
CgiCgi
Cgi
AkramWaseem
 
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...
Maarten Balliauw
 
Web API or WCF - An Architectural Comparison
Web API or WCF - An Architectural ComparisonWeb API or WCF - An Architectural Comparison
Web API or WCF - An Architectural Comparison
Adnan Masood
 
HTML5 Server Sent Events/JSF JAX 2011 Conference
HTML5 Server Sent Events/JSF  JAX 2011 ConferenceHTML5 Server Sent Events/JSF  JAX 2011 Conference
HTML5 Server Sent Events/JSF JAX 2011 Conference
Roger Kitain
 
ASP.NET Web API and HTTP Fundamentals
ASP.NET Web API and HTTP FundamentalsASP.NET Web API and HTTP Fundamentals
ASP.NET Web API and HTTP Fundamentals
Ido Flatow
 
Web Server-Side Programming Techniques
Web Server-Side Programming TechniquesWeb Server-Side Programming Techniques
Web Server-Side Programming Techniques
guest8899ec02
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. REST
Sam Brannen
 
Common Gateway Interface
Common Gateway InterfaceCommon Gateway Interface
Common Gateway Interface
Balu Masulkar
 
40+ tips to use Postman more efficiently
40+ tips to use Postman more efficiently40+ tips to use Postman more efficiently
40+ tips to use Postman more efficiently
postmanclient
 
Understanding the Web through HTTP
Understanding the Web through HTTPUnderstanding the Web through HTTP
Understanding the Web through HTTP
Olivia Brundage
 
Class 1 - World Wide Web Introduction
Class 1 - World Wide Web IntroductionClass 1 - World Wide Web Introduction
Class 1 - World Wide Web Introduction
Ahmed Swilam
 
Simple Object Access Protocol (SOAP)
Simple Object Access Protocol (SOAP)Simple Object Access Protocol (SOAP)
Simple Object Access Protocol (SOAP)
Mehul Boricha
 
HTTP fundamentals for developers
HTTP fundamentals for developersHTTP fundamentals for developers
HTTP fundamentals for developers
Mario Cardinal
 
Comet from JavaOne 2008
Comet from JavaOne 2008Comet from JavaOne 2008
Comet from JavaOne 2008
Joe Walker
 

Similar to Web services intro. (20)

Overview of ASP.Net by software outsourcing company india
Overview of ASP.Net by software outsourcing company indiaOverview of ASP.Net by software outsourcing company india
Overview of ASP.Net by software outsourcing company india
Jignesh Aakoliya
 
Lecture slides_Introduction to ASP.NET presentation
Lecture slides_Introduction to ASP.NET presentationLecture slides_Introduction to ASP.NET presentation
Lecture slides_Introduction to ASP.NET presentation
ssuserbf6ebe
 
C# Unit5 Notes
C# Unit5 NotesC# Unit5 Notes
C# Unit5 Notes
Sudarshan Dhondaley
 
Active server pages
Active server pagesActive server pages
Active server pages
mcatahir947
 
Web servers
Web serversWeb servers
Web servers
webhostingguy
 
Xml web services
Xml web servicesXml web services
Xml web services
Raghu nath
 
Guide Hosting Dictionary
Guide Hosting DictionaryGuide Hosting Dictionary
Guide Hosting Dictionary
HostGee.Com , Inc.
 
SynapseIndia asp.net2.0 ajax Development
SynapseIndia asp.net2.0 ajax DevelopmentSynapseIndia asp.net2.0 ajax Development
SynapseIndia asp.net2.0 ajax Development
Synapseindiappsdevelopment
 
web-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
web-servers3952 (1)qwjelkjqwlkjkqlwe.pptweb-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
web-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
20521742
 
Using Java to implement SOAP Web Services: JAX-WS
Using Java to implement SOAP Web Services: JAX-WS�Using Java to implement SOAP Web Services: JAX-WS�
Using Java to implement SOAP Web Services: JAX-WS
Katrien Verbert
 
Active Server Page - ( ASP )
Active Server Page - ( ASP )Active Server Page - ( ASP )
Active Server Page - ( ASP )
MohitJoshi154
 
GAC Java Presentation_Server Side Include_Cookies_Filters 2022.ppt
GAC Java Presentation_Server Side Include_Cookies_Filters 2022.pptGAC Java Presentation_Server Side Include_Cookies_Filters 2022.ppt
GAC Java Presentation_Server Side Include_Cookies_Filters 2022.ppt
CUO VEERANAN VEERANAN
 
Java servlet life cycle - methods ppt
Java servlet life cycle - methods pptJava servlet life cycle - methods ppt
Java servlet life cycle - methods ppt
kamal kotecha
 
Asp.net server controls
Asp.net server controlsAsp.net server controls
Asp.net server controls
Raed Aldahdooh
 
Xml and webservice
Xml and webserviceXml and webservice
Xml and webservice
saba sumreen
 
5-WebServers.ppt
5-WebServers.ppt5-WebServers.ppt
5-WebServers.ppt
webhostingguy
 
Fm 2
Fm 2Fm 2
Fm 2
sambavade
 
5-WebServers.ppt
5-WebServers.ppt5-WebServers.ppt
5-WebServers.ppt
webhostingguy
 
Asp.Net Ajax Component Development
Asp.Net Ajax Component DevelopmentAsp.Net Ajax Component Development
Asp.Net Ajax Component Development
Chui-Wen Chiu
 
06 web api
06 web api06 web api
06 web api
Bat Programmer
 
Overview of ASP.Net by software outsourcing company india
Overview of ASP.Net by software outsourcing company indiaOverview of ASP.Net by software outsourcing company india
Overview of ASP.Net by software outsourcing company india
Jignesh Aakoliya
 
Lecture slides_Introduction to ASP.NET presentation
Lecture slides_Introduction to ASP.NET presentationLecture slides_Introduction to ASP.NET presentation
Lecture slides_Introduction to ASP.NET presentation
ssuserbf6ebe
 
Active server pages
Active server pagesActive server pages
Active server pages
mcatahir947
 
Xml web services
Xml web servicesXml web services
Xml web services
Raghu nath
 
web-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
web-servers3952 (1)qwjelkjqwlkjkqlwe.pptweb-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
web-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
20521742
 
Using Java to implement SOAP Web Services: JAX-WS
Using Java to implement SOAP Web Services: JAX-WS�Using Java to implement SOAP Web Services: JAX-WS�
Using Java to implement SOAP Web Services: JAX-WS
Katrien Verbert
 
Active Server Page - ( ASP )
Active Server Page - ( ASP )Active Server Page - ( ASP )
Active Server Page - ( ASP )
MohitJoshi154
 
GAC Java Presentation_Server Side Include_Cookies_Filters 2022.ppt
GAC Java Presentation_Server Side Include_Cookies_Filters 2022.pptGAC Java Presentation_Server Side Include_Cookies_Filters 2022.ppt
GAC Java Presentation_Server Side Include_Cookies_Filters 2022.ppt
CUO VEERANAN VEERANAN
 
Java servlet life cycle - methods ppt
Java servlet life cycle - methods pptJava servlet life cycle - methods ppt
Java servlet life cycle - methods ppt
kamal kotecha
 
Asp.net server controls
Asp.net server controlsAsp.net server controls
Asp.net server controls
Raed Aldahdooh
 
Xml and webservice
Xml and webserviceXml and webservice
Xml and webservice
saba sumreen
 
Asp.Net Ajax Component Development
Asp.Net Ajax Component DevelopmentAsp.Net Ajax Component Development
Asp.Net Ajax Component Development
Chui-Wen Chiu
 
Ad

Recently uploaded (20)

Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
Unit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdfUnit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdf
KanchanPatil34
 
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
SPRING FESTIVITIES - UK AND USA -
SPRING FESTIVITIES - UK AND USA            -SPRING FESTIVITIES - UK AND USA            -
SPRING FESTIVITIES - UK AND USA -
Colégio Santa Teresinha
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
Unit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdfUnit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdf
KanchanPatil34
 
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
Ad

Web services intro.

  • 1. INTRODUCTION TO WEBINTRODUCTION TO WEB SERVICESSERVICES CS 795CS 795
  • 2. What is a Web Service ?What is a Web Service ? Web service is a means by which computers talk to each other over theWeb service is a means by which computers talk to each other over the web using HTTP and other universally supported protocols.web using HTTP and other universally supported protocols. A Web service is an application that:A Web service is an application that: • Runs on a Web serverRuns on a Web server • Exposes Web methods to interested callersExposes Web methods to interested callers • Listens for HTTP requests representing commands to invoke WebListens for HTTP requests representing commands to invoke Web methodsmethods • Executes Web methods and returns the resultsExecutes Web methods and returns the results
  • 3. Web Services is based on:Web Services is based on: • HTTP (Hypertext Transport Protocol)HTTP (Hypertext Transport Protocol) • SOAP (Simple Object Access Protocol)SOAP (Simple Object Access Protocol) • UDDI (Universal Description, Discovery and Integration)UDDI (Universal Description, Discovery and Integration) • WS-POLICY (Web Services Policy)WS-POLICY (Web Services Policy) Most Web services expect their Web methods to be invoked usingMost Web services expect their Web methods to be invoked using HTTP requests containing SOAP messages. SOAP is an XML-basedHTTP requests containing SOAP messages. SOAP is an XML-based vocabulary for performing remote procedure calls using HTTP andvocabulary for performing remote procedure calls using HTTP and other protocols.other protocols.
  • 4. Sample web serviceSample web service Calc.asmxCalc.asmx <%@ WebService Language="C#" CodeBehind="~/App_Code/WebService.cs" Class="WebService"<%@ WebService Language="C#" CodeBehind="~/App_Code/WebService.cs" Class="WebService" %>%> using System;using System; using System.Web.Services;using System.Web.Services; [WebService (Name="Calculator Web Service",[WebService (Name="Calculator Web Service", Description = "Perform simple math over the Web")]Description = "Perform simple math over the Web")] class CalcServiceclass CalcService {{ [WebMethod (Description = "Computes the sum of two integers")][WebMethod (Description = "Computes the sum of two integers")] public int Add (int a, int b) { return a+b;}public int Add (int a, int b) { return a+b;} [WebMethod (Description = "Computes the difference between two integers")][WebMethod (Description = "Computes the difference between two integers")] public int Subtract (int a, int b) { return a-b;}public int Subtract (int a, int b) { return a-b;} }}
  • 5. The example demonstrates several important principles of Web service programmingThe example demonstrates several important principles of Web service programming using the .NET Framework:using the .NET Framework: • Web services are implemented in ASMX files. ASMX is a special file name extensionWeb services are implemented in ASMX files. ASMX is a special file name extension registered to ASP.NET (specifically, to an ASP.NET HTTP handler) in Machine.config.registered to ASP.NET (specifically, to an ASP.NET HTTP handler) in Machine.config. • ASMX files begin with @ WebService directives. At a minimum, the directive mustASMX files begin with @ WebService directives. At a minimum, the directive must contain a Class attribute identifying the class that makes up the Web service.contain a Class attribute identifying the class that makes up the Web service. • Web service classes can be attributed with optional WebService attributes. The one inWeb service classes can be attributed with optional WebService attributes. The one in the previous example assigns the Web service a name and a description that show up inthe previous example assigns the Web service a name and a description that show up in the HTML page generated when a user calls up Calc.asmx in his or her browser.the HTML page generated when a user calls up Calc.asmx in his or her browser. • Web methods are declared by tagging public methods in the Web service class withWeb methods are declared by tagging public methods in the Web service class with WebMethod attributes. You can build helper methods into a Web service—methods thatWebMethod attributes. You can build helper methods into a Web service—methods that are used internally by Web methods but that are not exposed as Web methodsare used internally by Web methods but that are not exposed as Web methods themselves—by omitting the Webmethod attribute.themselves—by omitting the Webmethod attribute.
  • 6. Testing a Web Service :Testing a Web Service : How do you test an ASMX Web service? Simple: just call it up in your browser.How do you test an ASMX Web service? Simple: just call it up in your browser. ASP.NET responds to the HTTP request for Calc.asmx by generating an HTML pageASP.NET responds to the HTTP request for Calc.asmx by generating an HTML page that describes the Web service.that describes the Web service. • The name and description in the ASMX file’s WebService attribute appear at the top ofThe name and description in the ASMX file’s WebService attribute appear at the top of the page.the page. • Underneath is a list of Web methods that the service exposes, complete with theUnderneath is a list of Web methods that the service exposes, complete with the descriptions spelled out in the WebMethod attributes.descriptions spelled out in the WebMethod attributes. Click “Add” near the top of the page, and ASP.NET displays a page that you can use toClick “Add” near the top of the page, and ASP.NET displays a page that you can use to test the Add method .test the Add method . • ASP.NET knows the method name and signature because it reads them from theASP.NET knows the method name and signature because it reads them from the metadata in the DLL it compiled from Calc.asmx. It even generates an HTML form thatmetadata in the DLL it compiled from Calc.asmx. It even generates an HTML form that you can use to call the Add method with your choice of inputs.you can use to call the Add method with your choice of inputs. • The XML returned by the Web method appears in a separate browser windowThe XML returned by the Web method appears in a separate browser window The forms that ASP.NET generates on the fly from ASMX files enable you toThe forms that ASP.NET generates on the fly from ASMX files enable you to test the Web services that you write without writing special clients to test themtest the Web services that you write without writing special clients to test them with.with.
  • 7. Suppose you write a Web service that publishes Web methods named Add and SubtractSuppose you write a Web service that publishes Web methods named Add and Subtract that callers can use to add and subtract simple integers. If the service’s URL isthat callers can use to add and subtract simple integers. If the service’s URL is www.wintellect.com/calc.asmxwww.wintellect.com/calc.asmx, here’s how a client would invoke the Add method by, here’s how a client would invoke the Add method by transmitting atransmitting a SOAP envelopeSOAP envelope in an HTTP request. This example adds 2 and 2:in an HTTP request. This example adds 2 and 2: POSTPOST /calc.asmx HTTP/1.1/calc.asmx HTTP/1.1 Host: www.wintellect.comHost: www.wintellect.com Content-Type: text/Content-Type: text/xmlxml; charset=utf-8; charset=utf-8 Content-Length: 338Content-Length: 338 SOAPActionSOAPAction:: http://tempuri.org/Addhttp://tempuri.org/Add <?xml version="1.0" encoding="utf-8"?><?xml version="1.0" encoding="utf-8"?> <<soap:Envelopesoap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema instance"xmlns:xsi="http://www.w3.org/2001/XMLSchema instance" xmlns: xsd=http://www.w3.org/2001/XMLSchemaxmlns: xsd=http://www.w3.org/2001/XMLSchema xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <<soap:Bodysoap:Body>> <<AddAdd xmlns="http://tempuri.org/">xmlns="http://tempuri.org/"> <a>2</a><a>2</a> <b>2</b><b>2</b> </Add></Add> </soap:Body></soap:Body> </soap:Envelope></soap:Envelope>
  • 8. And here’s how the Web service would respond:And here’s how the Web service would respond: HTTP/1.1 200 OKHTTP/1.1 200 OK Content-Type: text/Content-Type: text/xmlxml; charset=utf-8; charset=utf-8 Content-Length: 353Content-Length: 353 <?xml version="1.0" encoding="utf-8"?><?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance<soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:xsd=http://www.w3.org/2001/XMLSchemaxmlns:xsd=http://www.w3.org/2001/XMLSchema xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body><soap:Body> <<AddResponseAddResponse xmlns="http://tempuri.org/">xmlns="http://tempuri.org/"> <<AddResultAddResult>4</AddResult>>4</AddResult> </AddResponse></AddResponse> </soap:Body></soap:Body> </soap:Envelope></soap:Envelope>
  • 9. The Web service’s job is to parse the SOAP envelope containing the inputs, add 2The Web service’s job is to parse the SOAP envelope containing the inputs, add 2 and 2, formulate a SOAP envelope containing the sum of 2 and 2, and return it to theand 2, formulate a SOAP envelope containing the sum of 2 and 2, and return it to the client in the body of the HTTP response. This, at the most elemental level, is what Webclient in the body of the HTTP response. This, at the most elemental level, is what Web services are all about.services are all about. Web services written with the .NET Framework also allow their Web methods toWeb services written with the .NET Framework also allow their Web methods to be invoked using ordinary HTTP GET and POST commands. The followingbe invoked using ordinary HTTP GET and POST commands. The following GETGET command adds 2 and 2 by invoking the Web service’s Add method:command adds 2 and 2 by invoking the Web service’s Add method: GETGET /calc.asmx/Add?a=2&b=2 HTTP/1.1/calc.asmx/Add?a=2&b=2 HTTP/1.1 Host: www.wintellect.comHost: www.wintellect.com The Web service responds as follows:The Web service responds as follows: HTTP/1.1 200 OKHTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8Content-Type: text/xml; charset=utf-8 Content-Length: 80Content-Length: 80 <?xml version="1.0" encoding="utf-8"?><?xml version="1.0" encoding="utf-8"?> <<intint xmlns="http://tempuri.org/">4</int>xmlns="http://tempuri.org/">4</int>
  • 10. Here’s a POST command that adds 2 and 2:Here’s a POST command that adds 2 and 2: POSTPOST /calc.asmx/Add HTTP/1.1/calc.asmx/Add HTTP/1.1 Host: www.wintellect.comHost: www.wintellect.com Content-Type: application/x-www-form-urlencodedContent-Type: application/x-www-form-urlencoded Content-Length: 7Content-Length: 7 a=2&b=2a=2&b=2 And here’s the Web service’s response:And here’s the Web service’s response: HTTP/1.1 200 OKHTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8Content-Type: text/xml; charset=utf-8 Content-Length: 80Content-Length: 80 <?xml version="1.0" encoding="utf-8"?><?xml version="1.0" encoding="utf-8"?> <<intint xmlns="http://tempuri.org/">4</int>xmlns="http://tempuri.org/">4</int> The hard part of writing a Web service is parsing HTTP requests and generating HTTPThe hard part of writing a Web service is parsing HTTP requests and generating HTTP responses. The .NET Framework insulates developers from the low-level details of HTTP,responses. The .NET Framework insulates developers from the low-level details of HTTP, SOAP, and XML and provides a high-level framework for writing Web services and WebSOAP, and XML and provides a high-level framework for writing Web services and Web service clients alike.service clients alike.
  • 11. Web Services Description Language - WSDLWeb Services Description Language - WSDL If other developers are to consume (that is, write clients for) a Web service that youIf other developers are to consume (that is, write clients for) a Web service that you author, they need to know :author, they need to know : • What Web methods your service publishesWhat Web methods your service publishes • What protocols it supportsWhat protocols it supports • The signatures of its methodsThe signatures of its methods • The Web service’s location (URL)The Web service’s location (URL) All this information and more can be expressed in a language called the WebAll this information and more can be expressed in a language called the Web Services Description Language, or WSDL for short.Services Description Language, or WSDL for short. WSDL is an XML vocabularyWSDL is an XML vocabulary http://www.w3.org/TR/wsdlhttp://www.w3.org/TR/wsdl..
  • 12. Web Service Discovery—DISCO and UDDIWeb Service Discovery—DISCO and UDDI Once a client has a WSDL contract describing a Web service, it has all theOnce a client has a WSDL contract describing a Web service, it has all the information it needs to make calls to that Web service.information it needs to make calls to that Web service. But when you publish a Web service by making it available on a Web server,But when you publish a Web service by making it available on a Web server, how do clients find out where to get a WSDL contract? For that matter, how dohow do clients find out where to get a WSDL contract? For that matter, how do clients know that your Web service exists in the first place?clients know that your Web service exists in the first place? The answer comes in two parts:The answer comes in two parts: DISCO and Universal Description, Discovery, and Integration (UDDI)DISCO and Universal Description, Discovery, and Integration (UDDI) • DISCO is a file-based mechanism for local Web service discovery—that is, forDISCO is a file-based mechanism for local Web service discovery—that is, for getting a list of available Web services from DISCO files deployed on Web servers.getting a list of available Web services from DISCO files deployed on Web servers. • UDDI is a global Web service directory that is itself implemented as a Web service.UDDI is a global Web service directory that is itself implemented as a Web service.