src/Devedge/XmlRpc/Client.php
public function invokeRpcCall($method, $arguments = [])
    {
        if (!is_null($this->namespace)) {
            $method = $this->namespace . '.' . $method;
        }

        $body = XmlRpcBuilder::createRequest($method, $arguments);

        $guzzle = new \GuzzleHttp\Client();

        $this->getLogger()->info("sending request for $method to {$this->url}");
        $this->getLogger()->debug(
            "sending request for $method to {$this->url}, with parameters: " . print_r($arguments, true)
        );

        $response = $guzzle->post(
            $this->url,
            [
                'body' => $body,
                'headers' => [
                    'User-Agent' => 'Devedge\XmlRpc\Client/' .self::$version,
                    'Content-Type' => 'text/xml'
                ]
            ]
        );

        // if we have a fault, we will throw an exception
        if ($response->xml()->fault->count() > 0) {
            $this->logger->warning("serverside error occured, details: " . $response->getBody());
            throw XmlRpcParser::parseFault($response->xml()->fault);
        }

        // responses always have only one param
        return array_shift(XmlRpcParser::parseParams($response->xml()->params));
    }
public function invokeRpcCall($method, $arguments = [])
    {
        if (!is_null($this->namespace)) {
            $method = $this->namespace . '.' . $method;
        }

        $body = XmlRpcBuilder::createRequest($method, $arguments);

        $guzzle = new \GuzzleHttp\Client();

        $this->getLogger()->info("sending request for $method to {$this->url}");
        $this->getLogger()->debug(
            "sending request for $method to {$this->url}, with parameters: " . print_r($arguments, true)
        );

        $response = $guzzle->post(
            $this->url,
            [
                'body' => $body,
                'headers' => [
                    'User-Agent' => 'Devedge\XmlRpc\Client/' .self::$version,
                    'Content-Type' => 'text/xml'
                ]
            ]
        );

        // if we have a fault, we will throw an exception
        if ($response->xml()->fault->count() > 0) {
            $this->logger->warning("serverside error occured, details: " . $response->getBody());
            throw XmlRpcParser::parseFault($response->xml()->fault);
        }

        // responses always have only one param
        return array_shift(XmlRpcParser::parseParams($response->xml()->params));
    }
invoke a call to the RPC server
@param string $method
@param array $arguments
@return array