public static function factory($config = array())
    {
        $config = self::getConfigCollection($config);

        $client = new EncodingClient($config->get('base_url'), $config->get('userid'), $config->get('userkey'));

        $client->setConfig($config);

        // Add the XML service description to the client
        $description = ServiceDescription::factory(__DIR__ . DIRECTORY_SEPARATOR . 'guzzle_encoding_com.json');
        $client->setDescription($description);

        return $client;
    }