简体   繁体   中英

how to use aws s3 service by soap

i want to use the AWS S3 by soap, i checked the aws website, there is an example to list all the bucket. http://docs.aws.amazon.com/AmazonS3/latest/API/SOAPListAllMyBuckets.html . so when i use the soap template. it returns "405 Method Not Allowed". any help? thanks

this is what is sent to aws s3 server.

POST http://s3.amazonaws.com/ HTTP/1.1
Host: s3.amazonaws.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 497

<?xml version="1.0"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">

<soap:Body xmlns="https://.s3.amazonaws.com/">
  <ListAllMyBuckets xmlns="http://doc.s3.amazonaws.com/2006-03-01">
  <AWSAccessKeyId>AKIAIOSFODNN7EXAMPLE</AWSAccessKeyId>
  <Timestamp>2006-03-01T12:00:00.183Z</Timestamp>
  <Signature>Iuyz3d3P0aTou39dzbqaEXAMPLE=</Signature>
  </ListAllMyBuckets>
</soap:Body>

</soap:Envelope>

You need to use HTTPS, not HTTP.

Note that SOAP requests, both authenticated and anonymous, must be sent to Amazon S3 using SSL. Amazon S3 returns an error when you send a SOAP request over HTTP.

http://docs.aws.amazon.com/AmazonS3/latest/API/APISoap.html

Note also that the SOAP interface is deprecated.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM