我想在nodejs app中的客户端getRoleListOfUser函数中获取soap响应的状态代码。
return new Promise((resolve, reject) => {
soap.createClient(url, function(err, client) {
if (err){
console.log(err);
reject ({ error: true });
}
client.setSecurity(new soap.BasicAuthSecurity('admin', 'admin'));
client.getRoleListOfUser(args, function(err, result) {
if(err){
console.log(err);
reject ({ error: true });
}
console.log('success');
resolve ({ message: result });
});
});
});