Node-Soap Server will not parse WSDL file

I am tasked with making (node-soap)[https://github.com/milewise/node-soap] parse a wsdl file as part of a large scale application problem is it wont read the file

My Source Code:

var soap = require('soap');
var url = 'services/air_v24_0/Air.wsdl';
var args = {name: 'John Doe'};
var http = require('http');

soap.createClient(url, function(err, client){
    client.parseAirService(args, function(err, result){
        console.log(result);
    });
});

var parseAirService = {
    parseAirService: {
        port: {
            getArgs: function(args) {
                return {
                    name: args.name
                };
            }
        }
    }
};

var xml = require('fs').readFileSync(url, 'utf8');
var server = http.createServer(function(request, response){
    response.end("404: Not Found: "+request.url);
});

server.listen(8000);
soap.listen(server, 'services/air_v24_0/Air.wsdl', parseAirService, xml);

Answers:

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.