DOC PREVIEW
Toronto ECE 450 - Tutorial I - Web Services

This preview shows page 1-2-19-20 out of 20 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

ECE450H1S Software Engineering II 2005University of TorontoTutorial IWeb Services1. What is a Web Service?2. An example Web Service3. OmniEditor: Wrapping a text editor into a WS4. OmniGraphEditor: supporting a graphic editor ReferencesGustavo Alonso, Fabio Casati, Karumi Kuno, Vijay Machiraju. Web Services, Concepts, Architectures and Applications. Springer-Verlag, 2004.OmniEditor is a result of the course project for CSC408H.ECE450H1S Software Engineering II 2005University of TorontoWhat is Web Service• Historic perspectives– Centralized versus Distributed Programming Models: Client/Server, Master/Slave, SPMD, etc…– Middleware architecture 2-tier, 3-tier, n-tier– Technical evolution• IPC (inter process call): RPC, Java RMI, CORBA, DCOM• Shared Memory, Distributed Shared Memory and Message Passing• Interoperability, interoperability, interoperabilityECE450H1S Software Engineering II 2005University of TorontoWhat is a Web Service? • Web Services Standards (XML-based)– SOAP (Simple Object Access Protocol)– WSDL (Web Service Description Language)– UDDI (Universal Description, Discovery, Integration)– WS-I (integration), WS-Policy, WS-Security, etc.• Chances and Challenges– Application Wrappers to WS– Web Services Compositions– Holy Grail: large reusable library of WS with interoperability: 1,000 public WS ~ 1 Million private WS– ROI (Return of Investments): > 10x ?– Issues: Privacy, Security, PerformanceECE450H1S Software Engineering II 2005University of TorontoAn example web servicexmethods provides a web services to get the stock price• Example SOAP messages• Structure of WSDL descriptions• A program that invokes the web serviceECE450H1S Software Engineering II 2005University of TorontoSOAP architectureService requestorapplication object(OpenOME)SOAP-based middlewareService providerapplication object(OmniGraphEditor)SOAP-based middlewarerequestresponseECE450H1S Software Engineering II 2005University of TorontoExampleSOAP message: request<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelopexmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:ns="urn:xmethods-delayed-quotes"><SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><ns:getQuote><symbol>IBM</symbol></ns:getQuote></SOAP-ENV:Body></SOAP-ENV:Envelope>ECE450H1S Software Engineering II 2005University of TorontoExampleSOAP message: response<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelopexmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:ns="urn:xmethods-delayed-quotes"><SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><ns:getQuoteResponse><Result>86.05</Result></ns:getQuoteResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>ECE450H1S Software Engineering II 2005University of TorontoWSDL architectureService requestorstubSOAP-based middlewareService providerstubSOAP-based middlewarerequestresponseWSDL compiler(client)WSDL compiler (server side)WSDL (url)ECE450H1S Software Engineering II 2005University of TorontoExample WSDL structure: message<?xml version="1.0" encoding="UTF-8"?><definitions name="quote“xmlns:tns="urn:xmethods-delayed-quotes"… name spaces …>… types …<message name="getQuoteRequest"><part name="symbol" type="xsd:string"/></message><message name="getQuoteResponse"><part name="Result" type="xsd:float"/></message>… portType, binding, service …</definitions>ECE450H1S Software Engineering II 2005University of TorontoExample WSDL structure: portType<?xml version="1.0" encoding="UTF-8"?><definitions name="quote"… name spaces …>… types, messages, …<portType name="quotePortType"><operation name="getQuote"><input message="tns:getQuoteRequest"/><output message="tns:getQuoteResponse"/></operation></portType>… binding, service …</definitions>ECE450H1S Software Engineering II 2005University of TorontoExample WSDL structure: binding<?xml version="1.0" encoding="UTF-8"?><definitions name="quote"… name spaces …>… types, messages, portType …<binding name="quote" type="tns:quotePortType"><SOAP:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/><operation name="getQuote"><SOAP:operation soapAction=""/><input><SOAP:body use="encoded" namespace="urn:xmethods-delayed-quotes" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input><output><SOAP:body use="encoded" namespace="urn:xmethods-delayed-quotes" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output></operation></binding>… service …</definitions>ECE450H1S Software Engineering II 2005University of TorontoExample WSDL structure: service<?xml version="1.0" encoding="UTF-8"?><definitions name="quote"… name spaces …>… types, messages, portType, binding …<service name="quote"><port name="quote" binding="tns:quote"><SOAP:address location="http://services.xmethods.net/soap"/></port></service></definitions>ECE450H1S Software Engineering II 2005University of TorontoWeb Services InvocationXmethodsWSDLgetQuoteClientProgram<ns:getQuote><symbol>IBM</symbol></ns:getQuote><ns:getQuoteResponse><Result>86.05</Result></ns:getQuoteResponse>ECE450H1S Software Engineering II 2005University of TorontoInvoking the web servicegsoap/soapcpp2/samples/quote//gsoap ns service name: quote//gsoap ns service style: rpc//gsoap ns service encoding: encoded//gsoap ns service namespace: urn:xmethods-delayed-quotes//gsoap ns service location: http://services.xmethods.net/soapint ns__getQuote(char *symbol, float *Result); /* quote.h *//* quote.c */int main(int argc, char **argv){ struct soap soap;float q;char *sym;if (argc > 1)sym = argv[1];else{ fprintf(stderr, "Usage: quote <ticker>\n");exit(1);}soap_init(&soap);if (soap_call_ns__getQuote(&soap, "http://services.xmethods.net/soap", "", sym, &q) == 0)printf("\nCompany - %s Quote - %f\n", sym, q);elsesoap_print_fault(&soap, stderr);soap_end(&soap);soap_done(&soap);return 0;}%> quote IBMCompany - IBM Quote - 86.269997%>ECE450H1S Software Engineering II 2005University of TorontoReference Architecture 1: Client/ServerWeb serviceUPLOADDOWNLOADVIMEclipsechannelchannelVIMEmacsWhenever upload is called, the state of the


View Full Document
Download Tutorial I - Web Services
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Tutorial I - Web Services and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Tutorial I - Web Services 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?