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