分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 前端开发

学习 WebService 第四步:利用WSDL(URL)生成WebService客户端<初级>

发布时间:2023-09-06 01:46责任编辑:白小东关键词:Web

我用的是最简单的方法,利用jdk的命令wsimport -keep -p 包路径 -d 代码存放位置 WSDL网址

蓝色是命令,粉色是存放位置,橘色是URL

C:\Program Files\IBM\SQLLIB\java\jdk\bin>wsimport -keep -p com.demo.client -d C:\Users\IBM_ADMIN\Documents\MyWorking\WebService\WSDL2JAVA http://ws.webxml.com.cn/WebServices/MobileCodeWS.asmx?WSDL
parsing WSDL...

[WARNING] Ignoring SOAP port "MobileCodeWSSoap12": it uses non-standard SOAP 1.2 binding.
You must specify the "-extension" option to use this binding.
  line 199 of http://ws.webxml.com.cn/WebServices/MobileCodeWS.asmx?WSDL

[WARNING] ignoring port "MobileCodeWSHttpGet": no SOAP address specified. try running wsimport with -extension switch.
  line 202 of http://ws.webxml.com.cn/WebServices/MobileCodeWS.asmx?WSDL

[WARNING] ignoring port "MobileCodeWSHttpPost": no SOAP address specified. try running wsimport with -extension switch.
  line 205 of http://ws.webxml.com.cn/WebServices/MobileCodeWS.asmx?WSDL

Generating code...

Compiling code...

C:\Program Files\IBM\SQLLIB\java\jdk\bin>

我用的这个URL:http://ws.webxml.com.cn/WebServices/MobileCodeWS.asmx?WSDL(这是个免费服务,大家可以用,每天30次)

生成如下文件,其中Java文件是我后续要用的,Class文件据说可以直接打包用(没试过)

学习 WebService 第四步:利用WSDL(URL)生成WebService客户端<初级>

原文地址:https://www.cnblogs.com/dlsunf/p/8630117.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved