Author | XML-RPC vs. RTC Format |
Danijel Tkalcec [RTC]
25.10.2006 11:49:37 |
There are two major differences between the XML-RPC format and the RTC format. One difference is that XML-RPC doesn‘t support all types supported by RTC, so multiple RTC types need to be mapped to a single XML-RPC type. Because of this, some type information will be "lost" when sending the data over XML-RPC. Here is a list showing how your RTC types will be mapped to XML-RPC when sending the data out ... 1) rtc_Float, rtc_Currency -> <double> 2) rtc_Integer, rtc_LargeInt -> <int> 3) rtc_Text, rtc_String, rtc_WideString, rtc_Variable -> <value> 4) rtc_DateTime -> <datetime.iso8601> (no miliseconds) 5) rtc_Boolean -> <boolean> 6) rtc_DataSet -> <struct> with "Fields" and "Rows" as <array>s 7) rtc_Exception -> <fault><struct> 8) rtc_Record -> <struct> 9) rtc_Array -> <array> 10) rtc_ByteStream -> <base64> 11) rtc_Null -> <nil/> When RTC Clients need to talk to a RTC Server (and vice-versa), you can send all RTC types like DataSets and Exceptions as parameters and all other XML-RPC apps will be able to decipher the data, but other XML-RPC apps will most likely see the data "differently". For example, a rtc_DataSet will be seen as a <struct> with two <array>s and not as a single DataSet object (like in RTC SDK), while Exceptions included in other data will be seen as a <struct> with 2 <member>s (unless it‘s a single Exception sent from the Server to the Client, for which the standard <fault> structure will be used). You can also activate both data formats on the ServerModule (fmt_RTC and fmt_XMLRPC), so your RTC clients can use the compact RTC format while other apps use XML-RPC. Another difference is that XML-RPC function call parameters are sent in a list, where order is important, but no names are assigned, while RTC uses names for all parameters. To make the communication between RTC Clients and Servers compatible even when using XML-RPC, all parameters will be packed into a <struct>, unless you pack them in an array called "params". That way, name information will be preserved if you use the "standard RTC way", and ... if you need to talk to a server/client which wants the parameters in a list, you will pack them into an array named "params", with the first parameter at index 0. So, if a non-RTC app will want to call a remote function written with RTC by using names, it will have to send all parameters as a single <struct> param. On the other hand, when you want to call remote functions written by other servers, unless they use the same <struct> method, you will need to pack the data in an array called "params" (elements start from index 0). That way we are keeping 100% compatibility between RTC clients and servers, while still making communication with other XML-RPC apps possible, regardless of their format. Best Regards, |
Danijel Tkalcec [RTC]
25.10.2006 12:33:46 |
Here is how XML-RPC types will be mappet to RTC types when you receive a request or a response over XML-RPC ... 1) <FAULT> -> rtc_Exception 2) <METHODCALL>, <CALL> -> rtc_Function 3) <I4>, <INT> -> rtc_LargeInt 4) <BOOLEAN> -> rtc_Boolean 5) <VALUE>, <STRING> -> rtc_String 6) <DOUBLE> -> rtc_Float 7) <DATETIME.ISO8601>, <DATETIME>, <TIMESTAMP> -> rtc_DateTime 8) <BASE64>, <BASE64BINARY>, <BINARY> -> rtc_ByteStream 9) <STRUCT> -> rtc_Record; Except if it is the first and the only parameter in a function call list, in which case all values will be prepared as named parameters, "the standard RTC way". 10) <ARRAY> -> rtc_Array 11) </NIL> -> rtc_Null Best Regards, |
XML-RPC vs. RTC Format
时间: 2024-10-11 05:51:00
XML-RPC vs. RTC Format的相关文章
什么是XML RPC?
# -*- coding: cp936 -*- #python 27 #xiaodeng #什么是XML RPC? #中文叫:远程过程调用 #使用http协议做传输协议的rpc机制,使用xml文本的方式传输命令和数据 #一个rpc系统必然包含2个部分: #1.rpc client:用来向rpc server调用方法,并接收方法的返回数据 #2.rpc server:用于响应rpc client的请求,执行方法,并回送方法的执行结果. #工作原理 #1.rpc client的工作原理是rpc cl
The type javax.xml.rpc.ServiceException cannot be resolved.It is indirectly
The type javax.xml.rpc.ServiceException cannot be resolved.It is indirectly 博客分类: 解决方案_Java 问题描述:The type javax.xml.rpc.ServiceException cannot be resolved.It is indirectly…… 还加了一个错误提示:the hierarchy of the type is inconsistent 原因:缺少jaxrpc.jar包 解决方案:导
使用DOM4J解析XMl文件与读取XML文件
XML文件 1 <?xml version="1.0" encoding="UTF-8"?> 2 <bookstore> 3 <book id="1"> 4 <name>冰与火之歌</name> 5 <author>乔治马丁</author> 6 <year>2014</year> 7 <price>89</price&g
生成XML文件
import java.io.FileOutputStream;import java.io.IOException; import org.jdom.Document;import org.jdom.Element;import org.jdom.JDOMException;import org.jdom.output.Format;import org.jdom.output.XMLOutputter; public class CreateXML { Book[] books = new
XML的应用
1.XML的定义: XML 于 1998 年 2 月 10 日成为 W3C 的推荐标准.xml一般指可扩展标记语言,可扩展标记语言是一种很像超文本标记语言的标记语言.它的设计宗旨是传输数据,而不是显示数据. 2.通过XML我们可以自定义自己的标签,如: <mail> <from>tom</from> <to>lily</to> <detail>I will go home this weekend!</detail> &l
Java从零开始学四十三(DOM4j解析XML)
一.创建XML // 建立XML public static void gernatorXML() { // 创建Document对象 Document doc = DocumentHelper.createDocument(); // 创建根节点students Element studentsElement = doc.addElement("students"); // 创建子节点student Element studentElement1 = studentsElement.
Dom4J xml处理(我的第一个封装类)
Dom4J 是处理xml的一个高效强大的工具包 下面是我自己写的工具类 希望能对大家有帮助,下面是主要方法(注本类使用dom4j-1.6.1.jar包下载地址http://pan.baidu.com/s/1o7Vasmm) 主要方法1:getDocument(String path):获取documen对象 2:xmlWrites(String path,Document document):回写xml文件 3:getElement(String qname,String t
Ajax跨域访问XML数据的另一种方式——使用YQL查询语句
XML数据默认是不能在客户端通过Ajax跨域请求读取的,一般的做法是在服务器上写一个简单的代理程序,将远程XML的数据先读到本地服务器,然后客户端再从本地服务器通过Ajax来请求.由于我们不能对数据源所在的环境进行任何设置和修改,所以仅通过客户端代码很难绕过这个问题.但如果请求的数据不是XML而是JSON对象或者JavaScript函数,则通过JSONP方法可以非常容易地解决,直接调用JQuery.getJSON()方法在回调函数中就可以获取到返回的结果.如果要使用JSONP,可以在指定的URL
java生成xml
import java.io.File;import java.io.FileOutputStream;import java.text.SimpleDateFormat;import java.util.Calendar;import java.util.Date;import java.util.Map.Entry; import org.jdom2.Document;import org.jdom2.Element;import org.jdom2.output.Format;import