【问题标题】:Need assistance with diagnosing SOAP packet problem with Amazon S3需要帮助诊断 Amazon S3 的 SOAP 数据包问题
【发布时间】:2010-09-22 07:24:06
【问题描述】:

我们正在构建一个将数据存储在 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 数据包有什么问题?

提前致谢, 德文

【问题讨论】:

    标签: xml soap amazon-s3 amazon


    【解决方案1】:

    如果要在 SOAP 消息本身中发送数据,则需要使用 PutObjectInline,而不是 PutObject(它希望数据是 DIME 附件)。

    请参阅 s3 文档中的 PutObjectInline

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-09-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多