【发布时间】:2014-09-08 08:49:10
【问题描述】:
我正在进行我的第一个 Java-Spring 项目。我需要与几个网络服务通信。我提供了一些 WSDL,所以我使用 Jax2B 来自动生成类。
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.9.0</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaLanguage>WSDL</schemaLanguage>
<generatePackage>hello.wsdl</generatePackage>
<forceRegenerate>true</forceRegenerate>
<schemas>
<schema>
<url>http://wsf.cdyne.com/WeatherWS/Weather.asmx?wsdl</url>
</schema>
</schemas>
</configuration>
</plugin>
我的项目是一个网络项目。这里的问题是,我的类是在目标文件夹中生成的,而不是在我的项目中。有人知道如何解决这个问题吗?类是正确生成的,但不是在正确的目录中。如您所见,我目前正在使用测试 wsdl 和模型名称。我遵循了这个教程:http://spring.io/guides/gs/consuming-web-service/
在此先感谢
【问题讨论】: