我们正在构建一个将数据存储在 S3 存储桶中的应用程序。但是,我们遇到了PutObject方法的问题。这是我们发送的 xml 数据包:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<PutObject xmlns="http://doc.s3.amazonaws.com/2006-03-01">
<Bucket>lills</Bucket>
<Key>lills123</Key>
<Metadata>
<Name>Content-Type</Name>
<Value>text/plain</Value>
</Metadata>
<Metadata>
<Name>title</Name>
<Value>lills</Value>
</Metadata>
<Data>aGEtaGE=</Data>
<ContentLength>5</ContentLength>
<AWSAccessKeyId>key</AWSAccessKeyId>
<Timestamp>2008-11-12T06:23:17Z</Timestamp>
<Signature>signature</Signature>
</PutObject>
</soap:Body>
</soap:Envelope>
这是我们从 S3 得到的响应:
<?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>
<soapenv:Fault>
<faultcode>soapenv:Client.badRequest</faultcode>
<faultstring>Malformed request</faultstring>
<detail/>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
谁能告诉我 SOAP 数据包的问题是什么?
在此先感谢,德文