WX Server permission denied, open XXX
发布于 7 年前 作者 lixiulan 1426 次浏览 来自 问答

微信Server端,创建一个SOAP Web Server,文件系统打开WSDL报如下错误,请解决。

permission denied, open ‘./HelloService.wsdl’。

全部代码如下:

var http = require(‘http’);

var soap = require(‘soap’);

var helloService = {

Hello_Service: {

Hello_Port: {

sayHello: function (args) {

return {

greeting: args.name + “Hello!!!”

};

}

}

}

}

var xml = require(‘fs’).readFileSync(’./HelloService.wsdl’, ‘utf8’),

server = http.createServer(function (request, response) {

response.end("404: Not Found: " + request.url)

});

server.listen(8000);

soap.listen(server, ‘/wsdl’, helloService, xml);

console.log(‘Webserver start listen at http://eqeju3pb.qcloud.la:8000/wsdl?wsdl);

回到顶部