[英]Java classes are not generated from wsdl file using maven-jaxb2-plugin
我正在尝试使用 jaxb2-maven-plugin 生成请求/响应类,但我真的很挣扎。 我使用下面的代码来尝试生成类,但由于某种原因,只生成了剧集文件。 我尝试使用下载的 wsdl 文件和 url,但我无法使其正常工作。
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.14.0</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaDirectory>src/main/resources</schemaDirectory>
<generatePackage>com.example.wsdl</generatePackage>
<schemaIncludes>
<include>*.wsdl</include>
</schemaIncludes>
<generateDirectory>src/main/java</generateDirectory>
</configuration>
</plugin>
这个对我有用:
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.14.0</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaLanguage>WSDL</schemaLanguage>
<generatePackage>com.example.consumingwebservice.wsdl</generatePackage>
<schemas>
<schema>
<url>YOUR.URL</url>
</schema>
</schemas>
</configuration>
</plugin>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.