Re: control logging in restlet 2.1

2013-02-08 Thread Bjorn Roche
# File Logging java.util.logging.FileHandler.pattern = %h/myApp.log java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter java.util.logging.FileHandler.level = INFO # Console Logging java.util.logging.ConsoleHandler.level = ALL On Feb 8, 2013, at 12:30 PM, Bjorn Roche wrote: > I am hav

Re: control logging in restlet 2.1

2013-02-08 Thread Bjorn Roche
-- > Daniele Dellafiore > http://danieledellafiore.net > > -- > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3048141 - Bjorn Roche http://www.xonami.com Audio Collaboration http://blog.bjornroche.com @xonamiaudio -

Re: Posting files without writing them to disk

2012-10-08 Thread Bjorn Roche
e.printStackTrace(); > } catch (IOException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } catch (NoSuchAlgorithmException e) { > // TODO Auto-generated catch block >

Posting files without writing them to disk

2012-10-06 Thread Bjorn Roche
} catch (NoSuchAlgorithmException e) { // TODO Auto-generated catch block e.printStackTrace(); } - Bjorn Roche http://www.xonami.com Audio Collaboration http://blog.bjornroche.com

Re: oath server/protected resource

2012-10-01 Thread Bjorn Roche
On Sep 30, 2012, at 6:48 PM, Bjorn Roche wrote: > Kristoffer, > > Thanks for your feedback. You ask what parts of the documentation need work, > and let me just show you how many stumbling blocks there are by showing you > where I am now: > > > Your fix of removin

Re: oath server/protected resource

2012-09-30 Thread Bjorn Roche
orks, with snippets taken from the live working code, rather than just stuff made up on the spot for the sake of the docs. I hope that helps clarify where I am coming from. bjorn - Bjorn Roche http://www.xonami.com Audio Collaboration http://blog.bjorn

Re: oath server/protected resource

2012-09-30 Thread Bjorn Roche
On Sep 27, 2012, at 11:35 PM, Bjorn Roche wrote: > SAMPLE CODE > -- > > So I tried downloading the sample code and it's hard to know where to begin. > After digging through the code I figured out what some working URLs might be, > but eventually I get t

Re: oath server/protected resource

2012-09-28 Thread Bjorn Roche
hard. Maybe you can help me produce a simple working example, and I can provide you some documentation for it? bjorn - Bjorn Roche http://www.xonami.com Audio Collaboration http://blog.bjornroche.com -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3011015

oath server/protected resource

2012-09-27 Thread Bjorn Roche
It /seems/ like this could be made to work by changing references to this server to a constant and making a note in a readme that the user should change that constant to something (probably localhost), which I'm going to try,

Re: Handling exceptions/errors when using Restlet for Client and Server....

2012-07-10 Thread Bjorn Roche
iscuss mailing list archive at Nabble.com. > > -- > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2982701 - Bjorn Roche http://www.xonami.com Audio Collaboration http://blog.bjornroche.com -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2982833

Oauth status and instructions

2012-07-05 Thread Bjorn Roche
27;s not clear how I would go about integrating it (the docs are... not very readable). Before I go about making a major change to my API, I'd like to better understand to what extent server-side oauth 2.0 is supported. Can someone comment on this? bjorn -

Re: Restlet Resources

2012-04-24 Thread Bjorn Roche
at Nabble.com. > > -- > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2951527 - Bjorn Roche http://www.xonami.com Audio Collaboration http://blog.bjornroche.com -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2951531

Re: Content Range with Output Representation

2012-04-20 Thread Bjorn Roche
).openStream(); >> r = is.read(); >> goOn = (r == -1); >> } else { >> goOn = false; >> } >> } >> >> return r; >> } >>

Re: Content Range with Output Representation

2012-04-19 Thread Bjorn Roche
On = (r == -1); > } else { > goOn = false; > } > } > > return r; > } > } > > Then, I simple return the InputRepresentation: > return new InputRepresentation(new CompositeInputStream(urls))

Content Range with Output Representation

2012-04-17 Thread Bjorn Roche
if( amt != s ) throw new IOException( "Error reading requested data: " + amt + " : " + s ); } } }

Re: Unsupported Media Type (415)

2012-04-13 Thread Bjorn Roche
t; ------ > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2948001 - Bjorn Roche http://www.xonami.com Audio Collaboration http://blog.bjornroche.com -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2948083

