L'ajout de produits de PrestaShop 1.6.0.9 avec WebService

Je suis en train d'ajouter des produits dans ma boutique propulsée par PrestaShop 1.6.0.9. Voici mon code:

<?php
    ini_set('display_errors',1);
    ini_set('display_startup_errors',1);
    error_reporting(-1);
    define('DEBUG', true);
    define('_PS_DEBUG_SQL', true);
    define('PS_SHOP_PATH', 'http://myshop.com');
    define('PS_WS_AUTH_KEY', 'E6R9IDPK2R519WB9QAJ45MUACZ9GANC2');

    require_once('PSWebServiceLibrary.php');

    try {
            $webService = new PrestaShopWebservice(PS_SHOP_PATH, PS_WS_AUTH_KEY, DEBUG);
            $opt = array('resource' => 'products');

            $xml = $webService->get(array('url' => PS_SHOP_PATH.'/api/products?schema=synopsis'));
            $resources = $xml->children()->children();

            unset($resources->position_in_category);
            unset($resources->manufacturer_name);

            $resources->price = '1000';
            $resources->active = '1';
            $resources->quantity = '50';
            $resources->link_rewrite = 'blabla';
            $resources->name->language[0][0] = 'blabla';
            $resources->description->language[0][0] = '<p>blabla</p>';
            $resources->description_short->language[0][0] = 'blabla';
            $resources->associations = '';

            $opt = array('resource' => 'products');
            $opt['postXml'] = $xml->asXML();
            $xml = $webService->add($opt); 
    }
    catch (PrestaShopWebserviceException $ex) {
        echo 'Other error: <br/>'.$ex->getMessage();
    }
?>

Mais je reçois cette erreur XML:

<?xml version="1.0" encoding="UTF-8"?>
<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
<errors>
<error>
<code><![CDATA[127]]></code>
<message><![CDATA[XML error : String could not be parsed as XML
XML length : 7891
Original XML : %3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0A%3Cprestashop+xmlns%3Axlink%3D...................
</error>
</errors>
</prestashop>

Je recevoir le message d'erreur à chaque mise à jour ou insert. Quel peut être le problème? Et comment puis-je résoudre ce problème? Mon PrestaShop version 1.6.0.9.

OriginalL'auteur torayeff | 2014-08-27