使用Postman调用Web Service接口
1.使用 Post 方法,并在地址栏输入需要调用的web service服务,比如
http://localhost/MyServices/callservice.asmx
2.在Headers里面添加一个Content-Type。
3.在Body里面填写参数,注意,格式选择 raw 。
内容如下:
<?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> <【方法名】 xmlns="http://tempuri.org/"> <【参数名】>【参数值】</【参数名】> </【方法名】> </soap:Body> </soap:Envelope>
4.点击 Send即可。
记录编程的点滴,体会学习的乐趣