Product Advertising API
Developer Guide (API Version 2011-08-01)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

Binding

The binding segment of the WSDL specifies how operation requests and responses, defined in PortType, are actually transmitted over the wire using underlying transport protocols. While this is an interesting portion of the WSDL, it is a section that rarely changes so you need not pay much attention to it.

Binding values include HTTP GET, HTTP POST, and SOAP. SOAP is not tied to a specific transport. SMTP, FTP, HTTP are just some of the options that can transport a SOAP request. HTTP, however, is most commonly used. While both HTTP GET and HTTP POST are allowed, HTTP POST is preferred because many servers place character limits on HTTP GET requests.

Product Advertising API uses SOAP, as shown in the following Product Advertising API WSDL snippet.

<binding name="AWSECommerceServiceBinding"
  type="tns:AWSECommerceServicePortType">
...
  <operation name="ItemSearch">
    <soap:operation soapAction="http://soap.amazon.com" />
    <input>
      <soap:body use="literal" />
    </input>
    <output>
      <soap:body use="literal" />
    </output>
  </operation>

This binding shows that Product Advertising API uses two SOAP extensions: soap:operation and soap:body.

The soap:operation element specifies that the Product Advertising API operation, ItemSearch , in this case, is bound to a specific SOAP implementation. The soapAction attribute specifies that the SOAPAction HTTP header is used to identify the Product Advertising API service, which is the URI value of soapAction, http://soap.amazon.com.. soapAction enables Amazon web servers to determine the intent of the SOAP request without having to examine the message portion of the SOAP payload. Specifying this URI is required to access Product Advertising API web servers.

The soap:body element specifies the input and output details. The value in the Product Advertising API WSDL is "literal," which means that instead of encoding the input and output as a SOAP struct, a literal XML document is used. You have seen that Product Advertising API responses are XML documents.