我正在尝试使用 jaxws 生成我的 java 类。问题是我的绑定文件被忽略了。我在 bindingDirectory 中有两个绑定文件。也许有人可以帮忙?
<profiles>
<profile>
<id>Generate model (POJOS) from wsdl</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<!-- JAX-WS provides a tool called wsimport which takes the WSDL of a
web service and generates proxy classes or the WSDL's service and port definitions.
These can then be used to access the web service endpoint. -->
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<executions>
<execution>
<id>Id1</id>
<goals>
<goal>wsimport</goal>
</goals>
<configuration>
<wsdlUrls>
<wsdlUrl>http://intan.local:8080/toa/ws/airService?wsdl</wsdlUrl>
</wsdlUrls>
<target>2.1</target>
<xjcArgs>
<xjcArg>-XautoNameResolution</xjcArg>
</xjcArgs>
<verbose>true</verbose>
<extension>true</extension>
<bindingFiles>
<bindingFile>src/main/resources/schemas/2011b/xjb/global.xjb</bindingFile>
<bindingFile>src/main/resources/schemas/2011b/xjb/TPA_ExtensionsType.xjb</bindingFile>
</bindingFiles>
<keep>true</keep>
<packageName>gr.intan.toa._2011b</packageName>
<sourceDestDir>src/main/generated</sourceDestDir>
<extension>true</extension>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>javax.xml</groupId>
<artifactId>webservices-api</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-xjc</artifactId>
<version>2.1.12</version>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>2.1.4</version>
</dependency>
</dependencies>
<configuration>
<target>2.1</target>
<xjcArgs>
<xjcArg>-XautoNameResolution</xjcArg>
</xjcArgs>
<bindingDirectory>src/main/resources/schemas/2011b/xjb</bindingDirectory>
<keep>true</keep>
</configuration>
</plugin>
</plugins>
</build>
</profile>
提前致谢