PHP Zend XML-RPC 客户端 - “未知类型:i8”当使用 Zend_Crypt_Math_BigInteger 发出请求时?
我正在使用 Zend 1.10 的 XML-RPC 客户端库向另一台服务器发出 XML-RPC 请求。我必须调用的方法之一使用 i8
(又名 ex:i8
)类型,即扩展大整数。 Zend 中支持此功能(参见 http://framework.zend。 com/apidoc/1.10/Zend_XmlRpc/Value/Zend_XmlRpc_Value_BigInteger.html)。然而,每当我尝试对其进行几次调用时,我都会遇到异常(我认为在它联系服务器之前)。
exception 'Zend_XmlRpc_Client_FaultException' with message 'Failed to parse XML-RPC request: Unknown type: i8' in /usr/local/myprog/libs/zend/library/Zend/XmlRpc/Client.php:370
Stack trace:
#0 /usr/local/myprog/client.php(102): Zend_XmlRpc_Client->call('methodCall', Array)
#1 {main}
通过在客户端对象上使用 getLastRequest() ,我可以看到它想要发送的 XML 是这样的:
?xml version="1.0" encoding="UTF-8"?>
<methodCall><methodName>methodCall</methodName><params><param/><param/></params></methodCall>
看起来 Zend 没有将名称空间添加到 XML 中。我该如何解决这个问题?如何使用 i8
/ex:i8
/BigInteger
参数进行 XML-RPC 方法调用?
I am using Zend 1.10's XML-RPC client library to make XML-RPC requests to another server. One of the methods I have to call uses a i8
(a.k.a. ex:i8
) type, i.e. extended big integer. This is supported in Zend (cf. http://framework.zend.com/apidoc/1.10/Zend_XmlRpc/Value/Zend_XmlRpc_Value_BigInteger.html). However whenever I try to make a few calls to it, I get an exception (I think before it contacts the server).
exception 'Zend_XmlRpc_Client_FaultException' with message 'Failed to parse XML-RPC request: Unknown type: i8' in /usr/local/myprog/libs/zend/library/Zend/XmlRpc/Client.php:370
Stack trace:
#0 /usr/local/myprog/client.php(102): Zend_XmlRpc_Client->call('methodCall', Array)
#1 {main}
By using getLastRequest()
on the client object I can see that the XML it wants to send is this:
?xml version="1.0" encoding="UTF-8"?>
<methodCall><methodName>methodCall</methodName><params><param/><param/></params></methodCall>
It looks like Zend isn't adding the namespaces to the XML. How can I get around this? How do I make a XML-RPC method call with i8
/ex:i8
/BigInteger
parameter?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
作为
Zend_XmlRpc
i8 支持的前维护者和原始作者,我不得不承认这对我来说看起来像是一个错误。目前无法告诉 XML/RPC 客户端添加正确的名称空间声明。As the previous maintainer and original author of the
Zend_XmlRpc
i8 support I have to admit this looks like a bug to me. There is currently no way to tell the XML/RPC client to work add the correct namespace declaration.