1 / 20

Web Service

Web Service. 2008-4-21. 什么是 Web 服务 ? 建立可互操作的分布式应用程序的平台 能够通过 Web 进行调用的 API GET http://localhost/weather.asp?zipcode=20171 返回数据: 21, 晴 . 这个页面就可以算作是 Web service 了 . 哪些服务 ? Google EBay 技术手段 ? SOAP REST …. Overview. Computer. Human. Shopping Trading Research.

Download Presentation

Web Service

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 Service 2008-4-21

  2. 什么是Web服务? • 建立可互操作的分布式应用程序的平台 • 能够通过Web进行调用的API GET http://localhost/weather.asp?zipcode=20171返回数据:21,晴. 这个页面就可以算作是Web service 了. • 哪些服务? • Google • EBay • 技术手段? • SOAP • REST • … Overview

  3. Computer Human • Shopping • Trading • Research EBay服务提供商提供了哪些服务?

  4. Get a list with keyword “T-shirt” | Search and browse | Shopping web service | Document or WSDL | XML/JSON/SOAP | Parse or use Toolkit XML Sample EBay服务使用者如何使用这些服务?

  5. XML

  6. 轻量级,介于TEXT和XML之间 不需要解析器,直接转为JavaScript数组 JSON(JavaScript Object Notation)

  7. AddOrder method SOAP

  8. (JSON) REST EBay服务提供商如何设计服务的架构?

  9. SOAP(Simple Object Access Protocol) • WSDL+UDDI+WS-* • 各个平台提供支持. • 易于设计应用级别的访问接口. • 不依赖于HTTP的多重协议. Including Google, EBay all provide web service using SOAP. • REST(Representational State Transfer) • Resources(N) + POST/PUT/GET/DELETE(CURD)(V) • 资源多重表述(JSON/XML/IMAGE) • REST最大的特点是容易被人理解,不需要额外的工具进行解析. • 早期的web service比较常用SOAP,目前REST日渐流行(Google). • Lightweight. Including Yahoo, delicious, Amazon all provide web service using REST style architecture. SOAP VS REST

  10. SOAP VS REST

  11. 公开的有50多种供开发者调用的服务 • GData(Google Data API) • Blogger, Calendar, Picasa, YouTube, Gmail(Atom) • URL • Account, Static Map, Chart • AJAX • Map, Search, Book Search, Checkout • SOAP • AdSense, AdWords • XMPP • GTalk • Toolkit • Gadget, Web Toolkit, Desktop Search, Desktop Gadget, Mashup Editor, Mapplets REST Google服务提供商提供了哪些服务?

  12. Based on Atom 1.0 and RSS 2.0 • Query • Update • Collaboration • Authentication • In the spirit of REST • Resource(URL) • Query->GET • Updates->POST/PUT/DELETE GData

  13. Get a video list(YouTube) GET http://gdata.youtube.com/feeds/api/standardfeeds/top_rated Response: Refer to : http://code.google.com/apis/youtube/developers_guide_protocol.html Google服务使用者如何使用这些服务?

  14. GET Google服务使用者如何使用这些服务?

  15. Google服务使用者如何使用这些服务?

  16. Add a calendar POST POST: Response: Google服务使用者如何使用这些服务?

  17. Account • GET https://www.google.com/accounts/ClientLogin?accountType=HOSTED_OR_GOOGLE&Email=jondoe@gmail.com&Passwd=north23AZ&service=cl • Response SID=DQAAAGgA...7Zg8CTN LSID=DQAAAGsA...lk8BBbG Auth=DQAAAGgA...dk3fA5N • Static Map • GET http://maps.google.com/staticmap?center=40.714728,-73.998672&zoom=14&size=512x512&maptype=mobile\ &markers=40.702147,-74.015794,blues%7C40.711614,-74.012318,greeng%7C40.718217,-73.998284,redc\ &key=MAPS_API_KEY • Response URL

  18. Load Engine Setting Map Setting Search AJAX Display

  19. AdSense • 针对网站主的一种服务,将广告主投放的广告投放于网站主的网站,以使网站主分享广告收益 • https://www.google.com/api/adsense/v3/AdSenseForContentService?wsdl SOAP

  20. Google Gadgets Editor + Google Gadget API http://code.google.com/apis/gadgets/docs/gs.html#GGE Gadget

More Related