<!--- Build Array for Amazon.com Query --->
<cfset variables.keywordrequestARRAY.devtag = "[DEVTAG]">
<cfset variables.keywordrequestARRAY.asin = "0767920686">
<cfset variables.keywordrequestARRAY.tag = "[ASSOCID]">
<cfset variables.keywordrequestARRAY.type = "heavy">
<cftry>
<cfinvoke
webservice="http://soap.amazon.com/schemas3/AmazonWebServices.wsdl"
method="AsinSearchRequest" returnvariable="variables.productinfoARRAY">
<cfinvokeargument name="AsinSearchRequest"
value="#variables.keywordrequestARRAY#"/>
</cfinvoke>
<cfoutput>
Array length:
#arraylen(variables.productinfoARRAY.details)#<br />
</cfoutput>
<cfset amazonSELECT =
QueryNew('ImageURLSmall,ImageURLMedium,ImageURLLarge,ProductName,Authors,Media,Manufacturer,Asin,ReleaseDate')>
<cfloop index="i" from="1"
to="#arraylen(variables.productinfoARRAY.details)#" step="1">
<!--- Add Row To Query --->
<cfset QueryAddRow(amazonSELECT)>
<!--- Insert ImageURLSmall --->
<cftry>
<cfset QuerySetCell(amazonSELECT, 'ImageURLSmall',
variables.productinfoARRAY.details[i].ImageURLSmall)>
<cfcatch></cfcatch>
</cftry>
<!--- Insert ImageURLMedium --->
<cftry>
<cfset QuerySetCell(amazonSELECT, 'ImageURLMedium',
variables.productinfoARRAY.details[i].ImageURLMedium)>
<cfcatch></cfcatch>
</cftry>
<!--- Insert ImageURLLarge --->
<cftry>
<cfset QuerySetCell(amazonSELECT, 'ImageURLLarge',
variables.productinfoARRAY.details[i].ImageURLLarge)>
<cfcatch></cfcatch>
</cftry>
<!--- Insert ProductName --->
<cftry>
<cfset QuerySetCell(amazonSELECT, 'ProductName',
variables.productinfoARRAY.details[i].ProductName)>
<cfcatch></cfcatch>
</cftry>
<!--- Insert Authors --->
<cftry>
<cfset QuerySetCell(amazonSELECT, 'Authors',
ArrayToList(variables.productinfoARRAY.details[i].authors))>
<cfcatch></cfcatch>
</cftry>
<!--- Insert Artists --->
<cftry>
<cfset QuerySetCell(amazonSELECT, 'Authors',
ArrayToList(variables.productinfoARRAY.details[i].artists))>
<cfcatch></cfcatch>
</cftry>
<!--- Insert Media --->
<cftry>
<cfset QuerySetCell(amazonSELECT, 'Media',
variables.productinfoARRAY.details[i].Media)>
<cfcatch></cfcatch>
</cftry>
<!--- Insert Manufacturer --->
<cftry>
<cfset QuerySetCell(amazonSELECT, 'Manufacturer',
variables.productinfoARRAY.details[i].Manufacturer)>
<cfcatch></cfcatch>
</cftry>
<!--- Insert ReleaseDate --->
<cftry>
<cfset QuerySetCell(amazonSELECT, 'ReleaseDate',
variables.productinfoARRAY.details[i].ReleaseDate)>
<cfcatch></cfcatch>
</cftry>
<!--- Insert Asin --->
<cftry>
<cfset QuerySetCell(amazonSELECT, 'Asin',
variables.productinfoARRAY.details[i].Asin)>
<cfcatch></cfcatch>
</cftry>
<cfdump expand="yes" var="#amazonSELECT#">
</cfloop>
<cfcatch type="any">
<!--- <cfset amazonCallError = true> --->
<cfdump var="#cfcatch#"><cfabort>
<!--- <cfthrow message="Problem executing Amazon.com web
service invocation." type="AMAZON:FAILURE"> --->
</cfcatch>
</cftry>
Brian Kotek wrote:
>Cutter, I was trying that code already and I'm still getting the error about
>not being able to create a web services stub. Can you post an example of
>exactly what you are filling in for all the variables (except for your
>developer key obviously) so that I can try to determine what's wrong?
>Thanks
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212517
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54