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.

 

D. Chang 

 

 

From: [email protected]
[mailto:[email protected]] On Behalf Of Dan Chang
Sent: Tuesday, March 20, 2012 12:06 AM
To: [email protected]
Subject: [sipx-dev] Good way to return xml from RESTLet PUT and DELETE?

 

I am working on extending the SipXecs REST APIs to include API calls for
accessing Call Center functionality (OpenACD).  Might anyone know how
(or if) I can return xml or anything in the body after a PUT or DELETE
(I am admittedly new to REST).  I tried using the overload for
"getResponse().setStatus(status, message)" that takes a String for the
second parameter but that message does not seem to appear anywhere.

 

Hopefully I will get my first run reasonably ready in our Git fork
(danchang) and then I would like to start asking about the process for
requesting a review for potentially adding my changes to the main line.

 

Thanks!

 

D Chang

_______________________________________________
sipx-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev/

Reply via email to