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.
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?
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 !
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With