Assuming aADUserInfo is your structure then in the line:

    <cffunction name="userinformation" access="public" returntype="string"
hint="Get user information">

change:

   returntype="string"    to     returntype="struct"

That should do it.

----------------------------------------------------------------------------
----
Keith L. Miller
[EMAIL PROTECTED]

"A good programmer learns from his/her mistakes, but a great programmer
learns
from the mistakes of others." - Hal Helms
"The Power of Antipatterns" ColdFusion Developers Journal Volume: 05 Issue:
05)

----- Original Message ----- 
From: "chip willis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 25, 2003 4:26 PM
Subject: [CFCDev] display a struct from component


> Hi,
> I have two web services in a component and one is working fine, the other
is
> working but I do not know how to return the struct. The web service has a
> structure.
> How do I pass back the struct?
> <cfcomponent>
> <cffunction name="userinformation" access="public" returntype="string"
> hint="Get user information">
> <cfargument name="LogInName" type="string"  required="true" hint="the
users
> name">
> <cfinvoke
> webservice="blbla"
> method="getUserInfo"
> returnvariable="aADUserInfo">
> <cfinvokeargument name="username" value="LogInName"/>
>   </cfinvoke>
> <cfreturn #aADUserInfo#>
> </cffunction>
> </cfcomponent>
>
> The struct looks like this:
> aADUserInfo.SAMAccountName
> aADUserInfo.displayName
> aADUserInfo.email
> aADUserInfo.firstName
> aADUserInfo.lastName
>
> Here is how I am calling it:
> <cfinvoke
>    component="Components\WebServices"
>    method="userinformation"
>    returnvariable="aADUserInfo">
>   <cfinvokeargument name="LogInName" value="#url.username#"/>
> </cfinvoke>
>
> But this output does not work:
> <cfoutput>#aADUserInfo.displayName#</cfoutput>
>
> I do not get an error message but nothing will display. If I run the web
> service outside the component then it works.
> Thanks
> -CW
>
> _________________________________________________________________
> The new MSN 8: smart spam protection and 2 months FREE*
> http://join.msn.com/?page=features/junkmail
>
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email
> to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
> in the message of the email.
>
> CFCDev is run by CFCZone (www.cfczone.org) and supported
> by Mindtool, Corporation (www.mindtool.com).
>
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

Reply via email to