Yes, I have a project coping with errors in a similar way:

1. return HTTP status code 404 for invalid parameters etc, and 5xx for server 
side errors.

2. define a series of detailed error codes with localized error messages, it 
could be in Atom/json format according to the accept header in the original 
request.

And the best thing I got is 
1. my Restful Web Service can be used for SOA style integration with other 
systems with a Atom syndication hub
2. It's much easier than SOAP, because SOAP has a bunch of  WS-xxx protocols
3. My RIA client YUI or GWT can use Restful WS to achieve much more interactive 
UI than traditional Struts style app
4. Atom rocks! With Atom service document and WADL, users can easily understand 
the service, hence the service can be reused to mash up with other applications 
or services.

But the downside is that AFAIK there is no standard for transaction. The 
Restful service is exposed in a fine grain way, so it can be easily reused but 
difficult to wrap into one transaction. I have to design my own implementation, 
which might be incompatible with other services.
Also, it has no security standard, currently I am using HTTPS+Basic Auth.


> Matt,
> 
> When you send a HTTP error response you can include an XML body as  
> well. So you get the best of both worlds.
> 
> Paul
> On 22-Jan-09, at 10:32 AM, [email protected] wrote:
> 
> > Hi Paul
> >
> > Thanks for the advice. You can easily to the 'content type' with the  
> > TunnelService and it works just fabulous. I got that. We are not  
> > 100% if we are going to use WADL and I think they is some TOS  
> > requirement to be in every response. That was the entire 'wrapper'  
> > things. Also. As far as errors go there was a desire to have it in  
> > the xml if the error was say a missing param or or something. The  
> > desire was to have something like
> >
> > <errors>
> >  <error>
> >     <code>999</code>
> >     <message>start date is before end date</message>
> >  </error>
> > </errors>
> >
> > There was totally some desire to have the easiest and most verbose  
> > way to manage errors for the user as these 'restful' requests are  
> > going to have many many many optional params and some might conflict  
> > with eachother so the messages have to have some easy and quick  
> > visual rep to the user. This is not my ideal but I am not writing  
> > the recs. I will look into returning http error response as well!
> >
> > Thanks for the advice.
> >
> > matt
> >
> > ------------------------------------------------------
> > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1043422
> 
> Paul Austin
> President/CEO
> Revolution Systems Inc.
> 
> +1 (604) 288-4304 x201
> www.revolsys.com

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1049711

Reply via email to