On Sun, May 17, 2009 at 11:37 AM, glenn <[email protected]> wrote:
>
> What exactly are you looking for?
> Are you looking for way to use lift to communicate with an existing
> REST server, so that you can extract documents and display them
> in your lift app - using lift as your blog interface?
Getting the text of an ATOM feed... in 5 lines of Scala:
scala> for {
atom <- XML.load("http://twitter.com/statuses/public_timeline.atom")
entry <- atom \ "entry"
content <- entry \ "content"
} yield content.text
>
>
> If so, I'm trying to do something similar. There are discussions on
> this
> site from a lot of folks who say they are integrating lift with Jersey
> and
> other similar systems, but I haven't seen any code that directly gives
> lift templates and snippets direct access.
Putting the ATOM feed into a page via a Snippet:
def feed: Seq[String] = // see above code to load a feed
def mySnippet(toBind: NodeSeq): NodeSeq = feed.flatMap(i => bind("b",
toBind, "place" -> i))
>
>
> You are correct, in that you can pretty easily create a REST server in
> your lift application and GET xml documents from it, but I haven't
> figured out
> how to PUT documents from a non-lift resource into my lift app, since
> that
> requires that you can somehow access lift's Req object via a URL
Or... it requires that you change:
case Req("api" :: "place" :: Nil, _, GetRequest) =>
to
case Req("api" :: "place" :: Nil, _, PutRequest) =>
Three whole letters to service a PUT instead of a GET.
Glenn -- I'm happy to help you with specific questions. I can even tolerate
you complaining that the Lift doesn't interoperate with anything (dead
wrong) Lift team has a bad case of NIH, despite that you can't back up these
claims with facts. But, please don't waste the time of the whole list with
answering other people's questions when you don't have a clue about the
subject matter.
David
>
> Glenn...
>
> On May 17, 10:26 am, Barry Kaplan <[email protected]> wrote:
> > I'm looking for a bootstrap example of integrating lift into an
> > existing application that needs to server up XML documents via a REST
> > api.
> >
> > The application is already operational and cannot be reconfigured to
> > live within lift -- I'm looking to lift to add just the http service
> > and infrastructure.
> >
> > Does such a beast exist? (BTW, I have the lift book, but it seems only
> > to discuss adding an api to UI based lift application.)
> >
> > thanks!
> > -barry
>
> >
>
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---