如何让CXF为WSDL生成外部XSD? [英] How do I get CXF to generate external XSD for the WSDL?

查看:1240
本文介绍了如何让CXF为WSDL生成外部XSD?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用CXF和 @WebService 注释。它生成WSDL文件作为一个大文件,有没有办法告诉它在XSD文件中外部生成 wsdl:types 并将它们导入到WSDL中? / p>

I'm using CXF with the @WebService annotation. It generates the WSDL file as one big file, is there a way I can tell it to generate the wsdl:types externally in an XSD file and import them into the WSDL?

推荐答案

1)你最好的选择是使用CXF的 JavaToWS ,只需提供你的使用 - createxsdimports选项实现类和域对象,它将为您创建单独的WSDL和XSD文件,

1) Your best option is use CXF's JavaToWS, just provide your implementation class and domain objects with "-createxsdimports" option, it will create separate WSDL and XSD files for you,

请参阅以下示例从我的网站

http://www.javatips.net/blog/2012/09/cxf-java2wsdl-example

2)您可以使用SOPERA套件 http://www.sopera.de/ en / downloads / sopera-asf-331 并将其转换为单独的WSDL和XSD

2) You can use SOPERA suite http://www.sopera.de/en/downloads/sopera-asf-331 and it converts into separate WSDL and XSD

这篇关于如何让CXF为WSDL生成外部XSD?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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