Broken connection using Android client

2011-07-29 Thread Matt McMinn
I wrote a moderately complex server about 18 months ago based on Restlet 2.0 that has been happily serving data since then. I've recently needed to add some new features, and I'm running in to a problem with the new code. I've updated to Restlet 2.0.8 as well. For all requests to my new code

RE: Broken connection using Android client

2011-07-29 Thread Matt McMinn
I think I've fixed this problem by explicitly setting the connector helper in my client with: Engine.getInstance().getRegisteredClients().clear(); Engine.getInstance().getRegisteredClients().add(new HttpClientHelper(null)); I'm using the net client. So far it seems to have fixed

Re: ClientResource leaves inactive thread

2011-07-28 Thread Matt Kennedy
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);

Re: How-to for setting up Client PKI Cert based authentication?

2011-07-12 Thread Matt Kennedy
Have a look at this: http://restlet-discuss.1400322.n2.nabble.com/fine-grained-authorization-based-on-DN-X-509-td6444949.html Let me know if that answers the question for you... On Tue, Jul 12, 2011 at 2:16 PM, Kevin Pauli ke...@thepaulis.com wrote: This page talks about setting up Basic and

Re: how to use conditional get in restlet ?

2011-06-15 Thread Matt Kennedy
parameter. For example: http://www.example.com/people?age=over20 -Matt On Jun 15, 2011, at 4:08 PM, infoSyS wrote: I am currently designing an API using the restlet framework; Can anyone please give me a clue on how to use conditional GET requests in RESTlet ? what I mean is : lets say I have

Re: fine grained authorization based on DN/X.509

2011-06-07 Thread Matt Kennedy
be harder to re-use your code in other restlet applications later on. -Matt On Tue, Jun 7, 2011 at 6:31 AM, lambda daku lambdad...@gmail.com wrote: Thanks for the reply. I have few comments on your reply. Usually the certificate received at the server side has atleast 2 certificates - one

Re: fine grained authorization based on DN/X.509

2011-06-06 Thread Matt Kennedy
an LDAP to determine if the user can do what they are attempting or not. This is a good place to start research. I could have sworn that at one point Bruno Harbulot had posted a patch for a ClientCertAuthenticator.java to the issue tracker, but I have no clue what happened to it. -Matt On Mon

Re: fine grained authorization based on DN/X.509

2011-06-06 Thread Matt Kennedy
Sorry, forgot to include the link: http://wiki.restlet.org/docs_1.1/13-restlet/27-restlet/46-restlet.html On Mon, Jun 6, 2011 at 2:20 PM, Matt Kennedy stinkym...@gmail.com wrote: There are two steps here, authenticating the client cert, and authorizing the user, which correspond

Re: fine grained authorization based on DN/X.509

2011-06-06 Thread Matt Kennedy
And that was the wrong link, sorry: http://wiki.restlet.org/docs_2.0/13-restlet/27-restlet/46-restlet.html On Mon, Jun 6, 2011 at 2:21 PM, Matt Kennedy stinkym...@gmail.com wrote: Sorry, forgot to include the link: http://wiki.restlet.org/docs_1.1/13-restlet/27-restlet/46-restlet.html

Re: Using the simple framework in Restlet

2011-05-05 Thread Matt Kennedy
It should be as simple as having $RESTLET_HOME/lib/org.restlet.ext.simple.jar and $RESTLET_HOME/lib/org.simpleframework_N.N/org.simpleframework.jar on your classpath. On Thu, May 5, 2011 at 7:20 AM, Steve Ferris steve.fer...@forgerock.comwrote: Hi, I cannot work out how to tell my standalone

Re: Fine grained authorization

2011-04-19 Thread Matt Kennedy
for example. That way your annotated methods don't have to have authorization code in them, they simply won't be called if the user isn't allowed to call them by the MethodAuthorizer -Matt On Fri, Apr 15, 2011 at 1:57 AM, Ishaaq Chandy ish...@gmail.com wrote: Hi all, Am using Restlet 2.0.6. Trying

Re: Auditing function

2011-04-12 Thread Matt Kennedy
I've done something similar in the past. Rather than rely on the restlet access logging service, I collected all the data I needed in an object as the request was processed. After the request completed, I spun off another thread to write to the log object to the database. If the database wasn't

Re: Retrying requests

2010-05-05 Thread Matt Kennedy
I usually do this sort of thing in the ServerResource itself. Just wrap the problematic lines in the code you just provided only replace the call to super.handle with whatever calls throw the exception. Are you doing something in particular that makes this a bad strategy? -Matt On May 5

