Guest Posted June 28, 2011 Posted June 28, 2011 Hi,I have an issue with the webservice add function. I'm retrieving a blank schema like this: $xml_stock_mvt = $webService->get(array('url' => 'http://www.url.com/api/stock_movements?schema=blank')); After this I'm updating the values and call the add function: $opt = array('resource' => 'stock_movements'); $opt['postXml'] = (string)$xml_stock_mvt->asXML(); $xml_stock_mvt = $webService->add($opt); The XML I'm posting is (from webservice debug info): XML SENT xml=<?xml version="1.0" encoding="UTF-8"?> 3 541 0 1 1 6 But I'm getting a lot of XML errors like this one: <?xml version="1.0" encoding="UTF-8"?> <![CDATA[3]]> <![CDATA[[php Warning #2] SimpleXMLElement::__construct(): Entity: line 1: parser error : String not started expecting ' or " (/home/domains/www.url.com/public_html/classes/WebserviceRequest.php, line 1251)]]> and eventually: <![CDATA[xml error : String could not be parsed as XML XML length : 359 Original XML : <?xml version=\"1.0\" encoding=\"UTF-8\"?> 3 541 0 1 1 6 ]]> I have no idea what I'm doing wrong or how to fix this. Does anybody have a clue of what I am doing wrong? I'm running prestashop 1.4.3. Share this post Link to post Share on other sites More sharing options...
rodrigator Posted June 29, 2011 Posted June 29, 2011 I have the same problem. Anyone has a clue? Thanks Share this post Link to post Share on other sites More sharing options...
tchaffee Posted July 6, 2011 Posted July 6, 2011 Our program was working with version 1.4.2.5 and started getting this error when we upgraded to 1.4.3. Sounds like a breaking change was introduced in the new version. Share this post Link to post Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now