Web Service中RPC和Document的区别
来源:互联网 发布:算法之美 中文版 编辑:程序博客网 时间:2024/04/29 19:04
来自国外论坛的通俗易懂的回答:
With Document/Literal encoding, the payload of a message is an XML fragment that can be validated against the corresponding XML schema, for instance:
- <?xml version="1.0" encoding="UTF-8"?>
- <soap:Envelope
- xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:mi="http://www.somedomain.com/xyz/message-id"
- xmlns:proc="http://www.somedomain.com/xyz/processed-by"
- xmlns:po="http://www.books.com/purchase">
- <soap:Header/>
- <soap:Body>
- <po:purchaseOrder orderDate="2008-09-22"
- xmlns:po="http://www.somedomain.com/xyz/PO">
- <po:accountName>Books.com</po:accountName>
- <po:accountNumber>923</po:accountNumber>
- ...
- <po:book>
- <po:title>Air Guitars In Action</po:title>
- <po:quantity>300</po:quantity>
- <po:wholesale-price>14.99</po:wholesale-price>
- </po:book>
- </po:purchaseOrder>
- </soap:Body>
- </soap:Envelope>
RPC (remote procedure call)/Literal more closely corresponds to remote procedure invocations.
For instance, the method: public float getBookPrice(String inISBN) would correspond to the following RPC/Literal request message:
- <?xml version="1.0" encoding="UTF-8"?>
- <soap:Envelope
- xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:sd="http://www.somedomain.com/xyz/BookQuote">
- <soap:Body>
- <sd:getBookPrice>
- <isbn>0321146182</isbn>
- </sd:getBookPrice>
- </soap:Body>
- </soap:Envelope>
There is a SOAP standard XML format for RPC-style messaging. However, use and implementation of this standard is optional.
Hope this makes things more clear!
One important difference between RPC and Document web services is that with RPC web services, XML schema will only be created for complex type parameters. It is thus not possible to validate the entire XML fragment contained in the SOAP body.
With Document web services, however, the XML schema needs to define the ENTIRE XML fragment contained in the SOAP body. Consequently, the entire message can be validated against the XML schema.
- Web Service中RPC和Document的区别
- web service和rpc的区别
- web service和rpc的区别
- web service和rpc的区别
- web service和rpc的区别
- rpc和document的区别
- 远程通信 web service和RPC的区别
- RPC 和 Web Service 有什么区别?
- wsdl:binding中 style: "document" 和 RPC 区别
- wsdl:binding中 style: "document" 和 RPC 区别
- wsdl:binding中 style: "document" 和 RPC 区别
- document与rpc的区别
- SOAP风格中 RPC与Document的区别
- web service与远程调用(RPC)的区别:
- web service与远程调用(RPC)的区别
- web service与远程调用(RPC)的区别
- Soap中RPC-style和Document-style
- web service中typeMapping和beanMapping的区别
- 成功创办一个公司究竟需要多少钱?
- (转)算法大全(C,C++)
- oracle 用户名解释
- C#生成DLL文件
- javascript单引号和双引号区别
- Web Service中RPC和Document的区别
- epoll学习笔记
- JFreeChart: XY Log Axes Demo指数增长
- hibernate 中HQL语句查询学习笔记一
- Android为数据存储提供几种方式
- Linux 命令行 下编译 基于Qt的项目
- 位运算——判断整数a是否为2的正整数幂?
- Junit初体验
- asp.net-防DDOS攻击(CC攻击)代码