This section helps you confirm that your development environment is set up correctly. Skip to the section that corresponds to the toolkit you downloaded:
You can implement Amazon Associates Web Service operations directly in Java. You can also generate and use the Amazon Associates Web Service Java Client Side library to simplify your Java implementations. This section explains how to generate the Amazon Associates Web Service Java Client Side Library. The next section shows you how to use it to create a request.
You will use the wsimport utility in Java 6 to generate the stubs from the Amazon Associates Web Service WSDL, which is located at http://ecs.amazonaws.com/AWSECommerceService/AWSECommerceService.wsdl.
Generating the Amazon Associates Web Service Client Side Library Stubs
Go to the directory where you want to generate the stubs and create a "build" directory and "src" directory.
All of the generated source code will go under "src" folder.
If you are using Eclipse 3.2, create a custom binding to disable "Wrapper Style" code generation:
<jaxws:bindings wsdlLocation="http://ecs.amazonaws.com/AWSECommerceService/AWSECommerceService.wsdl" xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"> <jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle> </jaxws:bindings>
This step is necessary because Eclipse 3.2 does not support wrapper style generated code. However, if you are an IDE that does support wrapper style generated code, such as NetBeans, this step is not required.
Run the command:
wsimport -d ./build -s ./src -p com.ECS.client.jax http://ecs.amazonaws.com/AWSECommerceService/AWSECommerceService.wsdl -b jaxws-custom.xml .
You can find the generated stubs in the path, com.ECS.client.jax .
Several file types are generated in the package, com.ECS.client.jax:
AWSECommerceService—This file identifies the Amazon Associates Web Service webservice.
AWSECommerceServicePortType—This file provides the port type that the client can listen on.
This file also contains a list of all Amazon Associates Web Service operation signatures that can be used to build the client.
Amazon Associates Web Service requires that you have successfully installed Microsoft Visual Studio.
Confirm the Installation
Open Visual Studio 2005 C# Express Edition.
Click Help > About Microsoft Visual Studio.
A dialog box opens.
The dialog box should list Microsoft Visual Studio 2005 and version 2.0 of the .NET Framework.
In your application, you need to add a web reference to the Amazon Associates Web Service WSDL you want to use.
Adding a Web Reference
From the Project menu, select Add Web Reference.
A dialog box opens.
Enter the WSDL URL for Amazon Associates Web Service in the URL box.
For example, 2008-04-07.
Click Go.
The main pane in the dialog box shows the API.
Click Add Reference.
A new Web References folder is added to the Solution Explorer.
You can now reference the SOAP proxy using your project namespaces. For example:
using GettingStartedGuideSample.com.amazonaws.ecs;
Run the following commands to verify that you have installed all of the necessary Perl modules:
perl -MDigest::HMAC_SHA1 -e 1 perl -MMIME::Base64 -e 1 perl -MLWP -e 1 perl -MXML::XPath -e 1 perl -MDate::Format -e 1
You should not receive any error messages.
To verify your PHP installation, use a command-line interface to run the following command:
php -version
This command assumes you are either in your PHP installation directory or it is in your PATH system variable.
The response should be similar to the following:
PHP 5.1.2 (cli) (built: Jan 11 2006 16:40:00) Copyright (c) 1997-2006 The PHP Group Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies