Amazon SQS supports the SOAP message protocol for calling service actions over an HTTP connection. The easiest way to use the SOAP interface with your application is to use a SOAP toolkit appropriate for your programming platform. SOAP toolkits are available for most popular programming languages and platforms.
The service's Web Services Description Language (WSDL) file describes the actions along with the format and data types of the actions' requests and responses. Your SOAP toolkit interprets the WSDL file to provide your application access to the actions. For most toolkits, your application calls a service action using routines and classes provided or generated by the toolkit.
The API reference in this guide describes the request parameters for each action and their values. You might find it useful to refer to the WSDL and schema files directly to see how the parameters appear in the XML of the request generated by your toolkit, and to understand how your toolkit makes the actions available to your application code.
A SOAP request is an XML data structure that your SOAP toolkit generates and sends to the service. As described by the service WSDL, the root element of this structure is named after the action. You include the parameters for the request inside the root element, according to the SQS schema.
If you're using SOAP without WS-Security, you must also include the authentication information in the
AWSAccessKeyId,
Timestamp, and
Signature parameters inside the root element.
![]() | Important |
|---|---|
Even though the SQS schema currently does not include these three parameters, if you aren't using WS-Security for authentication, you must still place them inside the root element of the request. If you're using a toolkit that generates stubs from the WSDL, the code generated by the toolkit won't include the three parameters. You still have to insert them into the root element. |
For more information about these parameters, see Request Authentication and SOAP without WS-Security.
The following example shows the XML for a SOAP message that calls
the CreateQueue action. Although you probably won't build the SOAP message for a service
request manually, it is useful to see what your SOAP toolkit
tries to produce when provided with the appropriate values.
Many SOAP toolkits require you to build a request data
structure similar to the XML to make a request.
As described above, the CreateQueue element
contains the parameters common to all requests, and a
Request element that contains the
operation-specific QueueName parameter.
<?xml version="1.0" encoding="UTF-8" ?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<CreateQueue xmlns="http://queue.amazonaws.com/doc/2007-05-01">
<AWSAccessKeyId>0PAP1H1P8JJVZEXAMPLE</AWSAccessKeyId>
<Timestamp>2007-05-02T00:00:00.000Z</Timestamp>
<Signature>SZf1CHmQ/nrZbsrC13hCZS061yws</Signature>
<QueueName>MyQueue</QueueName>
</CreateQueue>
</soapenv:Body>
</soapenv:Envelope>