tag:blogger.com,1999:blog-8661585878226033328.post1277574751298538912..comments2023-11-16T01:04:05.703-08:00Comments on Frode Nilsen's Techblog: A Google Cloud Endpoints Hello-World example in Java using EclipseFrode Nilsenhttp://www.blogger.com/profile/11779675194677466654noreply@blogger.comBlogger12125tag:blogger.com,1999:blog-8661585878226033328.post-7966485430812156012014-09-16T02:58:30.070-07:002014-09-16T02:58:30.070-07:00Milos: Try specifying the endpoint name manually u...Milos: Try specifying the endpoint name manually using @ApiMethod over getThing(). Maybe Google have changed the spec since I wrote this blog, I don't know. <br /><br />Other than that I suggest you ask the question at stackoverflow.com as well - might get a lot better answers quicker there! Frode Nilsenhttps://www.blogger.com/profile/11779675194677466654noreply@blogger.comtag:blogger.com,1999:blog-8661585878226033328.post-40098029181777181392014-09-14T04:33:37.754-07:002014-09-14T04:33:37.754-07:00Hi i have problem with this API here si my code
p...Hi i have problem with this API here si my code<br /><br />package com.example;<br /><br />import com.google.api.server.spi.config.Api;<br />import com.google.api.server.spi.config.Named;<br /><br />@Api(name = "example", version="v1")<br />public class HelloWorldEndpoint {<br /> <br /> public Container getThing() {<br /> Container c = new Container();<br /> c.Text = "Hello world!";<br /> return c;<br /> }<br /> <br /> public Container insertContainer(Container c, @Named("name")int name){<br /> Container cr = new Container();<br /> cr.Text = "Hello "+ name;<br /> <br /> return cr;<br /> }<br /><br /><br /> public class Container {<br /> public String Text;<br /> }<br /> <br />}<br /><br />and when I call http://localhost:8888/_ah/api/example/v1/container/67 i got Error 404<br />and here is header<br />Remote Address:127.0.0.1:8888<br />Request URL:http://localhost:8888/_ah/api/example/v1/container/67<br />Request Method:GET<br />Status Code:404 Not Found<br />Request Headersview source<br />Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8<br />Accept-Encoding:gzip,deflate,sdch<br />Accept-Language:en-US,en;q=0.8,bs;q=0.6,hr;q=0.4,sl;q=0.2,sr;q=0.2<br />Cache-Control:max-age=0<br />Connection:keep-alive<br />Host:localhost:8888<br />User-Agent:Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36<br />Response Headersview source<br />Cache-Control:no-cache<br />Content-Length:83<br />Content-Type:text/html; charset=iso-8859-1<br />Date:Sun, 14 Sep 2014 11:29:18 GMT<br />Expires:Fri, 01 Jan 1990 00:00:00 GMT<br />Server:Development/1.0<br /><br />using chrome. So any help is welcome :)Anonymoushttps://www.blogger.com/profile/05246555078259313911noreply@blogger.comtag:blogger.com,1999:blog-8661585878226033328.post-41535134795005931502014-04-03T00:06:49.033-07:002014-04-03T00:06:49.033-07:00Really? You had to use v2 of JDA/JPO? I had that p...Really? You had to use v2 of JDA/JPO? I had that problem with Jersey, but not with GCE. Own blog entry regarding Jersey: <br />http://www.nilzorblog.com/2013/02/a-helloworld-example-of-jersey-rest.html<br /><br />v1 works well enough - I've actually got an app in production using that (www.chineseshowdown.com) . There's a couple of features I miss though, and you'll have a hard time getting support if you ever need it.Frode Nilsenhttps://www.blogger.com/profile/11779675194677466654noreply@blogger.comtag:blogger.com,1999:blog-8661585878226033328.post-79547189841154167632014-03-31T04:54:08.280-07:002014-03-31T04:54:08.280-07:00Thanks... same here.. I've been trying to unde...Thanks... same here.. I've been trying to understand how to create REST service on GAE for almost 2 days. Read pages of documentation, tried different ways, tutorials...but nothing. This one finally works well, it's well exlpained and simple :D<br />Just one thing. I had 404 thrown always, after a while I realized the problem is that my JDO/JPA version was v2... I changed it to v1 and finally worked.Davide Nerihttps://www.blogger.com/profile/07129244516000484779noreply@blogger.comtag:blogger.com,1999:blog-8661585878226033328.post-45351601972908119322014-03-26T11:53:02.706-07:002014-03-26T11:53:02.706-07:00Thank you!!! I killed a lot of time on this. It is...Thank you!!! I killed a lot of time on this. It is a first example that actually works!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8661585878226033328.post-31309978055582528332014-03-18T22:53:37.949-07:002014-03-18T22:53:37.949-07:00I searched everywhere for a clean working example ...I searched everywhere for a clean working example and failed to find it till now. <br />Thank you sirBashir Partovihttps://www.blogger.com/profile/00868236273989645081noreply@blogger.comtag:blogger.com,1999:blog-8661585878226033328.post-86204029920460781452014-02-04T21:08:40.032-08:002014-02-04T21:08:40.032-08:00Really good blog:)I felt this very helpful,,,Even ...Really good blog:)I felt this very helpful,,,Even I faced same problem by trying Rest service in GAE but it didnt work ,then I choosed End points as last solution it worked for me Thank you.Anonymoushttps://www.blogger.com/profile/14189781120910627229noreply@blogger.comtag:blogger.com,1999:blog-8661585878226033328.post-45355548946356693962013-06-01T20:57:46.409-07:002013-06-01T20:57:46.409-07:00http://ido-green.appspot.com/CloudEndpoints/CloudE...http://ido-green.appspot.com/CloudEndpoints/CloudEndpointsWebBlogPost.html<br /><br />Read this tutorial.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8661585878226033328.post-82320385201294473842013-05-29T07:06:39.794-07:002013-05-29T07:06:39.794-07:00If you run "curl -i" you should get full...If you run "curl -i" you should get full header with correct response code. But which client to use is pretty much a personal prefefrence. Fiddler2 and "Invoke-RestMethod" in PowerShell are two other options<br />Frode Nilsenhttps://www.blogger.com/profile/11779675194677466654noreply@blogger.comtag:blogger.com,1999:blog-8661585878226033328.post-44927816391371531282013-05-26T05:14:16.081-07:002013-05-26T05:14:16.081-07:00Its working finally! :) As seen above, i had initi...Its working finally! :) As seen above, i had initialised test obj to null and so there was a NullPointerException which curl did not show but the APIs explorer showed.<br /><br />Suggest people to test the APIs on the APIs explorer instead of curl (which shows 404 for every error )Anonymoushttps://www.blogger.com/profile/11463819923072529231noreply@blogger.comtag:blogger.com,1999:blog-8661585878226033328.post-41343537591010943342013-05-26T03:02:34.513-07:002013-05-26T03:02:34.513-07:00Thanks so much for this tutorial! It has really he...Thanks so much for this tutorial! It has really helped me a lot and hopefully lot of GAE beginners.<br /><br />I followed all your suggestions but somehow i still get 404 errors. Here is a sample of my code and .api file. Please help me if you can.<br /><br />@Api (name="Myapp", version="v1")<br />public class TestEndpoint {<br /> private static PersistenceManager getPersistenceManager() {<br /> return PersistenceManagerUtil.get().getPersistenceManager();<br /> }<br /> <br /> public Test insert(@Named("username") String username, @Named("password") String password){<br /> Test test=null;<br /> test.setUsername(username);<br /> test.setPassword(password);<br /> <br /> PersistenceManager pm = getPersistenceManager();<br /> pm.makePersistent(test);<br /> pm.close();<br /> return test;<br /> } <br />}<br /><br />.api file is as follows<br /><br />"Myapp.testEndpoint.insert" : {<br /> "path" : "test/{username}/{password}",<br /> "httpMethod" : "POST",<br /> "scopes" : [ ],<br /> "audiences" : [ ],<br /> "clientIds" : [ ],<br /> "rosyMethod" : ".TestEndpoint.insert",<br /> "request" : {<br /> "parameters" : {<br /> "username" : {<br /> "type" : "string",<br /> "required" : true<br /> },<br /> "password" : {<br /> "type" : "string",<br /> "required" : true<br /> }<br /> },<br /> "body" : "empty"<br /> },<br /> "response" : {<br /> "body" : "autoTemplate(backendResponse)"<br /> }<br /> }<br /> }Anonymoushttps://www.blogger.com/profile/11463819923072529231noreply@blogger.comtag:blogger.com,1999:blog-8661585878226033328.post-19855808855875316142013-02-19T15:21:49.090-08:002013-02-19T15:21:49.090-08:00really congratulations for your tutorial !
..Goog...really congratulations for your tutorial !<br /><br />..Google is often too simple into his documentation and tutorials offered .. if we see that most of GDG, GTUG, Hackathon and other are repetitive with exercises posed by Google, the level of detail of your development is really important..<br /><br />best regards<br />@Mlaynes<br />http://mlaynessanchez.blogspot.com<br />Miguel Angel Laynes Sanchezhttps://www.blogger.com/profile/05138365926545966434noreply@blogger.com