|
Comments for: joe20000907
| Message # 1013906: |
|
Date: 10/24/02 03:05
By: Tweaktijn Subject: RE: How to POST XML data? I am using the xmlpost, but i can't get the content through. I have a coldfusion soap server, and it collects the whole http message. The I dump it. But when i post this soap message: $msg = "bericht=<SOAP:Envelope xmlns:SOAP=\"http://www.w3.org/2001/12/soap-envelope\" SOAP:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\n". "<SOAP:Header></SOAP:Header>\n". "<SOAP:Body>\n". "<var>1</var>\n". "</SOAP:Body>\n". "</SOAP:Envelope>\n"; $httpheader = "POST /server/simpleserver.cfm HTTP/1.0\r\n". "Host: 10.0.0.120\r\n". "Content Length:".strlen($msg)."\r\n". "Connection: Keep-Alive\r\n". "Pragma:no-cache\r\n". "Content type: application/x-www-form-urlencoded\r\n". "SOAPAction: Simple Server\r\n\r\n"; $errno = "1"; $errstr = "opening the socket goes wrong"; $fp = fsockopen ("10.0.0.120", 80, $errno, $errstr, 10); if (!$fp) echo $errstr($errno)."<br />\n"; fputs ($fp, $httpheader . $msg . "\r\n"); echo fread($fp,32768); fclose($fp); I get the header of the post, but i do not get the content, ik tried several content type's, text/xml, application/xml, text/html. but it doesn't matter. I still don't get the content of the http post. I hope somebody knows a answer. |
Previous Message | Next Message |


