(I'm gonna crosspost this to CFCDev, too. Sorry if you have to read it
twice)
G'day.
I am having a curious time with webservices.
I have a method that returns a struct, and one of the keys to the struct is
a query.
When I call it, I get this:
And I get this:
"No deserializer for {http://rpc.xml.coldfusion}QueryBean" (amongst a
mountain of other stuff).
I'm a newbie with CFCs, so I simplified my test environment (I was about 30
files into a long and complicated process when this error crops up).
And I could not replicate the problem.
So I fiddled around some more, paring down my test rig more and more until
I could replicate it. And I could.
It seems to me that if there's *any* function in the CFC that has either a
<cfargument> of type query or a declared returntype of query, then other
methods that return query data (remember this query was a key of a struct,
so no returntype=query).
But if there's no method which have a query argument or returntype, then
that QueryBean error occurs.
Putting this hypothesis to the test by adding this sort of thing (bottom of
post) to my original webservice, fix it. Note: I don't have to *call* the
function, it just has to be in the CFC.
What gives there?
--
Adam Cameron
Senior Developer
Straker Interactive Ltd
Email: [EMAIL PROTECTED]
Phone: +64 9 309 5252 (ext 806)
Fax: +64 9 309 2797
Web: www.straker.co.nz
Street Address:
Level 18, Qantas House, 191 Queen Street, Auckland, New Zealand
Postal Address:
PO Box 147 007, Ponsonby, Auckland, New Zealand
�2004 Straker Interactive Limited. All Rights Reserved.
Fix code:
<cffunction name="dummy" access="remote" returntype="query" output="false"
hint="Work-around for bug in CF's implementation of webservices. This
method just returns the query passed into it. It's not intended to
actually be used.">
<cfargument name="query" returntype="query" required="true" hint="The
query will be passed back.">
<cfreturn arguments.query>
</cffunction>
---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/