function xmlrpc_error_get_xml in Drupal 7
Same name and namespace in other branches
- 4 includes/xmlrpc.inc \xmlrpc_error_get_xml()
- 5 includes/xmlrpc.inc \xmlrpc_error_get_xml()
- 6 includes/xmlrpc.inc \xmlrpc_error_get_xml()
Converts an XML-RPC error object into XML.
Parameters
$xmlrpc_error: The XML-RPC error object.
Return value
string An XML representation of the error as an XML methodResponse.
1 call to xmlrpc_error_get_xml()
- xmlrpc_server_error in includes/
xmlrpcs.inc - Throws an XML-RPC error.
File
- includes/
xmlrpc.inc, line 461 - Drupal XML-RPC library.
Code
function xmlrpc_error_get_xml($xmlrpc_error) {
return <<<EOD
<methodResponse>
<fault>
<value>
<struct>
<member>
<name>faultCode</name>
<value><int>{<span class="php-variable">$xmlrpc_error</span>-><span class="php-function-or-constant property member-of-variable">code</span>}</int></value>
</member>
<member>
<name>faultString</name>
<value><string>{<span class="php-variable">$xmlrpc_error</span>-><span class="php-function-or-constant property member-of-variable">message</span>}</string></value>
</member>
</struct>
</value>
</fault>
</methodResponse>
EOD;
}