soap-stub.js
function createClient(wsdlUrl, options, cb) {
  if (!cb) {
    cb = options;
    options = {};
  }

  if (this.errOnCreateClient) {
    return setTimeout(cb.bind(null, new Error('forced error on createClient')));
  }

  var client = getStub(wsdlUrl);

  if (client) {
    resetStubbedMethods(client);
    setTimeout(cb.bind(null, null, client));
  } else {
    setTimeout(cb.bind(null, new Error('no client stubbed for ' + wsdlUrl)));
  }
}
function createClient(wsdlUrl, options, cb) {
  if (!cb) {
    cb = options;
    options = {};
  }

  if (this.errOnCreateClient) {
    return setTimeout(cb.bind(null, new Error('forced error on createClient')));
  }

  var client = getStub(wsdlUrl);

  if (client) {
    resetStubbedMethods(client);
    setTimeout(cb.bind(null, null, client));
  } else {
    setTimeout(cb.bind(null, new Error('no client stubbed for ' + wsdlUrl)));
  }
}
function createClient ( wsdlUrl , options , cb ) { if ( ! cb ) { cb = options ; options = { } ; } if ( this . errOnCreateClient ) { return setTimeout ( cb . bind ( null , new Error ( 'forced error on createClient' ) ) ) ; } var client = getStub ( wsdlUrl ) ; if ( client ) { resetStubbedMethods ( client ) ; setTimeout ( cb . bind ( null , null , client ) ) ; } else { setTimeout ( cb . bind ( null , new Error ( 'no client stubbed for ' + wsdlUrl ) ) ) ; } }
Return a stubbed client based on the value of wsdlUrl.

@throws if wsdlUrl is unknown.

@param {String} wsdlUrl
@param {Object} options
@param {Function} cb
@return {Object}
Return a stubbed client based on the value of wsdlUrl .