【发布时间】:2011-06-15 17:34:55
【问题描述】:
我想使用 cxf-maven-plugin 根据此文档从 WSDL 生成 Java 代码:http://cxf.apache.org/docs/maven-cxf-codegen-plugin-wsdl-to-java.html
我尝试访问的服务受密码保护。如何指定密码?这似乎没有记录在案。
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${project.build.directory}/generated/cxf</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>http://host/TheService.wsdl</wsdl>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
【问题讨论】:
-
安德鲁是对的,没有办法,但你可以试试my answer。