Oops, wrong version of the function.  Here is the right code:

<cffunction name="getNavigation2" access="remote" returntype="any" output="false">
<cffile action="" file="D:\inetpub\wwwroot\ssoNavigation.xml" variable="myString" />
<cfreturn toString(myString) />
</cffunction>

On Wed, 2 Jun 2004, Tom Kitta wrote:

> Why is your function return type "void" it should be "string" if you want to
> return a string[Tom Kitta] . Change it to string and give it a go.
>
> TK
>   -----Original Message-----
>   From: Chris Dempsey [mailto:[EMAIL PROTECTED]
>   Sent: Wednesday, June 02, 2004 10:24 AM
>   To: CF-Talk
>   Subject: Returning XML via webservice, cont
>
>
>   Dear List,
>
>   I saw this thread a few days ago, about returning an XML document as a
>   string from a CFC.  I tried using returntype="any" and the toString()
>   function - neither worked.  What ends up happening is that the XML
>   document gets returned as a WDDX packet.  Is it possible to just return
>   it as a string, with no further changes?
>
>   Here is the XML doc: http://www.graddiv.ucsb.edu/ssoNavigation.xml
>
>   Here is the simplified CFC code:
>
>   <cfcomponent extends="base">
>   <cffunction name="getNavigation" access="remote"
>   returntype="void" output="false">
>   <cffile action="" file="#path#ssoNavigation.xml"
>   variable="myString" />
>
>   <cfreturn toString(myString) />
>   </cffunction>
>   </cfcomponent>
>
>   The cfc is located here: http://www.graddiv.ucsb.edu/sso.cfc
>
>   Thanks!
>
>   Chris
>
>   --
>
>
>   ***********************
>   Chris Dempsey
>   Director, Information Services
>   UCSB Graduate Division
>   Quis custodiet ipsos custodies
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to