returntype="any" didn't work, so I changed the <cfreturn #xml#> to:

<cfreturn #xml.toString()#>

Now I get a different bit of data:

[EMAIL PROTECTED]

James

-----Original Message-----
From: Sean A Corfield [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 14, 2004 3:36 PM
To: [EMAIL PROTECTED]
Subject: Re: [CFCDev] Problems returning XML via WebService

On May 14, 2004, at 3:17 PM, James Johnson wrote:
> This is the code which generates the XML from the Query. I converted 
> it from a function I found on cflib.org.
> ***********
>       <cffunction name="queryToXML"
>              access="remote"
>              returntype="string">

That's your problem - you are returning an XML DOM object but declaring the
return type to be string so the web service call tries to treat it as a
string, hence the bizarre data you get back. Unfortunately there is no
native "xml" type in ColdFusion so you will have to do one of two
things:
1. change your return type to "any"
2. change the return statement below to convert the DOM to a string:

>               <cfreturn #xml#>

I think xml.toString() will work.

Regards,
Sean

----------------------------------------------------------
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]

Reply via email to