将 WSDL 转换为 XML 工具?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5091776/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Convert WSDL to XML Tool?
提问by Richard
Does anyone know of a tool / program to convert a WSDL to XML?
有谁知道将 WSDL 转换为 XML 的工具/程序?
Basically I just want an empty XML template. I can populate the nodes with data after I get the template.
基本上我只想要一个空的 XML 模板。获得模板后,我可以用数据填充节点。
采纳答案by Richard
You can extract XML request/response templates from the WSDL using SoapUI.
您可以使用 SoapUI 从 WSDL 中提取 XML 请求/响应模板。
SoapUI is actually useful at a lot of things like web service mocking, unit testing etc. It is a great tool.
SoapUI 实际上在很多方面都很有用,比如 Web 服务模拟、单元测试等。它是一个很棒的工具。
Here is what it generates for an operation in one of their examples at: http://www.webservicex.net/CurrencyConvertor.asmx?WSDL
以下是它在其中一个示例中为操作生成的内容:http: //www.webservicex.net/CurrencyConvertor.asmx?WSDL
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.webserviceX.NET/">
<soapenv:Header/>
<soapenv:Body>
<web:ConversionRate>
<web:FromCurrency>?</web:FromCurrency>
<web:ToCurrency>?</web:ToCurrency>
</web:ConversionRate>
</soapenv:Body>
</soapenv:Envelope>
and
和
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:web="http://www.webserviceX.NET/">
<soap:Header/>
<soap:Body>
<web:ConversionRateResponse>
<web:ConversionRateResult>?</web:ConversionRateResult>
</web:ConversionRateResponse>
</soap:Body>
</soap:Envelope>

