The return format "PLAIN" means you can not return objects like array, strcuture, etc. If you return a structure but use "PLAIN" then it will throw and error.
If you want JSONP you need to add a "callback" parameter. This is the "standard" since JS needs a callback. Obviously, your "test" and "ASDFG" return format parameters are throwing errors, since they are not valid. This is normal. I mean, try <cfASDFG> and you know what I mean ;-) As a "good method of coding" I always define a returnformat of type "JSON" (developers using your API want 90% JSON). Kind Regards, Nitai On Thu, Aug 9, 2012 at 8:18 PM, Jason King <[email protected]> wrote: > http://www.openbd.org/manual/?/tag/CFFUNCTION > > ReturnFormat: When called as part of a WebService RPC, determines the > return format of the data. Values: PLAIN, WDDX, JSON, JSONP > > *it seems using value of PLAIN returns same error as any invalid > format. If I declared returnFormat=plain in the function, not adding > the url agrument to change it to wddx/json throws error > > Using the following CFC (in which no returnFormat is declared), > results are as follows > > http://details.at/config/cfc/functions.cfc?method=checkEmailValid&[email protected] > - returns WDDX > > http://details.at/config/cfc/functions.cfc?method=checkEmailValid&[email protected]&__BDreturnformat=wddx > - returns WDDX > > http://details.at/config/cfc/functions.cfc?method=checkEmailValid&[email protected]&__BDreturnformat=json > - returns JSON > > http://details.at/config/cfc/functions.cfc?method=checkEmailValid&[email protected]&__BDreturnformat=jsonp > - throws specific error, 'the request must contain a CALLBACK > parameter if using JSONP' > > http://details.at/config/cfc/functions.cfc?method=checkEmailValid&[email protected]&__BDreturnformat=plain > - returns 'Data not supported' error > > http://details.at/config/cfc/functions.cfc?method=checkEmailValid&[email protected]&__BDreturnformat=test > - returns 'Data not supported' error > > http://details.at/config/cfc/functions.cfc?method=checkEmailValid&[email protected]&__BDreturnformat=ASDFG > - returns 'Data not supported' error > > -- > online documentation: http://openbd.org/manual/ > http://groups.google.com/group/openbd?hl=en -- See for yourself how easy it is to manage files today. Join the revolution! Razuna - Hosted Digital Asset Management Solution http://www.razuna.com/ Razuna - Open Source Digital Asset Management http://www.razuna.org/ Twitter - http://twitter.com/razunahq Facebook - http://www.facebook.com/razunahq Support Platform - http://getsatisfaction.com/razuna -- online documentation: http://openbd.org/manual/ http://groups.google.com/group/openbd?hl=en
