Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
DaniFusionWeb #1
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
-
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... -
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... -
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... -
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... -
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"... -
_Sam_ #2
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
-
DaniFusionWeb #3
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



Reply With Quote

