本来想用 “wsimport -keep ” 生成客户端,结果报错“Use of SOAP Encoding is not supported.” 应该是缺jar包,

闲麻烦就发现了百度经验上的 这个方法。以下是教程

 

wsdl文件生成客户端

  1.  

    首先我们需要知道webservice接口地址,这里我的测试地址为http://localhost:8085/Service/Function?wsdl。

    “wsimport -keep ”生成客户端报错“Use of SOAP Encoding is not supported.”
  2.  

    右击另存为,保存为.wsdl的文件。

    “wsimport -keep ”生成客户端报错“Use of SOAP Encoding is not supported.”
  3.  

    在eclipse中新建一个java项目。

    “wsimport -keep ”生成客户端报错“Use of SOAP Encoding is not supported.”
  4.  

    将.wsdl文件拷贝到java工程下边。

    “wsimport -keep ”生成客户端报错“Use of SOAP Encoding is not supported.”
  5.  

    右击新建一个webservice client工程文件。

    “wsimport -keep ”生成客户端报错“Use of SOAP Encoding is not supported.”
  6.  

    点击browse,选择之前拷贝进去的.wsdl文件,点击下一步。

    “wsimport -keep ”生成客户端报错“Use of SOAP Encoding is not supported.”
  7.  

    这里会默认输出客户端的路径,一般为src文件。

    “wsimport -keep ”生成客户端报错“Use of SOAP Encoding is not supported.”
  8.  

    点击完成,客户端生成成功,我们就可以正常调用了。

    “wsimport -keep ”生成客户端报错“Use of SOAP Encoding is not supported.” 

相关文章:

  • 2021-11-05
  • 2021-10-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-27
  • 2021-08-17
  • 2021-08-06
猜你喜欢
  • 2021-11-06
  • 2021-06-02
  • 2021-12-15
  • 2021-04-10
  • 2021-06-20
  • 2022-12-23
相关资源
相似解决方案