PostMan Test Web Service

1, set the URL

2, mode setting request: Post

3, is provided Header : Add  the Content-the Type , is text / xml; charset = utf- 8

4, set the Body: check the raw

5. Enter the Body content

Body case:

The following points are to be modified to replace place:

<Soap: Body> parent node is fixed

xmlns identification, namespaces such as: http: //WebXml.com.cn/

getWeather nodes under: <soap Body> node name of the method is to call the web service

Nodes under <getWeather> parameter theCityCode web serivce method is to be transmitted, theUserID method parameter

Body structure when requested web serivce

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

Body structure web service response time of:

<?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>
    <getWeatherResponse xmlns="http://WebXml.com.cn/">
      <getWeatherResult>
        <string>string</string>
        <string>string</string>
      </getWeatherResult>
    </getWeatherResponse>
  </soap:Body>
</soap:Envelope>

The return value is a process of content getWeatherResult

Guess you like

Origin www.cnblogs.com/dxmdiy/p/11127567.html