Calling Restful web service within a Restful Web Service
Good afternoon. It was not intended but it forced us to call a restful web service within a restful web service. For example RWS1 in projectA deployed on server1 is calling RWS2 in projectB deployed on server2. I just wanted to find what could be disadvantes/cons by doing this. Thanks Venkat -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2804750
RE: Behavior when no media type specified
Doh! I think I found the answer thread: http://restlet-discuss.1400322.n2.nabble.com/automated-conversion-from-java-object-to-json-td3584962.html Sorry for adding noise to the discussion board... -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2804771
RE: Series.getValuesAsArray throws null pointer
Hi Martin, I've just fixed this regression in SVN trunk. Note that it's better to use the c...@restlet.tigris.org mailing list to discuss such issues (or enter defect reports in Tigris.org tracket). Best regards, Jerome -- Restlet ~ Founder and Technical Lead ~ http://www.restlet.org Noelios Technologies ~ http://www.noelios.com -Message d'origine- De : Martin Svensson [mailto:msv...@gmail.com] Envoyé : jeudi 28 juillet 2011 05:36 À : discuss@restlet.tigris.org Objet : RE: Series.getValuesAsArray throws null pointer Some further digging. I think the problem lies in the subList method: public SeriesE subList(String name, boolean ignoreCase) { SeriesE result = createSeries(null); for (E param : this) { if (equals(param.getName(), name, ignoreCase)) { result.add(param); } } return result; } The createSeries(null) will result in a list that is not backed up by anything since createSeries will justt pass on null as delegate, and thus the later series.size() method will throw a null pointer exception. cheers, martin -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2805117 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2805196
Re: ClientResource leaves inactive thread
I'm not clear from the question if you're asking about the number of task threads as Tim has explained, or the number of http listener threads, for that use: Server httpServer = new Server(Protocol.HTTP, port); serviceComponent.getServers().add(httpServer); httpServer.getContext().getParameters().add(maxThreads, maxThreads); On Jul 27, 2011, at 2:02 PM, Tim Peierls wrote: You can set the pool size of the executor used by the TaskService with org.restlet.service.TaskService.setPoolSize. Or you can provide your own TaskService and override createExecutorService.to return an ExecutorService tuned exactly the way you want. --tim On Wed, Jul 27, 2011 at 8:14 AM, Klemens Muthmann al...@gmx.de wrote: Hi, I read several threads about this problem now (including this one) and still can't figure out how to solve the issues (My Restlet Version is 2.0.8). May someone point me to the relevant tutorial or show some code on how to increase the thread pool size on the RESTlet Server? Thanks and regards -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2804569 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2805287
RE: templates in ClientResource?
Hi Andrei, Thanks for creating the bug report. Here it is: http://restlet.tigris.org/issues/show_bug.cgi?id=1285 This looks like a serious one to fix ! Best regards, Jerome -- Restlet ~ Founder and Technical Lead ~ http://www.restlet.org/ http://www.restlet.org Noelios Technologies ~ http://www.noelios.com/ http://www.noelios.com De : Andrei Pozolotin [mailto:andrei.pozolo...@gmail.com] Envoyé : mercredi 29 juin 2011 20:36 À : Jerome Louvel Cc : Restlet Discuss; Restlet Code Objet : Re: templates in ClientResource? Jerome: should I file a bug for this? Thank you, Andrei Original Message Subject: templates in ClientResource? From: Andrei Pozolotin mailto:andrei.pozolo...@gmail.com andrei.pozolo...@gmail.com To: discuss@restlet.tigris.org Date: Tue 28 Jun 2011 12:38:03 PM CDT Hello; 1) all ClientResource() constructors do uri encoding; so this resource uri: uri : http://localhost:8181/volumes/{volume}/select/{select} becomes this reference inside the client resource: ref : http://localhost:8181/volumes/%7Bvolume%7D/select/%7Bselect%7D an when it gets into: org.restlet.engine.component.ComponentClientDispatcher protected void doHandle(Request request, Response response) { then the TemplateDispatcher does not see it as {} template any more and hence does not do attributes resolution; 2) what is the right way to use templates in ClientResource? thank you; Andrei. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2779550 dsMessageId=2779550 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2805322
Re: ClientResource leaves inactive thread
Oh ... that's probably what the original question was asking about. I just jumped reflexively on the phrase thread pool. Sorry... --tim On Thu, Jul 28, 2011 at 8:40 AM, Matt Kennedy stinkym...@gmail.com wrote: I'm not clear from the question if you're asking about the number of task threads as Tim has explained, or the number of http listener threads, for that use: Server httpServer = new Server(Protocol.HTTP, port); serviceComponent.getServers().add(httpServer); httpServer.getContext().getParameters().add(maxThreads, maxThreads); On Jul 27, 2011, at 2:02 PM, Tim Peierls wrote: You can set the pool size of the executor used by the TaskService with org.restlet.service.TaskService.setPoolSize. Or you can provide your own TaskService and override createExecutorService.to return an ExecutorService tuned exactly the way you want. --tim On Wed, Jul 27, 2011 at 8:14 AM, Klemens Muthmann al...@gmx.de wrote: Hi, I read several threads about this problem now (including this one) and still can't figure out how to solve the issues (My Restlet Version is 2.0.8). May someone point me to the relevant tutorial or show some code on how to increase the thread pool size on the RESTlet Server? Thanks and regards -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2804569 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2805348
RE: Server configuration problem - outbound root not configured
Once again you've been an enormous help. By removing the Context from the Application constructor, I've moved from having errors that I don't understand to having errors that I expected. I consider this a step in the right direction (Not sure what the Context is supposed to be doing anyway) Thanks again for your help! -- John Wismar Alldata Technology 916-478-3296 -Original Message- From: Martin Svensson [mailto:msv...@gmail.com] Sent: Wednesday, July 27, 2011 12:01 PM To: discuss@restlet.tigris.org Subject: RE: Server configuration problem - outbound root not configured I dont think this is a problem with the OAuthExtension (you can verify this by doing an arbitrary client request in a serverresource). The only thing I can think of is 1. Do you really need to pass a context to your AdRestApplication in the first place? I typically dont do that in my apps (although it might not make a difference) 2. The createInboundRoot() is inside the AdRestApplication right? sorry for not being of more assistance. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId =2804710 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2805383