I actually have a couple follow up questions. I have successfully
been able to invoke my methods which return multiple items, such as
getUsers(). The format of the json response is as if I had called
SerializeJSON with serializeQueryByColumns set to false. This format
seems a bit cumbersome to work with though, so I'm wondering if there
is a way to retrieve the result set as if I had set
serializeQueryByColumns to true. The call is being made quite simply
from jQuery:
$.getJSON("
http://mysite.loc/model/services/RemoteUserService.cfc?
method=getUsers&returnformat=json", { }, myCallback);
I tried appending an additional argument to the end of the url with no
success:
$.getJSON("
http://mysite.loc/model/services/RemoteUserService.cfc?
method=getUsers&returnformat=json&serializeQueryByColumns=true", { },
myCallback);
Is anyone aware if there is a way to acheive this considering I'm not
actually using the SerializeJSON method?
My next question is that, while I can successfully retrieve complete
query results as json, I cannot successfully return a User business
object. When I try this, the result comes back as an empty string
rather than a json representation of the cfc. To dig into this a bit
further, rather than calling the method via jQuery, I called the
method via a direct cfinvoke of the Web service and noticed that the
result appeared to be a Java object rather than a simple cfc. Might
this be part of the problem?
I would be most appreciative if anyone could point me in the right
direction on these.
Best,
Brian