function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ashish  VermaAshish Verma 

Rendering an image from Amazon S3 on VF page

Iam using Amazon toolkit to integrate SF with Amazon S3.

I want to render the content(image) of files in a bucket when bucket is selected from a selectlist. Like ListBucket, I am calling a method 'getObject' which in turn calls the webservice operation 'GetObject' from S3 class. I can see the request and response(200) in my developer console but there is an exception

ERROR: Web service callout failed: Unable to parse callout response. Apex type not found for element Status.User-added image
SonamSonam (Salesforce Developers) 
Came across the following thread where the mismatch in the return element was giving this error.
Pls check the Apex class you have created using the WSDL and confirm if the return element is Status.

reference:
https://developer.salesforce.com/forums?id=906F00000008xGzIAI
Ashish  VermaAshish Verma
I have to Change GetObjectResult orginal code to also get status and  field_order

public class GetObjectResult { 
public S3.MetadataEntry[] Metadata; 
public String Data;
public DateTime LastModified; 
public String ETag; 
public Status Status; 
private String[] Status_type_info = new String[]{'Status','http://s3.amazonaws.com/doc/2006-03-01/','Status','1','1','false'}; 
private String[] Metadata_type_info = new String[]{'Metadata','http://s3.amazonaws.com/doc/2006-03-01/','MetadataEntry','0','-1','false'}; 
private String[] Data_type_info = new String[]{'Data','http://www.w3.org/2001/XMLSchema','base64Binary','1','1','true'}; 
private String[] LastModified_type_info = new String[]{'LastModified','http://www.w3.org/2001/XMLSchema','dateTime','1','1','false'}; 
private String[] ETag_type_info = new String[]{'ETag','http://www.w3.org/2001/XMLSchema','string','1','1','false'}; 
private String[] apex_schema_type_info = new String[]{'http://s3.amazonaws.com/doc/2006-03-01/','true'}; 
private String[] field_order_type_info = new String[]{'Status','Metadata','Data','LastModified','ETag'};

}


Now the above error is Gone.

I need to parse the xml response and render the image on VF page. Can you suggest me any way?



 
Ashish  VermaAshish Verma
check the link for reference:
http://salesforce.stackexchange.com/questions/57879/rendering-an-image-from-amazon-s3-on-vf-page/58291#58291
S3-LinkS3-Link
S3- Link is FREE App for Salesforce - Amazon Connector. Its also available on Appexchange. 
 

    Attach file related to any Salesforce object on Amazon.
    Ulimited free storage for one year.
    Multiple file uplaod.
    No file size limit for upload.
    File access control capabiliy.
    Track file downloads by users.
    File exlorer capability.

https://appexchange.salesforce.com/listingDetail?listingId=a0N3000000CW1OXEA1

Here is our email address. Let us know if you have any query.
support@neiloncloud.com

Thanks.