Send an XML Schema - Get Response

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
RCA86
Forum Commoner
Posts: 32
Joined: Thu Mar 10, 2011 1:03 pm

Send an XML Schema - Get Response

Post 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!
User avatar
Jade
Forum Regular
Posts: 908
Joined: Sun Dec 29, 2002 5:40 pm
Location: VA

Re: Send an XML Schema - Get Response

Post by Jade »

Have you checked the API/developer documentation for ESP? That's probably a good place to start.
RCA86
Forum Commoner
Posts: 32
Joined: Thu Mar 10, 2011 1:03 pm

Re: Send an XML Schema - Get Response

Post 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? :?
User avatar
flying_circus
Forum Regular
Posts: 732
Joined: Wed Mar 05, 2008 10:23 pm
Location: Sunriver, OR

Re: Send an XML Schema - Get Response

Post by flying_circus »

How are you sending/recieving the request? Are you using cURL?
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: Send an XML Schema - Get Response

Post by AbraCadaver »

http_post_fields() or http_post_data(), possibly with http_parse_message() if you need it.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
RCA86
Forum Commoner
Posts: 32
Joined: Thu Mar 10, 2011 1:03 pm

Re: Send an XML Schema - Get Response

Post 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
Post Reply