Hi woodHack,

I've just did a test and it worked for me. I created an AWS account *and* 
signed up for the S3 service (you need this step).

I was able to retrieve the list of buckets (empty initially) fine. See also the 
slightly updated classes attached.

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com


-----Message d'origine-----
De : R.H. [mailto:lnrha...@gmail.com] 
Envoyé : mercredi 1 juillet 2009 03:19
À : discuss@restlet.tigris.org
Objet : Need help with S3App.java example, from RESTful Web Services (O'Reilly)

I am trying to run the S3App.java (RESTful Web Services publisher O'Reilly) and 
getting a HTTP response code of 403 Forbidden. S3App.java extends 
S3Authorized.java which defines the following keys (constants),
    public final static String PUBLIC_KEY = "0F9DBXKB5274JK​​TJ8DG2";​
    public final static String PRIVATE_KEY = 
"GuUHQ086Wawbwv​​Vl3JPl9JIk4VO​tLcllkv​Ib0b7w​"; which are not allowing me to 
authenticate properly. I have compiled, S3App, S3Authorized, S3Bucket, and 
S3Object, successfully.
 
Please might someone shed some light on what I am doing wrong?

I tried the following work around. I created an account at AWS. When doing so, 
I was assigned an "Access Key ID" and a "Secret Access Key". I updated the 
code's original PUBLIC_KEY value by replacing it with the value of my 
AWS_Access_Key_ID and PRIVATE_KEY with my AWS_Secret_Access_Key value. The work 
around failed. I figured this was a long shot and would probably fail; because 
I was assuming the AWS_Secret_Access_Key is suppose to be used to create 
signatures for requests made to retrieve S3 content. However, I could have 
misunderstood the intent of an AWS_Secret_Access_Key and how to use it properly.

I have attached all the java code.

Cheers and thanks for reading,
woodHack

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2368812

Attachment: S3App.java
Description: Binary data

Attachment: S3Authorized.java
Description: Binary data

Reply via email to