How to use the strong-soap.soap function in strong-soap

To help you get started, we’ve selected a few strong-soap examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github strongloop / loopback-connector-soap / lib / soap-connector.js View on Github external
// Copyright IBM Corp. 2013,2015. All Rights Reserved.
// Node module: loopback-connector-soap
// US Government Users Restricted Rights - Use, duplication or disclosure
// restricted by GSA ADP Schedule Contract with IBM Corp.

var g = require('strong-globalize')();
var soap = require('strong-soap').soap;
var debug = require('debug')('loopback:connector:soap');
var HttpClient = require('./http');

/**
 * Export the initialize method to loopback-datasource-juggler
 * @param {DataSource} dataSource The data source object
 * @param callback
 */
exports.initialize = function initializeDataSource(dataSource, callback) {
  var settings = dataSource.settings || {};

  var connector = new SOAPConnector(settings);

  dataSource.connector = connector;
  dataSource.connector.dataSource = dataSource;
github strongloop / loopback-connector-soap / lib / http.js View on Github external
// Copyright IBM Corp. 2015. All Rights Reserved.
// Node module: loopback-connector-soap
// US Government Users Restricted Rights - Use, duplication or disclosure
// restricted by GSA ADP Schedule Contract with IBM Corp.

'use strict';

var req = require('request');
var util = require('util');
var url = require('url');
var debug = require('debug')('loopback:connector:soap:http');
var VERSION = require('../package.json').version;

var HttpClient = require('strong-soap').soap.HttpClient;

function LBHttpClient(options, connector) {
  if (!(this instanceof LBHttpClient)) {
    return new LBHttpClient(options, connector);
  }
  var httpClient = new HttpClient(this, options);
  this.req = req;
  if (options && options.requestOptions) {
    this.req = req.defaults(options.requestOptions);
  }
  this.connector = connector;
}

util.inherits(LBHttpClient, HttpClient);

/**
github strongloop / generator-loopback / soap / wsdl-loader.js View on Github external
// 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);
  });
}
github revskill10 / next-template / api / core / create-soap-client.js View on Github external
const soap = require('strong-soap').soap;

async function createSoapClient(url, options={}) {  
  return new Promise(function (resolve, reject) {
    soap.createClient(url, options, function(err, client) {
      if (err) {
        return reject(err)
      } else {
        return resolve(client)
      }
    })
  })
}

module.exports = {
  createSoapClient,
}