编辑: 梦里红妆 | 2017-09-18 |
13 ? SOAP 以XML 形式提供了一个简单的、轻量级 的可以在分散的环境,或者是分布式的环境中 点对点地交换结构化和类型化信息的一种机制. SOAP 组成 ? SOAP envelope 定义了一个整体的表示框架 ? SOAP envelope, 定义了 个整体的表示框架. ? SOAP encoding rules, 定义了一个编码机制用 于交换应用程序定义的数据类型的实例. ? SOAP RPC representation, 定义了一个用于表 示远端过程调用和响应的约定. SOAP bi di 定义了 个使用底层传输协议 2014/11/24
14 ? SOAP binding, 定义了一个使用底层传输协议 来完成在节点间交换SOAP 包的约定. 2014/11/24
8 SOAP 消息 SOAP Envelope ? SOAP Envelope ? SOAP Header (可选) ? SOAP Body 2014/11/24
15 SOAP Message ? A SOAP message is contained within an XML " l " l t ith H d d B d "envelope", complete with a Header and Body SOAP Envelope SOAP Header (optional) Web Services: SOAP
16 SOAP Body "payload" 2014/11/24
9 SOAP Message with Binary Attachments MIME Header MIME Boundary ? A SOAP message can also contain binary attachments using MIME encoding SOAP Envelope SOAP Header (optional) SOAP Body "payload" Root Body Part MIME Boundary Web Services: SOAP
17 payload Body Part MIME Boundary Attachment SOAP Structure ? Envelope contains ? Header ? Body ? Header is optional ? information such as… ? Authentication information ? Message routes Logging SOAP Envelope SOAP Header Header Block Header Block . . . Web Services: SOAP
18 ? Logging ? Transaction flow ? Body contains XML body of RPC call SOAP Body Body Block Body Block . . . 2014/11/24
10 SOAP over HTTP ? Request example POST /Temperature HTTP/1.1 Host: www.weather.com Content-Type: text/xml Content-Length: SOAPAction: "urn:StockQuote#GetQuote"