Hello,

I am using eclipse+google plugin to develop a simple API with Cloud 
Endpoints. I just have a member entity with JDO annotations, and I 
generated the Endpoint class.


My Member entity only has 2 fields: the Long id and String name.
I would like to use a getMemberByName(String name) method to retrieve 
easily a member instead of having to know its id.

So I added this method to the Endpoint class generated:


@SuppressWarnings({“unchecked”})



@ApiMethod(name = “getMemberByName”,path=”/member/byname/{name}”)

public List getMemberByName(@Named(“name”) String name) {

PersistenceManager mgr = getPersistenceManager();

List candidates = null;

Query q=mgr.newQuery(Member.class);

q.setFilter(“name == nameParam”);

q.declareParameters(“String nameParam”);

try {

candidates = (List) q.execute(nom);

} finally {

mgr.close();

}

return candidates;

}


When I call this API method and give it a name parameter (which does exist 
in my datastore) it sends me nothing back but a 404 error. 

I thought maybe you could tell me if my code got any error, I’m not an 
expert with JDO.


Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.

Reply via email to