[Lift] Re: Basic RESTful webservice with LIFT compile error ... since method createTag in trait XMLApiHelper ...

2009-10-08 Thread Alex Black
I noticed that other examples use a singleton object instead of class, so I changed my code, but I just get the same sort of error but for an object: object creation impossible, since method createTag in trait XMLApiHelper of type (scala.xml.NodeSeq)scala.xml.Elem is not defined RestAPI.scala

[Lift] Re: Basic RESTful webservice with LIFT compile error ... since method createTag in trait XMLApiHelper ...

2009-10-08 Thread David Pollak
In order to use the XMLApiHelper trait, you must define an outer-most XML Elem that will wrap the response. For example: def createTag(in: NodeSeq): Elem = foo_co_rest{in}/foo_co_rest Now... if your stuff already does the wrapping in the outer-most Elem, you can do: def createTag(in: NodeSeq):

[Lift] Re: Basic RESTful webservice with LIFT compile error ... since method createTag in trait XMLApiHelper ...

2009-10-08 Thread Alex Black
Hi David, thanks for the response. Thanks, that gets it compiling, and I think I see what it does. Is the right way to proceed if I want to return JSON (rather than XML)? - Alex On Oct 8, 2:17 pm, David Pollak feeder.of.the.be...@gmail.com wrote: In order to use the XMLApiHelper trait, you

[Lift] Re: Basic RESTful webservice with LIFT compile error ... since method createTag in trait XMLApiHelper ...

2009-10-08 Thread David Pollak
On Thu, Oct 8, 2009 at 7:19 PM, Alex Black a...@alexblack.ca wrote: Hi David, thanks for the response. Thanks, that gets it compiling, and I think I see what it does. Is the right way to proceed if I want to return JSON (rather than XML)? Roll your own :-( You can also use the excellent