postman調用webservice方法


1、headers加上Content-Type=text/xml;charset=utf-8,如下圖:

 

2、 body選擇xml格式,如下圖:

 

3、測試:

比如url為:http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?wsdl

比如入參xml為:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <getSupportCity xmlns="http://WebXml.com.cn/">
      <byProvinceName>四川</byProvinceName>
    </getSupportCity>
  </soap:Body>
</soap:Envelope>

調用為:

 【備注:有的比較特殊情況】

1、在header加上SOAPAction值為application/soap+xml;charset=utf-8

 2、body用xml格式,內容:

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="接口地址">
    <soapenv:Header/>
    <soapenv:Body>
        <ser:login soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
            <param1 xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">參數1</param1>
        </ser:login>
    </soapenv:Body>
</soapenv:Envelope>

 如圖:

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM