[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: RESTful XML for updates?

  • From: Elliotte Harold <elharo@m...>
  • To: "Scott, Christopher" <christopher.scott@f...>
  • Date: Fri, 06 Mar 2009 05:35:43 -0800

Re:  RESTful XML for updates?
Scott, Christopher wrote:
> Hello all,
> 
> 	I'm putting together a RESTful webservice and I wanted to get
> some input about how one would design XML resource representations.  The
> question has to deal with designing the resource with updates in mind.
> I've googled for examples but most articles outline what a resource
> should look like, but not how it should be updated.
> 
> I would like to be able to update a representation without having to PUT
> the entire resource representation back to the server.  For example,
> consider a simple resource which resides at a URL /Widget/001
> 
> <Widget>
>   <Id>0FAB7894C</Id>
>   <CreatedDate>2009-03-05</CreatedDate>
>   <State>INSPECTED</State>
>   <Color>Blue</Color>
>   <Whatsists>
>     <Whatsist href="/Whatsist/1002"/>
>     <Whatsist href="/Whatsist/1002"/>
>   </Whatsists>
> </Widget>
> 
> I'd like the client to be able to change the color or state of this
> widget to, say REJECTED, but not be able to change the id, or the
> CreatedDate. 

Don't be afraid of having lots of URLs. In this case, I would also 
define a URL at /Widget/001/Color to which you could PUT just the color.

I'm not sure about the best answer as to indicating which fields are 
updateable. perhaps a separate custom document indicating this?


-- 
Elliotte Rusty Harold  elharo@m...
Refactoring HTML Just Published!
http://www.amazon.com/exec/obidos/ISBN=0321503635/ref=nosim/cafeaulaitA


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.