The reason this code isn't working is because it's build on top of Apache
Commons HttpClient. You'll need to use URL and URLConnection to make your
REST calls instead.

This is definitely possible, as people have created a Python library for
doing this:

http://code.google.com/p/appengine-simpledb/source/browse/#svn/trunk

You're using Java. I haven't seen anything in my searches for examples
making SimpleDB calls in Java (probably because developers just use App
Engine's datastore for persistence). You'll likely have to roll your own
client against the REST spec:

http://docs.amazonwebservices.com/AmazonSimpleDB/latest/DeveloperGuide/index.html?MakingRESTRequests.html

On Fri, Apr 9, 2010 at 2:41 PM, deuce4 <[email protected]> wrote:

> I tried with this
>        //below gives error: java.lang.NoClassDefFoundError: org/apache/
> commons/httpclient/HttpMethod
>
> //        AmazonSimpleDB sdb = new AmazonSimpleDBClient(new
> PropertiesCredentials(
> //
> ClockServlet.class.getResourceAsStream("AwsCredentials.properties")));
> //
> //
> System.out.println("===========================================");
> //        System.out.println("Getting Started with Amazon SimpleDB");
> //
> System.out.println("===========================================\n");
> //
> //
> //            // Create a domain
> //            String myDomain = "MyStore";
> //            System.out.println("Creating domain called " + myDomain
> + ".\n");
> //            sdb.createDomain(new CreateDomainRequest(myDomain));
> //
> //            // List domains
> //            System.out.println("Listing all domains in your account:
> \n");
> //            for (String domainName :
> sdb.listDomains().getDomainNames()) {
> //                System.out.println("  " + domainName);
> //            }
> //            System.out.println();
>
> I don't have the URL fetch code attempt anymore--mostly I have the
> fundamental question of how to create a custom connection object like
> the sdb above into a Google App Engine URL Fetch connection object.
>
> I'm a novice with Google App Engine
>
> Any specific help would be super appreciated in connecting a Amazon
> SImpleDB to a Java Servlet in Google App Engine.
>
> thanks
>
> On Apr 10, 7:10 am, deuce4 <[email protected]> wrote:
> > On Apr 9, 3:23 pm, deuce4 <[email protected]> wrote:
> >
> > > Is there any elegant way to access data stored in Amazon's Simple DB
> > > from a Google
>  application?
> >
> > > I tried using URLfetch, but failed.  Any ideas?
> >
> > I suppose I am new at this, and wasn't able to get the libraries
> > working.  Any chance of seeing an outline of the process from someone
> > who is knowledgable in accessing outside data?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>


-- 
Ikai Lan
Developer Programs Engineer, Google App Engine
http://googleappengine.blogspot.com | http://twitter.com/app_engine

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to