Postman, SoapUI test WebService Interface

First, the use Postman test WebService Interface

Postman: Applicable RESTful interface (HTTP / HTTPS protocol) function tests

Browser access via http://oa.tmt.tcl.com/ekp/sys/webservice/scbcWebserviceEntrance?wsdl can see the following information:

image

1, open Postman interface as follows:

Mode setting request to "POST"

Content-Type set to text / xml; charset = UTF-8

image

A method of call setting request excute body and the corresponding parameter param

Note that the reference variable {{pw}}

image

Description:

  • (. 1) xmlns: Ser = "http://service.util.odm.kmss.landray.com/" inside the address http://service.util.odm.kmss.landray.com/ "address need to be consistent and WebService ;
  • (2) xmlns: ser namespace web and the above process requires <ser: execute> consistent inside the web;
  • (3) execute a method name;
  • (4) arg0 parameter;

The setup script and login token

image

//生成令牌
var pw = "scbcsmes"+getMyDate(new Date());


console.log("pw:==",pw);
var md5Str =CryptoJS.MD5(pw);
postman.setGlobalVariable("pw", md5Str.toString(CryptoJS.enc.Hex).toUpperCase());
 
 
function getMyDate(str) {
    if (str == null || str == "") {
        return '';
    }
    var oDate = new Date(str),
        oYear = oDate.getFullYear(),
        oMonth = oDate.getMonth() + 1,
        oDay = oDate.getDate(),
        oHour = oDate.getHours(),
        oMin = oDate.getMinutes(),
        oTime = oYear + '' + getzf(oMonth) + '' + getzf(oDay) + '' + getzf(oHour) + '' + getzf(oMin) ;//最后拼接时间
    return oTime;
};
function getzf(num) {
    if (parseInt(num) < 10) {
        num = '0' + num;
    }
    return num;
}

Request results were as follows:

image

Second, the test WebService interfaces with SoapUI

SoapUI: Applicable WebService test interface (SOAP protocol)

1, the menu bar File -> New SOAP Project -> Open Window -> Initial WSDL input http://oa.tmt.tcl.com/ekp/sys/webservice/scbcWebserviceEntrance?wsdl
-> the OK, SoapUI automatically to all methods the listed.
-> Double-node execute the following Request, Request 1 automatically open window, as shown below

image

2, are only entered in <arg0> </ arg0> parameter, clicking the window triangle blocks, returns the results as shown below?:

image

Guess you like

Origin www.cnblogs.com/springsnow/p/12533224.html