将样本请求XML从wsdl转换为Java

问题描述 投票:0回答:1

这里是示例wsdl:http://www.dneonline.com/calculator.asmx?wsdl,这是在SOAPUI中生成的示例请求:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
   <soapenv:Header/>
   <soapenv:Body>
      <tem:Add>
         <tem:intA>?</tem:intA>
         <tem:intB>?</tem:intB>
      </tem:Add>
   </soapenv:Body>
</soapenv:Envelope>

我知道那里有SOAPUI之类的工具,还有其他一些工具可以自动从wsdl生成示例XML调用。但是使用wsimport导入wsdl客户端后,是否可以在JAVA中生成示例请求?

java xml soap wsdl wsimport
1个回答
0
投票

您可以使用soap UI本身。检查一下

https://www.soapui.org/soap-and-wsdl/soap-code-generation.html

enter image description here

最新问题
© www.soinside.com 2019 - 2024. All rights reserved.