dounuogong0358 2010-06-04 15:03
浏览 12
已采纳

PHP Zend XML-RPC - 在请求中禁用'nil'的任何方法?

I'm using Zend XML-RPC Client library to send XML requests to another non-PHP XML RPC server.(it's a java JBoss install, but I don't have control to change it/patch it/hack it). One request I'm making has a <nil/> element, which is a XML-RPC extension. The XML-RPC server I'm talking to doesn't support that because the request fails with Failed to parse XML-RPC request: Unknown type: nil.

Is there any way to tell Zend to not send the <nil/> value and send something else instead? Others have asked this before: http://framework.zend.com/issues/browse/ZF-1919

  • 写回答

1条回答 默认 最新

  • dongwei2882 2010-06-04 15:37
    关注

    I don't think so, however:

    The array of parameters for the remote method can contain native PHP types, 
    Zend_XmlRpc_Value objects, or a mix of each. 
    

    You actually have full control over the type of parameters passed to the remote method. Converting null values to empty strings before sending the request should be trivial, isn't it?

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#.net#的问题:End Function
  • ¥15 无法import pycausal
  • ¥15 VS2022创建MVC framework提示:预安装的程序包具有对缺少的注册表值的引用
  • ¥15 weditor无法连接模拟器Local server not started, start with?
  • ¥20 6-3 String类定义
  • ¥15 嵌入式--定时器使用
  • ¥20 51单片机学习中的问题
  • ¥30 Windows Server 2016利用兩張網卡處理兩個不同網絡
  • ¥15 Python中knn问题
  • ¥15 使用C#,asp.net读取Excel文件并保存到Oracle数据库