欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

postman调试webservice接口

程序员文章站 2022-04-30 20:14:49
...

postman调试webservice

1、设置URL
http://172.16.2.167:8080/webservice/services/mclz?wsdl
2、设置请求模式:Post
3、设置Header:添加 Content-Type ,值为 text/xml;charset=utf-8
4、设置Body:勾选raw
5、输入Body内容
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:ernesto="http://controller.mclz.elink.com/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Body>
    <ernesto:test>
      <param>1</param>
    </ernesto:test>
  </soapenv:Body>
</soapenv:Envelope>

注意:xmlns:ernesto为webservice的targetNamespace;

response结果如下:
postman调试webservice接口

复杂参数请求
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:ernesto="http://controller.mclz.elink.com/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Body>
    <ernesto:saveMclzData>
      <param>{"securityParams":{"userName":"saidakeji","code":"6","password":"1qazxsw2elink"},queryParams:{"xydm":"610403630030462","xkzbh":"XCY201661040300113","qymc":"杨凌妈咪的味道包子店","sblb":[{"sbmc":"操作间1","sbbs":"12a1e321-eaa6-4c17-979a-f26c815f2e7c"},{"sbmc":"操作间2","sbbs":"12a1e321-eaa6-4c17-979a-f26c815f2e7c"}]}}</param>
    </ernesto:saveMclzData>
  </soapenv:Body>
</soapenv:Envelope>

response结果如下:
postman调试webservice接口

相关标签: webService