Sharing Jetty (Restlet and Play)

2012-04-12 Thread Bjorn Roche
elper.html#getWrappedServer() Nor can I figure out a way to pass a jetty server to restlet when initializing. Am I missing something? is there another way to do this? Thanks, bjorn ----- Bjorn Roche http://www.xonami.com Audio Collaboration http://blog.bjor

Re: Content Range with Output Representation

2012-04-11 Thread Bjorn Roche
On Apr 11, 2012, at 2:14 PM, Bjorn Roche wrote: > > On Apr 11, 2012, at 1:50 PM, Thierry Boileau wrote: > >> Hi Bjorn, >> >> that's right, I primarily use the restlet 2.1 version, which does not >> support this constructor I think. I'm not sure this

Re: Content Range with Output Representation

2012-04-11 Thread Bjorn Roche
On Apr 11, 2012, at 2:14 PM, Bjorn Roche wrote: > > On Apr 11, 2012, at 1:50 PM, Thierry Boileau wrote: > >> Hi Bjorn, >> >> that's right, I primarily use the restlet 2.1 version, which does not >> support this constructor I think. I'm not sure this

Re: Content Range with Output Representation

2012-04-11 Thread Bjorn Roche
at >> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) >>at java.lang.Thread.run(Thread.java:680) >> >> thanks, I try to reproduce this error. Or, if may ask you, can you provide a >> reproductible sample test

Re: Content Range with Output Representation

2012-04-11 Thread Bjorn Roche
readPoolExecutor.java:908) >at java.lang.Thread.run(Thread.java:680) > > thanks, I try to reproduce this error. Or, if may ask you, can you provide a > reproductible sample test code? > > Best regards, > Thierry Boileau > > - &

Re: Content Range with Output Representation

2012-04-11 Thread Bjorn Roche
at org.restlet.engine.io.BioUtils$2.run(BioUtils.java:394) at org.restlet.service.TaskService$1$1.run(TaskService.java:130) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Threa

Content Range with Output Representation

2012-04-10 Thread Bjorn Roche
ion( "Error reading requested data: " + amt + " : " + s ); } } } - Bjorn Roche http://www.xonami.com Audio Collaboration http://blog.bjornroche.com -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2946885

Re: XStream and time formats

2012-04-06 Thread Bjorn Roche
st posted here, I thought > I would post the solution. Also, it would be nice if there was an easier > wayto change restlet converters since that was another hoop I had to jump > through in figuring this out. > > bjorn > > ---

RE: XStream and time formats

2012-03-20 Thread Bjorn Roche
I still don't know what the difference between my test and server environments was, but for whatever reason on the server my persistence system was storing my Date objects as java.sql.timestamp and my loca environment was using java.util.Date. The problem, then is that ISO8601DateConverter only

RE: XStream and time formats

2012-03-19 Thread Bjorn Roche
So I followed the instructions on that thread. I added JodaTime to my project and used new ISO8601DateConverter(), as suggested by xstream. It's a bit verbose, but it works... locally, it does not work when I deploy to the server. Obviously I have some difference between my deployment environmen

XStream and time formats

