postman请求webService

时间: 2023-08-15 admin 互联网

postman请求webService

postman请求webService

postman请求调用asmx接口

实例

1、请求方式: POST
2、webService地址:http://127.0.0.1:/WebService/LoginService.asmx
3、header中添加:Content-Type:text/xml;charset=utf-8
4、参数:(xml格式)

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="" xmlns:xsd="" xmlns:soap="/">
  <soap:Body>
    <Login xmlns="/">
      <user>admin</user>
      <psd>123456</psd>
    </Login>
  </soap:Body>
</soap:Envelope>

如下图:

返回值

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="/" xmlns:xsi="" xmlns:xsd="">
    <soap:Body>
        <LoginResponse xmlns="/">
            <LoginResult>{
                        "status": 200,
                        "msg": "登录成功"
                         }
			</LoginResult>
        </LoginResponse>
    </soap:Body>
</soap:Envelope>