Jump to content

Error 500 on webservices


Recommended Posts

Hi,

 

I've installed and parameted Prestashop and webservices.

I wanted to use this kit to begin understanding data flow on this system :

https://github.com/P...-webservice-lib

I also read the doc :

http://doc.prestasho...and+list+client

I've got prestashop 1.5.3.1

However when i want to create a client, I've written the good key and url, the lists works fine, but I got a 500 error on creating :s ... i didn't touch anything else on the code, please help me ...

 

Thanks !

Link to comment
Share on other sites

Here is my response :

 

 

HTTP REQUEST HEADER

GET /api/customers?schema=blank HTTP/1.1
Authorization: Basic R05XTDM2NzUwSkhKNTBDVkdCWlg5TlhPVENNTldWMzA6
Host: prestashop.monhost.com
Accept: */*



HTTP RESPONSE HEADER

HTTP/1.1 200 OK
Date: Tue, 29 Jan 2013 09:31:11 GMT
Server: Apache/2.2.16 (Debian)
Access-Time: 1359451871
X-Powered-By: PrestaShop Webservice
PSWS-Version: 1.5.3.1
Execution-Time: 0.004
Content-Sha1: 6acce20c38cc9287e48ca635f56933f144f68dfb
Set-Cookie: 3f99a2f33f7744ef0eca694ec6b1a644=fydXAkHEWKCYz8z%2FOPuV4d2%2FE2174LZyC%2B1ZuHIZYJmc4NsHtk5wnITJvDsKkXd2vAIsO%2FIUXzD2DlUjbHDXqA%3D%3D000060; expires=Mon, 18-Feb-2013 09:31:11 GMT; path=/; domain=prestashop.pixtory-redmine.reseaux.info; httponly
Vary: Authorization,Host
Transfer-Encoding: chunked
Content-Type: text/xml;charset=utf-8

RETURN HTTP BODY

<?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></passwd>
<lastname></lastname>
<firstname></firstname>
<email></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>
<groups>
<group>
<id></id>
</group>
</groups>
</associations>
</customer>
</prestashop>


HTTP REQUEST HEADER

POST /api/customers HTTP/1.1
Authorization: Basic R05XTDM2NzUwSkhKNTBDVkdCWlg5TlhPVENNTldWMzA6
Host: prestashop.monhost.com
Accept: */*
Content-Length: 1174
Content-Type: application/x-www-form-urlencoded



HTTP RESPONSE HEADER

HTTP/1.1 500 Internal Server Error
Date: Tue, 29 Jan 2013 09:31:11 GMT
Server: Apache/2.2.16 (Debian)
Access-Time: 1359451871
X-Powered-By: PrestaShop Webservice
PSWS-Version: 1.5.3.1
Execution-Time: 0.003
Set-Cookie: 3f99a2f33f7744ef0eca694ec6b1a644=fydXAkHEWKCYz8z%2FOPuV4d2%2FE2174LZyC%2B1ZuHIZYJmc4NsHtk5wnITJvDsKkXd2vAIsO%2FIUXzD2DlUjbHDXqA%3D%3D000060; expires=Mon, 18-Feb-2013 09:31:11 GMT; path=/; domain=prestashop.pixtory-redmine.reseaux.info; httponly
Vary: Authorization,Host
Connection: close
Transfer-Encoding: chunked
Content-Type: text/xml;charset=utf-8

XML SENT

xml=<?xml version="1.0" encoding="UTF-8"?>
<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
<customer>
<id></id>
<id_default_group>3</id_default_group>
<newsletter_date_add>2013-01-24 16:54:56</newsletter_date_add>
<ip_registration_newsletter></ip_registration_newsletter>
<last_passwd_gen>2013-01-24 10:54:15</last_passwd_gen>
<secure_key>5e8bcd008f30db7b1cf44e58c94088a4</secure_key>
<deleted>0</deleted>
<passwd>f71dbe52628a3f83a77ab494817525c6</passwd>
<lastname>TEST</lastname>
<firstname>Amélie</firstname>
<email>[email protected]</email>
<id_gender>3</id_gender>
<birthday>1982-09-10</birthday>
<newsletter>1</newsletter>
<optin>1</optin>
<website>http://www.monsite.com</website>
<company>Pixtory</company>
<siret></siret>
<ape></ape>
<outstanding_allow_amount>0.000000</outstanding_allow_amount>
<show_public_prices>0</show_public_prices>
<id_risk>0</id_risk>
<max_payment_days>0</max_payment_days>
<active>1</active>
<note></note>
<is_guest>0</is_guest>
<id_shop>1</id_shop>
<id_shop_group>1</id_shop_group>
<date_add></date_add>
<date_upd></date_upd>
<associations></associations>
</customer>
</prestashop>


RETURN HTTP BODY

<?xml version="1.0" encoding="UTF-8"?>
<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
<errors>
<error>
<message><![CDATA[internal error. To see this error please display the PHP errors.]]></message>
</error>
<error>
<message><![CDATA[internal error. To see this error please display the PHP errors.]]></message>
</error>
<error>
<message><![CDATA[internal error. To see this error please display the PHP errors.]]></message>
</error>
<error>
<message><![CDATA[internal error. To see this error please display the PHP errors.]]></message>
</error>
</errors>
</prestashop>

Edited by amelie13 (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...