private function encodeMulticall(array $requests) {

        $composed_requests = [];

    	$this->logger->debug("Performing an XML multicall");

    	$this->logger->debug("Data dump before encoding", $requests);

        foreach ($requests as $request) {

            $composed_requests[] = [
                $request->getMethod(),
                $request->getParameters()
            ];

            foreach ( $request->getSpecialTypes() as $key => $value ) {
                $this->encoder->setValueType($key, $value);
            }

        }

        try {

            $encoded_requests = $this->encoder
                ->setEncoding($this->getEncoding())
                ->encodeMulticall($composed_requests);

        } catch (XmlrpcException $xe) {

            throw $xe;

        }

        $this->logger->debug("Data dump after encoding: ".$encoded_requests);

        return $encoded_requests;

    }