> Still trying to work through various issues setting up a web
> service to perform a number of different functions.
>
> Below should insert a record into the database. But I'm getting:
> faultDetail:
>
> {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXExcepti
> on: Bad types (boolean -> class coldfusion.xml.rpc.QueryBean)
>
> What's wrong with the type? "Boolean" is a correct value, right?
>
> <cffunction name="newCLIENT"
> access="remote"
> returntype="boolean"
> hint="Add a New Client" >
>
> <cfargument name="WSClientName" type="string" />
>
> <cfquery>
> INSERT INTO ClientInfo
> (ClientName)
> VALUES
> ( <cfqueryparam cfsqltype="CF_SQL_VARCHAR"
> null="false"
> value="#WSClientName#" />)
> </cfquery>
> <cfreturn true>
> </cffunction>
Yes, boolean is an acceptable return value type. The fact that you're
getting a QueryBean back is sort of odd. I suspect that if you do the
following, it'll work fine:
1. Add OUTPUT="FALSE" to your function.
2. Create a local variable after your CFARGUMENT tag.
3. Use that variable for your CFQUERY's NAME attribute value.
I don't think you should have to do (2) or (3) to make it work, but you
might. I've never had a web service contain an unnamed query before.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:263795
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4