Rick,
Thank you so much for the reply. You may have just saved me from a week of
banging my head against my desk.
So, a question: when you convert the structure to an array, does that mean
that the caller then needs to know which return variable is in each position of
the array? So, they'd have to know that "errorcode" is array[1], and
"errormessage" is array[2], and so on, right?
If that's the case, then I probably don't want to go that route. Seems like
too many chances for them to screw up (i.e. "I thought first name was array[5],
not array[4]", and so on).
I think I'll just serialize the data to a string.
>BTW, here is an example of a function from the wrapper CFC code....
>
>
><cffunction name="authByUsername" output="no" access="remote"
>returntype="Array" displayname="authByUsername"
> hint="Verify a username and password against DB2">
> <cfargument name="UNAME" type="string" required="yes">
> <cfargument name="PWORD" type="string" required="yes">
> <cfargument name="SPECIFICLOGINS" type="string" required="Yes">
> <cfargument name="SPECIFICGROUPS" type="string" required="Yes">
> <cfargument name="OTHER_RESTRICTIONS" type="string" required="no"
>DEFAULT="">
>
>
> <cfset var authCFC = createObject("component","authorize")>
> <CFSET var retVal = initRetVal(ArrayNew(1))>
> <cfset var results = authCFC.authByUsername(
> arguments.uname,
> arguments.pword,
> arguments.specificlogins,
> arguments.specificgroups,
> arguments.other_restrictions,
> "ADVANCE/ER"
> )>
>
> <cfif results.errorcode gt 0>
> <cfset retVal[1] = results.errorCode>
> <cfset retVal[2] = results.errorMessage>
> <cfelse>
> <cfset retVal[1] = 0>
> <cfset retVal[2] = "">
> <CFSET retVal[3]= results.NAME>
> <CFSET retVal[4] = results.title>
> <CFSET retVal[5] = results.dept>
> <CFSET retVal[6] = results.phone>
> <CFSET retVal[7] = results.fax>
> <CFSET retVal[8]= results.location>
> <CFSET retVal[9] = results.dukebox>
> <CFSET retVal[10] = results.lninitial>
>
> <CFSET retVal[15] = results.email>
> <CFSET retVal[16] = results.userid>
> <CFSET retVal[17] = results.SECURITY_GROUP>
> <CFSET retVal[18] = results.MOVESFLAG1>
> <CFSET retVal[19] = results.MOVESFLAG2>
> <CFSET retVal[20] = results.FLASHCOOKIE>
> <CFSET retVal[21] = results.ERUSERFLAG>
> <CFSET retVal[22] = results.IMAGE_URL>
> <CFSET retVal[23] = results.DROPRACEFLAG>
> </cfif>
> <CFRETURN retVal>
>
></cffunction>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271354
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4