精品推荐
XML-RPC规范(中文版)
日期:2008年6月16日 作者: 查看:[大字体
中字体 小字体 ]
值可以个<array> 一个<array>简单的有一个<data>元素。<data>可以是任何合法类型。 下面是一个有4个值的array: <array> <data> <value><i4>12</i4></value> <value><string>Egypt</string></value> <value><boolean>0</boolean></value> <value><i4>-31</i4></value> </data> </array> <array> elements do not have names. <array> 元素没有名字。 你可以混合使用上面列出的几种类型。 <arrays>可以递归使用,其值可以是<array>或其他类型,包括上面说明的<strut>。 Response应答样式 下面是一个 XML-RPC请求: HTTP/1.1 200 OK Connection: close Content-Length: 158 Content-Type: text/xml Date: Fri, 17 Jul 1998 19:55:08 GMT Server: UserLand Frontier/5.1.2-WinNT <?xml version="1.0"?> <methodResponse> <params> <param> <value><string>South Dakota</string></value> </param> </params> </methodResponse> Respnse应答格式 除非底层操作出现错,否则总是返回200 OK. Content-Type是text/xml。必须设置Content-Length,并且必须是正确的值。 应到内容是一个简单的XML,可是是<methodResponse>包含一个<params>,<params>包含一个<param>,<param>包含一个<value>。 <methodResponse>可能含有一个<fault>标签。<fault>的值为<struct>类型,<struct>有两个元素,值为<int>的<faultCode>和值为<string>的<faultString>。 <methodResponse>不能既有<fault>又有<params>。 Fault example HTTP/1.1 200 OK Connection: close Content-Length: 426 Content-Type: text/xml Date: Fri, 17 Jul 1998 19:55:02 GMT Server: UserLand Frontier/5.1.2-WinNT <?xml version="1.0"?> <methodResponse> <fault> <value> <struct> <member> <name>faultCode</name> <value><int>4</int></value> </member> <member> <name>faultString</name> <value><string>Too many parameters.</string></value> </member> </struct> </value> </fault> </methodResponse> Strategies/Goals Firewalls. The goal of this protocol is to lay a compatible foundation across different environments, no new power is provided beyond the capabilities of the CGI interface. Firewall software can watch for POSTs whose Content-Type is text/xml.
复制本页网址和标题,发送给你QQ/Msn的好友一起分享
上一篇:让Win2000和XP SP1支持System.EnterpriseServices
下一篇:Firefox遭遇开发人员与资金危机
相关文章:
相关软件: