dima_tr Posted January 8, 2013 Share Posted January 8, 2013 (edited) Hello, every one. I cannot figure out how to solve next problem. No solution I found in google. I'm trying to send shell curl request to api. (Prestashop 1.5.3.1) curl -X POST -T ./myxmlfile 'http://[email protected]/api/customers' -v <?xml version="1.0" encoding="UTF-8"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <customer> <id></id> <id_default_group></id_default_group> <newsletter_date_add></newsletter_date_add> <ip_registration_newsletter></ip_registration_newsletter> <last_passwd_gen></last_passwd_gen> <secure_key></secure_key> <deleted></deleted> <passwd>ttestasdasd</passwd> <lastname>ttest</lastname> <firstname>ttest</firstname> <email>[email protected]</email> <id_gender></id_gender> <birthday></birthday> <newsletter></newsletter> <optin></optin> <website></website> <company></company> <siret></siret> <ape></ape> <outstanding_allow_amount></outstanding_allow_amount> <show_public_prices></show_public_prices> <id_risk></id_risk> <max_payment_days></max_payment_days> <active></active> <note></note> <is_guest></is_guest> <id_shop></id_shop> <id_shop_group></id_shop_group> <date_add></date_add> <date_upd></date_upd> <associations></associations> </customer> I also tried to add "xml=" in the beginning of the file. The result of the request is 500 error. To trace the error is impossible. I tried this request through PSWebServiceLibrary.php with debug option and it works. So xml file is correct. Help, please))) Edited January 8, 2013 by dima_tr (see edit history) Link to comment Share on other sites More sharing options...
dima_tr Posted January 8, 2013 Author Share Posted January 8, 2013 So... I found new stuff. I change in config/defines.inc.php _PS_MODE_DEV_ to true and now I can see all errors. Error is <code><![CDATA[127]]></code> <message><![CDATA[xml error : String could not be parsed as XML Link to comment Share on other sites More sharing options...
dima_tr Posted January 8, 2013 Author Share Posted January 8, 2013 I Found solution. I needed to add </prestashop> xml tag Link to comment Share on other sites More sharing options...
Recommended Posts