NeedZoom Posted June 8, 2016 Share Posted June 8, 2016 Hi how i can edit the status of the order in php with webservice? $xml = $webService->get(array('url' => $url.'/api/order_histories?schema=blank')); $xml->order_history->id_order = getOrderId($data[0]); $xml->order_history->id_order_state = '5'; $opt = array('resource' => 'order_histories'); $opt['postXml'] = $xml->asXML(); $xml = $webService->add($opt); i have error : HTTP XML response is not parsable: array ( 0 => LibXMLError::__set_state(array( 'level' => 3, 'code' => 64, 'column' => 6, 'message' => 'XML declaration allowed only at the start of the document ', 'file' => '', 'line' => 597, )), 1 => LibXMLError::__set_state(array( 'level' => 3, 'code' => 77, 'column' => 1, 'message' => 'Premature end of data in tag br line 596 ', 'file' => '', 'line' => 607, )), 2 => LibXMLError::__set_state(array( 'level' => 3, 'code' => 77, 'column' => 1, 'message' => 'Premature end of data in tag br line 595 ', 'file' => '', 'line' => 607, )), 3 => LibXMLError::__set_state(array( 'level' => 3, 'code' => 77, 'column' => 1, 'message' => 'Premature end of data in tag br line 1 ', 'file' => '', 'line' => 607, )), ) Link to comment Share on other sites More sharing options...
NeedZoom Posted June 8, 2016 Author Share Posted June 8, 2016 I have a hookactionOrderStatusPostUpdate. Now i have space befor <?xml version="1.0" encoding="UTF-8"?> How can i resoled this PLZ! XML declaration allowed only at the start of the document Link to comment 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