Your SOAP toolkit is responsible for formatting and sending requests based on the provided WSDL. This section shows what SOAP requests look like "on the wire".
In SOAP, the authentication information is put into the following elements of the SOAP request:
Every request must contain authentication information to establish the identify of the principal making the request. In SOAP, the authentication information is put into elements in the <Request> element. The parameters needed for authentication are in the following table.
| Parameter | Description |
|---|---|
AWSAccessKeyId
| Your AWS Access Key Id |
Timestamp
| This must be a dateTime (http://www.w3.org/TR/xmlschema-2/#dateTime) in the Coordinated Universal Time (Greenwich Mean Time) time zone, such as 2005-01-31T23:59:59.183Z. Authorization will fail if this timestamp is more than 15 minutes away from the clock on AWIS servers. |
Signature | The RFC 2104 HMAC-SHA1 digest
(http://www.ietf.org/rfc/rfc2104.txt) of the concatenation of
[Action, such as 'UrlInfo'] +
[Timestamp], using your AWS Secret Access Key
as the key. See the Query article for a description of how to generate the signature. For example, in the following sample requests,
the signature element would contain the HMAC-SHA1 digest of the value
"UrlInfo2005-01-31T23:59:59.183Z":
Example Sample SOAP Request
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<m:UrlInfo xmlns:m="http://webservices.amazon.com/AWSAlexa/2005-07-11">
<m:Request>
<m:Security>
<m:AWSAccessKeyId>1234567890ABCDEFGHIJ</m:AWSAccessKeyId>
<m:Signature>S1USmkAFnpQy6xCgKAEa9RXITVA=</m:Signature>
<m:Timestamp>2006-09-08T22:02:46.000Z</m:Timestamp>
</m:Security>
<m:Url>amazon.com</m:Url>
<m:ResponseGroup>Rank</m:ResponseGroup>
</m:Request>
</m:UrlInfo>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
URL Encoding. The result of the SHA-1 hash is binary data. An encoding must be specified to include this in a SOAP request. SOAP requests should be Base64 encoded. |
Note: | Due to different interpretations regarding how extra time precision should be dropped, .NET users should take care not to send overly specific time stamps. This can be accomplished by manually constructing DateTime objects with only millisecond precision. |
<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<m:UrlInfoResponse xmlns:m="http://webservices.amazon.com/AWSAlexa/2005-07-11">
<aws:Response xmlns:aws="http://alexa.amazonaws.com/doc/2005-10-05/">
<aws:OperationRequest>
<aws:RequestId>3e894c2b-ee67-4de3-90f3-e9eeab516479</aws:RequestId>
</aws:OperationRequest>
<aws:UrlInfoResult>
<aws:Alexa>
<aws:TrafficData>
<aws:DataUrl type="canonical">amazon.com/</aws:DataUrl>
<aws:Asin>B0000690L4</aws:Asin>
<aws:Rank>17</aws:Rank>
</aws:TrafficData>
</aws:Alexa>
</aws:UrlInfoResult>
<m:ResponseStatus>
<m:StatusCode>Success</m:StatusCode>
</m:ResponseStatus>
</aws:Response>
</m:UrlInfoResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>