How to PUT a JSON payload and have Jackson automagically create an object?

2010-10-14 Thread webpost
I am trying to PUT ( and POST ) to a ServerResource and have it convert my JSON payload to the corresponding Java POJO, but all I get is 415 "Unsupported Media Type" errors. My POJO implements Serializable, @Get("json") seems to work as it is supposed to. @Put("json") gives me the 415 Unsuppor

How to PUT a JSON payload and have Jackson automagically create an object?

2010-10-14 Thread Jarrod Roberson
I am trying to PUT ( and POST ) to a ServerResource and have it convert my JSON payload to the corresponding Java POJO, but all I get is 415 "Unsupported Media Type" errors. My POJO implements Serializable, @Get("json") seems to work as it is supposed to. @Put("json") gives me the 415 Unsuppor

change the default URL Restlet uses from http:// to https://

2010-10-14 Thread webpost
Hi I've got a web application created by my supervisor which uses Spring Security and Restlet. I've got two lots of proxying happening and SSL is performed at an earlier stage. All my resources of this web application have the URL http://something. It appears this is Restlet's default. how do i

help, I need my URLS defaulted to https:// not http://

2010-10-14 Thread webpost
Hi I've got a web application from my supervisor using restlet and Spring security. I've got SSL happening at an earlier stage before the a request reach my web application on a virtual machine. Restlet has defaulted all my URLS to http://something. How do I change this so that the default is h

RE: Re: download a file using FileRepresentation while uploading it

2010-10-14 Thread Maujean
to save time, please avoid these kinsd of comment -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2671759

RE: Re: get from browsers

2010-10-14 Thread webpost
This worked: this.getTunnelService().setUserAgentTunnel(true); Can you explain a little more why it works so I understand what is going on? Shawn -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2671992

RE: Re: org.restlet.lib.org.json has malformed Maven data. Any plans to release it with valid metadata?

2010-10-14 Thread Bartosz Kowalewski
Hi Thierry, Thanks a lot for the update. When do you envision these changes being released? Thanks again! Bartek -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2672023

RE: download a file using FileRepresentation while uploading it

2010-10-14 Thread Maujean
ok here is the answer, in the response the content-length should not be specify, otherwise the client stop the connection automatically when he reaches this size. make a new class FileRepresentation and in the getSize method return Representation.UNKNOWN_SIZE to fulfill the header restlet use thi

Re: Re: get from browsers

2010-10-14 Thread Fabian Mandelbaum
Hello Shawn, glad to hear it worked. As for the explanation. Check the javadocs and the sources for the TunnelService stuff while keeping in mind the explanation I gave on my 1st answer. You can think of this setting like an Restlet internal rewriting of 'bad' HTTP headers for lazy/badly designed

Re: Using a REST layer for UI and services

2010-10-14 Thread Tim Peierls
On Sat, Sep 11, 2010 at 11:47 AM, Jerome Louvel wrote: > Good news, is that we are planning to simplify this binding in version 2.1 > but associating the template files with representation beans based on the > bean qualified class name. The converter service would allow the developer > to indicate