{"id":351,"date":"2018-07-27T10:52:26","date_gmt":"2018-07-27T10:52:26","guid":{"rendered":"http:\/\/csp12.epgpbooks.inflibnet.ac.in\/?post_type=chapter&#038;p=351"},"modified":"2018-08-02T08:54:21","modified_gmt":"2018-08-02T08:54:21","slug":"web-services-i","status":"publish","type":"chapter","link":"https:\/\/ebooks.inflibnet.ac.in\/csp12\/chapter\/web-services-i\/","title":{"rendered":"WEB SERVICES &#8211; I"},"content":{"raw":"<strong>WEB SERVICES - I<\/strong>\r\n\r\n&nbsp;\r\n\r\n<strong>Learning Objectives:<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">This module is intended to learn about the fundamentals of web services, different types of web services and to understand about the architecture of web services along with its implementation.<\/p>\r\n\r\n<ol>\r\n \t<li><strong>Overview of DISTRIBUTED COMPUTING TECHNOLOGIES<\/strong><\/li>\r\n<\/ol>\r\n<p style=\"text-align: justify\">To know\/understand the basics of web services, an overview of various distributed computing technologies has been discussed here<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong>CORBA (OMG) <\/strong>: It is standards-based, vendor-neutral, and language-agnostic middleware. This is very powerful but limited by its complicated way of utilizing the power and flexibility of the Internet.<\/p>\r\n<p style=\"text-align: justify\"><strong>DCOM (Microsoft): <\/strong>This is a Distributed Computing platform which is closely tied to Microsoft components such as OLE, COM and ActiveX.<\/p>\r\n<p style=\"text-align: justify\"><strong>RMI (Sun Microsystems):<\/strong>This kind of middleware is purely Java based effort which doesn\u2019t play well with other languages. This is an J2EE platform integrated RMI with IIOP.<\/p>\r\n<p style=\"text-align: justify\"><strong>Web Services (W3C): <\/strong>In this series, Web services are more of an evolution than a revolution .<\/p>\r\n\r\n<ol start=\"2\">\r\n \t<li><strong> INTRODUCTION TO WEB SERVICE<\/strong><\/li>\r\n<\/ol>\r\n<p style=\"text-align: justify\">Figure 1. shows an environment where data need to get shared between devices in a networkwhich uses a standard web protocol like HTTP in addition to the servers, browsers, firewall, security and databases.Here, HTTP is supported by all Web Browser, Servers and many Programming Languages Today. But an ideal solution which can support all of these entities in a real time environment is Web Services. Because Web services uses standard web protocols like HTTP and it is supported by all servers, browsers and PL\u2019s.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: center\"><img class=\"size-full wp-image-352 aligncenter\" src=\"http:\/\/csp12.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-220.png\" alt=\"\" width=\"543\" height=\"329\" \/><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">A web service is a network accessible interface to application programs, built using standard Internet technologies as shown in Figure 2. Clients of web services do not need to know how it is implemented.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: center\"><img class=\"size-full wp-image-353 aligncenter\" src=\"http:\/\/csp12.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-221.png\" alt=\"\" width=\"444\" height=\"216\" \/><\/p>\r\n\r\n<div>\r\n\r\n<strong>\u00a0 \u00a03.Web ServicesHistory<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Web services are evolved from previous technologies that served the same purpose such as RPC, ORPC (DCOM, CORBA and JAVA RMI) etc.Web Services are intended to solve three main problems such as interoperability, firewall traversal and complexity.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong>Firewall traversal<\/strong>: The 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.<\/p>\r\n\r\n<\/div>\r\n<p style=\"text-align: justify\"><strong>\u00a0 Complexity: <\/strong>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 need to be learnt to implement these services.<\/p>\r\n&nbsp;\r\n\r\nA more precise definition of web service can be stated as an application component that:\r\n<ul>\r\n \t<li>Communicates via open protocols (HTTP, SMTP, etc.)<\/li>\r\n \t<li>Processes XML messages framed using SOAP<\/li>\r\n \t<li>Describes its messages using XML Schema<\/li>\r\n \t<li>Provides an endpoint description using WSDL<\/li>\r\n \t<li>Can be discovered using UDDI<\/li>\r\n<\/ul>\r\n<ol start=\"4\">\r\n \t<li><strong>WEB EVOLUTION<\/strong><\/li>\r\n<\/ol>\r\n<p style=\"text-align: justify\"><strong>\u00a0<\/strong>The evolution of web technology has been projected in the table below (Table 1): Table 1. Evolution of Web Technologies<\/p>\r\n&nbsp;\r\n<p style=\"text-align: center\"><img class=\"size-full wp-image-354 aligncenter\" src=\"http:\/\/csp12.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-222.png\" alt=\"\" width=\"444\" height=\"261\" \/><\/p>\r\n&nbsp;\r\n<div>\r\n<p style=\"text-align: justify\">As a result of the evolution of web technologies, two main types of Web Services have been emerged. They are 1. SOAP based web services and 2. RESTful web services.<\/p>\r\n&nbsp;\r\n\r\n<strong>5.\u00a0<\/strong><strong>Web Services Advantages<\/strong>\r\n\r\n<strong>\u00a0<\/strong>\r\n\r\nThe advantages of Web Services are listed below:\r\n<ul>\r\n \t<li>platform-independence<\/li>\r\n \t<li>reusability<\/li>\r\n \t<li>interoperability<\/li>\r\n \t<li>scalability<\/li>\r\n \t<li>adaptability<\/li>\r\n<\/ul>\r\n<\/div>\r\n<div>\r\n\r\n<strong>\u00a0 6.\u00a0<\/strong><strong>Web Services Implementation:<\/strong>\r\n<p style=\"text-align: justify\">There are four major web service components apart from XML Technologies. They are listed below:<\/p>\r\n\r\n<ul>\r\n \t<li>XML<\/li>\r\n \t<li>SOAP<\/li>\r\n \t<li>UDDI<\/li>\r\n \t<li>WSDL<\/li>\r\n<\/ul>\r\n<p style=\"text-align: justify\">\u00a0 \u00a0\u2022 XML \u2013 eXtensible Markup Language \u2013 This is a uniform data representation and exchange mechanism used for data transfer.<\/p>\r\n<p style=\"text-align: justify\">\u2022 SOAP \u2013 Simple Object Access Protocol \u2013 This protocols helps for a standard way for communication.<\/p>\r\n<p style=\"text-align: justify\">\u2022\u00a0 UDDI \u2013 Universal Description, Discovery and Integration specification \u2013 This is a mechanism which is used to register and locate Web Service based application.<\/p>\r\n<p style=\"text-align: justify\">\u2022\u00a0 WSDL \u2013 Web Services Description Language \u2013 A standard meta language which is used to describe the services offered.<\/p>\r\n&nbsp;\r\n\r\nBefore learning about the significance of web services and its architecture, let us have an\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">overview of XML technologies. A brief description about XML has been studied in the earlier modules itself. To have a glimpse, XML is a collection of extensible information representation and manipulation language. XML itself is a base document standard. XML Schema is used for data typing and document structuring. XSLT is used here for transforming XML to other XML or other formats. XML Parsing strategies are used for XML document processing. There are two ways to parse an XML document either using XML DOM \u2013 Document Object Model or SAX parser \u2013 Simple API for XML. Apart from that, XML consists of XPATH and XQUERY languages to query the XML document.<\/p>\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<strong>7.<\/strong>\u00a0<strong>Working of a Web Service<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">To initiate a web service, the client sends a requestand searches the UDDI registry\/ Web service Registry for the availability of a particular web service. Once it is available in UDDI, it\u00a0<span style=\"text-align: initial;font-size: 1em\">fetches and reads the WSDL of that service. Then it contacts the corresponding server(Publisher) which provides that service by sending a SOAP message consisting of clients request. The listener on the other hand executes the particular service requested and sends the results back to the client(Consumer). The entire flow of web service process has been shown in the figure 3.<\/span><\/p>\r\n\r\n<\/div>\r\n<p style=\"text-align: center\"><img class=\"size-full wp-image-355 aligncenter\" src=\"http:\/\/csp12.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-223.png\" alt=\"\" width=\"397\" height=\"386\" \/><\/p>\r\n&nbsp;\r\n<ol start=\"8\">\r\n \t<li><strong> WEB SERVICES ARCHITECTURE<\/strong><\/li>\r\n<\/ol>\r\n<p style=\"text-align: justify\">The simplest Web service system has two participants which includes a service producer (provider) and a service consumer (requester).The provider presents the interface and implementation of the service, whereas the requester uses the web service as shown in figure 4.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: center\"><img class=\"size-full wp-image-356 aligncenter\" src=\"http:\/\/csp12.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-224.png\" alt=\"\" width=\"455\" height=\"215\" \/><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Web Services architecture also called as Service Oriented Architecture is a more sophisticated system where a registry, acts as a broker for Web services.A provider publishes services to the registry and the consumer discovers services in the registry as shown in the figure 5.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: center\"><img class=\"size-full wp-image-357 aligncenter\" src=\"http:\/\/csp12.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-225.png\" alt=\"\" width=\"282\" height=\"207\" \/><\/p>\r\n\r\n<div>\r\n\r\n<strong>\u00a0 9.\u00a0<\/strong><strong>Web Services Components<\/strong>\r\n\r\n<strong>\u00a0<\/strong>\r\n<p style=\"text-align: justify\"><strong>\u00a0<\/strong>Let us have an overview of the two important Web services components in this section. 1. SOAP and 2. WSDL.<strong>\u00a0<\/strong><\/p>\r\n<strong>\u00a0<\/strong>\r\n\r\n<strong>9.1 SOAP (Simple Object Access Protocol)<\/strong>\r\n\r\n<strong>\u00a0<\/strong>\r\n<p style=\"text-align: justify\">This is a standard way used for communication. SOAP is an industry accepted W3C specification for a ubiquitous XML distributed computing infrastructure. SOAP is a mechanism for defining the unit of communication and for error handling. It is an extensibility mechanism that lives above the transport layer of OSI. It is a mechanism that allows the transmission of XML documents, regardless of transport layer protocol.<\/p>\r\n\r\n<ul>\r\n \t<li style=\"text-align: justify\">SOAP defines some key functions needed in a distributed computing environment, namely:<\/li>\r\n \t<li style=\"text-align: justify\">One-way stateless message exchange mechanism.<\/li>\r\n \t<li style=\"text-align: justify\">Message processing model (roles, must-understand, intermediary) for SOAP nodes<\/li>\r\n \t<li style=\"text-align: justify\">Abstract, structured message definition which is able to run on different serializations<\/li>\r\n \t<li style=\"text-align: justify\"><span style=\"font-size: 1em\">Definition of bindings to transport protocols (HTTP for firewall traversal, SMTP) is possible.<\/span><\/li>\r\n \t<li style=\"text-align: justify\"><span style=\"font-size: 1em\">Extension mechanism through header elements enabling functionality defined in different XML namespaces such as WS-addressing<\/span><\/li>\r\n \t<li style=\"text-align: justify\"><span style=\"font-size: 1em\">Fault handling model<\/span><\/li>\r\n<\/ul>\r\n<\/div>\r\n<strong>\u00a0 \u00a09.1.1 SOAP Messages (Logical &amp; Physical Structure):<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Regarding the structure of SOAP messages, the root element of a SOAP message is the Envelope element.It contains an optional Header element and the required Body Elements called Faults which are used to describe the exceptional situations.This can also contain optional Attachments in MIME encoding for exchanging binary data. The format of SOAP Envelope and attachment (SOAP message) is shown in the figure 6.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: center\"><img class=\"size-full wp-image-358 aligncenter\" src=\"http:\/\/csp12.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-226.png\" alt=\"\" width=\"252\" height=\"305\" \/><\/p>\r\n\r\n<div>\r\n\r\n<strong>\u00a0 \u00a0 <\/strong>\r\n\r\n<strong>9.1.2 SOAP Example<\/strong>\r\n\r\n&nbsp;\r\n\r\nStructure of a real XML based SOAP message example has been given below:\r\n\r\n&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\r\n\r\n&lt;soap:Envelope\r\n\r\nsoap:encodingStyle=\"http:\/\/soap.org\/soap\/encoding\/\"xmlns:xsd=\"http:\/\/www.w3.org\/2001\/XMLSchema\" xmlns:soap=\"http:\/\/xmlsoap.org\/soap\/envelope\/\" xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-inst\"&gt;\r\n\r\n&lt;soap:Header&gt;\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">&lt;!-- Transactions, priorites, etc. --&gt;<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">&lt;\/soap:Header&gt;<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">&lt;soap:Body&gt;<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">&lt;!-- Some content --&gt;<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">&lt;\/soap:Body&gt;<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">&lt;\/soap:Envelope&gt;<\/span>\r\n\r\n<\/div>\r\n<strong>\u00a0 \u00a0 9.1.3 SOAP Message Transmission<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">In the process of transmission, SOAP Message Transmission involves three main roles as shown in the figure 7:The SOAP Sender creates and sends a SOAP Message to an ultimate SOAP Receiver.One or more optional SOAP Intermediaries can be positioned to intercept messages between the sender and the receiver. They can perform filtering, logging, catching etc.The\u00a0 SOAP\u00a0 sender\u2019s\u00a0 intended\u00a0 destination\u00a0 is\u00a0 called\u00a0 the\u00a0 Ultimate\u00a0 SOAP Receiver.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: center\"><img class=\"size-full wp-image-359 aligncenter\" src=\"http:\/\/csp12.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-227.png\" alt=\"\" width=\"447\" height=\"114\" \/><\/p>\r\n\r\n<div>\r\n<p style=\"text-align: justify\"><strong>\u00a0 9.2 UDDI (Universal Description, Discovery and Integration specification)<\/strong>: This is a registry based mechanism which is used to register and locate Web Service based application.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong>9.3 WSDL (Web Services Description Language):<\/strong>A standard meta language which is used to describe the services offered. Web Services Description Language (WSDL) is an XML-based language for describing about web services and how to access them. WSDL was developed jointly by Microsoft and IBM. WSDL is an XML based protocol which is used for information exchange in decentralized and distributed environments. This is the standard format used for describing a web service. WSDL\u00a0<span style=\"text-align: initial;font-size: 1em\">definition\u00a0 describes\u00a0 how\u00a0 to\u00a0 access\u00a0 a\u00a0 web\u00a0 service\u00a0 and\u00a0 what\u00a0 operations\u00a0 it\u00a0 would\u00a0<\/span><span style=\"text-align: initial;font-size: 1em\">perform. This is also used for describing how to interface with XML-based services\u00a0<\/span><span style=\"text-align: initial;font-size: 1em\">and it is an integral part of UDDI, an XML-based worldwide business registry.<\/span><span style=\"text-align: initial;font-size: 1em\">WSDL is the language that UDDI uses and is pronounced as 'wiz-dull' and spelled out\u00a0<\/span><span style=\"text-align: initial;font-size: 1em\">as \u201cW-S-D-L\u201d.<\/span><\/p>\r\n\r\n<\/div>\r\n<strong>\u00a0 \u00a09.3.1 Major WSDL Elements<\/strong>:\r\n\r\n&nbsp;\r\n\r\nThe major elements of the WSDL with its description has been defined below. The physical and logical aspects of WSDL elements has been shown in the figure 8.The major WSDL elements encompasses the top level XML element known as the <strong>definitions<\/strong> element.&lt;definitions&gt; . . . &lt;\/definitions&gt;In addition to definitions, services are defined using eight major elements as listed below:\r\n<ul>\r\n \t<li style=\"text-align: justify\"><span style=\"font-size: 1em\">\u00a0<\/span><strong style=\"font-size: 1em\">Types: <\/strong><span style=\"font-size: 1em\">Data type definitions which is used to describe the messages exchanged.<\/span><\/li>\r\n \t<li style=\"text-align: justify\"><strong style=\"font-size: 1em\">\u00a0Message:<\/strong><span style=\"font-size: 1em\">The abstract definition of the data being transmitted in a message.\u00a0<\/span><\/li>\r\n \t<li style=\"text-align: justify\"><strong style=\"font-size: 1em\">\u00a0Parts: <\/strong><span style=\"font-size: 1em\">Each of which has one of the defined types.<\/span><\/li>\r\n \t<li style=\"text-align: justify\"><span style=\"font-size: 1em\"><strong>\u00a0O<\/strong><\/span><strong style=\"font-size: 1em\">peration: <\/strong><span style=\"font-size: 1em\">Each operation can have an input message and an output message.<\/span><\/li>\r\n \t<li style=\"text-align: justify\"><span style=\"font-size: 1em\"><strong>\u00a0P<\/strong><\/span><strong style=\"font-size: 1em\">ort type<\/strong><span style=\"font-size: 1em\">: A set of operations.<\/span><\/li>\r\n \t<li style=\"text-align: justify\"><strong style=\"font-size: 1em\">\u00a0Binding<\/strong><span style=\"font-size: 1em\">: It specifies concrete protocol and data formats for the operations and messages defined by a particular portType.<\/span><\/li>\r\n \t<li style=\"text-align: justify\"><span style=\"font-size: 1em\"><strong>\u00a0P<\/strong><\/span><strong style=\"font-size: 1em\">ort: <\/strong><span style=\"font-size: 1em\">Specifies an address for a binding, thus defining a singlecommunication.<\/span><\/li>\r\n \t<li style=\"text-align: justify\"><strong style=\"font-size: 1em\">\u00a0Service<\/strong><span style=\"font-size: 1em\">: It isused to aggregate a set of related ports.<\/span><\/li>\r\n<\/ul>\r\n<p style=\"text-align: center\"><img class=\"size-full wp-image-360 aligncenter\" src=\"http:\/\/csp12.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-228.png\" alt=\"\" width=\"402\" height=\"247\" \/><\/p>\r\n&nbsp;\r\n\r\nThe main structure of a WSDL document looks as below:\r\n\r\n&nbsp;\r\n\r\n&lt;definitions&gt;\r\n\r\n&lt;types&gt;\u00a0 data type definitions........ &lt;\/types&gt;\r\n\r\n&lt;message&gt;\r\n\r\ndefinition of the data being communicated....\r\n\r\n&lt;\/message&gt;\r\n\r\n&lt;portType&gt;\u00a0 set of operations...... &lt;\/portType&gt;\r\n\r\n&lt;binding&gt;protocol and data format specification....\r\n\r\n&lt;\/binding&gt;\r\n\r\n&lt;\/definitions&gt;\r\n<ol start=\"10\">\r\n \t<li><strong> Web Service Stack<\/strong><\/li>\r\n<\/ol>\r\n<p style=\"text-align: justify\">Web service stack is a set of standards for which is used for implementing web services. As discussed above in the web service components, web service stack consists of 4 layers as shown in the figure 9. The top most layer UDDI extends from URI which is used for publication and discovery of web services. The third layer of the stack corresponds to the WSDL file extends from HTML used for describing the web services for better access. The second layer of the stack corresponds to the SOAP message exchanged between the consumer and the publisher and the lower layer of the stack corresponds to the the different transport protocols used.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: center\"><img class=\"size-full wp-image-361 aligncenter\" src=\"http:\/\/csp12.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-229.png\" alt=\"\" width=\"402\" height=\"174\" \/><\/p>\r\n\r\n<div>\r\n\r\n<strong>11.\u00a0 <\/strong><strong>Basic Web Service Usage Scenario<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Once again , a basic web service usage scenario has been illustrated using the figure 10. In this scenario, first the WSDL file is registered manually. The request is sent by the web service lookup to the web service respository (UDDI) using http get method to get the WSDL file. Then using the WSDL file description the client application is written\u00a0\u00a0<span style=\"text-align: initial;font-size: 1em\">and it is deployed. Once the application is deployed, the application communicates with the service provider using SOAP request and receives a SOAP respose.<\/span><\/p>\r\n&nbsp;\r\n<p style=\"text-align: center\"><img class=\"size-full wp-image-362 aligncenter\" src=\"http:\/\/csp12.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-230.png\" alt=\"\" width=\"383\" height=\"277\" \/><\/p>\r\n\r\n<\/div>\r\n<p style=\"text-align: left\">\u00a0 \u00a0 \u00a0Scenario <strong>12. Web Service Applications<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Application Server (web service-enabled)provides implementation of services and exposes it through WSDL\/SOAPimplementation in Java, EJB, .NET (C#) environments etc.Here, SOAP server implements the SOAP protocol. The SOAP clientimplements the SOAP protocol on the client site.<\/p>\r\n&nbsp;\r\n\r\n<strong>Summary<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">This module has described about the fundamentals of Web services and various types of Web services. This module also discussed about the architecture and components of web services. We have also learnt about the implementation of the Web services.<\/p>\r\n&nbsp;\r\n\r\n<strong>Web Links<\/strong>\r\n<ul>\r\n \t<li style=\"text-align: justify\">https:\/\/www.cs.colorado.edu\/~kena\/classes\/7818\/f06\/lectures.html<\/li>\r\n \t<li style=\"text-align: justify\">http:\/\/www.java4s.com\/web-services\/<\/li>\r\n \t<li style=\"text-align: justify\">https:\/\/www.cl.cam.ac.uk\/~ib249\/teaching\/Lecture1.handout.pdf<\/li>\r\n \t<li style=\"text-align: justify\">https:\/\/www.w3schools.com\/xml\/xml_services.asp<\/li>\r\n \t<li style=\"text-align: justify\">https:\/\/www.javatpoint.com\/web-services-tutorial<\/li>\r\n \t<li style=\"text-align: justify\">https:\/\/www.cs.colorado.edu\/~kena\/classes\/7818\/f08\/lectures\/lecture_4_netbeans_presenta.pdf<\/li>\r\n \t<li style=\"text-align: justify\">http:\/\/vhost3.cs.rit.edu\/project_web_page\/webservices.html<\/li>\r\n \t<li style=\"text-align: justify\">http:\/\/cs.ulb.ac.be\/public\/teaching\/infoh511<\/li>\r\n \t<li style=\"text-align: justify\">https:\/\/www.fas.harvard.edu\/~cscie259\/distribution\/lectures\/1\/lecture1.pdf<\/li>\r\n \t<li style=\"text-align: justify\">http:\/\/www.java2blog.com\/2013\/03\/web-service-tutorial.html<\/li>\r\n \t<li style=\"text-align: justify\">David Chappell and Tyler Jewell, \u201cJava Web Services\u201d, First Edition, O'Reilly, 2002<\/li>\r\n \t<li style=\"text-align: justify\">Paul J. Deitel, Harvey Deitel, \u201cJava How to Program\u201d, Ninth Edition, Pearson,2012.<\/li>\r\n<\/ul>","rendered":"<p><strong>WEB SERVICES &#8211; I<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Learning Objectives:<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">This module is intended to learn about the fundamentals of web services, different types of web services and to understand about the architecture of web services along with its implementation.<\/p>\n<ol>\n<li><strong>Overview of DISTRIBUTED COMPUTING TECHNOLOGIES<\/strong><\/li>\n<\/ol>\n<p style=\"text-align: justify\">To know\/understand the basics of web services, an overview of various distributed computing technologies has been discussed here<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong>CORBA (OMG) <\/strong>: It is standards-based, vendor-neutral, and language-agnostic middleware. This is very powerful but limited by its complicated way of utilizing the power and flexibility of the Internet.<\/p>\n<p style=\"text-align: justify\"><strong>DCOM (Microsoft): <\/strong>This is a Distributed Computing platform which is closely tied to Microsoft components such as OLE, COM and ActiveX.<\/p>\n<p style=\"text-align: justify\"><strong>RMI (Sun Microsystems):<\/strong>This kind of middleware is purely Java based effort which doesn\u2019t play well with other languages. This is an J2EE platform integrated RMI with IIOP.<\/p>\n<p style=\"text-align: justify\"><strong>Web Services (W3C): <\/strong>In this series, Web services are more of an evolution than a revolution .<\/p>\n<ol start=\"2\">\n<li><strong> INTRODUCTION TO WEB SERVICE<\/strong><\/li>\n<\/ol>\n<p style=\"text-align: justify\">Figure 1. shows an environment where data need to get shared between devices in a networkwhich uses a standard web protocol like HTTP in addition to the servers, browsers, firewall, security and databases.Here, HTTP is supported by all Web Browser, Servers and many Programming Languages Today. But an ideal solution which can support all of these entities in a real time environment is Web Services. Because Web services uses standard web protocols like HTTP and it is supported by all servers, browsers and PL\u2019s.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-352 aligncenter\" src=\"http:\/\/csp12.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-220.png\" alt=\"\" width=\"543\" height=\"329\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-220.png 543w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-220-300x182.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-220-65x39.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-220-225x136.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-220-350x212.png 350w\" sizes=\"auto, (max-width: 543px) 100vw, 543px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">A web service is a network accessible interface to application programs, built using standard Internet technologies as shown in Figure 2. Clients of web services do not need to know how it is implemented.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-353 aligncenter\" src=\"http:\/\/csp12.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-221.png\" alt=\"\" width=\"444\" height=\"216\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-221.png 444w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-221-300x146.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-221-65x32.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-221-225x109.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-221-350x170.png 350w\" sizes=\"auto, (max-width: 444px) 100vw, 444px\" \/><\/p>\n<div>\n<p><strong>\u00a0 \u00a03.Web ServicesHistory<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Web services are evolved from previous technologies that served the same purpose such as RPC, ORPC (DCOM, CORBA and JAVA RMI) etc.Web Services are intended to solve three main problems such as interoperability, firewall traversal and complexity.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong>Firewall traversal<\/strong>: The 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.<\/p>\n<\/div>\n<p style=\"text-align: justify\"><strong>\u00a0 Complexity: <\/strong>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 need to be learnt to implement these services.<\/p>\n<p>&nbsp;<\/p>\n<p>A more precise definition of web service can be stated as an application component that:<\/p>\n<ul>\n<li>Communicates via open protocols (HTTP, SMTP, etc.)<\/li>\n<li>Processes XML messages framed using SOAP<\/li>\n<li>Describes its messages using XML Schema<\/li>\n<li>Provides an endpoint description using WSDL<\/li>\n<li>Can be discovered using UDDI<\/li>\n<\/ul>\n<ol start=\"4\">\n<li><strong>WEB EVOLUTION<\/strong><\/li>\n<\/ol>\n<p style=\"text-align: justify\"><strong>\u00a0<\/strong>The evolution of web technology has been projected in the table below (Table 1): Table 1. Evolution of Web Technologies<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-354 aligncenter\" src=\"http:\/\/csp12.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-222.png\" alt=\"\" width=\"444\" height=\"261\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-222.png 444w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-222-300x176.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-222-65x38.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-222-225x132.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-222-350x206.png 350w\" sizes=\"auto, (max-width: 444px) 100vw, 444px\" \/><\/p>\n<p>&nbsp;<\/p>\n<div>\n<p style=\"text-align: justify\">As a result of the evolution of web technologies, two main types of Web Services have been emerged. They are 1. SOAP based web services and 2. RESTful web services.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>5.\u00a0<\/strong><strong>Web Services Advantages<\/strong><\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p>The advantages of Web Services are listed below:<\/p>\n<ul>\n<li>platform-independence<\/li>\n<li>reusability<\/li>\n<li>interoperability<\/li>\n<li>scalability<\/li>\n<li>adaptability<\/li>\n<\/ul>\n<\/div>\n<div>\n<p><strong>\u00a0 6.\u00a0<\/strong><strong>Web Services Implementation:<\/strong><\/p>\n<p style=\"text-align: justify\">There are four major web service components apart from XML Technologies. They are listed below:<\/p>\n<ul>\n<li>XML<\/li>\n<li>SOAP<\/li>\n<li>UDDI<\/li>\n<li>WSDL<\/li>\n<\/ul>\n<p style=\"text-align: justify\">\u00a0 \u00a0\u2022 XML \u2013 eXtensible Markup Language \u2013 This is a uniform data representation and exchange mechanism used for data transfer.<\/p>\n<p style=\"text-align: justify\">\u2022 SOAP \u2013 Simple Object Access Protocol \u2013 This protocols helps for a standard way for communication.<\/p>\n<p style=\"text-align: justify\">\u2022\u00a0 UDDI \u2013 Universal Description, Discovery and Integration specification \u2013 This is a mechanism which is used to register and locate Web Service based application.<\/p>\n<p style=\"text-align: justify\">\u2022\u00a0 WSDL \u2013 Web Services Description Language \u2013 A standard meta language which is used to describe the services offered.<\/p>\n<p>&nbsp;<\/p>\n<p>Before learning about the significance of web services and its architecture, let us have an<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">overview of XML technologies. A brief description about XML has been studied in the earlier modules itself. To have a glimpse, XML is a collection of extensible information representation and manipulation language. XML itself is a base document standard. XML Schema is used for data typing and document structuring. XSLT is used here for transforming XML to other XML or other formats. XML Parsing strategies are used for XML document processing. There are two ways to parse an XML document either using XML DOM \u2013 Document Object Model or SAX parser \u2013 Simple API for XML. Apart from that, XML consists of XPATH and XQUERY languages to query the XML document.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>7.<\/strong>\u00a0<strong>Working of a Web Service<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">To initiate a web service, the client sends a requestand searches the UDDI registry\/ Web service Registry for the availability of a particular web service. Once it is available in UDDI, it\u00a0<span style=\"text-align: initial;font-size: 1em\">fetches and reads the WSDL of that service. Then it contacts the corresponding server(Publisher) which provides that service by sending a SOAP message consisting of clients request. The listener on the other hand executes the particular service requested and sends the results back to the client(Consumer). The entire flow of web service process has been shown in the figure 3.<\/span><\/p>\n<\/div>\n<p style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-355 aligncenter\" src=\"http:\/\/csp12.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-223.png\" alt=\"\" width=\"397\" height=\"386\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-223.png 397w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-223-300x292.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-223-65x63.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-223-225x219.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-223-350x340.png 350w\" sizes=\"auto, (max-width: 397px) 100vw, 397px\" \/><\/p>\n<p>&nbsp;<\/p>\n<ol start=\"8\">\n<li><strong> WEB SERVICES ARCHITECTURE<\/strong><\/li>\n<\/ol>\n<p style=\"text-align: justify\">The simplest Web service system has two participants which includes a service producer (provider) and a service consumer (requester).The provider presents the interface and implementation of the service, whereas the requester uses the web service as shown in figure 4.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-356 aligncenter\" src=\"http:\/\/csp12.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-224.png\" alt=\"\" width=\"455\" height=\"215\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-224.png 455w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-224-300x142.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-224-65x31.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-224-225x106.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-224-350x165.png 350w\" sizes=\"auto, (max-width: 455px) 100vw, 455px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Web Services architecture also called as Service Oriented Architecture is a more sophisticated system where a registry, acts as a broker for Web services.A provider publishes services to the registry and the consumer discovers services in the registry as shown in the figure 5.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-357 aligncenter\" src=\"http:\/\/csp12.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-225.png\" alt=\"\" width=\"282\" height=\"207\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-225.png 282w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-225-65x48.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-225-225x165.png 225w\" sizes=\"auto, (max-width: 282px) 100vw, 282px\" \/><\/p>\n<div>\n<p><strong>\u00a0 9.\u00a0<\/strong><strong>Web Services Components<\/strong><\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p style=\"text-align: justify\"><strong>\u00a0<\/strong>Let us have an overview of the two important Web services components in this section. 1. SOAP and 2. WSDL.<strong>\u00a0<\/strong><\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p><strong>9.1 SOAP (Simple Object Access Protocol)<\/strong><\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p style=\"text-align: justify\">This is a standard way used for communication. SOAP is an industry accepted W3C specification for a ubiquitous XML distributed computing infrastructure. SOAP is a mechanism for defining the unit of communication and for error handling. It is an extensibility mechanism that lives above the transport layer of OSI. It is a mechanism that allows the transmission of XML documents, regardless of transport layer protocol.<\/p>\n<ul>\n<li style=\"text-align: justify\">SOAP defines some key functions needed in a distributed computing environment, namely:<\/li>\n<li style=\"text-align: justify\">One-way stateless message exchange mechanism.<\/li>\n<li style=\"text-align: justify\">Message processing model (roles, must-understand, intermediary) for SOAP nodes<\/li>\n<li style=\"text-align: justify\">Abstract, structured message definition which is able to run on different serializations<\/li>\n<li style=\"text-align: justify\"><span style=\"font-size: 1em\">Definition of bindings to transport protocols (HTTP for firewall traversal, SMTP) is possible.<\/span><\/li>\n<li style=\"text-align: justify\"><span style=\"font-size: 1em\">Extension mechanism through header elements enabling functionality defined in different XML namespaces such as WS-addressing<\/span><\/li>\n<li style=\"text-align: justify\"><span style=\"font-size: 1em\">Fault handling model<\/span><\/li>\n<\/ul>\n<\/div>\n<p><strong>\u00a0 \u00a09.1.1 SOAP Messages (Logical &amp; Physical Structure):<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Regarding the structure of SOAP messages, the root element of a SOAP message is the Envelope element.It contains an optional Header element and the required Body Elements called Faults which are used to describe the exceptional situations.This can also contain optional Attachments in MIME encoding for exchanging binary data. The format of SOAP Envelope and attachment (SOAP message) is shown in the figure 6.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-358 aligncenter\" src=\"http:\/\/csp12.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-226.png\" alt=\"\" width=\"252\" height=\"305\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-226.png 252w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-226-248x300.png 248w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-226-65x79.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-226-225x272.png 225w\" sizes=\"auto, (max-width: 252px) 100vw, 252px\" \/><\/p>\n<div>\n<p><strong>\u00a0 \u00a0 <\/strong><\/p>\n<p><strong>9.1.2 SOAP Example<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Structure of a real XML based SOAP message example has been given below:<\/p>\n<p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&gt;<\/p>\n<p>&lt;soap:Envelope<\/p>\n<p>soap:encodingStyle=&#8221;http:\/\/soap.org\/soap\/encoding\/&#8221;xmlns:xsd=&#8221;http:\/\/www.w3.org\/2001\/XMLSchema&#8221; xmlns:soap=&#8221;http:\/\/xmlsoap.org\/soap\/envelope\/&#8221; xmlns:xsi=&#8221;http:\/\/www.w3.org\/2001\/XMLSchema-inst&#8221;&gt;<\/p>\n<p>&lt;soap:Header&gt;<\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">&lt;!&#8211; Transactions, priorites, etc. &#8211;&gt;<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">&lt;\/soap:Header&gt;<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">&lt;soap:Body&gt;<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">&lt;!&#8211; Some content &#8211;&gt;<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">&lt;\/soap:Body&gt;<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">&lt;\/soap:Envelope&gt;<\/span><\/p>\n<\/div>\n<p><strong>\u00a0 \u00a0 9.1.3 SOAP Message Transmission<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">In the process of transmission, SOAP Message Transmission involves three main roles as shown in the figure 7:The SOAP Sender creates and sends a SOAP Message to an ultimate SOAP Receiver.One or more optional SOAP Intermediaries can be positioned to intercept messages between the sender and the receiver. They can perform filtering, logging, catching etc.The\u00a0 SOAP\u00a0 sender\u2019s\u00a0 intended\u00a0 destination\u00a0 is\u00a0 called\u00a0 the\u00a0 Ultimate\u00a0 SOAP Receiver.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-359 aligncenter\" src=\"http:\/\/csp12.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-227.png\" alt=\"\" width=\"447\" height=\"114\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-227.png 447w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-227-300x77.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-227-65x17.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-227-225x57.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-227-350x89.png 350w\" sizes=\"auto, (max-width: 447px) 100vw, 447px\" \/><\/p>\n<div>\n<p style=\"text-align: justify\"><strong>\u00a0 9.2 UDDI (Universal Description, Discovery and Integration specification)<\/strong>: This is a registry based mechanism which is used to register and locate Web Service based application.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong>9.3 WSDL (Web Services Description Language):<\/strong>A standard meta language which is used to describe the services offered. Web Services Description Language (WSDL) is an XML-based language for describing about web services and how to access them. WSDL was developed jointly by Microsoft and IBM. WSDL is an XML based protocol which is used for information exchange in decentralized and distributed environments. This is the standard format used for describing a web service. WSDL\u00a0<span style=\"text-align: initial;font-size: 1em\">definition\u00a0 describes\u00a0 how\u00a0 to\u00a0 access\u00a0 a\u00a0 web\u00a0 service\u00a0 and\u00a0 what\u00a0 operations\u00a0 it\u00a0 would\u00a0<\/span><span style=\"text-align: initial;font-size: 1em\">perform. This is also used for describing how to interface with XML-based services\u00a0<\/span><span style=\"text-align: initial;font-size: 1em\">and it is an integral part of UDDI, an XML-based worldwide business registry.<\/span><span style=\"text-align: initial;font-size: 1em\">WSDL is the language that UDDI uses and is pronounced as &#8216;wiz-dull&#8217; and spelled out\u00a0<\/span><span style=\"text-align: initial;font-size: 1em\">as \u201cW-S-D-L\u201d.<\/span><\/p>\n<\/div>\n<p><strong>\u00a0 \u00a09.3.1 Major WSDL Elements<\/strong>:<\/p>\n<p>&nbsp;<\/p>\n<p>The major elements of the WSDL with its description has been defined below. The physical and logical aspects of WSDL elements has been shown in the figure 8.The major WSDL elements encompasses the top level XML element known as the <strong>definitions<\/strong> element.&lt;definitions&gt; . . . &lt;\/definitions&gt;In addition to definitions, services are defined using eight major elements as listed below:<\/p>\n<ul>\n<li style=\"text-align: justify\"><span style=\"font-size: 1em\">\u00a0<\/span><strong style=\"font-size: 1em\">Types: <\/strong><span style=\"font-size: 1em\">Data type definitions which is used to describe the messages exchanged.<\/span><\/li>\n<li style=\"text-align: justify\"><strong style=\"font-size: 1em\">\u00a0Message:<\/strong><span style=\"font-size: 1em\">The abstract definition of the data being transmitted in a message.\u00a0<\/span><\/li>\n<li style=\"text-align: justify\"><strong style=\"font-size: 1em\">\u00a0Parts: <\/strong><span style=\"font-size: 1em\">Each of which has one of the defined types.<\/span><\/li>\n<li style=\"text-align: justify\"><span style=\"font-size: 1em\"><strong>\u00a0O<\/strong><\/span><strong style=\"font-size: 1em\">peration: <\/strong><span style=\"font-size: 1em\">Each operation can have an input message and an output message.<\/span><\/li>\n<li style=\"text-align: justify\"><span style=\"font-size: 1em\"><strong>\u00a0P<\/strong><\/span><strong style=\"font-size: 1em\">ort type<\/strong><span style=\"font-size: 1em\">: A set of operations.<\/span><\/li>\n<li style=\"text-align: justify\"><strong style=\"font-size: 1em\">\u00a0Binding<\/strong><span style=\"font-size: 1em\">: It specifies concrete protocol and data formats for the operations and messages defined by a particular portType.<\/span><\/li>\n<li style=\"text-align: justify\"><span style=\"font-size: 1em\"><strong>\u00a0P<\/strong><\/span><strong style=\"font-size: 1em\">ort: <\/strong><span style=\"font-size: 1em\">Specifies an address for a binding, thus defining a singlecommunication.<\/span><\/li>\n<li style=\"text-align: justify\"><strong style=\"font-size: 1em\">\u00a0Service<\/strong><span style=\"font-size: 1em\">: It isused to aggregate a set of related ports.<\/span><\/li>\n<\/ul>\n<p style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-360 aligncenter\" src=\"http:\/\/csp12.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-228.png\" alt=\"\" width=\"402\" height=\"247\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-228.png 402w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-228-300x184.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-228-65x40.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-228-225x138.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-228-350x215.png 350w\" sizes=\"auto, (max-width: 402px) 100vw, 402px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>The main structure of a WSDL document looks as below:<\/p>\n<p>&nbsp;<\/p>\n<p>&lt;definitions&gt;<\/p>\n<p>&lt;types&gt;\u00a0 data type definitions&#8230;&#8230;.. &lt;\/types&gt;<\/p>\n<p>&lt;message&gt;<\/p>\n<p>definition of the data being communicated&#8230;.<\/p>\n<p>&lt;\/message&gt;<\/p>\n<p>&lt;portType&gt;\u00a0 set of operations&#8230;&#8230; &lt;\/portType&gt;<\/p>\n<p>&lt;binding&gt;protocol and data format specification&#8230;.<\/p>\n<p>&lt;\/binding&gt;<\/p>\n<p>&lt;\/definitions&gt;<\/p>\n<ol start=\"10\">\n<li><strong> Web Service Stack<\/strong><\/li>\n<\/ol>\n<p style=\"text-align: justify\">Web service stack is a set of standards for which is used for implementing web services. As discussed above in the web service components, web service stack consists of 4 layers as shown in the figure 9. The top most layer UDDI extends from URI which is used for publication and discovery of web services. The third layer of the stack corresponds to the WSDL file extends from HTML used for describing the web services for better access. The second layer of the stack corresponds to the SOAP message exchanged between the consumer and the publisher and the lower layer of the stack corresponds to the the different transport protocols used.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-361 aligncenter\" src=\"http:\/\/csp12.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-229.png\" alt=\"\" width=\"402\" height=\"174\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-229.png 402w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-229-300x130.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-229-65x28.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-229-225x97.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-229-350x151.png 350w\" sizes=\"auto, (max-width: 402px) 100vw, 402px\" \/><\/p>\n<div>\n<p><strong>11.\u00a0 <\/strong><strong>Basic Web Service Usage Scenario<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Once again , a basic web service usage scenario has been illustrated using the figure 10. In this scenario, first the WSDL file is registered manually. The request is sent by the web service lookup to the web service respository (UDDI) using http get method to get the WSDL file. Then using the WSDL file description the client application is written\u00a0\u00a0<span style=\"text-align: initial;font-size: 1em\">and it is deployed. Once the application is deployed, the application communicates with the service provider using SOAP request and receives a SOAP respose.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-362 aligncenter\" src=\"http:\/\/csp12.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-230.png\" alt=\"\" width=\"383\" height=\"277\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-230.png 383w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-230-300x217.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-230-65x47.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-230-225x163.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-content\/uploads\/sites\/60\/2018\/07\/Untitled-230-350x253.png 350w\" sizes=\"auto, (max-width: 383px) 100vw, 383px\" \/><\/p>\n<\/div>\n<p style=\"text-align: left\">\u00a0 \u00a0 \u00a0Scenario <strong>12. Web Service Applications<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Application Server (web service-enabled)provides implementation of services and exposes it through WSDL\/SOAPimplementation in Java, EJB, .NET (C#) environments etc.Here, SOAP server implements the SOAP protocol. The SOAP clientimplements the SOAP protocol on the client site.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Summary<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">This module has described about the fundamentals of Web services and various types of Web services. This module also discussed about the architecture and components of web services. We have also learnt about the implementation of the Web services.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Web Links<\/strong><\/p>\n<ul>\n<li style=\"text-align: justify\">https:\/\/www.cs.colorado.edu\/~kena\/classes\/7818\/f06\/lectures.html<\/li>\n<li style=\"text-align: justify\">http:\/\/www.java4s.com\/web-services\/<\/li>\n<li style=\"text-align: justify\">https:\/\/www.cl.cam.ac.uk\/~ib249\/teaching\/Lecture1.handout.pdf<\/li>\n<li style=\"text-align: justify\">https:\/\/www.w3schools.com\/xml\/xml_services.asp<\/li>\n<li style=\"text-align: justify\">https:\/\/www.javatpoint.com\/web-services-tutorial<\/li>\n<li style=\"text-align: justify\">https:\/\/www.cs.colorado.edu\/~kena\/classes\/7818\/f08\/lectures\/lecture_4_netbeans_presenta.pdf<\/li>\n<li style=\"text-align: justify\">http:\/\/vhost3.cs.rit.edu\/project_web_page\/webservices.html<\/li>\n<li style=\"text-align: justify\">http:\/\/cs.ulb.ac.be\/public\/teaching\/infoh511<\/li>\n<li style=\"text-align: justify\">https:\/\/www.fas.harvard.edu\/~cscie259\/distribution\/lectures\/1\/lecture1.pdf<\/li>\n<li style=\"text-align: justify\">http:\/\/www.java2blog.com\/2013\/03\/web-service-tutorial.html<\/li>\n<li style=\"text-align: justify\">David Chappell and Tyler Jewell, \u201cJava Web Services\u201d, First Edition, O&#8217;Reilly, 2002<\/li>\n<li style=\"text-align: justify\">Paul J. Deitel, Harvey Deitel, \u201cJava How to Program\u201d, Ninth Edition, Pearson,2012.<\/li>\n<\/ul>\n","protected":false},"author":4,"menu_order":35,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":["dr-s-abirami"],"pb_section_license":""},"chapter-type":[],"contributor":[59],"license":[],"class_list":["post-351","chapter","type-chapter","status-publish","hentry","contributor-dr-s-abirami"],"part":3,"_links":{"self":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-json\/pressbooks\/v2\/chapters\/351","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-json\/wp\/v2\/users\/4"}],"version-history":[{"count":5,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-json\/pressbooks\/v2\/chapters\/351\/revisions"}],"predecessor-version":[{"id":621,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-json\/pressbooks\/v2\/chapters\/351\/revisions\/621"}],"part":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-json\/pressbooks\/v2\/parts\/3"}],"metadata":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-json\/pressbooks\/v2\/chapters\/351\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-json\/wp\/v2\/media?parent=351"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-json\/pressbooks\/v2\/chapter-type?post=351"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-json\/wp\/v2\/contributor?post=351"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp12\/wp-json\/wp\/v2\/license?post=351"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}