【发布时间】:2015-06-29 13:58:16
【问题描述】:
方法的代码生成工作正常,但在我看来,语法部分被省略了,因为没有生成 Pojo 和 JAXB 注释。我必须指定一些额外的配置吗?我使用了这个命令:wadl2java.bat -p packagename /path/to/wadl
这是 wadl 的 sn-p。
<application
xmlns="http://wadl.dev.java.net/2009/02"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://www.tns.de">
<grammer>
<xsd:include href="file1.xsd"></xsd:include>
<xsd:include href="file2.xsd"></xsd:include>
<xsd:include href="file3.xsd"></xsd:include>
<xsd:include href="file14.xsd"></xsd:include>
</grammer>
<resources base="http:localhost:8080/rest">
<resource path="status/{id}" id="statusId">
<param name="id" type="xsd:unsignedInt" required="true" default="" style="template"/>
<method name="GET" id="getById">
<request>
<representation mediaType="application/json" element="tns:type1"/>
</request>
<response>
<representation mediaType="application/json" element="tns:type2"/>
</response>
</method>
....
【问题讨论】:
-
xsd 是否也放置在 WSDL 所在的同一文件夹中?
-
是的 wadl 和 xsd 在同一个文件夹中