Scala 相当于 wsdl2java? [英] Scala equivalent to wsdl2java?

查看:67
本文介绍了Scala 相当于 wsdl2java?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何等效于 wsdl2java 的东西,它会采用 WSDL 文件并为服务器和/或客户端生成 Scala 存根?

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

我用谷歌搜索,但要么没有,要么我的 google-fu 很弱.

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

推荐答案

scalaxb 对此有一些支持,但它仍然是非常实验性的,它仍然只是客户端.我见过的处理服务器端的唯一可靠技术是通过以下方式生成 Java 代码wsdl2java 或其他工具,然后将其包装在 Scala 中,或者可能使用注释从 Scala 代码生成 WSDL.不过,后面的选项可能会带来一些痛苦,因为您会了解到 Scala 可以和不易于映射到 Java 约定的哪些方面.

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.

这篇关于Scala 相当于 wsdl2java?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