views:

258

answers:

2

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.

+1  A: 

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?

pdbartlett
@Chris: just for my own interest did this work, or had I completely misunderstood your question?
pdbartlett
it worked like a charm
Chris
+1  A: 

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 !

kings