Export source code comments to the WSDL using CXF and maven?

别等时光非礼了梦想. 提交于 2019-12-23 01:54:22

问题


Like the title says: Is it possible to export my javadoc comments for web service method parameters into the wsdl? We're using CXF and the java2ws goal with maven to generate the wsdl from source code.


回答1:


You can use the @WSDLDocumentationCollection annotation to attach multiple @WSDLDocumentation annotations to a single method (with different placements) but you can't use this to go much deeper than placing documentation on single operations of a port, because that's where it ceases to be a WSDL problem and becomes an XSD problem. XSD documentation would be handled by an annotation at the JAXB level, except that no such annotation exists; the schema generated won't contain <xs:documentation> elements. (When starting from a schema, documentation comments can be generated as Javadoc, but the reverse direction doesn't happen as Javadoc comments aren't retained in Java class files.)



来源:https://stackoverflow.com/questions/8266596/export-source-code-comments-to-the-wsdl-using-cxf-and-maven

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!