On Mon, Jan 5, 2009 at 9:00 PM, Joe <joe_ts...@hotmail.com> wrote:
> The reason I'm making a web service is b/c I want the JSON to be parsed by
> jQuery.  Are you telling me client-side Javascript can handle CFCs?

jQuery doesn't read WSDL (afaik). Therefore - you don't want a WSDL
response. You want a JSON response.

You can call any CFC, under web root, with just the url. Try it. Put
this CFC under your web root:

<cfcomponent>

<cffunction name="sayHi" access="remote" returnType="string">
<cfreturn "Ray roxors">
</cffunction>

</cfcomponent>

If you name this test.cfc, and put it in web root, open your browser to:

http://yourhost/test.cfc?method=sayHi

You wlll see a response. If you view source, you will see it is XML,
in this case, WDDX. To switch to JSON, do:

http://yourhost/test.cfc?method=sayHi&returnFormat=json

Any CFC under web root, and any method with access=remote, can be
directly called by your ajax code.



>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317442
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to