1 / 19

Web Services

Learn about the basics of web services, their architecture, and examples of how they are used. Understand the technologies like XML, SOAP, WSDL, and UDDI that power web services. Discover the benefits and reasons for using web services in your applications.

bobbief
Download Presentation

Web Services

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. Web Services Part 1 -- Qinwei Zhu Part 2 – Yongqun He

  2. What Are Web Services? • Web services are a new breed of Web application. They are self-contained, self-describing, modular applications that can be published, located, and invoked across the Web.

  3. Generic Web Service Architecture

  4. Why we use Web Services? • The Web provides a uniform and widely accessible interface and access glue over services. • Web service providers can use the Internet to market their services to a potentially huge set of possible clients. • For clients, it can mean quicker and more flexible application development.(all the wording)

  5. Examples of Web Services • Microsoft Passport: a convenient authentication service used in Hotmail • A credit checking service that returns credit information when given a person's social security number. • A stock quote service that returns the stock price associated with a specified ticker symbol.

  6. Web Services Platform = XML + HTTP Or = XML + HTTP + SOAP + WSDL + UDDL Or = XML + HTTP + SOAP + WSDL + UDDL +XAML + XLANG + XFS +……

  7. SOAP • Simple Object Access Protocol – is a protocol specification that defines a uniform way of passing XML-encoded data • SOAP envelop • SOAP header • SOAP body

  8. POST /StockQuote HTTP/1.1 Host: www.stockquoteserver.com Content-Type: text/xml; charset="utf-8" Content-Length: nnnn SOAPAction: "Some-URI" <SOAP-ENV:Envelope   xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/ SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body>        <m:GetLastTradePrice xmlns:m="Some-URI">            <symbol>DIS</symbol>        </m:GetLastTradePrice>    </SOAP-ENV:Body> </SOAP-ENV:Envelope>

  9. HTTP/1.1 200 OK Content-Type: text/xml; charset="utf-8" Content-Length: nnnn <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> <SOAP-ENV:Body>        <m:GetLastTradePriceResponse xmlns:m="Some-URI">            <Price>34.5</Price>        </m:GetLastTradePriceResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>

  10. UDDI • Universal Description, Discovery and Integration – provides a mechanism for clients to dynamicaly find other web services

  11. UDDI • White pages: Information such as the name, address, telephone number, and other contact information of a given business. • Yellow pages: Information that categorizes businesses. This is based on existing(non-electronic) standards. • Green pages: Technical information about the Web services provided by a given business.

  12. UDDI schema

  13. Registry APIs (SOAP Messages) • Publishers API • Save things • save_business • save_service • save_binding • save_tModel • Delete things • delete_business • delete_service • delete_binding • delete_tModel • security… • get_authToken • discard_authToken • Inquiry API • Find things • find_business • find_service • find_binding • find_tModel • Get Details about things • get_businessDetail • get_serviceDetail • get_bindingDetail • get_tModelDetail

  14. e.g.1 <find_business generic="2.0" xmlns=um:uddi-org:api-v2"> <name>Books%</name> </find_business> e.g.2 (?) ( and return result……) <get_serviceDetail generic="2.0" xmlns=um:uddi-org:api-v2"> <serviceKey>"2AB346C0-2282-43B0-756B-0003CC35CC1D“ </name> </get_serviceDetail>

  15. <tModel authorizedName="..." operator="..." tModelKey="..."> <name>StockQuote Service</name> <description xml:lang="en"> WSDL description of a standard stock quote service interface </description> <overviewDoc> <description xml:lang="en">WSDL source document. </description> <overviewURL> http://stockquote-definitions/stq.wsdl </overviewURL> </overviewDoc> <categoryBag> <keyedReference tModelKey="uuid:C1ACF26D-9672-4404-9D70-39B756E62AB4" keyName="uddi-org:types" keyValue="wsdlSpec"/> </categoryBag> </tModel>

  16. WSDL • Web Services Description Language • Service – a collection of ports • Port – a single endpoint defined as a combination of a binding and a network address • Binding – a concrete protocol and data format specification for particular port type • Port type – an abstract set of operations supported by one or more endpoints • Operation – an abstraction description of an action • And so on…

  17. WSDL • There are tools available to read a WSDL file and generate the code required to communicate with an XML web service • Apache AXIS: generating Java stubs/skeletons given a WSDL file • Microsoft Visual Studio .NET

  18. References • http://www.uddi.org • http://java.sun.com/webservices/ • http://www.xml.com/lpt/a/2001/04/04/webservices/index.html • http://www-106.ibm.com/developerworks/webservices/

More Related