I'm getting started with Scala and Lift, implementing a simple REST
service.  I've extended XMLApiHelper, following examples in "Exploring
Lift", but I'm getting a compile error I'm not sure about, any
suggestions?

error:

class RestAPI needs to be abstract, since method createTag in trait
XMLApiHelper of type (scala.xml.NodeSeq)scala.xml.Elem is not defined
RestAPI.scala   /poc/src/main/scala/com/somecompany/api Unknown Scala
Problem

So its telling me I have to implement createTag... but, I don't know
how to :)  Also, the examples i've seen don't seem to implement it,
making me think I'm doing something wrong.

package com.somecompany.api

import _root_.net.liftweb.util._
import _root_.net.liftweb.http._
import Helpers._

import net.liftweb.http.rest.XMLApiHelper

class RestAPI  extends XMLApiHelper {
  def dispatch: LiftRules.DispatchPF = {

    case Req(List("api", "camera", cameraId), "", DeleteRequest) =>
        () => deleteCamera(cameraId)

        // Invalid API request - route to our error handler
    case Req(List("api", _), "", _) => failure _
        }

  def failure : LiftResponse = BadResponse()

  def deleteCamera(cameraId : String) : LiftResponse = {
        NoContentResponse()

  }

}

Thanks!

- Alex

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to