php.net/manual/en/function.soap-soapclient-soapcall.
php), like this:
$result->__soapCall('ItemSearch', array ($request));
The web service request does an ItemSearch operation on the postal+t-shirt keywords in
the ???Apparel??? store. The whole request is placed in a try-catch block that catches any potential
exceptions and generates an error. Read more on the SoapFault exception class, which contains
the details of the SOAP error, at http://www.php.net/manual/en/function.is-soap-fault.php.
Loading test_soap.php generates the result shown in Figure 22-6.
CHAPTER 22 ?– USING AMAZON.COM WEB SERVICES 675
Figure 22-6. The results of the SOAP request
Integrating A2S with TShirtShop
The goal is to bring some books related to the words postal t-shirt from Amazon.com to your
store. You??™ll build a special department with no categories that will display some book information
(cover image, title, authors, and price). Each book will have a Buy from Amazon link
that allows your visitor to buy the book from Amazon.com. If you apply for an Amazon.com
associates ID account, you??™ll get a small commission from this. After following the exercises,
you??™ll implement the Amazon.com integration, as shown earlier in Figure 22-1.
The following link engages a REST search for Amazon.com books on the postal t-shirt
keywords and returns the first ten products data sorted by their sales rank:
http://webservices.
Pages:
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790