Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default WDDX deserializing.

    Hi everybody. Hi have to post some information from one local computer to a
    server. I'm using WDDX to serialize the information and CFHTTP to sent it. I'm
    new to this. The only thing I achieved so far was passing from the local
    computer into another file on the same computer and it works fine. But when I
    try to to the same to a remote server, It doesn't seem to work. Here is the
    code for both files:

    <!--- This is my local cfm file. --->


    <!--- Define variable "today" and assign today's date to it. --->
    <CFSET today = "#DateFormat(Now())#">


    <!--- Technician: Dani. We search all the records where the follow_date is
    equal to today's date, the status is open and the tech is Richard --->
    <cfquery name="sendDs" datasource="service" >

    SELECT * FROM history
    WHERE follow_date = '#today#'
    AND status = "Open"
    AND technician = "Dani"

    </cfquery>

    <html>
    <head>
    <title></title>
    </head>


    <!--- Serialize data to WDDX format. --->
    Serializing CFML data...<p>
    <cfwddx
    action = "cfml2wddx"
    input = #sendDs#
    output = info>

    <!--- Display WDDX XML packet. --->
    Resulting WDDX packet is:
    <xmp><cfoutput>#info#</cfoutput></xmp>

    <cfhttp
    method="POST"
    url="http://192.168.0.212:8500/mail.cfm" >
    <cfhttpparam
    name="ref"
    value="#info#"
    type="FORMFIELD">



    </cfhttp>


    <!--- Deserialize to a variable named wddxResult. --->
    Deserializing WDDX packet...<p>
    <cfwddx action = "wddx2cfml" input =#info# output = "qnew">


    The recordset data is:...<p>
    <cfoutput query = qnew>
    #Serial_Number# <br>#Follow_Date#<br> #Status#<br> #Technician#<br><br>
    </cfoutput><p>

    <cfinclude template="mail.cfm">

    </body>
    </html>


    <!--- This is my remote cfm file. It works when local, but something is not
    well configured when sending the info to a remote server.--->
    <!--- Could you help me please? --->

    <cfoutput>
    <cfwddx
    action="WDDX2CFML"
    input="#info#"
    output="newDs">
    </cfoutput>
    The information is:<br><br>
    <cfoutput query="newDs">
    #serial_number#<br>#who#<br>#what#<br>#resolution# <br><br>
    </cfoutput>

    DaniFusionWeb Guest

  2. Similar Questions and Discussions

    1. WDDX and '&'
      I have a Query record that has a '&' in it. The record loads fine into a WDDX variable and then displays into a field on the screen however when I...
    2. CF5 to CF7 WDDX Errors
      We've recently moved a bunch of sites froma cf5 system to a cf7 system and they are now throwing the following errors: WDDX packet parse error at...
    3. WDDX issue
      How are you sending it once you have it packaged? I'm guessing either through a 'get' mehtod via a form or a url. In either case the server will cut...
    4. php wddx
      I have a webserver machine with linux apache 2.0 php 4.2.2 with wddx support and a windows machine with iis server wich have a .Net system wich i...
    5. Deserializing custom ArrayList type from ViewState... help..
      > // this doesn't work try: ViewState = ml; make sure the classes that are stored in the arraylist are attributed w/ as well. "Ramzey"...
  3. #2

    Default Re: WDDX deserializing.

    The receiving file needs to use the form field name provided by the sending
    file--form.ref. Preferrably you shouldn't change the name and just keep it as
    info, or better yet, choose a descriptive name and use that in both.

    _Sam_ Guest

  4. #3

    Default Re: WDDX deserializing.

    Sam, thanks. I just changed the name and it is the same. When I have my
    receiving file on the same computer than the sending file, everything seems to
    work ok, I get the result I'm expecting. But when The receiving file is on a
    remote server, I'm getting an error. Here is the code again:

    <!--- This is my local cfm file. --->


    <!--- Define variable "today" and assign today's date to it. --->
    <CFSET today = "#DateFormat(Now())#">


    <!--- Technician: Dani. We search all the records where the follow_date is
    equal to today's date, the status is open and the tech is Richard --->
    <cfquery name="sendDs" datasource="service" >

    SELECT * FROM history
    WHERE follow_date = '#today#'
    AND status = "Open"
    AND technician = "Dani"

    </cfquery>

    <html>
    <head>
    <title></title>
    </head>


    <!--- Serialize data to WDDX format. --->
    Serializing CFML data...<p>
    <cfwddx
    action = "cfml2wddx"
    input = #sendDs#
    output = info>

    <!--- Display WDDX XML packet. --->
    Resulting WDDX packet is:
    <xmp><cfoutput>#info#</cfoutput></xmp>

    <cfhttp
    method="POST"
    url="http://192.168.0.212:8500/mail.cfm" >
    <cfhttpparam
    name="info"
    value="#info#"
    type="FORMFIELD">



    </cfhttp>


    <!--- Deserialize to a variable named wddxResult. --->
    Deserializing WDDX packet...<p>
    <cfwddx action = "wddx2cfml" input =#info# output = "qnew">


    The recordset data is:...<p>
    <cfoutput query = qnew>
    #Serial_Number# <br>#Follow_Date#<br> #Status#<br> #Technician#<br><br>
    </cfoutput><p>

    <cfinclude template="mail.cfm">

    </body>
    </html>


    <!--- This is my remote cfm file. It works when local, but something is not
    well configured when sending the info to a remote server.--->
    <!--- Could you help me please? --->

    <cfoutput>
    <cfwddx
    action="WDDX2CFML"
    input="#info#"
    output="newDs">
    </cfoutput>
    The information is:<br><br>
    <cfoutput query="newDs">
    #serial_number#<br>#who#<br>#what#<br>#resolution# <br><br>
    </cfoutput>

    DaniFusionWeb Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139