google-cloud-endpoints

How to check service-to-service authentication in Google Cloud Endpoints?

陌路散爱 提交于 2019-12-06 12:05:50
问题 I'm trying to split a monolith Google App Engine application (using Python & standard environment) into several services within one application. Default service is calling API implemented using the Endpoints framework in another service. Everything works nicely except that I don't understand how to correctly check authentication of the default service (and make it work both in local development server and in production). To call the service I'm using google-api-python-client and default

IllegalArgumentException: Deserializing generated objects with @JsonString annotation

左心房为你撑大大i 提交于 2019-12-06 11:01:01
问题 Long values in Objects generated by Cloud Endpoints are annotated with @JsonString. This causes a IllegalArgumentException when deserializing those Objects using a GsonFactory. This is the stacktrace: Caused by: java.lang.IllegalArgumentException: number type formatted as a JSON number cannot use @JsonString annotation [key updated, field private java.lang.Long com.google.api.services.timetable.model.Lesson.updated] at com.google.common.base.Preconditions.checkArgument(Preconditions.java:119)

Making calls from the Javascript client library with @Named and unnamed parameters makes no sense

邮差的信 提交于 2019-12-06 10:44:42
问题 I have a Cloud Endpoints method that looks like this: //HTTP POST @ApiMethod(name = "hylyts.insert") public Hylyt insertHylyt(@Named("url") String url, Hylyt hylyt, User user) throws OAuthRequestException{ log.info("Trying to save hylyt '"+hylyt+"' with id '"+hylyt.getId()); if (user== null) throw new OAuthRequestException("Your token is no good here."); hylyt.setArticle(getArticleKey(url, user)); ofy().save().entity(hylyt); return hylyt; } I call it from the Javascript Client Library using

Error connecting android app to Google Cloud Endpoints: could not find class

别说谁变了你拦得住时间么 提交于 2019-12-06 10:36:05
I have built an API with Google Cloud Endpoints and I am trying to connect to it writing an Android application. I followed the following tutorial: https://developers.google.com/appengine/docs/java/endpoints/consume_android So, I added the content of the jar on my "src" folder, I copied the listed libraries to lib and I added the code. When I tried to start the application, it crashed with the following error: 02-26 12:19:52.874: E/dalvikvm(17558): Could not find class 'com.google.api.services.utenteendpoint.Utenteendpoint$Builder', referenced from method com.example.androidgcetest

golang go-endpoints Session using gorilla-toolkit

一世执手 提交于 2019-12-06 10:23:27
问题 I'm trying to implement Session handling and combine it with the go-endpoints package ! The package that i use to handle the session is Gorilla Sessions (github.com/gorilla/sessions), i would like some help.. I'm able to store a cookie to the client .. and when i call the endpoints is can see that the cookie is sent to the server. The problem while i try to get the Session values from the Session storage while the api is called, i cant get threw to the cookie .. it seams that the endpoints

How to access local Cloud Endpoints API from mobile device

久未见 提交于 2019-12-06 08:38:08
问题 I want to access my Cloud Endpoints API hosted on my local dev machine from an Android app running on a mobile device I use for testing. My device can access my dev machine by IP address. I passed --host=192.1.168.101 to the App Engine launcher so that my local App Engine instance binds to the IP address. Although I can access the App Engine instance from 192.168.1.101, I get a 404 when my app makes an API call. I noticed that going to http://192.168.1.101:9080/_ah/api/explorer/ does not show

Android Studio: IncorrectOperationException when 'Add as Library' is clicked whilst trying to configure Google Apps Endpoints client libraries

♀尐吖头ヾ 提交于 2019-12-06 07:59:45
问题 I am trying to generate and use the android client libraries for a Python google app engine project following this guide https://developers.google.com/appengine/docs/python/endpoints/consume_android Everytime I get to this step Select the library you just added, right-click, then select Add As Library to your project. I get the following exception: IncorrectOperationException: Must not change document outside command or undo-transparent action. I'm new to Android Studio but can't seem to find

Mobile Backend handle continuous queries in background

两盒软妹~` 提交于 2019-12-06 07:41:39
I'm using Mobile Backend Starter in my app, and I'm able to continuously receive data using this code: CloudCallbackHandler<List<CloudEntity>> handler = new CloudCallbackHandler<List<CloudEntity>>() { @Override public void onComplete(List<CloudEntity> results) { Logger.log(MainActivity.this, "onComplete"); } @Override public void onError(IOException e) { Logger.log(MainActivity.this, e); } }; CloudQuery cq = new CloudQuery("Test"); cq.setLimit(50); cq.setSort(CloudEntity.PROP_UPDATED_AT, Order.DESC); cq.setScope(Scope.FUTURE_AND_PAST); getCloudBackend().list(cq, handler); This all works fine

Can I return a generic in Google Cloud End Point

别说谁变了你拦得住时间么 提交于 2019-12-06 05:31:38
问题 When I return a generic the end point api file seems to disappear. Sample code is pasted. @ApiMethod public RestResponse<Container> testGeneric() { Container container = new Container(); container.testLong = (long)4345; container.testDate = new Date(); container.testString = "sathya"; container.testDouble = 123.98; container.testInt = 123; RestResponse<Container> response = new RestResponse<Container>(); response.t = container; return response; } Is this a bug in endpoint and is such a thing

App engine + endpoint generating a string instead of byte array as method argument

邮差的信 提交于 2019-12-06 04:46:42
I have GAE + endpoints working between an Android client and app engine backend. I'm now at the point where I want to store a small image as a Blob datatype using JDO. I have the following two methods in my model's backend: public byte[] getPicture() { if (picture == null) { return null; } return picture.getBytes(); } public void setPicture(byte[] bytes) { this.picture = new Blob(bytes); } However, when I generate my endpoint for my Android client, the setPicture(byte[] bytes) method signature gets transformed to setPicture(String bytes). Is that a bug or intended? If intended, how am I