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="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>
    <Login xmlns="http://tempuri.org/">
      <user>admin</user>
      <psd>123456</psd>
    </Login>
  </soap:Body>
</soap:Envelope>

如下图:
在这里插入图片描述
返回值

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
        <LoginResponse xmlns="http://tempuri.org/">
            <LoginResult>{
                        "status": 200,
                        "msg": "登录成功"
                         }
			</LoginResult>
        </LoginResponse>
    </soap:Body>
</soap:Envelope>
Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