Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFWDDX and CFHTTP

Status
Not open for further replies.

Sarky78

Programmer
Oct 19, 2000
878
GB
Right I have got an XML file that has been created using CFWDDX CFML2WDDX, when I try to read this file back in using CFFILE Read the file is read, displayed and inserted into a test database in the required fields. When however I try to use CFHTTP to read the file contents, I get an error (and this is a real helpful one!) "unknown element encountered" this error indicates the CFWDDX line of the code. Like I said this only happens when I use CFHTTP, I need to use this obviously to connect to a remote server. Anyone got any ideas ?
 
Its OK now I have sorted the problem, it appears that CFHTTP can't read a file with an extension of .xml as I did an output on the CFHTTP.filecontent and it returned something like "file is not a ASCII file", changed it to .txt and it worked fine. This is the code that I am using anyway ! thanks again !


<CFHTTP URL=&quot; METHOD=&quot;GET&quot; RESOLVEURL=&quot;false&quot;>

<cfwddx action=&quot;WDDX2CFML&quot; input=&quot;#cfhttp.filecontent#&quot; output=&quot;newq&quot;>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top