0
我试图按照我自己的WSDL在http://spring.io/guides/gs/consuming-web-service上给出的例子。但是,我无法看到正在生成的任何JAXB类。没有错误或有用的调试信息。使用org.jvnet.jaxb2.maven2为WSDL生成JAXB组件:maven-jaxb2-plugin
上述示例不起作用的限制或WSDL结构是什么?
让我知道你是否需要任何进一步的信息。
谢谢
我试图按照我自己的WSDL在http://spring.io/guides/gs/consuming-web-service上给出的例子。但是,我无法看到正在生成的任何JAXB类。没有错误或有用的调试信息。使用org.jvnet.jaxb2.maven2为WSDL生成JAXB组件:maven-jaxb2-plugin
上述示例不起作用的限制或WSDL结构是什么?
让我知道你是否需要任何进一步的信息。
谢谢
检查你的POM,应该沿着这些路线的东西:有细微的差别,以配合您的WSDL位置/装订(如果有的话)/等。 类
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.8.1</version> <!-- I used version 0.8.1 since 0.8.2 is bugged and it throws the Exception
"Illegal pattern character 'g' "when using italian locale -->
<executions>
<execution>
<id>wsdl-generation</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<schemaDirectory>src/main/resources/wsdl</schemaDirectory>
<schemaIncludes>
<include>*.xsd</include>
</schemaIncludes>
<extension>true</extension>
<!-- Specify binding directory where we put customization for the
generated classes -->
<bindingDirectory>src/main/resources/binding</bindingDirectory>
<bindingIncludes>
<include>*.xjb</include>
</bindingIncludes>
</configuration>
</execution>
</executions>
</plugin>
是在目标下生成的,因此请确保将它们添加到类路径中(只需在运行生成源之后,执行maven-> update项目,如果我记得正确,它应该处理它)。 您可能想要做一个右键点击 - >运行 - > maven生成源,以防它看起来不能正常工作。