加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

java – 是否可以使用Spring-WS从WSDL文件创建WS-client? (似

发布时间:2020-12-15 01:22:55 所属栏目:大数据 来源:网络整理
导读:我想知道是否可以使用Spring Web Services从WSDL文件创建Web服务客户端. 我的意思是从WSDL开始,我暂时没有任何XSD. 但我读过Josh Long的“Spring Recipes A Problem-Solution Approach”,Hamidreza Sattari的“Spring Web Services 2 Cookbook”和教程本身(6

我想知道是否可以使用Spring Web Services从WSDL文件创建Web服务客户端.

我的意思是从WSDL开始,我暂时没有任何XSD.

但我读过Josh Long的“Spring Recipes A Problem-Solution Approach”,Hamidreza Sattari的“Spring Web Services 2 Cookbook”和教程本身(6. Using Spring Web Services on the Client),并没有提到这个功能.

我还阅读了其他帖子,如Webservice-Client: Common approach with Spring WS,JAXB and just one WSDL file?或Spring-ws client from WSDL(此处为stackoverflow),但没有任何进一步的结果.

我甚至在Spring论坛上提出了这个问题,但在超过60次读取之后没有回复:Is it possible to create a WS-client from WSDL file using SWS? (It seems not)

也许这是不可能的.

谢谢.

最佳答案
你可以这样做:

>使用JDK发行版附带的xjc工具生成java类型 – xjc -wsdl file.wsdl
>然后使用生成的java类型,使用WebserviceTemplate,描述here来创建客户端.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读