PrestaShop

Hello,

I need to communicate with prestashop. The XML i need to parse is in a remote server and the http address is http://minisys.gr/mstore/api/products but as you can see asks for credentials. So, how i can communitate with that and pass data (credentials) through http? Do i have to use Xcentrisity or RMNet or is there any other whay?

The XML is from PrestaShop eshop and in the development documentation says that i have to your REST. 

http://doc.prestashop.com/display/PS14/Using the REST webservice

anyone can help pleas?

  • You can send Basic Authentication credentials using the Authenticate HTTP header.  In RMNet one would use the optional extraheaders parameter on the HTTPPost to inject the Authenticate header.  The extraheaders string is a set of name-value pair(s) where there is a binary zero (x00) byte after the name and the value, and two binary zero bytes (x0000) at the end.  The credentials are encoded in base64 - which can be done using COBOL (there may be such a module floating around on this forum or on RM/COBOL).

    REST is an architecture for implementing web services by using the HTTP verbs, which are transport layer verbs, at the application layer.  RMNet (at least in the RM/COBOL version) implements only the POST and GET verbs.  That may be sufficient for your use of this web service.  You may find an explanation of REST in the Xcentrisity Business Information Server tutorial; the tutorial discusses creating web services, but you may find the explanation useful in the context of consuming web services as well.  If you find that you also need to use the HTTP PUT and DELETE verbs, you can use cURL from CALL "SYSTEM".

    It appears, from the very limited documentation on the web service payloads, that Xcentrisity XML Extensions would be a good choice for creating and consuming the XML 'trees' that are mentioned in the documentation.  Use the ?synopsis capability to get the XML exemplar for a method, and use that to design XSLT transformations that will convert to/from COBOL data.

    Tom Morrison
    Hill Country Software