使用PostMan測試WebService接口教程


一、操作步驟

1、設置URL

2、設置請求模式:Post

3、設置Header:添加 Content-Type ,值為 text/xml;charset=utf-8

4、設置Body:勾選raw

5、輸入Body內容:(詳見 二)

 

二、請求WebService時的Body結構

 

<?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>
    <getXXXX xmlns="http://WebXml.com.cn/">  
      <Code>string</Code>
      <userID>string</userID>
    </getWeather>
  </soap:Body>
</soap:Envelope>


詳細說明:

(1) getXXXX是方法名。

(2)Code、userID是方法參數。

  (3)   xmlns對應的接口的targetNamespace屬性


免責聲明!

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



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