'org.apache.cxf.tools.wsdlto.WSDLToJava'将wsdl转换为java类.
它是否在内部使用JAXB?为什么这个命令能够生成类似'xjc'创建的类?有人可以解释一下它是如何工作的吗?
小智 7
CXF在内部使用xjc进行代码生成.
有关更多信息,请参阅以下内容(来自CXF官方页面)
在2.3.0之前的CXF版本中,xjc插件直接阴影到大的cxf bundle jar中.在2.3.0中,它们从jar中删除,并单独放入发行版的lib目录中.xjc插件只是代码生成实用程序,在运行时根本不使用,这就是它们被拔出的原因.
Apache CXF XJC-Utils子项目提供了许多实用程序,用于使用JAXB生成更好或更有用的代码.
目前,它包含以下模块:
cxf-xjc-plugin Provides a maven wrapper around the JAXB XJC utility
cxf-xjc-dv Initialize fields mapped from elements/attributes with their default values
cxf-xjc-ts Implements the toString() method
cxf-xjc-boolean Generate getters named getXXX() for Booleans instead of isXXX()
cxf-xjc-wsdlextension Adds extensions methods to allow generated beans to be used as WSDL4J extensors
cxf-xjc-bug671 Provides a workaround for https://jaxb.dev.java.net/issues/show_bug.cgi?id=671
- Not needed for JAXB >=2.1.12
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
12297 次 |
| 最近记录: |