سؤال

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

هل كانت مفيدة؟

المحلول

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?

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top