1/30/20161 introduction to web services bina ramamurthy
DESCRIPTION
HTTP Protocol for communication among web entities. It is a standard from IETF (Internet Engineering Task Force) and W3C: (World Wide Web Consortium) Request-response model for client-server systems HTTP operates by sending requests with operations to be performed on resources referred by Uniform Resource Identifiers (URI) Request methods are: HEAD, GET, POST, PUT, DELETE, TRACE,… PATCH (just a few standard commands) 1/30/20163TRANSCRIPT
![Page 2: 1/30/20161 Introduction to Web Services Bina Ramamurthy](https://reader036.vdocuments.site/reader036/viewer/2022062317/5a4d1b0f7f8b9ab05998dd12/html5/thumbnails/2.jpg)
05/03/23 2
Topics for DiscussionHTTP : Hyper Text Transfer ProtocolHTML: Hyper Text Markup LanguageXML: eXtensible Markup LanguageResource references on the webWeb servicesSOAP: Simple Object Request ProtocolREST: Representational State TransferSummary
![Page 3: 1/30/20161 Introduction to Web Services Bina Ramamurthy](https://reader036.vdocuments.site/reader036/viewer/2022062317/5a4d1b0f7f8b9ab05998dd12/html5/thumbnails/3.jpg)
HTTPProtocol for communication among web entities.It is a standard from IETF (Internet Engineering Task Force) and W3C: (World Wide Web Consortium)Request-response model for client-server systems HTTP operates by sending requests with operations to be performed on resources referred by Uniform Resource Identifiers (URI)Request methods are: HEAD, GET, POST, PUT, DELETE, TRACE,… PATCH (just a few standard commands)
05/03/23 3
![Page 4: 1/30/20161 Introduction to Web Services Bina Ramamurthy](https://reader036.vdocuments.site/reader036/viewer/2022062317/5a4d1b0f7f8b9ab05998dd12/html5/thumbnails/4.jpg)
HTMLHyper text mark-up languageStandard markups for structural organization of web pagesExample:<tr> <td style="vertical-align: top;"><br> </td> <td style="vertical-align: top;">File System<br> </td> <td style="vertical-align: top;"><a href="FileSystemOct21.ppt">FileSys</a><br> </td> <td style="vertical-align: top;"><br> </td> </tr>
05/03/23 4
![Page 5: 1/30/20161 Introduction to Web Services Bina Ramamurthy](https://reader036.vdocuments.site/reader036/viewer/2022062317/5a4d1b0f7f8b9ab05998dd12/html5/thumbnails/5.jpg)
HTML over HTTP
05/03/23 5
Web BrowserWeb serverhttp://www.cse.buffalo.edu/faculty/bina
Web Browser
Web Browser
Request:Get http:…
Response:index.html
browser interpretation ofindex.html
![Page 6: 1/30/20161 Introduction to Web Services Bina Ramamurthy](https://reader036.vdocuments.site/reader036/viewer/2022062317/5a4d1b0f7f8b9ab05998dd12/html5/thumbnails/6.jpg)
05/03/23 6
XMLXML is a markup language, developed by W3C (World Wide Web Consortium), mainly to overcome the limitations of HTML.But it took a life of its own and has become a very popular part of distributed systems.We will examine its definition, associated specifications (DTD, XSLT etc.), Java APIs available to process XML, protocols and services based on XML, and the role XML plays in a distributed computing environment.
![Page 7: 1/30/20161 Introduction to Web Services Bina Ramamurthy](https://reader036.vdocuments.site/reader036/viewer/2022062317/5a4d1b0f7f8b9ab05998dd12/html5/thumbnails/7.jpg)
05/03/23 7
First Look at XMLIt has no predefined tags. Such as in HTML Domains may specify their own set of
standard tagsIt is stricter. Most html document have errors and the
browser have to built to take care of these. On the other hand XML has a strict syntax. There is a notion of validity and A notion of well-formed.
![Page 8: 1/30/20161 Introduction to Web Services Bina Ramamurthy](https://reader036.vdocuments.site/reader036/viewer/2022062317/5a4d1b0f7f8b9ab05998dd12/html5/thumbnails/8.jpg)
05/03/23 8
An Example: MemoSee the two documents enclosed: one in html and the other in XML formats.Observe the meaningful tags in XML.Compare it to a class definition: it looks like a class with data definitions and accessors (tags).
![Page 9: 1/30/20161 Introduction to Web Services Bina Ramamurthy](https://reader036.vdocuments.site/reader036/viewer/2022062317/5a4d1b0f7f8b9ab05998dd12/html5/thumbnails/9.jpg)
05/03/23 9
Memo.html vs memo.xml<!DOCTYPE html PUBLIC "-//W3C//DTD
HTML 4.01 Transitional//EN"><html><head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-
1"> <title>memo.html</title></head><body><h3>Hello World</h3>Bina<br>CSE486 DS Students <br>Wake up everyone<br>
BR<br><br></body></html>
<?xml version="1.0" ?> <!DOCTYPE memo (View Source for
full doctype...)> - <memo> <header>Hello World</header> <from>bina</from> <to>CSE486 DS Students</to> <body>Wake up everyone</body> <sign>br</sign> </memo>
![Page 10: 1/30/20161 Introduction to Web Services Bina Ramamurthy](https://reader036.vdocuments.site/reader036/viewer/2022062317/5a4d1b0f7f8b9ab05998dd12/html5/thumbnails/10.jpg)
XML
05/03/23 10
![Page 11: 1/30/20161 Introduction to Web Services Bina Ramamurthy](https://reader036.vdocuments.site/reader036/viewer/2022062317/5a4d1b0f7f8b9ab05998dd12/html5/thumbnails/11.jpg)
XML parsingLets understand XML parsing.Reference: http://java.sun.com/developer/technicalArticles/xml/mapping/index.htmlMapping/parsing is similar to compiling: if it is not valid or well formed, the parser is going to complainLets look at some examples starting from the very beginning.
05/03/23 11
![Page 12: 1/30/20161 Introduction to Web Services Bina Ramamurthy](https://reader036.vdocuments.site/reader036/viewer/2022062317/5a4d1b0f7f8b9ab05998dd12/html5/thumbnails/12.jpg)
05/03/23 12
XML to SOAPSimple xml can facilitate sending message to receive information.The message could be operations to be performed on objects.Simple Object Access Protocol (SOAP)Representational State Transfer (REST) is an architectural pattern on HTTP’s methods
![Page 13: 1/30/20161 Introduction to Web Services Bina Ramamurthy](https://reader036.vdocuments.site/reader036/viewer/2022062317/5a4d1b0f7f8b9ab05998dd12/html5/thumbnails/13.jpg)
05/03/23 13
SOAP Request<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <getProductDetails xmlns="http://warehouse.example.com/ws"> <productId>827635</productId> </getProductDetails> </soap:Body> </soap:Envelope>
![Page 14: 1/30/20161 Introduction to Web Services Bina Ramamurthy](https://reader036.vdocuments.site/reader036/viewer/2022062317/5a4d1b0f7f8b9ab05998dd12/html5/thumbnails/14.jpg)
05/03/23 14
SOAP Reply<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <getProductDetailsResponse xmlns="http://warehouse.example.com/ws"> <getProductDetailsResult> <productName>Toptimate 3-Piece Set</productName> <productId>827635</productId> <description>3-Piece luggage set. Black Polyester.</description> <price>96.50</price> <inStock>true</inStock> </getProductDetailsResult> </getProductDetailsResponse> </soap:Body> </soap:Envelope>
![Page 15: 1/30/20161 Introduction to Web Services Bina Ramamurthy](https://reader036.vdocuments.site/reader036/viewer/2022062317/5a4d1b0f7f8b9ab05998dd12/html5/thumbnails/15.jpg)
05/03/23 15
SOAPWeb Services (WS)SOARead this paper:http://www.w3.org/DesignIssues/
WebServices.html
![Page 16: 1/30/20161 Introduction to Web Services Bina Ramamurthy](https://reader036.vdocuments.site/reader036/viewer/2022062317/5a4d1b0f7f8b9ab05998dd12/html5/thumbnails/16.jpg)
05/03/23 16
WS Stack
Network
XML-based Messaging
Service Description
Service Publication
Service Discovery
Service Flow
HTTP, FTP, MQEmail, IIOP
SOAP
WSDL
UDDI
UDDI
WSFL
SecurityM
anagement
Quality of Service
![Page 17: 1/30/20161 Introduction to Web Services Bina Ramamurthy](https://reader036.vdocuments.site/reader036/viewer/2022062317/5a4d1b0f7f8b9ab05998dd12/html5/thumbnails/17.jpg)
05/03/23 17
WS Interoperability Infrastructure
Network
XML Messaging
Service DescriptionWSDL
SOAP
HTTP
Do you see any platform or language dependencies here?
![Page 18: 1/30/20161 Introduction to Web Services Bina Ramamurthy](https://reader036.vdocuments.site/reader036/viewer/2022062317/5a4d1b0f7f8b9ab05998dd12/html5/thumbnails/18.jpg)
05/03/23 18
SummaryWe looked at foundational concepts supporting web services: XML, SOAP, WSDL and Web Services standards.We also illustrated the concepts using sample programs.We will discuss REST-based web services and WDSL in the next lectures.