Awesome, thanks! That is exactly the kind of stuff I was trying to do. I even wanted to return errors so that was a double-bonus. Hopefully I can get this support added to the stuff I am doing pretty quickly.
Thanks again, D. Chang -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of George Niculae Sent: Tuesday, March 20, 2012 6:41 AM To: sipXecs developer discussions Subject: Re: [sipx-dev] Good way to return xml from RESTLet PUT and DELETE? On Tue, Mar 20, 2012 at 6:35 AM, Dan Chang <[email protected]> wrote: > I think I may have found the answer to my own question. Create a new > "Representation" object of the type you want (either custom or apparently > there are some built in ones), then use > > > > getResponse().setEntity(representation); > > > > Passing in the Representation object. I am having to do some maintenance on > my VM so I have not had a chance to follow this through yet, but some of the > code I am seeing looks like it is the right answer. I will try to follow up > on this when I solidify my understanding. Of course any other input is > welcome! Sorry I did not catch this earlier. > Yes, that's the way to go. Additionally use DomRepresentation for constructing the response Check this sample: http://www.restlet.org/documentation/1.0/firstResource#part03 and how generateErrorRepresentation is implemented George _______________________________________________ sipx-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipx-dev/ _______________________________________________ sipx-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipx-dev/
