Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Copyright IBM Corp. 2017,2019. All Rights Reserved.
// Node module: generator-loopback
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT
'use strict';
var url = require('url');
var chalk = require('chalk');
var fs = require('fs');
var async = require('async');
var soapGenerator = require('loopback-soap');
var soap = require('strong-soap').soap;
var WSDL = soap.WSDL;
var path = require('path');
var selectedWsdl, selectedWsdlUrl, wsdlServices,
selectedService, selectedBinding;
// loads remote WSDL or local WSDL using strong-soap module APIs.
function loadWsdl(wsdlUrl, log, cb) {
WSDL.open(wsdlUrl, {}, function(err, wsdl) {
if (err) {
return cb(err);
}
cb(null, wsdl);
});
}
// get services defined in the wsdl