有人知道将 WSDL 转换为 XML 的工具/程序吗?
基本上我只想要一个空的 XML 模板。获得模板后,我可以用数据填充节点。
最佳答案
您可以提取 XML 请求/响应 templates from the WSDL using SoapUI .
SoapUI 实际上在很多方面都很有用,例如 Web 服务模拟、单元测试等。它是一个很棒的工具。
这是它在其示例之一中为操作生成的内容: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>
和
<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>
关于xml - 将 WSDL 转换为 XML 工具?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5091776/