简体   繁体   English

jaxws-maven-plugin或jaxb2-maven-plugin从WSDL创建Java类

[英]jaxws-maven-plugin or jaxb2-maven-plugin to create java classes from WSDL

I am developing a web service contract-first. 我先开发一个Web服务合同。 I have seen a lot of developers use the plugin jaxws-maven-plugin in the pom.xml to create java classes from the wsdl file (or the xsd file), while other developers use some pluggin variation of jaxb2-maven-plugin to do it. 我已经看到很多开发人员使用pom.xml中的插件jaxws-maven-plugin从wsdl文件(或xsd文件)创建Java类,而其他开发人员则使用jaxb2-maven-plugin一些jaxb2-maven-plugin变体来做它。

Does someone know advantage of using one or the other?. 有人知道使用其中一个的优势吗? Is any of them obsolete? 他们中的任何一个都过时了吗?

jaxb2 - maven - plugin is a maven plugin that replaces XJC and schemagen to complete the transformation of Java classes and schema files. jaxb2-maven-插件是一个maven插件,它替换了XJC和schemagen以完成Java类和模式文件的转换。 When using jaxb2: schemagen generates a schema file, it cannot be generated if the Java bean property name is different from the specified name 使用jaxb2时:schemagen会生成一个模式文件,如果Java bean属性名称与指定名称不同,则无法生成该文件。

Jaxws-maven-plugin generates the Web Service client Java code. Jaxws-maven-plugin生成Web服务客户端Java代码。

Most of the time Jaxws-maven -plugin is more recommended for use 大多数时候,更建议使用Jaxws-maven -plugin

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

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