0

I would like to implement an API in Spray (Scala), that allows me to process a simple SOAP request. The request is a POST with a WS-Addressing payload. Although I can get the XML document, and I am aware of the existence of javax.xml.ws.soap.Addressing, I'm not sure how to tie the two together.

Can I use the above mentioned Addressing support in a spray route? if so, how? I can't figure out how to use an AddressingFeature in Scala.

Any help would be appreciated. If I can solve this, I can probably address other WS-* support I need.

Will I Am
  • 2,614
  • 3
  • 35
  • 61

1 Answers1

0

Can I use the above mentioned Addressing support in a spray route?

The short answer is no, or better, why would you want to?

It's possible to build JAX-WS web services in Scala, but if you're trying to do it in Spray you're crossing paradigms. You really need a JAX-WS framework if you have to support WS-Addressing and other WS-* features.

I started with Spray as a WS-* refugee, and I doubt I'm the only one. I prefer Spray and I know you can use it to parse out your e.g. MessageId or Action and use them to build a Route, but I wouldn't reach for JAX-WS to make it happen.

  • Thanks. Really all I was looking for was the actual SOAP objects that would validate and de/serialize the SOAP XML. What would be the best alternative framework for SOAP in Scala? At this point I'm reviewing my needs and trying to determine if it's worth writing the definitions by hand -- WS-Addressing is not that hard to write, but others could be a full time job to just type in. – Will I Am Apr 30 '15 at 14:57
  • I've used Glassfish Metro with Scala. I don't remember the specifics of why I found it lacking, but I do remember telling myself that if I had to write WS-* services again, I'd take a much harder look at Apache CXF. I'd start there. – Michael Harnish Apr 30 '15 at 19:52