Re: Custom Error Handling

2011-05-05 Thread Tim Peierls
Sometimes it seems like every tenth message to this list is asking a variation of this question. I know that we're free to define our own StatusService implementations, overriding getRepresentation, but wouldn't it be nice if the *default* StatusService had support that would let us throw a resourc

Custom Error Handling

2011-05-05 Thread Bruno Mendes
How can I provide a custom error handler for a service? Case Study: I have this service which persists the Operation passed either by xml or by json. The problem is, when a malformed structure is passed, the server it returns a predefined error message. @POST @Consumes({"text/xml

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 wrote: > Hi, > > I cannot work out how to tell my standalone Restlet application to t

No extra detail found in web service response entity when an error occurs

2011-05-05 Thread Simon Earnshaw
I have a restlet web service. When the client requests some data from the web service, sometimes that data is missing unexpectedly so I return a 404 (maybe it should be 500) error - and I would like to add some extra detail along with the reponse. This would be good for the client application t

Re: Restlet+Mule - Concurrent request results 404

2011-05-05 Thread Gaurav Gupta
Found the solution. Resource bean must be scope prototype in spring context fine refer http://www.restlet.org/documentation/snapshot/jse/ext/org/restlet/ext/spring/SpringBeanRouter.htm -- Gaurav Gupta On Thu, May 5, 2011 at 4:43 PM, Gaurav Gupta wrote: > Hey All, > > I followed > http://www.mul

Re: Fwd: Bug in WriterRepresentation with internal connector

2011-05-05 Thread Tim Peierls
In summary, this is a reproducible bug: Using WriterRepresentation and the internal connector with content of size > 1024 in 2.1-M4 (at least) on Windows (at least) hangs the Restlet component. WriterRepresentation is the supertype of JacksonRepresentation, so this means you can't use Jackson with

Using the simple framework in Restlet

2011-05-05 Thread Steve Ferris
Hi, I cannot work out how to tell my standalone Restlet application to the use the Simple framework as it's chosen server connector. Is this some method I have to call or property to set? I am using maven and have included the correct dependency. thanks Steve

Restlet+Mule - Concurrent request results 404

2011-05-05 Thread Gaurav Gupta
Hey All, I followed http://www.mulesoft.org/documentation/display/RESTLET/User%27s+Guide#User%27sGuide-EmbeddingRestletsinMule Querying http://localhost:9002 is working fine for one request. But when I hit multiple request concurrently, most request fails with 404 status. Although those response

RE: Re: Status code being overwritten

2011-05-05 Thread anoop kulkarni
We set the status code on the response and throw an exception. When the StatusFilter intercepts this response, it overrides the status code with 500 while keeping our original exception in place. So the client sees our exception, but without the corresponding status code. -

RE: Status code being overwritten

2011-05-05 Thread anoop kulkarni
btw the exception thats being thrown is a runtimeexception (dont know why that decision was made, but that's what it is) -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2730210

RE: Re: GWT 2.3

2011-05-05 Thread Mike
I am able to run the code with no issues under GWT 2.2. The problem happens when I switch to GWT 2.3. Are you sure the problem you fixed exists with GWT 2.2? I guess it's possible that my code takes a different path under GWT 2.2 that does not use Serializa​bleTypeOracleBuilder. Thanks, Mike

Restlet Extensions and Maven

2011-05-05 Thread Dave Muirhead
Greetings- The Restlet JAXB extension (org.restlet.ext.jaxb) has a dependency on javax.xml.bind. For folks using a downloaded Restlet full distribution, that dependency is satisfied by the exploded bundle shipped in the "lib/javax.xml.bind_2.1" directory. But, for folks using Maven (or Ivy in

Differences @Get x @GET; @Post x @POST with @Path

2011-05-05 Thread Bruno Mendes
I'm developing an application where a POST to /operations will create a new Operation, a GET to /operations/{code} will either return the Operation in XML or in JSON, depending on the Header parameter Accept. In order to achieve the path, I had to use @Path("operations") in the class declaratio