<commit_before>'use strict';
var soap = require('soap');
var easysoap = require('easysoap');
var http = require('http');
var params = {host: 'ipg.umas.cl',path: '/wscrm/Service1.asmx',wsdl: '/wscrm/Service1.asmx?WSDL'};
// ?USUARIO=wscrm&CLAVE=56d9aed975d82fd94f69aa36a0b94a693ffd7c65

function allFunctions() {
  var soapClient = easysoap.createClient(params);
  console.log("LOL");
  console.log(soapClient);
  soapClient.getAllFunctions()
    .then(function (list) {
      console.log("plpl");
      console.log(list);
    }
  )

  soapClient.getMethodParamsByName('WS_sp_busca_matriculado_todos_crm')
    .then(function (list) {
      console.log("**************************************************************************** GET METHOS PARAMS ****************************************************************************");

      console.log(JSON.stringify(list.request));
    }
  )


  soapClient.call({
    'method' : 'wsSpBuscaMatriculadoTodosCrm',
      'params' : {
        'USUARIO' : 'wscrm',
        'PASSWORD' : '<PASSWORD>'
      }
    }
  ).then(function (res) {
    console.log("BLA");
    console.log(res);
  });
}

// var soapHeader = ''//xml string for header
// var url = 'http://ipg.umas.cl/wscrm/'
// soap.createClient(url, function(err, client){
//   // client.addSoapHeader(soapHeader);
//   var args = {
//     USUARIO: "wscrm",
//     PASSWORD: "<PASSWORD>"
//   };
//
//   client.BasicVerify(args, function(err, result){
//    if(err){
//      throw err;
//    }
//    console.log(result);
//   });
// });

// WS_sp_busca_matriculado_todos_crm
function buscarMatriculados() {
  var req = http.get(params, function(res) {
    console.log('STATUS: ' + res.statusCode);
    console.log('HEADERS: ' + JSON.stringify(res.headers));
    // Buffer the body entirely for processing as a whole.<commit_msg>Fix umas header<commit_after>'use strict';
var soap = require('soap');
var easysoap = require('easysoap');
var http = require('http');
var params = {host: 'ipg.umas.cl',path: '/wscrm/Service1.asmx',wsdl: '/wscrm/Service1.asmx?WSDL'};
// ?USUARIO=wscrm&CLAVE=56d9aed975d82fd94f69aa36a0b94a693ffd7c65

function allFunctions() {
  var soapClient = easysoap.createClient(params);
  console.log("LOL");
  console.log(soapClient);
  soapClient.getAllFunctions()
    .then(function (list) {
      console.log("plpl");
      console.log(list);
    }
  )

  soapClient.getMethodParamsByName('WS_sp_busca_matriculado_todos_crm')
    .then(function (list) {
      console.log("**************************************************************************** GET METHOS PARAMS ****************************************************************************");
      console.log(JSON.stringify(list.request));
    }
  )

  soapClient.call({
    method : 'WS_sp_busca_matriculado_todos_crm',
    attributes: {
      xmlns: 'http://umas.cl/'
    },
    params : {
      'usuario' : 'wscrm',
      'password' : '<PASSWORD>'
    }
  }).then(function (res) {
    console.log("BLA");
    console.log(JSON.stringify(res));
  });
}

// var soapHeader = ''//xml string for header
// var url = 'http://ipg.umas.cl/wscrm/'
// soap.createClient(url, function(err, client){
//   // client.addSoapHeader(soapHeader);
//   var args = {
//     USUARIO: "wscrm",
//     PASSWORD: "<PASSWORD>"
//   };
//
//   client.BasicVerify(args, function(err, result){
//    if(err){
//      throw err;
//    }
//    console.log(result);
//   });
// });

// WS_sp_busca_matriculado_todos_crm
function buscarMatriculados() {
  var req = http.get(params, function(res) {
    console.log('STATUS: ' + res.statusCode);
    console.log('HEADERS: ' + JSON.stringify(res.headers));
    // Buffer the body entirely for processing as a whole.
{'fraction_non_alphanumeric': 0.24514563106796117, 'fraction_numerical': 0.01348435814455232, 'mean_word_length': 3.63625, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 3}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1835226', 'n_tokens_mistral': 1319, 'n_tokens_neox': 1262, 'n_words': 196}