mdspidle
Joined: 11 May 2005 Posts: 5
|
| Posted: Thu Nov 30, 2006 - 12:01 pm Post subject: XMLHttpRequest POST Soap |
|
|
I have a working example of this being done in php with curl so I know the soap side is working.
I want to recreate this using xmlhttprequest. Here are the specifics:
Here is the php code:
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_URL, 'https://www.website.com/DE/DRequest.asmx');
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 300); //timeout after 5 minutes (60 * 5 = 300)
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: text/xml", "SOAPAction: \"http://wwww.website.com/Request\""));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $sRequestXml);
===========================
The $sRequestXml is xml with authentication info the search etc.
Can anyone show me how I can do the same thing with xmlhttprequest? I have successfully used this before to GET pages with no problem, but using POST and sending xml is just not happening for me.
Thanks in advance.
Mark
$sResponse = curl_exec($ch); |
|