14

Is ther any equivalent to wsdl2java that will take a WSDL file and generate scala stubs for the server and/or client?

I googled, but either there isn't or my google-fu is weak.

The Archetypal Paul
  • 41,321
  • 20
  • 104
  • 134
  • Why bother if the generated code is Java or Scala? Changing generated code is usually not a good idea anyway.. – eivindw Jun 17 '11 at 17:55
  • Because it ends up calling my code (server side) or my code calls ut (client side). And there's a mismatch between the way the generated Java code works with the Scala code I'd like to write. So I'm not after changing the generated code, but looking for an alternative implementation. – The Archetypal Paul Jun 17 '11 at 18:01

4 Answers4

10

scalaxb has some support for this, but it's still very much experimental and it's still client-side only. The only reliable techniques I've seen for handling the server side is either to generate the Java code via wsdl2java or other tools and then wrap that in Scala or, possibly, to use annotations to generate the WSDL from the Scala code. The later option is likely to lead to some pain, though, as you learn where Scala does and does not map readily to Java conventions.

Eugene Yokota
  • 94,654
  • 45
  • 215
  • 319
Thomas Lockney
  • 2,567
  • 20
  • 13
  • I can use wsdl2java and call Scala from the Java server side stubs, of course, but that seems a waste. I'm using WSDL given to me so annotations and WSDL generation doesn't really work for me. – The Archetypal Paul Jun 17 '11 at 17:56
  • I hope there's no penalty for conflict of interest because I just hit +1. – Eugene Yokota Jun 18 '11 at 21:22
1

Not sure if it is what you want, but have you looked at http://scalaxb.org/wsdl-support?

Femi
  • 64,273
  • 8
  • 118
  • 148
1

Looking at this old thread it seems possible to create custom mapping templates: http://www.mail-archive.com/axis-user@ws.apache.org/msg35857.html

Maybe you could use wsdl2java tool with custom templates creating Scala code?

eivindw
  • 1,939
  • 17
  • 13
0

Thinking one can try to combine wsdl2avro and avro4s

SemanticBeeng
  • 937
  • 1
  • 9
  • 15