惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cisco Talos Blog
Cisco Talos Blog
阮一峰的网络日志
阮一峰的网络日志
云风的 BLOG
云风的 BLOG
D
Docker
Vercel News
Vercel News
IT之家
IT之家
Recent Announcements
Recent Announcements
Last Week in AI
Last Week in AI
V
Visual Studio Blog
Engineering at Meta
Engineering at Meta
腾讯CDC
Google DeepMind News
Google DeepMind News
I
InfoQ
博客园 - 三生石上(FineUI控件)
Apple Machine Learning Research
Apple Machine Learning Research
The GitHub Blog
The GitHub Blog
博客园 - Franky
The Cloudflare Blog
A
About on SuperTechFans
有赞技术团队
有赞技术团队
Y
Y Combinator Blog
T
Tenable Blog
P
Proofpoint News Feed
Recorded Future
Recorded Future
Security Latest
Security Latest
H
Hackread – Cybersecurity News, Data Breaches, AI and More
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 聂微东
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Google Online Security Blog
Google Online Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Simon Willison's Weblog
Simon Willison's Weblog
The Last Watchdog
The Last Watchdog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
N
News and Events Feed by Topic
TaoSecurity Blog
TaoSecurity Blog
U
Unit 42
The Hacker News
The Hacker News
Martin Fowler
Martin Fowler
T
Threat Research - Cisco Blogs
NISL@THU
NISL@THU
F
Full Disclosure
M
MIT News - Artificial intelligence
人人都是产品经理
人人都是产品经理
Hugging Face - Blog
Hugging Face - Blog
V
V2EX
Project Zero
Project Zero

博客园 - 烂人

删除数据前把数据备份到另外一个表的通用Oracle Procedure代码 一个混乱千万级软件项目 Python中安装Prophet Python 列表下标操作 Weka java.lang.reflect.InvocationTargetException 金山注入浏览器默认开启上网导航 www.uu114.cn 下载Web微信视频 强制删除无用old windows文件夹命令 BitLocker 加密工具挂起和恢复命令行(windows7) R 统计学工具部署和使用 Microsoft Azure 01 (Summarize) Windows性能优化关键点-Windows Performance tuning important settings Office OneNote 自动打开问题 BAT 快速删除CVS文件和拷贝最近修改文件的目录结构 WINDOWS 远程桌面不能直接拷贝文件问题 PLSQL外键悲剧 eclipse 3.6 慢 卡 原因根源,终于找到了! - 烂人 Java applet java.lang.OutOfMemoryError: Java heap space 翻页中改变每页记录数后当前页面起始页问题
使用WSDL转换成JAVA客户端代码问题
烂人 · 2021-05-02 · via 博客园 - 烂人

  好久没法技术博客了,最近接触开发多了许多,又有新总结发给遇到问题的老铁们。

大家可能都知道使用JDK中自带的wsimport命令把WSDL文件或URL直接转换成JAVA客户端代码,以实现快速开发。

如下:

wsimport -keep "mywsdlfile.xml" -p com.zeng.test

可是我最近总是遇到无法生成service类文件,这个类继承于javax.xml.ws.Service。百思不得其解,看了老半天,发现控制台有warning,

[WARNING] Ignoring SOAP port "WorkOrderManagerPort": it uses non-standard SOAP 1.2 binding.

You must specify the "-extension" option to use this binding.

  line 88 of file:/C:/Users/xxxx/xxxx_1623774202.xml

[WARNING] Service "WorkOrderManagerService" does not contain any usable ports. try running wsimport with -extension switch.

  line 87 of file:/C:/Users/xxx/xxxx_1623774202.xml

 原来是因为客户给的是SOAP 1.2版本的wsdl文件,需要加-extension

既然wsimport知道我是用这个版本,干脆直接帮加上得了,然后出个warning不是更好吗,咳!浪费大家的时间。

改成下面命令,搞定:

wsimport -keep "mywsdlfile.xml" -p com.zeng.test -extension

 如果WSDL是一些老系统给的,很可能会有类似问题,自己看看控制台的输出,有惊喜。