Hi.
I'm having a strange problem. I'm using the webservice via direct cURL calls, because I had problems with the PSWebServiceLibrary doing stupid things and mainly just getting in the way (though I did briefly test this with the library as well, with the same error).
I'm trying to add order_histories via the webservice to update the order status and history (as merely updating the order via the orders resource doesn't change the order history, and I'm not sure if it'll send the email to the customer either). Anyway, for some strange reason it does not work. Editing an existing order_histories with PUT request works, but as soon as I try to POST, I get this error:
<?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 : 0
Original XML : ]]></message>
</error>
</errors>
</prestashop>
The obvious problem is XML length: 0. As if I hadn't sent the XML at all. But the Content-Length of my outgoing request isn't 0, so the XML itself is definitely being sent in CURLOPT_POSTFIELDS. And the exact same function (except for the different CURLOPT_CUSTOMREQUEST setting, and of course adding the ID for PUT in the XML data) is sending the PUT request where the XML is recognized (if there's a problem with the XML I get an error as I should, but even then XML length is correct and the original XML is listed). So basically everything else being identical, PUT request works, POST doesn't.
What on earth could cause this? I've been banging my head at this for hours, with no luck.