Web services allow applications to communicate with each other over the internet by exchanging XML-based messages. They make it possible to break apart large applications into smaller sub-applications that can be independently developed and can run either on the same or different operating systems. The essential components of a web service include the service provider that implements the service, the service requestor that consumes the service, a service registry for publishing and discovering services, and standards for transporting messages (SOAP/HTTP), describing services (WSDL) and discovering services (UDDI).
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
65 views47 pages
Introduction To Web Services
Web services allow applications to communicate with each other over the internet by exchanging XML-based messages. They make it possible to break apart large applications into smaller sub-applications that can be independently developed and can run either on the same or different operating systems. The essential components of a web service include the service provider that implements the service, the service requestor that consumes the service, a service registry for publishing and discovering services, and standards for transporting messages (SOAP/HTTP), describing services (WSDL) and discovering services (UDDI).
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 47
1
Introduction to Web Services
Saturday, October 29, 2011 2 What is Web Service? ! Currently, most websites limit themselves to extremely simple methods of integration. ! you might be provided with a link that opens another website in an existing frame on the current web page. ! Most important, units of application logic cant easily be reused between one application and another. Saturday, October 29, 2011 3 What is Web Service? The Web Today: The Human Centric !"#$%$& !"#$%$& !"#$%$& Internet Web Application Server HTTP GET HTTP Response HTML Saturday, October 29, 2011 4 What is Web Service? Web Services: Application Centric Web !"#$%$& !"#$%$& !"#$%$& Web Services Server Application B Application A Internet XML XML XML Saturday, October 29, 2011 5 What is Web Service? ! u:n:n:q ntunlwlznun: Internet w:a Private !Intranet" Network ! lz::uuuan:untuuun:u XML ! uuuaunu::uuu_unn:w:anulnlun:n:u ! auuunnauunn:unu XML ntuuun:u !WSDL" ! au:nnuwnnu:un:n:u !UDDI" Saturday, October 29, 2011 6 What is Web Service? Internet X M L X M L X M L Language: C# Operating System: Windows Mobile Language: Perl Operating System: Windows 2000 Language: Java Operating System: Linux Saturday, October 29, 2011 7 What is Web Service? Saturday, October 29, 2011 8 Uses of Web Services ! Business#to#Business ! Electronic Data Interchange !EDI" has been the technology of choice. ! EDI has been a technology that only large corporations could a$ord to leverage. ! XML could facilitate the low#cost and simplistic approach that was necessary for the B2B task. Saturday, October 29, 2011 9 Uses of Web Services ! Exposing Functionality to Customers ! An example might be the history report of a car but not just any report, especially not one that is displayed in a Web page. ! Rather, this information must be provided in XML so that a car dealer can build a used#car evaluation system that automatically approves or rejects trade#ins. Saturday, October 29, 2011 10 Uses of Web Services ! Integrating Heterogeneous Systems ! It's normal for companies to have computing systems dispersed across multiple platforms. ! Web Services is the solutions for these problems Saturday, October 29, 2011 11 Uses of Web Services ! Rapid Development Environment ! Web Services can make your project development environment operate faster ! Developers can work in their preferred environment, while still allowing them to produce an integrated solution. ! Web Services also force you to think in terms of interfaces. ! You don't have to worry about compiling another developer's source code or linking in libraries. Saturday, October 29, 2011 12 Web Service Architecture ! Web Services Role ! Service Provider ! This is the provider of the web service. The service provider implements the service and makes it available on the Internet. ! Service Requestor ! This is any consumer of the web service. The requestor utilizes an existing web service by opening a network connection and sending an XML request. Saturday, October 29, 2011 13 Web Service Architecture ! Service Registry ! This is a logically centralized directory of services. The registry provides a central place where developers can publish new services or nd existing ones. It therefore serves as a centralized clearinghouse for companies and their services. Saturday, October 29, 2011 14 Web Service Architecture Saturday, October 29, 2011 15 Web Service Architecture Saturday, October 29, 2011 16 Web Service Architecture Saturday, October 29, 2011 17 Web Service Architecture ! Web Services Protocol Stack !4 layers" ! Service Transport ! This layer is responsible for transporting messages between applications. Currently, this layer includes hypertext transfer protocol !HTTP", Simple Mail Transfer Protocol !SMTP", le transfer protocol !FTP", and newer protocols, such as Blocks Extensible Exchange Protocol !BEEP". Saturday, October 29, 2011 18 Web Service Architecture ! XML Messaging ! This layer is responsible for encoding messages in a common XML format so that messages can be understood at either end. Currently, this layer includes XML#RPC and SOAP. ! Service Description ! This layer is responsible for describing the public interface to a specic web service. Currently, service description is handled via the Web Service Description Language !WSDL". Saturday, October 29, 2011 19 Web Service Architecture ! Service Discovery ! This layer is responsible for centralizing services into a common registry, and providing easy publish/nd functionality. Currently, service discovery is handled via Universal Description, Discovery, and Integration !UDDI". Saturday, October 29, 2011 20 Service Transport ! HTTP ! HTTP is the most popular of Web services transport ! HTTP is simple, stable, and widely deployed ! HTTP is allowed by Firewall ! Allows XML, XML#RPC ! Security Concern Saturday, October 29, 2011 21 XML Messaging ! XML !eXtension Markup Language" ! Mid#1970s, Charles F Goldfarb introduce the world of Standard Generalized Markup Language !SGML". It is designed for data representation. ! HTML !Hyper Text Markup Language" is based on SGML. It is describe how to formatting and present the data Saturday, October 29, 2011 22 XML Messaging ! XML !eXtension Markup Language" ! Mid#1970s, Charles F Goldfarb introduce the world of Standard Generalized Markup Language !SGML". It is designed for data representation. ! HTML !Hyper Text Markup Language" is based on SGML. It is describe how to formatting and present the data Saturday, October 29, 2011 23 XML Messaging ! XML !eXtension Markup Language" ! XML is really just a collection of data consisting of both physical and logical structure. ! Physically, the document consists of textual information. It contains entities that can reference other entities that are located elsewhere in memory, on a hard disk, or, more importantly, on the Web. ! The logical structure of an XML document includes processing instructions, declarations, comments, and elements. Saturday, October 29, 2011 24 XML Messaging ! XML !eXtension Markup Language" <?xml version="1.0" ?> <Car Year="2005"> <Make>Chevrolet</Make> <Model>Optra<Model> <Color>Blue</Color> </Car> Saturday, October 29, 2011 25 XML Messaging ! XML#RPC !Remote Procedure Call" ! It is the simple protocol that uses XML messaging for perform RPC. ! Message send via HTTP POST. ! XML#RPC is platform independent. JAVA client can sent XML#RPC for call .NET Server. Saturday, October 29, 2011 26 XML Messaging ! XML#RPC !Request" <?xml version="1.0" encoding="ISO#8859#1"? > <methodCall> <methodName>weather.getWeather</ methodName> <params> <param><value>10016</value></param> </params> </methodCall> Saturday, October 29, 2011 27 XML Messaging ! XML#RPC !Response" <?xml version="1.0" encoding="ISO#8859#1"? > <methodResponse> <params> <param> <value><int>65</int></value> </param> </params> </methodResponse> Saturday, October 29, 2011 28 XML Messaging ! SOAP !Simple Object Access Protocol" ! SOAP is an XML#based protocol for exchanging information between computers. ! SOAP can be used in a variety of messaging systems, and can be delivered via a variety of transport protocols, the main focus of SOAP is RPCs transported via HTTP. ! Like XML#RPC, SOAP is platform# independent and therefore enables diverse applications to communicate. Saturday, October 29, 2011 29 XML Messaging ! SOAP (Request) <?xml version='1.0' encoding='UTF#8'?> <SOAP#ENV:Envelope xmlns:SOAP#ENV="http://www.w3.org/2001/09/soap# envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema#instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SOAP#ENV:Body> <ns1:getWeather xmlns:ns1="urn:examples:weatherservice" SOAP#ENV:encodingStyle="http://www.w3.org/2001/09/soap# encoding/"> <zipcode xsi:type="xsd:string">10016</zipcode> </ns1:getWeather> </SOAP#ENV:Body> </SOAP#ENV:Envelope> Saturday, October 29, 2011 30 XML Messaging ! SOAP (Response) <?xml version='1.0' encoding='UTF#8'?> <SOAP#ENV:Envelope xmlns:SOAP#ENV="http://www.w3.org/2001/09/soap#envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema#instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SOAP#ENV:Body> <ns1:getWeatherResponse xmlns:ns1="urn:examples:weatherservice" SOAP#ENV:encodingStyle="http://www.w3.org/2001/09/soap# encoding/"> <return xsi:type="xsd:int">65</return> </ns1:getWeatherResponse> </SOAP#ENV:Body> </SOAP#ENV:Envelope> Saturday, October 29, 2011 31 Service Description: WSDL ! WSDL !Web Services Description Language" ! WSDL is an XML grammar for specifying a public interface for a web service. ! Information on all publicly available functions. ! Data type information for all XML message. ! Biding information about the specic transport protocol to be used. ! Address information for locating the speciedservice. ! Describing of SOAP Services Saturday, October 29, 2011 32 Service Description: WSDL ! WSDL !Example" Saturday, October 29, 2011 33 Service Discovery: UDDI ! Universal Description, Discovery, and Integration ! UDDI is was originally created by Microsoft, IBM and Ariba ! UDDI is the place the to nd and discover the Web Service ! Public UDDI or Private UDDI !Public: http:// uddi.microsoft.com" Saturday, October 29, 2011 34 Service Discovery: UDDI Saturday, October 29, 2011 35 Security Consideration ! Condential ! both XML#RPC and SOAP run primarily on top of HTTP, and XML communications can therefore be encrypted via the Secure Sockets Layer !SSL". SSL is a proven technology, is widely deployed, and is therefore a very viable option for encrypting messages. ! Authentication ! Network Security Saturday, October 29, 2011 36 Security Consideration ! Authentication ! One solution is to leverage HTTP authentication. HTTP includes built#in support for Basic and Digest authentication, and services can therefore be protected in much the same manner as HTML documents are currently protected. Most security experts, however, agree that HTTP authentication is a relatively weak option. Saturday, October 29, 2011 37 All Together ! Services Provider Saturday, October 29, 2011 38 All Together ! Services Requestor Saturday, October 29, 2011 39 u::uzuua: Web Services nan:ntuuu:nn:n ! u:r.a.r.a.a-..a.aa:laa.a.. aa.a::a UDDI ! a.a.::r.aa.a...:.a.-..a.J:lJla.::a:.al: ..a:. Application to Application (A2A) aa...a.J.:.. +:r. Web Services ! .aa.:lJl-.:.:.al:J::..a....a.rl-- .:.l:a.ua: Web Services ! .aa:r:l:a.ua:..:::..rl..J:a:.a.a Web Services .u:r.a.r.a.a Saturday, October 29, 2011 40 a.J..aal- Web Services ! n:tzauu:::uua:autnnnulua:nn: Enterprise Application Integration (EAI) ! n:tzauu:::uua:autnnnun:uwanwaunulua:nn: ! ::uu:uaatann:auna e-Government ! ::uun:lwu:n:u::zzunntnu: e-Government (G2G2C) ! ::uun:nuan:n:atann:auna (G2B e-Procurement) ! ::uuu:nnuaaatann:auna e-Business ! n:tzauu:::uua:autnnua:u:unnua nu u:unnuu ! B2B e-Marketplace ! e-Supply Chain Management Saturday, October 29, 2011 41 Government Data Exchange Application Center Server Gateway '()*+*)+,(-.%/"01 2&3456%&7-%6 89)%*+6*)+,(-.%/"01 GDI Data Legacy Data Government Data Exchange (GDX) Gateway SOAP SOAP Applicatio n Web browser SOAP SOAP Servlet Aspx HTTP/ HTTPS HTTP/ HTTPS HTTP/ HTTPS Saturday, October 29, 2011 42 Question & Answer Saturday, October 29, 2011 43 r:r: ! u:unuua:uzuna:n:nnu::uuaw:u nnnuaunua:ann nulwann au:nn::aauaunnnun: Internet n n:un:ta: ! utuu Saturday, October 29, 2011 44 r:r: ! aun:uuuw:wu:na:n:nnu::uuaw:u lwu:unn:: ua:aun:uun:q nuuun: n::aautaun:n:lwu:n: ua:a:/a:ua un:nua:nun: Internet nuau:n n:u::unu::uuua:u:unnuuun:nlu nun ! ls web Services tnaava4uvnavnvavaau tavna4 va4/saunvnuaavtnalnna4avnu v:uuavq 1nlvnvn Saturday, October 29, 2011 45 r:r: ! w:a::naun Big A na:n:::uuaw:uz:u u::u:anan:uuaunua:unun ua:au n:q unnnugwnaun:q u::uuntnu uauan:uun:nu ! ls web Services tnavauvausauanavsau vanv:uulvuna:aasa Saturday, October 29, 2011 46 r:r: ! u:un:nuunuw:wu:na:n:nnu::uu aw:ulwannaanzu:n ua:aun:nnuun: n:aun::aau:n ua:w Dealer uu:n nu::uu:na:uan:aunnluanun: 3 un au:nwuunn 360 a:n ua:lwtwun au:nu:utuauu Content nau:aa:: ! utuu Saturday, October 29, 2011 47 r:r: ! tn:auuaunu::u:una:n:nnu::uu aw:ulwu:n:a:wa:nn nu::uuau:n n::aauwa:nn:: nnnn::u:ulutn:a uuuuu Real Time nuntwununa:nn: na::wa: nu::uuna:n:aulwu:n:unun na:tnu: 24 zu. 7 :u ! ls web Services tnaava4 navuantauv sauana4nnsa4v:uuna4q nlslvuna:v4uvu Saturday, October 29, 2011