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