Re: Retrying requests

2010-05-05 Thread Matt Kennedy
. It is usually fairly easy to change around your inheritance hierarchy and change some method names, especially if you have a nice refactoring helper like Eclipse. -Matt On May 5, 2010, at 9:06 PM, Jean-Philippe Steinmetz wrote: I just tested that scenario out and it works. Unfortunately though

Re: What to do about sessions?

2010-04-20 Thread Matt Kennedy
specific advice for creating a subclass of Authenticator that can get the Google account identity? Specifically a way to use a restlet to write the login example given on this link: http://code.google.com/appengine/docs/java/users/overview.html -Matt On Apr 20, 2010, at 11:37 AM, dj wrote: Hey

Re: Representation for multiple types?

2010-01-24 Thread Matt Kennedy
=byName scope=prototype class=com.restlets.MyResource property name=map ref=map/ /bean ... /beans On Fri, Jan 22, 2010 at 3:07 PM, Matt Kennedy stinkym...@gmail.com wrote: I'm not a Spring user, so maybe that's why it isn't clear to me what you're asking. Can

Re: Representation for multiple types?

2010-01-22 Thread Matt Kennedy
I can't remember what 1.1.6's API looks like, but I do something like this with the 2.0 API. Basically, in the Resource's constructor, I use someting like: getVariants().add(new MyXMLRepresentation(this)) getVariants().add(new MyJSONRepresentation(this)) Each of those My* classes are a

Re: Representation for multiple types?

2010-01-22 Thread Matt Kennedy
22, 2010 at 1:27 PM, Matt Kennedy stinkym...@gmail.com wrote: I can't remember what 1.1.6's API looks like, but I do something like this with the 2.0 API. Basically, in the Resource's constructor, I use someting like: getVariants().add(new MyXMLRepresentation(this)) getVariants().add(new

Re: Applying multiple security scheme's to a uri

2010-01-11 Thread Matt Kennedy
() to specify the next resource in the chain, either an instance of an Authorizer, or your restlet usually. -Matt On Jan 11, 2010, at 9:44 AM, webp...@tigris.org wrote: Hello, Given the user-agent property, is it possible to apply different security scheme's to a given uri? i.e. when using

Re: Redirection?

2009-12-28 Thread Matt Kennedy
the entity to be some html that will do your refresh to the new URL, plus the countdown. Be careful if you choose to go with 301 or 302 as the response code, read IETF RFC 2626 for details. -Matt -- http://restlet.tigris.org/ds/viewMessage.do

Re: Redirection?

2009-12-28 Thread Matt Kennedy
with a refresh directive. You can definitely use it to get your delayed redirect effect. -Matt On Dec 28, 2009, at 2:18 PM, Rob Heittman wrote: RFC 2616 :-) http://www.ietf.org/rfc/rfc2616.txt (2626 is the Y2K RFC) Sopasakis -- as HTTP itself doesn't have a means of specifying a delay before

Re: how to set up client certificate in restlet 1.1.4 for HTTPS?

2009-12-16 Thread Matt Kennedy
Here's the server code I use, my keys/certs may be set up a little differently from yours though, but this code supports client cert handshakes using browser clients and curl clients. In this case, the CAs that sign the client certs are stored in /etc/pki/ca.jks along with the CA that signed that

Re: Unauthenticated access returns 204.

2009-12-09 Thread Matt Kennedy
very well and I really like the new security architecture, I'm just trying to figure out if this particular aspect of the behavior is as simple as it could be. Thanks for your time, Matt -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId

Re: Unauthenticated access returns 204.

2009-12-08 Thread Matt Kennedy
. I'm going to get a checkout of svn tomorrow and I'll see if I can make this change without breaking anything and submit the code if everything works OK. -Matt On Dec 5, 2009, at 8:16 AM, Stephan Koops wrote: Hi Matt, maybe the reason is, that the status is set to 204

Unauthenticated access returns 204.

