如何使用 Axistools-maven-plugin 将 WDSL 转换为 Java?
我配置了 axistools-maven-plugin 如下:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>axistools-maven-plugin</artifactId>
<version>1.4</version>
<configuration>
<wsdlDirectory>/src/main/resources</wsdlDirectory>
<wsdlFiles>
<wsdlFile>adjustment.wsdl</wsdlFile>
</wsdlFiles>
<keep>true</keep>
<allElements>true</allElements>
<outputDirectory>/src/main/java</outputDirectory>
<subPackageByFileName>true</subPackageByFileName>
<useEmitter>true</useEmitter>
<wsdlVersion>2</wsdlVersion>
</configuration>
<executions>
<execution>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
但是我的 wsdl 文件没有被正确引用。配置是否正确?
我总是收到以下信息消息
[INFO] Nothing to generate. All WSDL files are up to date.
I configured the axistools-maven-plugin as follows:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>axistools-maven-plugin</artifactId>
<version>1.4</version>
<configuration>
<wsdlDirectory>/src/main/resources</wsdlDirectory>
<wsdlFiles>
<wsdlFile>adjustment.wsdl</wsdlFile>
</wsdlFiles>
<keep>true</keep>
<allElements>true</allElements>
<outputDirectory>/src/main/java</outputDirectory>
<subPackageByFileName>true</subPackageByFileName>
<useEmitter>true</useEmitter>
<wsdlVersion>2</wsdlVersion>
</configuration>
<executions>
<execution>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
but my wsdl files are not being referred properly. Is the configuration correct?
I am getting the following info msg always
[INFO] Nothing to generate. All WSDL files are up to date.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
对我来说这是目录参数名称。它不是
而是
。无论如何,这是我的工作配置:For me it was the directory parameter name. It's not
<wsdlDirectory>
but<sourceDirectory>
. Anyway, here's my working config:当我在 wsdlFile 中出现拼写错误时,收到几乎相同的(信息)消息!
实际消息是:“跳过最新的 wsdl”
例如
,存在的文件是:ABCWebservice_x.y.wsdl
Got almost the same (info) message when i had a typo in wsdlFile!
The actual message was: "Skipping up to date wsdl"
e.g.
And the file present was: ABCWebservice_x.y.wsdl
跳过
/src/main/java
和/src/main/resources
中的前导斜杠可能会有所帮助。编辑:我仔细查看了我的工作配置。我不知道你是怎么想到这个的:
可能应该是:
Skipping the leading slash in
/src/main/java
and/src/main/resources
will probably help.Edit: I've taken a closer look at my working configuration. I don't know how you came to this:
Should probably be:
如果您在同一个 wsdlfiles 标签下使用多个 wsdls,那么您可能会遇到如下跳过信息:
在这种情况下,要么在 wsdlfiles 标签下使用单个 WSDL,要么使用 wsdloptions
Do
Maven Clean
>Maven 更新项目
>Maven 生成的资源
。完毕 !If you are using multiple wsdls under same wsdlfiles tag then you may encounter skipping info like below:
In this case, either use single WSDL under wsdlfiles tag or use wsdloptions
Do
Maven Clean
>Maven Update project
>Maven Generated resources
. DONE !