House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  XML

Coldfusion wddx problem

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Hello,
becky.mcdermott
09/05/07 07:33 P
Hey Becky -
Rob Wilkerson
09/09/07 07:17 P
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
becky.mcdermott
09/05/2007 07:33 PM

Hello, I have a coldfusion application which I have structured using Fusebox.  I have a template that does several queries and builds up a complex structure (many fields and an array of substructures).  I'm trying to serialize this structure (using wddx) and pass it to another template which needs access to the structure. Here is a snippet of my code (dsp_ShowContacts.cfm) <!--- granteeStruct is the complex structure which contains an array of other structures ---> <cfoutput>      <cfwddx action="CFML2WDDX" input="#granteeStruct#" output="aWDDXpacket">      <cfset urlSafeWddxPacket=URLEncodedFormat(#aWDDXpacket#)>       <a href="./index.cfm?fuseaction=AddContact&inputStruct='#urlSafePacket#'">Click Here</a> </cfoutput> Then in index.cfm, I have: <cfcase value="AddContact">     <cfoutput>         <cfset inputGranteeStruct=#URLDecode(ATTRIBUTES.inputStruct)#>         <cfwddx action="wddx2cfml" input="#inputGranteeStruct#" output="outputGranteeStruct">         <br>Testing This Code<br>     </cfoutput>   </cfcase> When I load the page and try clicking on the URL that says "Click Here", I get the following error message:   WDDX packet parse error at line 1, column 1. Content is not allowed in prolog.. Inside dsp_ShowContacts.cfm, if I try adding code to deserialize the object right after it is serialized and then dump it, the structure is fine.  So all appears well inside dsp_ShowContacts.cfm.  It's when it gets passed over the URL that things go bad.  Could my structure be too complex?  Am I missing some small syntax that will make it work? Thank You, Becky

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Rob Wilkerson
09/09/2007 07:17 PM

Hey Becky - This is something that isn't exactly uncommon when dealing with XML. My first guess is that the "premature content" is a result of your URLEncodedFormat() wrapper.  For giggles, just try removing the function call.  If that works, then we'll have some idea where to go next. On 9/5/07, becky.mcdermott@comcast.net <becky.mcdermott@comcast.net> wrote: ----- Excess quoted text cut - see Original Post for more -----


<< Previous Thread Today's Threads Next Thread >>

Search xml

May 20, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Designer, Developer and mobile workflow conference