I also posted already posted an example for Ian showing the jQuery/CF7 
portion of the code:

http://blog.pengoworks.com/index.cfm/2011/3/3/Easy-AJAX-using-ColdFusion-jQuery-and-CFCs

The example does deal w/a struct, but converting data to a struct is 
very straightforward. I know he's seen it--because we had an offlist 
brief discussion.

The only piece of the puzzle he needs to work out is the web service 
part--which may end up being extremely easy, or extremely 
difficult--depending on the web service he's trying to consume. If CF7 
can handle the format natively, then it's very straight forward. 
However, if CF7 throws errors accessing the web service, then he's going 
to have to find other method of consuming the web service.

-Dan

On 3/14/2011 9:20 AM, Dean Lawrence wrote:
>
> Ian, again you are mixing things up.CFJSON is not what calls the
> webservice. CFJSON is used to encode or decode native ColdFusion
> objects to and from JSON format. So if you if have a query result, you
> would pass that query object to CFJSON and it will encode it into JSON
> format. Vice-versa, you can pass it a JSON string and it can covert it
> back to a native ColdFusion object.
>
> So with that said, JQuery would make an AJAX call to your ColdFusion
> page, be it a .cfm or .cfc page (doesn't really matter as JQuery
> doesn't care). On that ColdFusion page you would invoke the webservice
> that you are getting your data from and make whatever calls that the
> webservice requires. If what you get back from the webservice is not
> in a JSON format, you would then pass the results to CFJSON to convert
> it to JSON. It is this converted data that you would then return to
> the original AJAX call and now use JQuery to populate your form with
> that data.
>
> I think your hang-up is on this whole ColdFusion 7 mentality. The use
> of JQuery to make an AJAX call and populate the form is not ColdFusion
> 7 specific, as it is a client-side task, it really has nothing to do
> with ColdFusion 7. The only ColdFusion 7 functionality that you really
> need to be concerned about is making the call to your .Net webservice.
> Here is Adobe's LiveDoc page that tells you how to do that.
>
> http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&file=part_dev.htm
>
> As for ColdFusion 7 and JSON, JSON is really only text. Again, you
> don't need anything special to work with it. Projects like CFJSON
> simply make it easier to work with it. But if you look at the source
> code for CFJSON, it is just using plain old ColdFusion to process the
> data. The same holds true for newer version of ColdFusion. The
> built-in tags are just a way to make it easier to work with JSON, but
> are not required. I'm running ColdFusion 9.01 and don't use any of the
> built-in tags to do my AJAX calls as I like to have full control over
> the process. That's just me though.
>
> Anyway, here is a link to the JSON homepage so that you can get a
> better understanding about what it is.
>
> http://www.json.org/
>
> Dean
>
> On Mon, Mar 14, 2011 at 7:24 AM, Ian Vaughan
> <i.vaug...@neath-porttalbot.gov.uk>  wrote:
>>
>> Thanks found this link
>> http://www.monochrome.co.uk/blog/2008/02/01/using-jquery-and-coldfusion-
>> 7-with-a-little-json-glue which seems ok - the problem I am having in
>> understanding is how would I use CFJSON to use the .asmx webservice data
>> that I would consume/call with the Coldfusion 7 cfinvoke tag?
>>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342993
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to