vizCard.js
798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
'use strict';
var express = require('express');
var router = express.Router();
const EasySoap = require('easysoap');
/* GET users listing. */
router.get('/', function(req, res, next) {
// define soap params
const params = {
host: 'www.sample.com',
path: '/path/soap/',
// set soap headers (optional)
headers: [{
'name' : 'item_name',
'value' : 'item_value',
'namespace': 'item_namespace'
}]
}
/*
* create the client
*/
var soapClient = EasySoap(params);
console.log(soapClient);
/*
* get all available functions
*/
soapClient.getAllFunctions()
.then((functionArray) => { console.log(functionArray); })
.catch((err) => { throw new Error(err); });
res.send('viz card id');
});
module.exports = router;