-- Tony Harrison <[email protected]> wrote
(on Tuesday, 31 January 2012, 11:58 AM +0000):
> Hello, when making an XML RPC call like so:
> 
> $result = $client->call($rpc_method, $params);
> 
> It produces this exception:
> PHP Fatal error:  Uncaught exception
> 'Zend_XmlRpc_Client_FaultException' with message 'Invalid response' in
> /var/www/library/Zend/XmlRpc/Client.php:261
> 
> How can I read the HTTP response from the RPC Call? As I need to see
> this to find out what is going wrong for me.

Grab the HTTP client from the XML-RPC client, and then the last response
from that:

    $httpClient   = $xmlRpcClient->getHttpClient();
    $httpResponse = $httpClient->getLastResponse();

    $payload      = $httpResponse->getRawBody();
    $headers      = $httpResponse->getHeaders();

-- 
Matthew Weier O'Phinney
Project Lead            | [email protected]
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to