简体   繁体   English

Scala相当于wsdl2java?

[英]Scala equivalent to wsdl2java?

Is ther any equivalent to wsdl2java that will take a WSDL file and generate scala stubs for the server and/or client? 是否与wsdl2java等效,它将获取WSDL文件并为服务器和/或客户端生成scala存根?

I googled, but either there isn't or my google-fu is weak. 我用谷歌搜索,但要么没有,要么我的谷歌弱。

scalaxb has some support for this, but it's still very much experimental and it's still client-side only. scalaxb对此有一些支持,但它仍然是非常实验性的,它仍然只是客户端。 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. 我在处理服务器端时看到的唯一可靠技术是通过wsdl2java或其他工具生成Java代码,然后将其包装在Scala中,或者可能使用注释从Scala代码生成WSDL。 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. 但是,后面的选项可能会导致一些痛苦,因为您了解Scala所处的位置,并且不会轻易地映射到Java约定。

不确定它是否是你想要的,但是你看过http://scalaxb.org/wsdl-support吗?

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 看看这个旧线程,似乎可以创建自定义映射模板: http//www.mail-archive.com/axis-user@ws.apache.org/msg35857.html

Maybe you could use wsdl2java tool with custom templates creating Scala code? 也许您可以使用wsdl2java工具和自定义模板创建Scala代码?

思考一个可以尝试结合wsdl2avroavro4s

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM