1 / 31

INFOSYS 290, Section 3 Web Services: Concepts, Design and Implementation

INFOSYS 290, Section 3 Web Services: Concepts, Design and Implementation. Adam Blum ablum@good.com. Today’s Agenda. Motivation and history of web services The basics of current web service standards: SOAP and WSDL Goals for the course Project description Outline of future classes.

raheem
Download Presentation

INFOSYS 290, Section 3 Web Services: Concepts, Design and Implementation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. INFOSYS 290, Section 3Web Services: Concepts, Design and Implementation Adam Blum ablum@good.com

  2. Today’s Agenda • Motivation and history of web services • The basics of current web service standards: SOAP and WSDL • Goals for the course • Project description • Outline of future classes

  3. My Background • Career • 5 years at Microsoft building first three versions of SQL Server • VP of Engineering at Commerce One for the XML platform • Chief Technology Officer at Systinet, the first web services company • Director of Data Access at Good Technology • Building a new mobile web services platform • Why I’m here • No real collection of web service information exists today

  4. Student Backgrounds • Technologies? • XML Schema • object-oriented design • modeling • distributed systems • Programming languages and tools? • Java? • C#, .NET • Perl, Python, PHP, ASP • Projects? • Work Background? • Programmer, analyst, IT, architect

  5. The Next Internet Generation • HTML and browsers were app to human communication • Universal human to application access • SOAP and XML-based web services are for program to program communication • Separated by program, machine, operating system and organizational boundaries • Universal application to application access

  6. What is a Web service? • Application capability, function or operation exposed to other programs via open, interoperable standards • “payloads” defined as XML documents • “transports” over http or other open Internet protocol • Can be accessed from any programming language, hardware platform or operating system

  7. What is a “Good Web Service”? • “self describing” • XML Schema or DTD for grammar of payload • human readable instances • discoverable • UDDI, WS-Inspection, or some other method of advertising availability • Realize promise of many to many integrations that are enabled by a web service (one to one ad hoc integrations can be done with earlier technology) • “coarse grained” • Large documents representing entire business events or business objects • e.g. CRUD operations: CreateOrder, ReadOrder, UpdateOrder, DeleteOrder • NOT operations such as SetPrice(), SetProduct(), SetCustomer(), CompleteOrder() • asynchronous • When appropriate (often for large scale work)

  8. Basic SOAP Message Exchange WSDL describing service Exposing Program Service Provider Consuming Program Service Requestor SOAP message http transport SOAP message http transport discover services Service Registry UDDI WSDLs describing services

  9. SOAP Message

  10. Sample SOAP Envelope <?xml version='1.0' ?> <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> <env:Header> <m:reservation xmlns:m="http://travelcompany.example.org/reservation" env:role="http://www.w3.org/2003/05/soap-envelope/role/next" env:mustUnderstand="true"> <m:reference>uuid:093a2da1-q345-739r-ba5d-pqff98fe8j7d</m:reference> <m:dateAndTime>2001-11-29T13:20:00.000-05:00</m:dateAndTime> </m:reservation> <n:passenger xmlns:n="http://mycompany.example.com/employees" env:role="http://www.w3.org/2003/05/soap-envelope/role/next" env:mustUnderstand="true"> <n:name>Åke Jógvan Øyvind</n:name> </n:passenger> </env:Header>

  11. Sample SOAP Message (cont’d) <env:Body> <p:itinerary xmlns:p="http://travelcompany.example.org/reservation/travel"> <p:departure> <p:departing>New York</p:departing> <p:arriving>Los Angeles</p:arriving> <p:departureDate>2001-12-14</p:departureDate> <p:departureTime>late afternoon</p:departureTime> <p:seatPreference>aisle</p:seatPreference> </p:departure> <p:return> <p:departing>Los Angeles</p:departing> <p:arriving>New York</p:arriving> <p:departureDate>2001-12-20</p:departureDate> <p:departureTime>mid-morning</p:departureTime> <p:seatPreference/> </p:return> </p:itinerary> <q:lodging xmlns:q="http://travelcompany.example.org/reservation/hotels"> <q:preference>none</q:preference> </q:lodging> </env:Body> </env:Envelope>

  12. A Soap Response <?xml version='1.0' ?> <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> • <env:Header> <m:reservation xmlns:m="http://travelcompany.example.org/reservation" env:role="http://www.w3.org/2003/05/soap-envelope/role/next" env:mustUnderstand="true"> <m:reference>uuid:093a2da1-q345-739r-ba5d-pqff98fe8j7d</m:reference> <m:dateAndTime>2001-11-29T13:35:00.000-05:00</m:dateAndTime> </m:reservation> <n:passenger xmlns:n="http://mycompany.example.com/employees" env:role="http://www.w3.org/2003/05/soap-envelope/role/next" env:mustUnderstand="true"> <n:name>Åke Jógvan Øyvind</n:name> </n:passenger> </env:Header> • <env:Body> • <p:itineraryClarification xmlns:p="http://travelcompany.example.org/reservation/travel"> <p:departure> <p:departing> <p:airportChoices> JFK LGA EWR </p:airportChoices> </p:departing> </p:departure> <p:return> <p:arriving> <p:airportChoices> JFK LGA EWR </p:airportChoices> </p:arriving> </p:return> </p:itineraryClarification> </env:Body> </env:Envelope>

  13. Alternatives to SOAP over http • XML documents over HTTP • Less need to do this with commonplace SOAP toolkits • But these are still web services • XML RPC • Simpler than SOAP and longer history • Limitations on objects that can be exposed • With current SOAP toolkit support little reason to use

  14. Distributed Systems and RPC • How did apps once communicate with each other across machine and OS boundaries? • remote procedure calls • Java RMI • .NET Remoting • Corba • DCOM

  15. So What’s Different? • Open format usable from any platform • Easy to understand and debug • Stable supported interfaces • Standards enable “expose service once” and have multiple consumers • versus typical point to point integration efforts • Easy for intermediaries to process messages and add value • Routing and delivery • security • management and monitoring • schema and service design • acceleration • Easy to extend with additional transport semantics

  16. WSDL Specification types message message message porttype operation operation operation binding service port

  17. An Example - WSDL Types <?xml version="1.0"?> <definitions name="StockQuote" targetNamespace="http://example.com/stockquote.wsdl" xmlns:tns="http://example.com/stockquote.wsdl" xmlns:xsd1="http://example.com/stockquote.xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/"> <types> <schema targetNamespace="http://example.com/stockquote.xsd" xmlns="http://www.w3.org/2000/10/XMLSchema"> <element name="TradePriceRequest"> <complexType> <all> <element name="tickerSymbol" type="string"/> </all> </complexType> </element> <element name="TradePrice"> <complexType> <all> <element name="price" type="float"/> </all> </complexType> </element> </schema> </types>

  18. WSDL Operations <message name="GetLastTradePriceInput"> <part name="body" element="xsd1:TradePriceRequest"/> </message> <message name="GetLastTradePriceOutput"> <part name="body" element="xsd1:TradePrice"/></message> <portType name="StockQuotePortType"> <operation name="GetLastTradePrice"> <input message="tns:GetLastTradePriceInput"/> <output message="tns:GetLastTradePriceOutput"/> </operation> </portType>

  19. WSDL Bindings, Services, Ports <binding name="StockQuoteSoapBinding" type="tns:StockQuotePortType"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="GetLastTradePrice"> <soap:operation soapAction="http://example.com/GetLastTradePrice"/> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> </binding> <service name="StockQuoteService"> <documentation>My first service</documentation> <port name="StockQuotePort" binding="tns:StockQuoteBinding"> <soap:address location="http://example.com/stockquote"/> </port> </service> </definitions>

  20. Web Services Construction Tools

  21. Web Services Usage Only Tools

  22. Demo Simple .NET Web Service • Create web service project • Expose some web methods • Demo accessing it from AboveAll

  23. Some Applications • Services a web application might need • Credit card verification • Package shipping • Currency conversion • Stock quotes • Internal architecture of multiple server applications • User authorization web service • Remote procedure calls • Heavy computational tasks • Optimizers • Routing • Factor out business logic to expose to many application front ends • E.g. Common Order web service with web page frontend, desktop frontend, cellphone frontend, PDA frontend

  24. Existing Web Services • Consumer • Google (search, cache, spelling) http://www.google.com/apis/download.html • Amazon AWS 4.0 • Product search via REST and SOAP • Enterprise application ISVs • SalesForce, www.sforce.com • Siebel • SAP • Microsoft • Miscellaneous Utilities • Xmethods.com • Thousands of internal IT applications at many companies • WellsFargo • Motorola

  25. Goals of Course • Grasp basic web servicearchitectural principles for integration between applications • Learn when when web services are an effective approach to application integration problems • Learn the important existing dominant standards in web services • Understand SOAP and its proposed extensions for invoking and routing web services • Be effective designing web services in WSDL and XML Schema • UDDI and when using a web services registry is required • Learn other best practices in Service Oriented Architectures including what it means to perform web services management • Consume web services with a variety of ad hoc tools and programs • Understand the missing pieces of current web services standards and the roadmap to new standards for resolving them • Build applications that connect to web services from both desktops and mobile devices

  26. Course Project • Goal • Build “web service consuming” client applications from desktops and mobile devices • Requirements • Use an “informational” web service • Has QCUD (Query, Create, Update and Delete operations) • Consume web service from AboveAll or Visual Studio for desktop • Consume WS from GoodAccess Web Services or Visual Studio from mobile device • Optionally write or enhance a backend web service • Only if previous steps are achieved • Demo to class • Team size • Two people per project

  27. Possible “Informational Web Services” for Your Projects • Stock/company/financial information • Sales account information • Cal course schedule • Books that match search criteria (using Amazon’s WS) • Documents that match search criteria (using google’s WS) • Course assignments • Calendar appointments • Project bugs • Bank account records • BART schedules • Directions to multiple sites • Local sites of interest • Blogs (via Atom-wrapping web service) • News (via an RSS-wrapping web service)

  28. Course Schedule • Class 1 (September 1): Introduction • Class 2 (September 8): Describe and Invoke: WSDL and SOAP and Their Precursors • Class 3 (September 15): Consuming Web Services • MindReef SOAPScope • AboveAll Studio • Visual Studio.NET • Class 4 (September 22): Creating Web Services • In Microsoft Visual Studio.NET • Class 5 (September 29): Mobile Web Services Clients • Microsoft’s .NET Compact Framework • J2ME with IBM WebSphere Developer Studio • Class 6 (October 6th): GoodAccess Web Services • Platform for automatic syncing and efficient transport of web services • Class 7: Midterm (October 13th)

  29. Second Half • Class 8 (October 20): Register and Discover: Service Registries and UDDI • IBM, Microsoft and Systinet UDDI registries • Register your services in a UDDI • Class 9 (October 27th): Web Services Metadata Repositories and Composite Tools • Guest lecture from Roger Sippl, AboveAll • Class 10 (November 3rd): Web Services Security • Class 11 (November 10th): The Enterprise Web Services Bus • Class 12 (November 17th): SOA Best Practices • Class 13 (November 24): No Class - Thanksgiving • Class 14 (December 1): Presentations • Class 15 (December 8): Presentations • Class 16 (December 15): Final Exam

  30. References • Specs • SOAP Specification, http://www.w3.org/TR/soap/ • WSDL Specification, http://www.w3.org/TR/wsdl • UDDI Specification, http://www.uddi.org/specification.html • Tools • Visual Studio, http://microsoft.com/vstudio • Will be supply Visual Studio 2005 Beta to the class • AboveAll Studio, http://aboveallsoftware.com • MindReef SOAPScope

  31. How To Reach Me • ablum@good.com • TA: awright@good.com, aliseya@eecs.berkeley.edu • 408-396-5490 • Office hours Thursday at 4pm

More Related