一、使用Postman测试WebService接口
Postman:适用RESTful接口(HTTP/HTTPS协议)的功能测试
1、打开Postman界面如下:
设置请求方式为”POST”
设置Content-Type为text/xml;charset=UTF-8
设置body请求调用的方法excute及对应的参数param
注意引用变量{ {pw}}
说明:(1) xmlns:ser="http://service.util.odm.kmss.landray.com/"里面地址http://service.util.odm.kmss.landray.com/"需要和WebService地址保持一致;
(2)xmlns:ser的命名空间web需要和上面方法 里面的web保持一致;
(3)execute为方法名;
(4)arg0为参数;
设置脚本和登录令牌
//生成令牌
var pw = "scbcsmes"+getMyDate(newDate());
console.log("pw:==",pw);var md5Str =CryptoJS.MD5(pw);
postman.setGlobalVariable("pw", md5Str.