|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-08-18 10:12 UTC] giunta dot gaetano at sea-aeroportimilano dot it
Description:
------------
If an array containing members 'faultCode' and 'faultString' is passed as second parameter to xmlrpc_encode_request, a weird xml is generated, containing a methocall member and a fault member. Needless to say, it is not a valid xmlrpc request...
Reproduce code:
---------------
xmlrpc_encode_request('hello', array('faultCode' => 666, 'faultString' => 'hello world'))
Expected result:
----------------
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>hello</methodName>
<params>
<param>
<value><struct>
<member><name>faultCode</name>
<value><int>666</int></value>
</member>
<member><name>faultString</name>
<value><string>hello world</string></value>
</member>
</struct></value>
</param>
</params>
</methodCall>
Actual result:
--------------
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>hello</methodName>
<fault>
<value>
<struct>
<member>
<name>faultCode</name>
<value>
<int>666</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>hello world</string>
</value>
</member>
</struct>
</value>
</fault>
</methodCall>
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 10:00:01 2025 UTC |
This is rather an odd feature of libxmlrpc. Use: xmlrpc_encode_request('hello', array(array("faultCode"=>...,"faultString"=>...)));