You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Tony Collen <tc...@hist.umn.edu> on 2002/07/17 23:49:07 UTC
Amazon SOAP web service + Cocoon = ?
Hi all-
I took the Google SOAP XSP script as a starting point and opened up my
shiny new copy of the Amazon web services developer's kit. Much to my
amazement, I got it working :)
Here's a basic XSP script to use with Amazon. It will do a basic keyword
search for "cocoon" and return the results. This XSP will retrieve
"heavy" results - ie everything.. salesrank, user comments, etc. Be
sure to replace the [YOUR_DEVELOPER_TOKEN_HERE] with the key you get
from Amazon at
https://associates.amazon.com/exec/panama/associates/join/developer/application.html
I'm working on a useful XSL script, perhaps I will contribute it in a
few days time. The version I am working at is live at
http://134.84.151.92/cocoon-2.0.3/amazon.html - this URL will probably
not be permanent, nor do I guarantee it will work :)
Happy SOAPing,
Tony
--------8<--------
<?xml version="1.0" encoding="UTF-8"?>
<!-- ============================================================ -->
<!-- initial xsp page for making a SOAP search call to amazon.com -->
<!-- based off google.xsp -->
<!-- July 17, 2002 TC -->
<!-- ============================================================ -->
<xsp:page
language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:xsp-request="http://apache.org/xsp/request/2.0"
xmlns:soap="http://apache.org/xsp/soap/3.0"
>
<search-results>
<soap:call url="http://soap.amazon.com:80/onca/soap"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<namesp1:KeywordSearchRequest
xmlns:namesp1="urn:PI/DevCentral/SoapService">
<KeywordSearchRequest xsi:type="namesp1:KeywordRequest">
<keyword xsi:type="xsd:string">cocoon</keyword>
<page xsi:type="xsd:string">1</page>
<mode xsi:type="xsd:string">books</mode>
<tag xsi:type="xsd:string">webservices-20</tag>
<type xsi:type="xsd:string">heavy</type>
<devtag
xsi:type="xsd:string">[YOUR_DEVELOPER_TOKEN_HERE]</devtag>
<format xsi:type="xsd:string">xml</format>
<version xsi:type="xsd:string">1.0</version>
</KeywordSearchRequest>
</namesp1:KeywordSearchRequest>
</soap:call>
</search-results>
</xsp:page>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>