Forrest, I realize you've perhaps abandoned the effort, but I'll throw out
some clarification if it's useful, first about the JRE/CFX issue, then about
calling the google search APIs. 

First, you said it (the CFX) "It needs a path to the JRE on my PC", and that
just didn't make sense to me. So I did some googling (pardon the pun) and
found that this was a CFX created by Pete Freitag
(http://www.petefreitag.com/item/27.cfm) which he used to offer on his cfdev
site but which is now called zrinity. The docs for the tag, at
http://www.zrinity.com/xml/soap/google/, show that it was written in the CF5
time frame. 

As such, the reference to adding a path to your JRE is from the pre-CFMX
days when CF did not come built on top of Java but could indeed integrate
with it if you pointed CF's Admin to a JRE. This started in CF 4.51.  (My
first talk to the Atlanta CFUG, in Oct 2001, was on this very subject of
doing CF/Java integration even before CFMX.)

Anyway, as mentioned on blog entry, he was relying on a googlelib.jar file
from 2002, and I'd not be surprised if the APIs no longer work as they did
then, thus rendering the CFX useless. I've not tried it. I didn't see too
many other references to it in my searching, so it may be a bit of a wild
goose chase trying to get it to work, whether on CF 5, 6, 7, or 8. 

But really, the whole need for the CFX was somewhat obviated on 6, 7, and 8
where you can just call the Google web services directly with
CFINVOKE/CFOBJECT/createobject and their ability to invoke web services.
There are lots of articles and presentations on that, including a few I've
done over the years, which you can find on my web site (carehart.org). 

In fact, I just did a little digging and was able to create a page that uses
the old google search SOAP API to do a search for entries on coldfusion. The
code below will indeed work if you have a valid Google SOAP Search API key,
but they aren't issuing any new ones (as Steve said, they prefer you use the
Ajax Search API, which I'll discuss in a moment.). Of course, the style of
programming is just one of many ways such a request could be made (could
have used CFOBJECT, createObject, etc).:

<cfscript>
googlesearchprops = structnew();
//enter your GOOGLE API key
googlesearchprops.key="-- your key here --";
// enter the search query keywords
googlesearchprops.q="coldfusion" ;
// various other goole api properties
googlesearchprops.ie="";
googlesearchprops.lr="";
googlesearchprops.oe="";
googlesearchprops.restrict="";
googlesearchprops.filter="true";
googlesearchprops.safeSearch="true";
googlesearchprops.maxResults="10";
googlesearchprops.start="1";
</cfscript>

<cftry>
        <cfinvoke webservice="http://api.google.com/GoogleSearch.wsdl";
method = "doGoogleSearch" timeout="30" returnVariable="searchResults"
argumentcollection="#googlesearchprops#" >
<cfcatch>
        <!--- <cfdump var="#cfcatch#"> --->
        <cfoutput>#cfcatch.detail#</cfoutput>
        <cfabort>
</cfcatch>
</cftry>

<cfset results = searchresults.getresultelements()>

<cfoutput>
Results for searching for: #googlesearchprops.q# 
<ul>
<cfloop from=1 to="#arraylen(results)#" index="i">
        <li><a href="#results[i].geturl()#">#results[i].gettitle()#</a>-
#results[i].getsnippet()#</li>
</cfloop>
</ul>
</cfoutput>

The details of the properties being passed in is at
http://code.google.com/apis/soapsearch/reference.html But that page also
explains again that the old SOAP API has been deprecated in favor of the new
Ajax search API (http://code.google.com/apis/ajaxsearch/). 

In fact, there are ways to use the new Ajax-based search API that don't
involve any traditional web service calls at all, so all the more reason to
skip trying to use the CFX or even the CFINVOKE code above. To your final
comment, the fact is that things are indeed getting simpler. It's just
different, so that old tools (and articles and tested approaches) need to
evolve with the times. :-)

Hope that helps.

/charlie



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Forrest C.
Gilmore
Sent: Sunday, February 03, 2008 4:51 PM
To: discussion@acfug.org
Subject: Re: [ACFUG Discuss] JVM version and ColdFusion

Thanks for all of your suggestions. In light of Steve's response, perhaps I
should abandon this CFX_Google endeavor!

A number of years ago, with talk about fourth generation languages, I had
hoped that all this needless(?) complexity would eventually go away, and we
could just get work done with our computers.
It seems like we started over again, and it's worse now than it was then!

Forrest C. Gilmore
===========
> I don't think that the Google web service API is supported anymore by 
> Google, rendering the question moot.
>
> Google really wants you to use their AJAX Search API instead...or, 
> better yet, to buy one of their search appliances.
>  
>
>
> Regards,
> Steve Drucker
> CEO
> Fig Leaf Software
> Adobe / Google / WebSense / Paperthin  Premier Consulting and Training 
> Partners http://www.figleaf.com http://training.figleaf.com
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Forrest C.
> Gilmore
> Sent: Saturday, February 02, 2008 3:37 AM
> To: ACFUG Discussion
> Subject: [ACFUG Discuss] JVM version and ColdFusion
>
> I want to install the CFX_Google tag on my local PC. It needs a path 
> to the JRE on my PC.
> I see that currently, ColdFusion is using it's default JRE, which is 
> version 4.
> On my PC, I have several JRE installs, 5.0.11, 6.0, 6.0.1, 6.0.2, 
> 6.0.3, and
> 6.0.4 from the JDK.
>
> Does it matter which of these I use with CFX_Google?
> Should I change the setting for CF Server to one of the newer JRE's?
> Do the two have to be the same?
>
> Forrest C. Gilmore
>
>
>
> -------------------------------------------------------------
> Annual Sponsor FigLeaf Software - http://www.figleaf.com
>
> To unsubscribe from this list, manage your profile @ 
> http://www.acfug.org?fa=login.edituserform
>
> For more info, see http://www.acfug.org/mailinglists Archive @ 
> http://www.mail-archive.com/discussion%40acfug.org/
> List hosted by http://www.fusionlink.com
> -------------------------------------------------------------
>
>
>
>
> -------------------------------------------------------------
> Annual Sponsor FigLeaf Software - http://www.figleaf.com
>
> To unsubscribe from this list, manage your profile @ 
> http://www.acfug.org?fa=login.edituserform
>
> For more info, see http://www.acfug.org/mailinglists Archive @ 
> http://www.mail-archive.com/discussion%40acfug.org/
> List hosted by http://www.fusionlink.com
> -------------------------------------------------------------
>
>
>
>
>
>   




-------------------------------------------------------------
Annual Sponsor FigLeaf Software - http://www.figleaf.com

To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists Archive @
http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------






-------------------------------------------------------------
Annual Sponsor FigLeaf Software - http://www.figleaf.com

To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------



Reply via email to