0

I use soap. The soap server is located by url https://3logic.ru/ws/soap/soap.php?wsdl

I want to get the result of the getToday() function, which should display the current date, but when I connect to the function it gives me an error because the parameter was not found. As I understand it, it is a string that needs to be passed.

How can I pass a parameter to a function and get the correct answer? Currently I try to pass it in the function argument, but nothing comes out

var soap = require('soap');

var url = 'https://3logic.ru/ws/soap/soap.php?wsdl';

soap.createClient(url, function(err, client) {

    var args = {
        login: 'login',
        password: 'pass',
        encoding: 'UTF-8',
        trace: 1,
        cache_wsdl: 'WSDL_CACHE_NONE',
        soap_version: 'SOAP_1_1',
        'tns:str': "my@emailaddress.com"
    };

    client.getToday(args, function(err, result){
        if (err) throw err;
        console.log(result);
     });
});
Moritz Ringler
  • 9,772
  • 9
  • 21
  • 34
  • Can you share `console.log(result)` result? I can't test the `getToday()` function call due to no credential. – Bench Vue Feb 21 '23 at 00:44
  • You can test getToday() by soap-ui without coding in [here](https://stackoverflow.com/questions/74890978/how-to-consume-soap-web-services-using-node-js/74894011#74894011). It can get the `getToday()` result. [Here](https://stackoverflow.com/questions/75100450/how-can-i-make-soap-api-call-from-node-js-using-soap-npm/75109131#75109131) is how to passing credential. – Bench Vue Feb 21 '23 at 00:47

0 Answers0