Closed skonsoft closed 10 years ago
Hi,
Sure, I will. In general it's quite easy, there is an example:
$client = new \Seven\RpcBundle\XmlRpc\Client('http://xml.rpc.server/endpoint.php');
$result = $client->call('method_name', array($parameter1, $parameter2, ..));
In case of error you will get an Exception.
Thanks a lot for your explanation, but i've another quest, how can i know if the server is down?. What execption should i receive.
In current version you will get an exception if you will try to call unreachable server. But this exception will not reflect the problem it will say "Empty response".
Using the client i get this: The XML document has not valid XML-RPC content is an error from the server or my own?
I have a requirement that create a python RPCserver and client using php. But Notice: Undefined property: DOMText::$tagName in /home/wwwroot/sample/vendor/seven/symfony-rpc-bundle/Seven/RpcBundle/XmlRpc/Implementation.php Finally, I changed the Implementation.php which function's name createMethodResponse from $xpath->query("//methodResponse/params/param"); to $xpath->query("//methodResponse/params/param/value"), and it is resolved. Btw,I use Silex Framework, below is my composer "require": { "silex/silex": "~1.1", "symfony/twig-bridge": "~2.4", "twig/twig": ">=1.8,<2.0-dev", "mheap/Silex-Assetic": "", "natxet/cssmin": "@dev", "symfony/yaml": "~2.3", "seven/symfony-rpc-bundle": "dev-master" } Thx for your hard work.
@chigwicheung thanks for letting me know. I have made a fix few moments ago.
Hello,
Can you write some documentation to know how to use your bundle as client of an xml rpc server ?
regards