Try this the code below, there might be some syntax issues as this is all
off the top of my head, but I think it's all right:

Also, I added the Trim because sometimes when you write a file it can add a
return carriage at the end of the file which is unwanted whitespace for xml.

<cfdirectory directory="C:\myDir\" action="list" name="CurrentDirector">
<cfoutput query="CurrentDirectory">
        <cffile action="read"
file="E:\digitalstorage.com-dev\reseller\orderxml\#Name#" variable="procXML"
/>
        <cfhttp method="post" url="http://myUrl.com/procXML";
throwonerror="yes" timeout="30">
                <cfhttpparam type="xml" name="XML" value="#Trim(procXML)#"
/>
        </cfhttp>
</cfoutput>


Let me know how if that doesn't work, and I'll put together an actual test
harness.

- Doug

-----Original Message-----
From: Paul Ihrig [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 11, 2007 12:21 PM
To: CF-Talk
Subject: cfhttp XML from a directory problem

we have a page that post xml data which works fine.
during the night we do a back up on a server. during this time we
write out the data to a static xml file like myXML.xml  it contains
the exact same data that process just fine as:
<cfhttpparam name="XML" type="xml" value="#procXML#">

but what i loop over my directory & try to change from type xml to
file i keep getting time outs.
even if i remove the output & hard code in just one file it still happens.
honestly, i just want to pass the contents of the file as the value &
then delete or move the file from the dir...

any help would be great!


<cfdirectory directory="C:\myDir\" action="list" name="CurrentDirectory">
<cfoutput query="CurrentDirectory">
#Name#<br>
</cfoutput>


<cfoutput query="CurrentDirectory">
<cfhttp method="post" url="http://myUrl.com/procXML";
throwonerror="yes" timeout="30">
        <cfhttpparam type="file" name="XML"
file="E:\digitalstorage.com-dev\reseller\orderxml\#Name#"
encoded="no">
</cfhttp>
</cfoutput>


<!--- way it works when no back up... --->
<cfhttp method="post" url="http://myUrl.com/procXML";
throwonerror="yes" timeout="30">
<cfhttpparam name="XML" type="xml" value="#procXML#">
</cfhttp>
<!---  where procXML was the contents of the XML file --->



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Enterprise web applications, build robust, secure 
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:288173
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to