Page 1 of 1

Send an XML Schema - Get Response

Posted: Tue Jun 07, 2011 11:29 am
by RCA86
Hi guys,

I'm working on an integration between the Interspire Shopping Cart and eSeller Pro, and to export information to eSeller, I need to send an XML schema to ESP. I can source all the data and build the schema in PHP, but I'm not sure of the best way to send the XML schema. I also need to be able to process a response from the server. Can anybody suggest how I can get started on this?

Thanks!

Re: Send an XML Schema - Get Response

Posted: Tue Jun 07, 2011 11:38 am
by Jade
Have you checked the API/developer documentation for ESP? That's probably a good place to start.

Re: Send an XML Schema - Get Response

Posted: Tue Jun 07, 2011 2:33 pm
by RCA86
Yeah, I've looked through the documentation, but it just outlines the schema to use, the URL to send the schema to, and the login parameters to send with it, and that it should be submitted as a POST request.

I've tried using jQuery to send the POST, but it never got a response. When I used the Firebug Net panel, it just timed out after a while. What (coding) method would you use to just send XML data by POST and accept a response? :?

Re: Send an XML Schema - Get Response

Posted: Tue Jun 07, 2011 2:56 pm
by flying_circus
How are you sending/recieving the request? Are you using cURL?

Re: Send an XML Schema - Get Response

Posted: Tue Jun 07, 2011 3:27 pm
by AbraCadaver
http_post_fields() or http_post_data(), possibly with http_parse_message() if you need it.

Re: Send an XML Schema - Get Response

Posted: Wed Jun 08, 2011 4:59 am
by RCA86
AbraCadaver wrote:http_post_fields() or http_post_data(), possibly with http_parse_message() if you need it.
I'll give these a try, but I don't think they allow me to get a response from the server. I need to send the XML data, and receive a 'success' or 'failure' message in return.

At the moment I'm using jQuery.post() to send the data. I found a specific version used to send XML, but I'm not getting a response. It's pretty annoying. :x