Download Document

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Darknet market wikipedia , lookup

Search engine optimization wikipedia , lookup

Web 2.0 wikipedia , lookup

Amazon (company) wikipedia , lookup

Web analytics wikipedia , lookup

Transcript
Project: web service composition
Jianguo Lu
University of Windsor
Search for web services
• Xmethods …
• Google search, yahoo, …
• Web service examples
–
–
–
–
–
–
–
–
–
–
–
–
–
Amazon, Barnes Noble
Google, Yahoo
Ebay
Alexa: web site traffic ranking
Web site promotion service
Weather
Yellow page, zipcode look up
Currency converters
Amortization calculation, mortgage
Stock quote
SMS, email, fax sender
Yellow page
Mappoint
2
Useful links
– Links to web services and projects
• http://serl.cs.colorado.edu/~dennis/cs7818f06/links.html
3
Service composition examples
• Meta search engines
– Combine google and yahoo (or amazon?)
• Display amazon product prices in currencies other than
USD.
– Combine currency converter with amazon (or ebay)
• Compare prices from ebay and amazon
• ……
4
A few books on Amazon, Yahoo, Ebay APIs
• Be aware that information may be
outdated
• For example, google not issuing new
access IDs
5
Amazon
• Amazon E_Commerce Service
• Alexa Web Information Service (AWIS)
• Amazon Simple Queue Service
• Amazon E_Commerce Service
–
–
–
–
–
–
Retrieving product and pricing information
Retrieving customer reviews of a product
Retrieving product images
Performing simple and advanced searches
Retrieving wish lists by name, e-mail, and other identifiers
Creating and updating remote shopping carts
• Alexa Web Information Service (AWIS)
–
–
–
–
–
Performing Web searches
Accessing Web pages by categories and subcategories
Accessing Web site statistics gathered from Alexa’s Web crawls
Accessing Web page metadata gathered from Alexa’s Web crawls
Retrieving links to or from a specified URL
6
• Amazon Simple Queue Service
– It offers a hosted queue for buffering messages between distributed
application components.
– It enables you to decouple components of your application so that they
run independently. Any component of a distributed application can store
any type of data in a reliable queue at Amazon.com.
– Once the component is stored in the queue, any other procedure or
application can then later retrieve the data. A single queue can be used
simultaneously by multiple applications or components without the need
for them to communicate with each other.
– What is terrific about this new Simple Queue Service API is that your
application does not have to be based on other Amazon.com features in
any fashion for you to take advantage of it.
7
ECS operations
• Item lookup
http://webservices.amazon.com/onca/xml?Service=AWSECommerceService
&SubscriptionId=[Your Subscription ID]
&Operation=ItemLookup
&ItemId=[Up to 10 ID’s separated by commas, assumed to be ASIN unless temType
parameter used]
• ItemSearch: search for products or restaurants.
http://webservices.amazon.com/onca/xml?Service=AWSECommerceService
&SubscriptionId=[Your Subscription ID Here]
&Operation=ItemSearch&Keywords=[Keywords]
&SearchIndex=[Search Index]
• REST web service
8
Executing a Query Using HTTP-GET (REST)
• You can test the web service in browsers
http://webservices.amazon.com/onca/xml?Service=AWSECommerceService
&SubscriptionId=[Your Subscription Id Goes Here]
&Operation=ItemSearch
&SearchIndex=Books
&Keywords=Amazon%20MapPoint%20API
9
• You can send the request out using a program
– For example, in .NET, you can use the System.Net.WebRequest
object to perform the HTTP-GET,
– and then use the System.Xml.XmlTextReader object to parse the
results.
10
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As _
System.EventArgs) Handles Button1.Click
Dim oReq As System.Net.HttpWebRequest
Dim oResp As System.Net.HttpWebResponse
oReq = _
System.Net.HttpWebRequest.Create(“http://webservices.amazon.com/onca/xml?Se
rvice=AW
SECommerceService&SubscriptionId=[Your Subscription ID
Here]&Operation=ItemSearch&SearchIndex=Books&Keywords=Amazon%20MapPo
int%20API”)
‘use the StreamReader to get the response
oResp = oReq.GetResponse
Dim sr As New System.IO.StreamReader(oResp.GetResponseStream)
Dim strResponse As String
‘read the entire stream to retrieve the results
strResponse = sr.ReadToEnd
‘write the results to the web browser
Response.Write(strResponse)
End Sub
11
12
Other operations
• CustomerContentLookup
– retrieves information submitted by customers that is available to
the public, such as reviews, wish lists, and so on.
http://webservices.amazon.com/onca/xml?Service=AWSECommerceService
&SubscriptionId=[Your Subscription ID Here]
&Operation=CustomerContentLookup
&CustomerId=[The Customer Id you want to look up]
• CustomerContentSearch
– look up the Customer ID for the person you specify by name or
e-mail address.
http://webservices.amazon.com/onca/xml?Service=AWSECommerceService
&SubscriptionId=[Your Subscription ID Here]
&Operation=CustomerContentSearch
&Name=[name of person – such as Denise%20Gosnell]
13
• Seller Lookup Operation
– retrieve feedback about specific sellers, such as location,
customer feedback, average ratings, and so on.
http://webservices.amazon.com/onca/xml?Service=AWSECommerceService
&SubscriptionId=[Your Subscription ID Here]
&Operation=SellerLookup
&SellerId=[Seller ID’s separated by commas]
14
• Retrieve Product Pricing with ECS
– retrieves pricing of Sony’s new LCD using the ItemSearch
method of the ECS Web API.
http://webservices.amazon.com/onca/xml?Service=AWSECommerceService
&SubscriptionId=[Your Subscription Id Here]
&Operation=ItemSearch
&SearchIndex=Electronics
&Manufacturer=Sony
&Keywords=LCD
&Condition=New
&MerchantId=All
&ResponseGroup=Medium,OfferFull
15
•
Look Up a Friend or Family Member’s Wish List with ECS
– use the wish list feature in the ECS Web API to look up a friend or family
member’s wish list so that you can purchase an item from their list. The following
example looks up and retrieves a wish list using the ListSearch and ListLookup
methods of the ECS Web API.
•
The first step is to look up the wish list of a person by his name, e-mail
address, and so on. The example that follows looks up a person by name.
http://webservices.amazon.com/onca/xml?Service=AWSECommerceService
&SubscriptionId=[Your Subscription Id Here]
&Operation=ListSearch
&ListType=WishList
&Name=Denise%20Gosnell
•
Next, you can use the list ID that is returned in the previous search to
retrieve the list content.
http://webservices.amazon.com/onca/xml?Service=AWSECommerceService
&SubscriptionId=[Your Subscription Id Here]
&Operation=ListLookup
&ListType=WishList
&ListId= YQLZOK4N6RZ5
&ResponseGroup=Request,ListFull
16
• Retrieve URL Information with Alexa Web Information
Service
– uses the UrlInfo operation of the AWIS Web API to retrieve links
of Web pages that are related to the www.amazon.com Web site.
http://aws-beta.amazon.com/onca/xml?Service=AlexaWebInfoService
&Operation=UrlInfo
&SubscriptionId=[Your Subscription ID]
&Url=www.amazon.com
&ResponseGroup=RelatedLinks
17
Other ways to use Amazon web service
• Amazon ECS Web API:
– Retrieve cover art for albums
– Make recommendations for other products a customer should
consider
– Retrieve additional data about a product based on a partial
match (ISBN based on title, and so on)
– Analyze sales data from Amazon purchases for product
development research
18
• Here are examples of other ways to use the Alexa Web
Information Service:
– Analyze your Web site’s statistics
– Analyze the Web site statistics of your competitors to help point
you to the companies you should be looking at
– Find out if someone is improperly linking and/or framing to your
Web site. Such a feature might be useful for attorneys and
companies trying to track down infringers of intellectual property.
19
• Here are some creative examples of ways you might use
the Simple Queue Service:
– Create an application that allows users to submit requests to the
queue and then check the queue periodically to perform the
requested action (for example: search Google with specified
criteria contained in the message in the queue).
– Use the queue as a bulletin board of sorts with an application
that reads the queue to allow multiple people to share
information with each other (for example: a to-do list, project
information, and so on).
– Use the queue to store a simple list of information you want to
access from anywhere (for example: list of favorites, personal
information that is not sensitive, and so on). You can then use
HTTP/GET (REST) for the particular URL to retrieve the list from
a Web browser from any computer in the world with an Internet
connection.
20