Answer the question
In order to leave comments, you need to log in
How to force soap in node to pass location?
Everything is fine exactly until I start making another request :(
var
soap = require('soap'),
config = {
url: 'https://192.168.0.5',
port: 60,
def: {
login : 'admin',
pass : ''
}
},
args = {trace: 1,exceptions:1,location:`${config.url}:${config.port}`,rejectUnauthorized: false,};
soap.createClient(`${config.url}:${config.port}?wsdl`,{wsdl_options: args}, function(err, client) {
client.Login(config.def.login, config.def.pass, function(err, response) {
if (err) console.log(err);
else console.log('ok');
});
});
{ Error: connect ECONNREFUSED 127.0.0.1:60
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1083:14)
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0. 0.1',
port: 60}
<wsdl:definitions>
<wsdl:service name="sms_1">
<wsdl:port name="sms_1Soap12" binding="tns:sms_1Soap12">
<soap12:address location="https://www.localhost:60"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Answer the question
In order to leave comments, you need to log in
Well, in general, the answer to my question was found
And also if someone has problems with a self-signed certificate, then here is the solution
client.setSecurity(new soap.ClientSSLSecurity(undefined,undefined, undefined, {rejectUnauthorized: false,},));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question