我使用axis2-wsdl2code-maven-pluginin命令从wsdl生成java源。
我的pom.xml中的插件部分如下所示:
<plugin>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-wsdl2code-maven-plugin</artifactId>
<version>1.6.2</version>
<executions>
<execution>
<id>first wsdl</id>
<goals>
<goal>wsdl2code</goal>
</goals>
<configuration>
<packageName>my.package</packageName>
<databindingName>xmlbeans</databindingName>
<wsdlFile>src/main/resources/ws1.wsdl</wsdlFile>
<generateServerSideInterface>true</generateServerSideInterface>
</configuration>
</execution>
<execution>
<id>second wsdl</id>
<goals>
<goal>wsdl2code</goal>
</goals>
<configuration>
<packageName>my.package</packageName>
<databindingName>xmlbeans</databindingName>
<wsdlFile>src/main/resources/ws2.svc.wsdl</wsdlFile>
<generateServerSideInterface>true</generateServerSideInterface>
</configuration>
</execution>
</executions>
</plugin>
我想让架构验证尽可能不严格。从一些谷歌搜索我看到在命令行上你可以设置-Eosv作为轴代码生成器的参数。
是否可以在maven插件中使用? 是否还有一些我可以用来使验证不那么严格的属性?
谢谢!
答案 0 :(得分:2)
在寻找类似的问题之后,我发现你可以添加:
<options>
<osv>true</osv>
</options>
我不确定它是否真的有效,因为它没有解决我的问题(客户端因无法识别的元素而异常),但如果有任何人在努力,请试一试并添加您的反馈。
在此处找到: How to set -Euwc param with axis2-wsdl2code-maven-plugin?