Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.1.5

Doc Bug #18650 Calling 2 methods from the server
Submitted: 2011-07-04 20:52 UTC
From: elvislicsari Assigned:
Status: Open Package: XML_RPC2 (version 1.1.1)
PHP Version: 5.2.4 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2011-07-04 20:52 UTC] elvislicsari (Elvis Licsari)
Description: ------------ I'm trying to call 2 methods from the server in the same client and every time i call the second method i get an exception. Test script: --------------- Client: $client = XML_RPC2_Client::create('url'); try { $result = $client->echoecho('XML_RPC2 test'); $result = $client->getArr(); } catch (...... Server: class EchoServer { /** * echoes the message received * * @param string Message * @return string The echo */ public function echoecho($string) { $string .= "<br />adaugat string in server ".$_SERVER["REQUEST_METHOD"]; return $string; } /** * returns a test array * * @return array the response array */ public function getArr() { return array("test1", "test2"); } } try { $server = XML_RPC2_Server::create(new EchoServer()); $server->handleCall(); } catch (........ Expected result: ---------------- I was hoping i could call 2 methods (or the same method 2 times) from the same server in the same client. Actual result: -------------- Every time i call the second method i get an exception: HTTP_Request2_MessageException: Malformed response: in ...../HTTP/Request2/Adapter/Socket.php on line 930

Comments