1 / 18

Web Service 實作簡介

Web Service 實作簡介. 張啟中. Outline. Introduction to Web Service Demo (An Example) Demo (Building a Web Service with .Net) Demo (Consuming a Web Service with .Net). Programming Model. View. Model. Control. Distribution Environment (1). 商業邏輯元件與前端視覺元件在一起,延展性與負載性不佳。. Servers Data, Hosts.

sean-mejia
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 實作簡介 張啟中

  2. Outline • Introduction to Web Service • Demo (An Example) • Demo (Building a Web Service with .Net) • Demo (Consuming a Web Service with .Net)

  3. Programming Model View Model Control

  4. Distribution Environment (1) • 商業邏輯元件與前端視覺元件在一起,延展性與負載性不佳。 Servers Data, Hosts UI Logic Biz Logic Browsers OS Services

  5. Distribution Environment (2) • 商業邏輯與前端視覺元件分開,增加了延展性,同時也較易於維護。 Biz Logic Tier Servers Data, Hosts Rich Client UI Logic 分散式元件 Richer Browsers OS Services “Stateful” “Stateless” & “Geo-Scalable”

  6. Distribution Objects • DCOM、COM+ • EJB • ORG (CORBA)

  7. Issue of Distribution Objects • Server 與 Client 都需要瞭解: • Implementation 的細節 • 服務的部署 • 安全類型與信任關係 • 必須有相同的平台環境 • Binary code 相容 • COM 對 COM, EJB 對 EJB, ORB 對 ORB, HTML 3.2, 等等 • 無法穿越防火牆

  8. Web Services 防火牆 Servers Data, Hosts Rich Client UI Logic Web Service XML、SOAP、HTTP Richer Browsers OS Service XML、SOAP、HTTP

  9. Web Services • 使用 HTTP 協定,可穿越防火牆 • 通訊的內容為 XML 格式文件, • 程式化存取網站的服務 • 允許豐富的、動態的通訊於應用程式間 • Components for the Web

  10. Web Service Technology • XML • SOAP • HTTP or HTTPS SOAPDiscovery • 描述 web site 所提供的 Web Services SOAPContract Language • Web Services 所定義的格式與訊息順序 SOAP • Web Service Provider and Consumers 之間利用 XML 送、收訊息 XML, XSDHTTP, SMTP • 所有的這些性能都建立再使用開放的 Internet protocols

  11. http://yourservice.com HTML or XML with link to SCL SCL http://yourservice.com/SCL XML with service descriptions http://yourservice.com/svc1 XML/SOAP BODY Web Service Web Service Consumer Web Service Provider Discovery SOAP Runtime Design-Time or Dynamic

  12. SOAP • Simple Object Access Protocol • Lightweight XML-based messaging format • Application • Any operating system • Any programming language • Any platform • Builds on • W3C XML standards

  13. 整個 SOAP Message SOAP Message 標準的 Protocol (HTTP, SMTP, etc.)與 SOAP Headers <Envelope> encloses payload SOAP Envelope SOAP Header <Header> encloses headers SOAP Body <Body> 包含 SOAP 訊息名稱與資料 XML 編碼的 SOAP 訊息名稱與資料 SOAP Format Protocol Headers Headers Message Name & Data

  14. Microsoft .Net with Web Service • Visual Studio .NET 2002/2003 • Visual Studio 6 請下載 Web Service SDK Tools 安裝即可。 • .Net Build on XML,對於 Web Service 支援相當豐富。 • Windows 2003 內建 UDDI Server

  15. Example

  16. Web Service Provider

  17. Web Service Consumer 正則語言樣本字串 [0-9]* 與來源字串 ABCDE 作比對,傳回結果成功,因為空字串也符合樣本字串。 本程式叫用先前 http://www.johnaxer.idv.tw /example 的 Web Service

  18. DEMO

More Related