2012-03-18 Thread Bjorn Roche
My xstream restlet code used to output time/date formats in ISO 8601. Right now I seem to be getting dates like this: 2012-03-17 20:44:00.49 It's not even clear what timezone that's in, so as far as I'm concerned that's useless. Not sure why this has changed, (Not too long ago, I ported my cod

RE: Re: Wadl advice

2012-02-10 Thread Bjorn Roche
t, though. Thanks, bjorn > --tim > > > On Fri, Feb 10, 2012 at 11:01 AM, Bjorn Roche wrote: > > > hey there, > > > > I am trying to use the wadl extensions to document my restlet api, but I'm > > ending up with some weird results. Here's wh

Wadl advice

2012-02-10 Thread Bjorn Roche
hey there, I am trying to use the wadl extensions to document my restlet api, but I'm ending up with some weird results. Here's why: several parts of my api look something like this: /object /object/{objectid} and I use the same serverresource to handle both of them: router.attach( "/object",

RE: Re: Redirecting from http to https

2012-02-09 Thread Bjorn Roche
> Hello Bjorn, > > if I understand well, your restlet-based app listens on port 80, and > receives requests with the "HTTP_X_FORWARDED_PROTO" header. In this cas, > you can add a filter which looks at the "org.restlet.http.headers" > attribute: > if you are using restlet 2.0, you code looks like >

Redirecting from http to https

2012-02-05 Thread Bjorn Roche
I have a restlet-based app running on heroku that I want to use SSL. Heroku has a "piggyback" option which processes SSL connections for you. As far as I can tell, it works like this: Heroku processes the SSL connection, and redirects the call to a normal, unencrypted connection on port 80 and s

RE: POSTing to GAE

2011-06-14 Thread Bjorn Roche
Thank you for your response. I'm afraid I'm still a bit confused: the link you gave shows making this call in the android client, but as I said in my email I am testing with curl. Does this mean there is no server-side fix? I don't see anything in curl to prevent chunking. (in my version anyway.

POSTing to GAE

2011-06-14 Thread Bjorn Roche
Recently I upgraded my google eclipse plugin and discovered that POSTing form data to restlet always resulted in an empty form. eg. curl URL -X POST -d "key=val" @Post("form") public void postMethod(Form form) { form.getFirstParameter("key"); // == null! } I see a related topic on this list,

RE: Getting started with OAuth in eclipse

2011-02-04 Thread Bjorn Roche
Well... after a few tries, and updating eclipse (which I had already tried) I am no longer getting maven related errors and maven seems to be able to find the projects. I'm going to have to chalk this up to "something weird in eclipse". Thanks for your help!

Mailing list issues

2011-01-31 Thread Bjorn Roche
I have two issues with this list: 1. I initially signed up for this list as web only, because I was still evaluating restlet, but then I decided restlet was awesome so I went to add email. Unfortunately, I don't receive any of the emails in my inbox, so I have to keep going back to the site. (Y

RE: Getting started with OAuth in eclipse

2011-01-31 Thread Bjorn Roche
> Once you have done this you should verify that your local mvn repository > looks like this > > .m2/repository/org/restlet/dev/org.restlet.incubator/2.1-SNAPSHOT > .m2/repository/org/restlet/dev/org.restlet.oauth/2.1-SNAPSHOT > .m2/repository/org/restlet/dev/org.restlet.openid/2.1-SNAPSHOT > >

RE: Getting started with OAuth in eclipse

2011-01-30 Thread Bjorn Roche
Thanks for your reply! Very helpful indeed. For some reason, I am getting this error when I manually enter the pom Failed to read artifact descriptor for org.restlet.dev:org.restlet.ext.openid:jar:${re​stlet.version} and when I try to use the UI, it can't find the artifacts (I hope I am using

Getting started with OAuth in eclipse

2011-01-28 Thread Bjorn Roche
-SNAPSHOT which I believe should be: mvn install:install-file -Dfile=oauth.jar -DpomFile=oauth-pom.xml - Dversion=2.1-SNAPSHOT - Bjorn Roche http://www.xonami.com Audio Collaboration -- http://restlet.tigris.org/ds

RE: Unsupported Media Type (415)

2011-01-28 Thread Bjorn Roche
> My ContactServerResource is similar to the example: > @Get > public Contact retrieve(Contact contact) { > return contact; > } > > @Put > public void store(Contact contact) { > ContactServerResource.contact = contact; > } I am also

RE: Re: Re: Post data results in unexpected 415

2011-01-26 Thread Bjorn Roche
>I tried that from scratch, but it just returns a java object. This could come from the classpath of the server application. The ability to convert an Object to a perticular type of representation is given via Restlet extensions (see this page for more details about the Converter [1]) simply put in

RE: Re: Post data results in unexpected 415

2011-01-16 Thread Bjorn Roche
I think the issue was that I did not define my function to take a Form argument. It seems to work now: @Post("form") public Representation post(Form form) { ... } FYI: I was unclear what the post annotation argument referred to, the content-type in the Accept header of the request (which is wha

Post data results in unexpected 415

2011-01-14 Thread Bjorn Roche
Hey all, I'm using restlet on GAE and I'm afraid I'm new to both. I've setup a basic routing: router.attachDefault(UserResource.class); Route r = router.attach( "/" + API_VERSION + "/user/{" + USER_ID_ATTRIBUTE + "}",UserResource.class); (with the intent that, ATM, all calls sh