I believe that this actually would work when called directly by CF (e.g.
not as a webservice), or by Flash Remoting (this one I can confirm). So
it's really AXIS complaining more than CF.
-Dave
>>> [EMAIL PROTECTED] 8/19/2004 2:33:25 PM >>>
So we just went round and round with some code in a web service that
looks like so:
<cffunction method="getUserData" returnType="struct" access="remote">
<cfset var tReturnData = StructNew() />
<cfset var qLoginInfo = "" />
<cfquery name="qLoginInfo" datasource="...">
valid query returning 1 record
</cfquery>
<cfif qLoginInfo.recordCount>
<cfset tReturnData.success = true />
<cfset tReturnData.loginInfo = qLoginInfo />
</cfif>
</cffunction>
The line that was causing an error about deserialization was:
<cfset tReturnData.loginInfo = qLoginInfo />
We tried playing with Duplicate(), StructCopy(), etc, but ot no avail.
However, if I wrap the query in it's own method, that returns a query,
it works just fine. Like so:
<cffunction method="getUserData" returnType="struct" access="remote">
<cfset var tReturnData = StructNew() />
<cfset var qLoginInfo = "" />
<cfset qLoginInfo = getLoginInfoFromDatabase()>
<cfif qLoginInfo.recordCount>
<cfset tReturnData.success = true />
<cfset tReturnData.loginInfo = qLoginInfo />
</cfif>
</cffunction>
getLoginInfoFromDatabase has a returnType of "query" which is exactly
what it was before. However *something* is getting generated
differently because one works and one throws an error about
deserialization of the data.
Is this intentional by Macromedia to make developers separate business
logic from their data layer? A bug? Something else that I'm not
noticing because it's early and I'm uncaffeinated?
Thanks,
Nolan
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at
www.mail-archive.com/[EMAIL PROTECTED]
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]