views:

102

answers:

1

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  A: 

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?

nuqqsa
Yes, in the end I put an empty array and changed my XML RPC spec
Rory