getSupply basic
This commit is contained in:
parent
7716921005
commit
c56f437fed
|
@ -1,2 +1,2 @@
|
|||
node_modules
|
||||
config.js
|
||||
config.json
|
|
@ -2,12 +2,11 @@ var querystring = require("querystring");
|
|||
var xml2js = require('xml2js');
|
||||
var soap = require('soap');
|
||||
var getXml = require('./getXml');
|
||||
var credential = require('./credential');
|
||||
var config = require('./config.json');
|
||||
|
||||
function soapClient(xmlFile){
|
||||
|
||||
var url = 'http://services2-acc.floraholland.com/CommercialCustomer/CommercialCustomer_1p5.svc?wsdl';
|
||||
var auth = "Basic " + new Buffer(credential.user + ":" + credential.pass).toString("base64");
|
||||
var auth = "Basic " + new Buffer(config.user + ":" + config.pass).toString("base64");
|
||||
var options =
|
||||
{
|
||||
wsdl_headers:{
|
||||
|
@ -17,13 +16,14 @@ function soapClient(xmlFile){
|
|||
valueKey: '_'
|
||||
};
|
||||
|
||||
|
||||
soap.createClient(url,options, function(err, client) {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
return;
|
||||
}
|
||||
|
||||
client.setSecurity(new soap.BasicAuthSecurity(credential.use,credential.pass));
|
||||
client.setSecurity(new soap.BasicAuthSecurity(config.user,config.pass));
|
||||
console.log('no entra');
|
||||
getXml.getXml(xmlFile, function(err, data) {
|
||||
if (err) {
|
||||
|
|
Loading…
Reference in New Issue