Amazon Product Advertising API Developer's Manual page 22

Api version 2011-08-01
Table of Contents

Advertisement

Product Advertising API Developer Guide
Service (p. 20)
Typically, the Binding and Service segments do not change from one WSDL release to the next. In the
Definitions segment, only the WSDL version changes. For that reason, when you read a WSDL, you will
typically spend most of your time reading the Request and Response Definitions segments.
Definitions
Topics
Namespaces (p. 15)
Versioning (p. 16)
The Definitions section of the WSDL defines the namespaces used throughout the WSDL, and the name
of the service, as shown in the following snippet of the Product Advertising API WSDL.
<?xml version="1.0" encoding="UTF-8" ?>
<definitions
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://webservices.amazon.com/
AWSECommerceService/2011-08-01"
targetNamespace="http://webservices.amazon.com/
AWSECommerceService/2011-08-01">
This example shows that the:
• Default namespace is xmlns="http://schemas.xmlsoap.org/wsdl/"
• SOAP namespace used is xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
• Schema used is xmlns:xs="http://www.w3.org/2001/XMLSchema"
• Product Advertising API WSDL namespace is
"http://webservices.amazon.com/AWSECommerceService/2011-08-01"
The date at the end is the version number. It is the date the WSDL became public.
• TargetNamespace is "http://webservices.amazon.com/AWSECommerceService/2011-08-01"
The TargetNamespace is an XML schema convention that enables the WSDL to refer to itself (as the
target). The TargetNamespace value is the Product Advertising API WSDL namespace
Namespaces
Namespaces are collections of parameters and operations in which their names are unique.The advantage
of using namespaces is that the WSDL can define terms, like string, just by referring it its namespace,
xs. Also, prepending the namespace to a parameter ensures that there is no danger of name collisions.
Each namespace declaration starts with "xmlns:" (XML namespace:) and is followed by the abbreviation
for the namespace. For example, in the following namespace declaration, xs becomes the abbreviation
for the URL of the schema.
xmlns:xs="http://www.w3.org/2001/XMLSchema"
Throughout the remainder of the WSDL you will see parameters defined in terms of namespace
abbreviations, for example:
What is a WSDL?
API Version 2011-08-01
15

Advertisement

Table of Contents
loading

Table of Contents