Integrating Amazon Web Service with Lotus Notes database

Source: Internet
Author: User
Tags definition soap mail web services xml parser xslt wsdl

Amazon.com's old users may remember the "Eyes" service, which allows you to set up keyword lists of products of interest to you. When you have a new product that matches the list of keywords you set up, you are sent an e-mail notification that contains links to these new products, as well as an introduction to the services you can use on your own Web site, which can be useful if you are a member of Amazon. With the increasing number of people using this service, Amazon.com decided to stop the service because of its high demand for the processor and its difficulty in maintaining it.

After that, Amazon.com provides a Web service called Amazon Web Service or AWS that you can use to query Amazon's search engine on its own web site. This WEB service allows us to create an application similar to the Eyes service. You can integrate Amazon Web service into a Notes application to create a better service than Eyes; Integration solutions provide a way to categorize books and tag unrelated books using your own standards. And keeping track of a book when it stops publishing. This technique is currently being used to update the list of books on the Notes FAQ Web site. Of course, you can also use this technique with other types of product listings on Amazon.

There are two parts in this article, in part 1th, we will briefly describe how to integrate the Amazon Web Service (AWS) in a Notes application so that you can query the Amazon.com search engine with the notes Java API. We'll also describe how to create an agent to remove references to outdated books. In the 2nd part of this article, we will describe how to recreate this application using RDBMS and Java EE technology. This article assumes that you have experience developing a Notes application and that you have Java programming skills. You can download Amazon's web Services SDK directly from the Amazon.com Web site.

SOAP and Web Services

There are many ways to communicate over a WEB service, but there are usually two ways to do this: Xml/http or SOAP (simple Object Access Protocol). The Xml/http method uses a specially formatted URL for the request. Because the Xml/http access method uses some encoded parameters to initiate the request, it restricts the maximum length of the URL, which is about 1,024 characters long (some servers can support longer, but 1,024 characters are a more secure setting). The results you receive are encoded using XML/SOAP. You can use XSLT to convert XML, or use an XML parser to read the desired value from XML. However, the work of writing XML parsers is tedious.

The SOAP technology used to access Web services leverages the definition of the WSDL (Web Services Description Language) provided by the Web service provider. If you are publishing a Web service, you need a WSDL definition; you can usually use a Web service with a URL, as you'll see later in this article. Here, the Amazon Web Service provides a definition of WSDL. The WSDL definition describes how to format the request and how to read the response information, and also tells you which requests you can use. WSDL is another complex layer on top of Web services, but it really provides the bridge needed to generate "wrappers" to access Web services as if they were on your own machine.

Encapsulation programs that invoke Web services can be generated in any language that supports Web services in a friendly manner, including Java, C, VB, PHP, Perl, TCL, and so on. In addition, the information sent in the SOAP request is limited in size because the information is sent in a Web request body, not in a URL; This allows you to emit complex requests for Web services because there is no size limit in the Web request body.

Amazon Web Service

In the Amazon.com Web Service page, you can see more information about Amazon Web services. You can see the Java, Perl, PHP, and VB sample code provided in the SDK. The tool also includes documents that use the SDK. There is also a developer forum that Amazon will monitor. Before you can call the Amazon Web service API, you first need to register a developer account. When Amazon's customers use the Amazon Associate Web site to add Amazon's order records, they can use this developer account to provide a recommended record for Amazon associate. If you use Amazon's XSLT service to convert the XML results to HTML format, the account will automatically embed the returned URL so that you can get a referral fee.

Amazon provides a lot of functionality in its Web service implementation, which is a good example of what you can do with Web services. They provide not only the function of the search engine, but also the ability to manage the Amazon user's shopping cart, purchase intention and mail order information level. In fact, the intent of Web services is to allow Amazon Associate (they pay the recommendation) to use a more flexible approach to building web storefronts (Web storefront) to help sell more Amazon products. That's why it's a good example of a Web service: it helps the providers of Web services increase their benefits.

For this article, we are interested in the Web Services API for the Amazon search engine. Before we begin, we need to prepare the following items:

Install the Amazon Web Service. For more information, see the documentation in the SDK for Amazon Web services.

To test, we created a Notes application to use AWS.

To use the Amazon search engine, the first item you must specify in your Notes application is something called a schema, which is equivalent to the High-level tab you can see on the Amazon.com home page: Books, music, tools, and so on. You can then search by keyword, browse node (product catalog, for example, if you set the pattern to a book, you can find science fiction), ASIN, ISBM, UPC, author, musician, actor, director, Distributor, listmania! and similar products (other products that customers may purchase). For the Bettereyes service we are building, we will search using keywords.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.