Hi,

In AmazonS3 REST API, "PUT Bucket policy" method expects a dynamic JSON
array to create bucket policies.
Is it a best practice to send dynamic JSON array through SOAP request as
below?
Please note that the policies change from each other and does not have a fix
nature.

Please guide us, if the following way is not a good practice.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:urn="wso2.connector.amazons3.createbucketpolicy">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:accessKeyId>AKIAIGURZM7GJ7TRO6KQ</urn:accessKeyId>
     
<urn:secretAccessKey>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</urn:secretAccessKey>
      <urn:methodType>PUT</urn:methodType>
      <urn:contentType>application/json</urn:contentType>
      <urn:bucketName>imagesBucket5</urn:bucketName>
      <urn:xAmzDate>true</urn:xAmzDate>
      <urn:bucketUrl>http://s3.amazonaws.com/imagesBucket5</urn:bucketUrl>
      <urn:uriRemainder>/?policy</urn:uriRemainder>
      <urn:bucketPolicy>{
   "Version":"2012-10-17",   
   "Statement":[
      {
         "Sid":"Policy1",
         "Effect":"Allow",
         "Principal": {
         "AWS": "*"},
         "Action":["s3:GetObject"],
         "Resource":"arn:aws:s3:::imagesBucket5/*",
         "Condition":{
            "StringLike":{
               "aws:Referer":[
                  "http://www.example.com/*";,
                  "http://example.com/*";
               ]
            }
         }
      }
   ]
}</urn:bucketPolicy>
   </soapenv:Body>
</soapenv:Envelope>



--
View this message in context: 
http://wso2-oxygen-tank.10903.n7.nabble.com/Pass-JSON-array-through-SOAP-Request-tp91556.html
Sent from the WSO2 Development mailing list archive at Nabble.com.
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to