每次我跑步wsimport,我收到此错误:
[错误]“不支持使用 SOAP 编码。
file:dummy.wsdl 中第 65 行的 SOAP 扩展元素具有 use="encoded" "
无法解析 WSDL。
WSDL(错误块):
<wsdl:input name="dummyRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:cmg.stdapp.webservices.generalplugin" use="encoded" />
</wsdl:input>
这是因为给定的 WSDL 使用“编码”,这是一种 RPC 编码,也是一种非常古老的处理方式。
wsimport 不支持 RPC 编码
有关您的错误消息的更多信息 https://github.com/javaee/metro-jax-ws/issues/930
作为替代尝试使用阿帕奇轴 http://axis.apache.org/axis/这很恶心而且很旧,但我想它会让你继续前进。
对于 Maven 项目,请将 WSDL 放入 src/main/resources/wsdl
并将以下内容添加到您的 pom.xml 中
<dependency>
<groupId>org.apache.axis</groupId>
<artifactId>axis</artifactId>
<version>1.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.axis</groupId>
<artifactId>axis-jaxrpc</artifactId>
<version>1.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>wsdl4j</groupId>
<artifactId>wsdl4j</artifactId>
<version>1.6.2</version>
<scope>compile</scope>
</dependency>
<plugins>
...
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>axistools-maven-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
<configuration>
<packageSpace>com.mycompany.service.client</packageSpace>
<sourceDirectory>src/main/resources/wsdl</sourceDirectory>
<outputDirectory>target/generated-sources/wsdl2java</outputDirectory>
</configuration>
</plugin>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)