中国高校课件下载中心 》 教学资源 》 大学文库

Distributed Systems and Networking Programmin(SOAP – Introduction)

文档信息
资源类别:文库
文档格式:PPT
文档页数:33
文件大小:183KB
团购合买:点击进入团购
内容简介
Distributed Systems and Networking Programmin(SOAP – Introduction)
刷新页面文档预览

EIE424 Distributed Systems and Networking Programming -PartIl 3.1 SOAP-Introduction 3.1 SOAP- Introduction

1 EIE424 Distributed Systems and Networking Programming –Part II 3.1 SOAP – Introduction 3.1 SOAP – Introduction

EIE424 Distributed Systems and Networking Programming -PartIl 3.1 SOAP-Introduction What is soAP? SOAP is an XML-based protocol for exchanging information between computers o Mainly use for performing remote procedure calls transported via Http e Different from corba. dcom or java rmi SOAP messages are entirely written in XML o Hence platform and language independent E.g. SOAP java client running on Linux can connect to a Microsoft SOAP server running on Windows XP At the same time a perl client running on Solaris can 2 also connect to the same soap server

2 What is SOAP? ⚫ SOAP is an XML-based protocol for exchanging information between computers ⚫ Mainly use for performing remote procedure calls transported via HTTP ⚫ Different from CORBA, DCOM or Java RMI, SOAP messages are entirely written in XML ⚫ Hence platform and language independent – E.g. SOAP java client running on Linux can connect to a Microsoft SOAP server running on Windows XP – At the same time, a Perl client running on Solaris can also connect to the same SOAP server EIE424 Distributed Systems and Networking Programming –Part II 3.1 SOAP – Introduction

EIE424 Distributed Systems and Networking Programming -PartIl 3.1 SOAP-Introduction What does soAP Define? o SOAP envelope specification Specify the rules for encapsulating data being transferred between computers In case of failure define how to encode error messages ● Data encoding rules Define how the data are encoded E.g. the rule to encode floating point numbers Most conventions are based on the w3c XMl schema RPC conventions Define how a rpc can be proceeded E.g. how to specify the procedure name, pass parameters 3 and receive response(returned results

3 EIE424 Distributed Systems and Networking Programming –Part II 3.1 SOAP – Introduction What does SOAP Define? ⚫ SOAP envelope specification – Specify the rules for encapsulating data being transferred between computers – In case of failure, define how to encode error messages ⚫ Data encoding rules – Define how the data are encoded – E.g. the rule to encode floating point numbers – Most conventions are based on the W3C XML Schema ⚫ RPC conventions – Define how a RPC can be proceeded – E.g. how to specify the procedure name, pass parameters and receive response (returned results)

EIE424 Distributed Systems and Networking Programming -PartIl 3.1 SOAP-Introduction SOAP VS XML-RPC Similarities Use XML for messaging Messages are usually embedded into Http header Use request/response mechanism Mainly use in remote procedure call Platform independent Language independent Differences SOAP messages are more complicated than XML-RPC Make use of XML namespaces and XML schemas Hence give a standard way for data encoding and RPC 4 Thus allow automatic method invocation on the Web

4 SOAP vs XML-RPC ⚫ Similarities – Use XML for messaging – Messages are usually embedded into HTTP header – Use request/response mechanism – Mainly use in remote procedure call – Platform independent – Language independent ⚫ Differences – SOAP messages are more complicated than XML-RPC – Make use of XML namespaces and XML Schemas – Hence give a standard way for data encoding and RPC – Thus allow automatic method invocation on the Web EIE424 Distributed Systems and Networking Programming –Part II 3.1 SOAP – Introduction

EIE424 Distributed Systems and Networking Programming -PartIl 3.1 SOAP-Introduction SOAP in Action Http --E XMI SOAP Request SOAP SOAP client server SOAP Response Http XML Hence soap messages can be delivered via the web 5

5 EIE424 Distributed Systems and Networking Programming –Part II 3.1 SOAP – Introduction SOAP in Action SOAP client SOAP server XML XML HTTP HTTP SOAP Response SOAP Request Hence SOAP messages can be delivered via the Web

EIE424 Distributed Systems and Networking Programming -PartIl 3.1 SOAP-Introduction SOAP Communication Styles SOAP supports two different communication styles RPC Style e Uses the soaP rPc conventions hence the communication method and procedure are governed by the conventions Conceptually similar to other RPCs The default of early SOAP implementations Document Style e Also known as message-oriented style ● Sending non-encodedⅩ ML content o Require more programming work on server and client sides to interpret the messages e More flexible communication and provides the best 6 interoperability

6 EIE424 Distributed Systems and Networking Programming –Part II 3.1 SOAP – Introduction SOAP Communication Styles ⚫ SOAP supports two different communication styles: – RPC Style ⚫ Uses the SOAP RPC conventions, hence the communication method and procedure are governed by the conventions ⚫ Conceptually similar to other RPCs ⚫ The default of early SOAP implementations – Document Style ⚫ Also known as message-oriented style ⚫ Sending non-encoded XML content ⚫ Require more programming work on server and client sides to interpret the messages ⚫ More flexible communication and provides the best interoperability

EIE424 Distributed Systems and Networking Programming -PartIl 3.1 SOAP-Introduction A Sample request in RPC Style 10016 Try to call the remote method getTemp with input parameter, a zipcode: 10016

7 EIE424 Distributed Systems and Networking Programming –Part II 3.1 SOAP – Introduction 10016 A Sample Request in RPC Style Try to call the remote method getTemp with input parameter, a zipcode: 10016

EIE424 Distributed Systems and Networking Programming -PartIl 3.1 SOAP-Introduction A Sample response in RPc Style 71.0 Return a double 71.0 which represents the temperature

8 EIE424 Distributed Systems and Networking Programming –Part II 3.1 SOAP – Introduction A Sample Response in RPC Style 71.0 Return a double 71.0 which represents the temperature

EIE424 Distributed Systems and Networking Programming -PartIl 3.1 SOAP-Introduction SOAP Messages o In most cases, we do not need to directly programming in SOAP o Dozens of SoAP implementations now freely exist on the Internet Apache SOAP(Axis) Microsoft soap toolkit o Allow generating SoAP messages automatically using High Level Language, e. g. Java, C++, Perl Understanding of SOAP message structure enables us to intercept a SoAP transaction and to debug a SOAP application

9 EIE424 Distributed Systems and Networking Programming –Part II 3.1 SOAP – Introduction SOAP Messages ⚫ In most cases, we do not need to directly programming in SOAP ⚫ Dozens of SOAP implementations now freely exist on the Internet – Apache SOAP (Axis) – Microsoft SOAP ToolKit ⚫ Allow generating SOAP messages automatically using High Level Language, e.g. Java, C++, Perl ⚫ Understanding of SOAP message structure enables us to intercept a SOAP transaction and to debug a SOAP application

EIE424 Distributed Systems and Networking Programming -PartIl 3.1 SOAP-Introduction Message SOAP Message Structure Envelope(mandatory) Header(optional) Body(mandatory) Fault(optional) 10

10 EIE424 Distributed Systems and Networking Programming –Part II 3.1 SOAP – Introduction Message Structure SOAP Message Envelope (mandatory) Header (optional) Body (mandatory) Fault (optional)

刷新页面下载完整文档
VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
相关文档