Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SOAP-proxy in Scala - what do I need?

I'm trying to write a program in Scala, that will accept SOAP-requests, get the response from the real server (or read it from the local disc) and return the data to the original client.

I'm new to the java/scala ecosystem, so I have no clue, what libraries to choose. I heard Scala's XML-handling is quite nice, so I don't know, whether I should use some enterprisey soap-library/framework like jax-ws, jboss-ws, axis, cxf, xmlbeans, etc.

Basically, I just need

  • a library, that accepts the requests (currently, I'm looking at jetty, but I'd prefer something that natively supports actors. scala-http seems to cover that, but isn't production-ready or maintained, for that matter)
  • some library to request the data from the other server (something like curl, libwww-perl for java/scala)
  • a build system (ant? sbt?)
  • an IDE (I'm used to eclipse, but IntelliJ's scala support is supposed to be better)
  • a tool to test it (currently, I'm using SoapUI)
like image 900
tstenner Avatar asked Sep 06 '10 09:09

tstenner


1 Answers

SOAP is truly a hideous specification, with lots of potential for unusual fringe behaviour. While it's true that XML support in Scala would help you write such a library from scratch, it would still be a major effort (depending on how much of the spec you need).

Likewise, Jetty has years of development behind it; dealing with performance demands and other unexpected behaviour that you probably haven't considered... Even Scala's best-known web framework, Lift, runs atop a Java web server for these very reasons. It still works very happily with actors.

So, at this moment in time, you're almost certainly better off using a tried and tested solution with a Java web server and an off-the-shelf Java SOAP Library. The effort to add a thin Scala wrapper around these will be far less than the effort to build these things from scratch.

For the build system, sbt is the most powerful tool presently available for Scala, but you may need to fall back to Maven if this is needed for code generation by your chosen SOAP library.

Finally, for the choice of editor. If you're happy using Emacs, then the Ensime plugin is just amazing. If a more conventional Java IDE is to your liking, then IntelliJ currently seems to be the most stable option, though be aware that this could change very quickly.

like image 194
Kevin Wright Avatar answered Sep 20 '22 07:09

Kevin Wright