2009-12-04 Thread Matt Kennedy
implementation? Thanks, Matt The following illustrates the problem (in Groovy): import org.restlet.*; import org.restlet.data.*; import org.restlet.security.Authenticator; import org.restlet.representation.*; class TestAuthenticator extends Authenticator { @Override public TestAuthenticator

Re: file extension changes on PUT

2009-11-19 Thread Matt Kennedy
Thierry, This work-around is perfect for my current needs, thanks. -Matt On Nov 19, 2009, at 4:29 AM, Thierry Boileau wrote: Hello Matt, the current directory is based on a mapping between extensions and media types (see the javadoc of the method MetadataService#addCommonExtensions

Re: Router in servelet not routing to correct resource

2009-10-22 Thread Matt Stromske
again,br Mattbr br Matt Kennedy wrote: blockquote cite=mid:682073e5-25b8-47b9-970e-182d4990e...@gmail.com type=cite pre wrap=I'm not 100% sure based on that description, but try setting your second router line to: router.attach(/test1) On Oct 21, 2009, at 1:19 PM, Matt Stromske wrote

Router in servelet not routing to correct resource

2009-10-21 Thread Matt Stromske
/*/url-pattern When I attempt to go to /gpsh/test1, I end up going to the default route. Any idea how I can get the routing corrected? Thanks, Matt -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2409873

Re: Router in servelet not routing to correct resource

2009-10-21 Thread Matt Kennedy
I'm not 100% sure based on that description, but try setting your second router line to: router.attach(/test1) On Oct 21, 2009, at 1:19 PM, Matt Stromske wrote: Hello, I can't figure out why my router isn't routing to the correct resource. It always seems to route to the default route

Client (HTTP) and query encoding of space characters

2009-10-01 Thread Matt Stromske
Hello, I'm using a Client with the HTTP protocol. I'm sending a GET with a query and I noticed that space characters are encoded to + (plus) signs. I would like them encoded to %20 instead. Is there a way to do this? Thanks, Matt -- http

Extracting XML from Representation from POST

2009-09-22 Thread Matt Stromske
names/values from the Form? Thanks, Matt -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2397624

Setting POST parameters

2009-09-11 Thread Matt Stromske
Hello, How do you set POST parameters in the body of the message? Thanks, Matt -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2393357

RE: Possible GAE Client issue.

2009-06-30 Thread Matt
Thanks for your response. Bug report added. Cheers, Matt jlouvel wrote: Hi guys, By default, we leverage the HttpURLConnection class which has been reimplemented on top of URLFetcher so this should work. Thierry will finish his work on automated Restlet editions next week or so

GAE + Restlet issue

2009-06-29 Thread Matt
: Unable to start the Restlet # E 06-29 07:44PM 54.635 org.restlet.engine.ChainHelper handle: The org.restlet.Component class has no Restlet defined to process calls. Maybe it wasn't properly started. Any ideas? Or could this be a possible bug? Thanks in advance, Matt -- View this message

Designing restlet applications

2009-06-15 Thread Matt
, UserEditResource.class) I don't really want to d this if I can avoid it. Any suggestions on how I can avoid doing the above? Thanks in advance, Matt -- View this message in context: http://n2.nabble.com/Designing-restlet-applications-tp3084513p3084513.html Sent from the Restlet Discuss mailing list

Setting Status from the write method of a Representation

2009-06-12 Thread Matt Kennedy
In order to support streaming writes of large ResultSets from a database, I am deferring execution of my query until the write() method of my Representations. The resource is responsible for configuring the query string and handling connection issues with the DB, but if there is a problem with

Re: restlet server NoSuchMethodError

2009-06-05 Thread Matt Stromske
I just realized I am using an old version of Tomcat (4.1) and the servlet spec for that version of Tomcat does not have support the 'getLocalAddr' method. Darn it. Stephan Koops wrote: Hi Matt, looks like that the JARs are from different Restlet versions. best regards Stephan

Re: Restlet 2.0 M3 released

2009-05-28 Thread Matt
to the file in safari I get a 405. If I revert back to 1.2-M2 again these problems go away. Matt PS: Thanks for all your hard work. Great product. jlouvel wrote: Hi all, Restlet 2.0 M3 has just been kicked out: http://blog.noelios.com/2009/05/27/restlet-2-0-m3-released/ We hope

Freemarker CLAP and jarfiles.

2009-05-22 Thread Matt
, MediaType.TEXT_HTML); } } And in my code I access templates like this class UsersResource extends ServerResource { @Get() public Representation doGet() { return Freemarker.INSTANCE.getTemplate(users/ui/users); } } Any ideas about what I might be doing wrong? Thanks in advance, Matt PS

Re: Tomcat not shutting down with Restlet

2009-05-14 Thread Matt Stromske
a servlet.  Anyway, the server wasn't getting shut down when Tomcat was shutting down.  So I simply removed it.  Thanks for all the advice. Matt Jerome Louvel wrote: Hi Matt, One way to check from where the issue comes is to trim your application to the strict minimum and check if you stil

Freemarker extension minor addition

2009-04-27 Thread Matt
could potentially respond with a 404 or whatever. So could we have a method like isTemplateLoaded() or something similar added to the TemplateRepresentation class to support this? Cheers, Matt -- View this message in context: http://n2.nabble.com/Freemarker-extension-minor-addition-tp2729880p2729880

Re: securing the whole application

2009-04-27 Thread Matt
, Matt João Pereira wrote: Hi, How to secure all the application instead of each route? if this seems to be a newbie question it's because I'm a newbie :) -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1946647

RE: File upload - as stream

2009-03-10 Thread Matt
Thanks, for some reason I missed that when looking at the apache fileupload api. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1301927

File upload - as stream

2009-03-09 Thread Matt Rutherford
Hi. Is there a way to receive a file element from an html form without storing it to disk? I will be storing the file directly into a DB so no need to have it on disk anywhere. Would be nice to just stream bytes to the LargeObject.write() Postgres JDBC method. Sorry if this is a silly

help with spring/servlet integration and applicaiton modificaton

2009-01-04 Thread matt
where things get switched up. I obviously and more sure on the correct binding order. If anybody has advice or an example from their own work that does this I am super appreciative! matt -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId

RE: Re: question about spring example and uri extension parsing/best practices.

2008-12-23 Thread matt
have a goal of deploying all through a servlet container with jetty or tomcat so hopefully I can get it all working there. Thanks to you guys for the help. It was a great stepping point!!! matt -- http://restlet.tigris.org/ds/viewMessage.do

question about spring example and uri extension parsing/best practices.

2008-12-22 Thread matt
Thanks in advance.. matt -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=990197

Re: Static files: no available connector for FILE

2008-11-16 Thread Matt
keke iamkeke at gmail.com writes: Have you add FILE protocol into your Component? Like component.getClients.add(Protocol.FILE) On Sun, Nov 16, 2008 at 12:54 PM, Matt restdev at randomcreation.com wrote: WARNING: No available server connector supports the required protocols: FILE

Static files: no available connector for FILE

2008-11-15 Thread Matt
WARNING: No available server connector supports the required protocols: FILE . Please add the JAR of a matching connector to your classpath. Which jar file contains the connector implementation for the FILE protocol? Here is what I'm including: org.restlet.jar com.noelios.restlet.jar

Re: restlet noob: getting the CLAP (right)

2008-07-14 Thread Matt Brennan
think the need to add extra client connectors and such was exactly what drove that improvement to ServerServlet. Rob, thanks for your help. the switch to the milestone (1.1) builds did the trick cheers, matt

restlet noob: getting the CLAP (right)

2008-07-09 Thread Matt Brennan
Hi there, I am just hacking up my first restlet app. I'm really impressed so far. In addition to some resources served RESTfully, i'd also like to serve some static comment of the classpath... and so have been trying a bunch of things to expose a dir on the classpath without success so

Re: restlet noob: getting the CLAP (right)

2008-07-09 Thread Matt Brennan
Forgot to add: in the war, the images directory sits at the top like: + WEB-INF +++ WEB-INF/web.xml + images +++ images/ajax-loader.gif cheers, matt (sorry for a few typos in the post!)

Re: restlet noob: getting the CLAP (right)

2008-07-09 Thread Matt Brennan
Rob Heittman rob.heittman at solertium.com writes: Be sure to do this in your Component constructor or another appropriate spot: getClients().add(Protocol.CLAP); Rob, thanks very much for your reply. At you'll note, I am extending Application and launching this with ServletServlet. That

RE: Re: StreamClientCall and FH exhaustion

2008-03-27 Thread Matt Reynolds
[mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2008 2:23 PM To: discuss@restlet.tigris.org Subject: Re: StreamClientCall and FH exhaustion Thanks Jerome. Matt, could you see if that solves your problem as well? If possible, can you attach your test case to 439? On Tue, Mar 25, 2008 at 5

StreamClientCall and FH exhaustion

2008-03-17 Thread Matt Reynolds
, with a null check and then a call to isClosed? Anyway, please let me know if I debugged this path correctly and, if possible, what I should do to get around this. Thanks, Matt

Possible bug?

2007-11-20 Thread Matt Allen
, but they alluded to a fix that was implemented. Is this the same bug? Can I solve it (correctly) by simply removing the call to close in SimpleProtocolHandler? Any feedback would be appreciated. Thank you, Matt

posting xml

2007-08-06 Thread matt
: Unable to complete the HTTP call due to a communication error with the remote server. socket closed. Thanks, matt