用nodejs调用webservice,是用soap包实现的.

步骤如下:
第一步:安装soap包

npm  install soap

第二部:调用webservice

var soap = require('soap');
var url = 'http://webservice.webxml.com.cn/WebServices/MobileCodeWS.asmx?wsdl';
var args = { mobileCode: '1343633****'};
var soaptest = function(){
soap.createClient(url, function(err, client) {
client.getMobileCodeInfo(args, function(err, result) {
console.log(result);
});
});
}
soaptest();

 

运行之后就可查看到该手机的归属地。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-18
  • 2022-12-23
  • 2021-12-02
  • 2021-12-07
  • 2021-12-23
猜你喜欢
  • 2022-02-17
  • 2022-01-25
  • 2021-10-15
  • 2021-06-07
  • 2021-04-17
  • 2021-12-03
  • 2022-02-20
相关资源
相似解决方案