<xs:complexType name="Image">
<xs:sequence>
<xs:element name="URL" type="xs:string" />
<xs:element name="Height" type="tns:DecimalWithUnits" />
<xs:element name="Width" type="tns:DecimalWithUnits" />
<xs:element name="IsVerified" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
As you can see, the Image response group returns the elements
URL
,
Height
(height of the image),
Width
, and
IsVerified
. All are required in the response except
IsVerified
, which is optional
(
minOccurs
=0). You can see how these elements are displayed in a response.
<MediumImage>
<URL>http://ec1.images-amazon.com/images/P/
B00005TNFV.01._SCMZZZZZZZ_.jpg</URL>
<Height Units="pixels">140</Height>
<Width Units="pixels">99</Width>
This example shows how
URL
,
Height
, and
Width
are child elements.
PortType
The association between operation names and their request and response definitions is created by the
PortType element in the WSDL, for example:
<portType name="AWSECommerceServicePortType">
...
<operation name="ItemSearch">
<input message="tns:ItemSearchRequestMsg" />
<output message="tns:ItemSearchResponseMsg" />
</operation>
In this example, the operation,
ItemSearch
, is associated with its request and response definitions,
ItemSearchRequestMsg
and
ItemSearchResponseMsg
. The keywords, input and output, identify the
operation's request and response definitions, respectively.
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" />
API Version 2011-08-01
19
Product Advertising API Developer Guide
What is a WSDL?