On 9/12/00, Ben Lowndes penned:
>I'm using CFHTTP to hit a page that produces WDDX, then trying to
>deserialise the wddx.
<snip>
><CFWDDX action="WDDX2CFML" input="#CFHTTP.FileContent#"
>output="RequestResult">
I may be wrong here. I'm on a roll with wrong answers lately. LOL
I'm not sure you CAN pick up a wddx packet as filecontent.
I just did a little test and I get XML errors and unknown element
found errors whenever I try and pick up any WDDX that is any kind of
complex structure like a query.
If I do the WDDX2CFML on the remote page then output that, it's fine.
If it's a page that people also access straightaway, then you could
output inside of html comment tags then strip out that part of the
cfhttp.filecontent. Of course, hopefully you have access to edit the
remote page to suit your needs.
This is my remote test page.
<cfset newquery = QueryNew("cell")>
<cfset temp = QueryAddRow(newquery)>
<cfset temp = QuerySetCell(newquery, "cell", test1)>
<cfset temp = QueryAddRow(newquery)>
<cfset temp = QuerySetCell(newquery, "cell", test2)>
<CFWDDX action="CFML2WDDX" input="#newquery#" output="content">
<CFWDDX action="WDDX2CFML" input="#content#" output="testquery">
<!--Start<CFOUTPUT query="testquery">#cell#<br></CFOUTPUT>End-->
This is the calling page:
<cfhttp url="http://192.168.0.5/testing/wddx/test.cfm" method="POST">
<cfhttpparam type="formfield" name="test1" value="This is row 1">
<cfhttpparam type="formfield" name="test2" value="This is row 2">
</cfhttp>
<cfset start = find("<!--Start", cfhttp.filecontent) + 9>
<cfset end = find("End-->", cfhttp.filecontent)>
<cfset length = end - start>
<CFOUTPUT>#mid(cfhttp.filecontent, start, length)#</CFOUTPUT>
This is what I see in the browser:
This is row 1
This is row 2
--
Bud Schneehagen - Tropical Web Creations
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.