I use these codes to connect SimpleDB and query data.
I can run the query in SQL Scrap Book, and the result is OK.
But when I run it in Eclipse, I got error message:
"12-18 22:01:57.401: I/com.amazonaws.request(402): Received error response: Status Code: 400, AWS Request ID: d68b7fcc-cd4a-7def-602c-96ad189d8fcf, AWS Error Code: NoSuchDomain, AWS Error Message: The specified domain does not exist."
Do you have any idea of that?
//1. Creating a SimpleDB Client
AWSCredentials credentials = new BasicAWSCredentials( ACCESS_KEY_ID, SECRET_KEY );
AmazonSimpleDBClient sdbClient = new AmazonSimpleDBClient( credentials);
//2. Select
String nextToken = null;
SelectRequest selectRequest = new SelectRequest( "select * from mydomain" ).withConsistentRead( true );
selectRequest.setNextToken( nextToken );
SelectResult response = sdbClient.select( selectRequest );
nextToken = response.getNextToken();
you need to specify server region end point before requesting data for domain. Amazon Simple DB supports 7 region ends points.
Region, Endpoint
How to set region end point