Hua... I've put your code in place and am sending the same packet of XML the other code uses (as a control) but I'm getting errors. It tells me that the XML is invalid. I copied and pasted the XML and wrapped it in a cfsavecontent tag, then attempted to transmit the data that way.
Interestingly enough, I then tried to use cfset and pasted the XML into that using single quotes to set the content of the variable and that worked perfectly. So thank you for that code. That makes my life MUCH easier. Off the original subject, but anyone know why this behaves this way? <!----------------//------ andy matthews web developer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --------------//---------> -----Original Message----- From: Hua Wei [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 20, 2005 10:58 AM To: CF-Talk Subject: RE: transmitting XML using CFHTTP Andy, You can use cfhttpparam to build an HTTP request. Example: <cfhttp method="post" url="#requestURL#" resolveurl="false" timeout="20"> <cfhttpparam type="header" name="Content-Type" value="application/x-www-form-urlencoded" /> <cfhttpparam type="xml" name="Urlxml" value="#tostring(requestXML)#" /> </cfhttp> Hope this helps. Hua -----Original Message----- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 20, 2005 11:41 AM To: CF-Talk Subject: transmitting XML using CFHTTP I need to transfer some data from our server to another server with a packet of XML. The transfer will send a string of plain text (XML), must be done with an encoding of application/x-www-form-urlencoded and a method of POST. I thought that cfhttp could do it, but I can't find where I can change the encoding and it appears that cfhttp HAS to send information with a variable name. This transmittion doesn't need a name, just the information sent to it. Is this possible with cfhttp? Here's the PHP we're using for comparison: <? // select XML from database $contents = "xmlString"; $host = "ssl://members.DOMAIN.com"; $port = "443"; $request = "POST /hdde/xml/udi.asp HTTP/1.0\nContent-type: application/x-www-form-urlencoded\nContent-length: " . strlen($contents) . "\n\n" . $contents; $this->socket = fsockopen($host, $port) or die('could not open ssl socket for DOMAIN'); fputs($this->socket, $request) or die('could not put to ssl socket for DOMAIN'); [EMAIL PROTECTED]($this->socket, 4096); if (strStr($results,'<Success>1</Success>')) { // success code here } else { // failure code here } ?> By the way, this is my first post on this list, so "hi". <!----------------//------ andy matthews web developer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --------------//---------> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218739 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54