简体   繁体   English

从 WSDL URL 生成 WSDL 文件

[英]Generate WSDL file from WSDL URL

I have a WebService definition exposed on http://localhost:8080/myService?wsdl我在http://localhost:8080/myService?wsdl上公开了一个 WebService 定义

This WSDL contains many external schema imports.此 WSDL 包含许多外部模式导入。

I want to save this WSDL to file (single one or wsdl + xsd - whatever).我想将此 WSDL 保存到文件(单个或 wsdl + xsd - 无论如何)。

I know that SoapUI can do that via Export definition , however I'm working on Windows and SoapUI throws:我知道SoapUI可以通过Export definition做到这一点,但是我正在使用 Windows 并且SoapUI抛出:

java.io.FileNotFoundException:
d:\myService_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20_21_22_23_24_25_26_27_28_29_30_31_32_33_34_35_36_37_38_39_40_41_42_43_44_45_46_47_48_49_50_51_52_53_54_55_56_57_58_59_60_61_62_63_64_65_66_67_68_69_70_71_72_73_74_75_76_77_78_79_80_81_82_83.xsd 
(The filename, directory name, or volume label syntax is incorrect) 

As you can see i have like 83+ .xsd file which cousing too long filename (on Windows).正如你所看到的,我有 83+ .xsd 文件,它的文件名太长(在 Windows 上)。

Any idea how to change a SoapUI naming convention or how to export definition to file with other tool?知道如何更改 SoapUI 命名约定或如何使用其他工具将定义导出到文件吗?

Right-click and choose "Show Interface Viewer".右键单击并选择“显示界面查看器”。 Choose the tab "WSDL Content".选择选项卡“WSDL 内容”。 Right-click the WSDL in the right-hand side and choose "Select All", then "Copy".右键单击右侧的 WSDL 并选择“全选”,然后选择“复制”。 Paste into Notepad and Save.粘贴到记事本并保存。

(2016/04/13 Update incorporating my own comment below) Alternately: (2016 年 4 月 13 日更新,在下面包含了我自己的评论)或者:

Try Merging WSDL and XSD files which has the description of a free tool to do this.尝试合并 WSDL 和 XSD 文件,其中有免费工具的描述可以做到这一点。 It has a link to Google Code page for the source code and binary.它有一个指向源代码和二进制文件的谷歌代码页面的链接。 On the Google Code page, click the Downloads link on the left to download only the Windows binary, if you prefer not to build it from source code.在 Google 代码页面上,如果您不想从源代码构建它,请单击左侧的下载链接以仅下载 Windows 二进制文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM