使用wsdl的cxf 3.0.2运行时生成Web服务客户端

时间:2014-11-07 15:33:19

标签: java web-services soap wsdl

我正在尝试生成此wsdl文件的Web服务客户端:

http://soapclient.com/xml/soapresponder.wsdl

但是我收到了这个错误:

WSDLToJava Error: Rpc/encoded wsdls are not supported with CXF

org.apache.cxf.tools.common.ToolException: Rpc/encoded wsdls are not supported with CXF
    at org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder.checkSupported(JAXWSDefinitionBuilder.java:142)
    at org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder.build(JAXWSDefinitionBuilder.java:87)
    at org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder.build(JAXWSDefinitionBuilder.java:61)
    at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:198)
    at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:164)
    at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:412)
    at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
    at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
    at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
    at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)

您是否知道如何以其他方式为此wsdl生成Web客户端?

1 个答案:

答案 0 :(得分:0)

CXF不支持RPC / encoded。如果要为RPC / encoded生成客户端,那么我建议使用Apache Axis 1.4

https://axis.apache.org/axis/

有关此内容的更多信息,请访问此网址 http://architects.dzone.com/articles/wsdltojava-error-rpcencoded