从 WSDL 生成基于 JAXB 的 WebService Client(Stub) [英] Generation of JAXB based WebService Client(Stub) from WSDL

查看:31
本文介绍了从 WSDL 生成基于 JAXB 的 WebService Client(Stub)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个需求,我们需要开发一个基于 JAXB 的 web 服务客户端.我们只有 WSDL url.有没有这样的工具可以为我们做到这一点?

We have a requirement where we need to develop a webservice client based upon JAXB. We have only the WSDL url with us. Is there any such tool exist which can do this for us ?

到目前为止,我们正在考虑 xjc 工具,但它需要一个 xsd 文件作为输入,而我们有 WSDL 文件生成存根.

As of now we are thinking of xjc tool, but that takes a xsd file as input whereas we have the WSDL file with us to generate the Stubs.

请指教.

问候S

推荐答案

你总是可以使用 CXF 它使用默认为 JAXB.

You can always use CXF which uses JAXB by default.

使用 CXF 生成的客户端 你可以仅使用 WSDL 即可获得所需的(客户端).

Using CXF generated Client you can have what you need (a client) using only WSDL.

只需使用:

wsdl2java -d <output-directory> -client <wsdlurl>

这篇关于从 WSDL 生成基于 JAXB 的 WebService Client(Stub)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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