On Wednesday, July 31, 2002, at 10:06 , Sean A Corfield wrote: > Access a web service (e.g., the Amazon one) and lo and behold!!
Here's a simple example (you'll need to sign up for the Amazon developer program and get your own developer tag to go in this code!): <html> <head> <title>Amazon Keyword Search</title> </head> <cfparam name="URL.kw" type="string" default="ColdFusion"/> <cfoutput> <cfset kwReq = structNew() /> <cfset kwReq.keyword=URL.kw /> <cfset kwReq.page="1" /> <cfset kwReq.mode="books" /> <cfset kwReq.tag="webservices-20" /> <cfset kwReq.type="lite" /> <cfset kwReq.devtag="XXX your developer tag goes here XXX" /> <cfset kwReq.version="1.0" /> <cfinvoke webservice="http://soap.amazon.com/schemas/AmazonWebServices.wsdl" method= "KeywordSearchRequest" KeywordSearchRequest="#kwReq#" returnvariable="amazon"/> <cfset details = amazon.getDetails()/> <p>Books matching #kwReq.keyword#:</p> <cfloop index="i" from="1" to="#arrayLen(details)#"> <!--- cfdump label="details[#i#]" var="#details[i]#"/ ---> <cfset authList = details[i].getAuthors()/> <cfset authors = arrayToList(authList,", ")/> <p>#details[i].getProductName()# by #authors# <s><font color="red">#details[i].getListPrice()#</font></s> #details[i].getOurPrice()#</p> </cfloop> </cfoutput> <body> </body> </html> ______________________________________________________________________ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

