Reputation: 9509
I'd like to create a simple webservice in scala similar to:
http://www.artima.com/lejava/articles/threeminutes.html
Is there an easy way to do this?
EDIT: I found a tutorial for lift http://wiki.liftweb.net/index.php/HowTo_do_Web_Services. However this seems to be way too complicated for what I'm looking for.
Upvotes: 5
Views: 9717
Reputation: 21
Might be a bit of a late reply for you, but for future reference, there I've posted a very short snippet that should do what you need here: http://scalabound.org/?p=179 Good luck !
Upvotes: 2
Reputation: 1519
Can't you just "port" that example to Scala? Importing and using Java classes should "just work", as should annotations (see http://www.scala-lang.org/node/106 for more details on those). Then it's just a case of invoking the framework as normal, which should pick up your Scala class just as it would a Java one (it's all JVM bytecode, after all...).
Or am I missing something?
Upvotes: 6