Need to call SOAP method through node soap module.Certificate installed
- or -
Post a project like this- Posted:
- Proposals: 1
- Remote
- #1412784
- Expired
Description
The code is :
var url = 'https://ticino.demo.docdesk.ch:4443/ehealth-ws/vivates?wsdl';
var publicKeyPath = './soap/Paolo_Maserati-20130215.p12';
var password = 'T1c1n0T3stS8mple';
var publicKey = fs.readFileSync(publicKeyPath);
soap.createClient(url, {
wsdl_options: {
pfx: publicKey,
strictSSL: true,
passphrase: password
}
}, function (err, client) {
console.log('Inside the function')
if (err)
{
console.log(err)
} else
{
var clientData = client.describe();
client.VivatesWebService.VivatesWebServicePort.getAllRegisteredOrganizations() {
if (err) {
console.log(JSON.stringify(err))
// console.log('My dish error: ', JSON.stringify(err), 'errrrrrrrrror');
} else {
// console.log('#########$$$$$$', res);
}
}
Pankaj K.
0% (0)New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
The below code works to call the SimpleTrip and return a proper response from the server. My TripLegs arg still isn't 100% correct to what the SOAP is looking for but the code and the way to call it is.
var url = 'http://prime.promiles.com/Webservices/v1_1/PRIMEStandardV1_1.asmx?wsdl';
var credentials = { Username: "xxxxx",
Password: "xxxxxx",
CompanyCode: "xxxxx"
};
var simpleTrip = {
AvoidTollRoads: false,
BorderOpen: true,
RoutingMethod: "PRACTICAL",
VehicleType: "Tractor2AxleTrailer2Axle",
TripLegs: [{Location: {LocationText: "77611"}},
{Location: {LocationText: "90210"}}]
}
args = {c: credentials, BasicTrip: simpleTrip};
Soap.createClient(url, function(err, client) {
console.log(err);
console.log(simpleTrip);
client.RunSimpleTrip(args, function(err, result, raw, soapHeader) {
console.log(result);
//console.log(err.root);
console.log(err.root.Envelope);
})
}); -
hi,
Can you please provide more details about this job?
- Are you facing any error while calling SOAP method?
- Do you want to make calls to set of APIs?
Pankaj K.08 Jan 2017hello there ,
When i am calling the soap method from the node soap module, it is giving timedout error. But when i call createSoapClient, it is working fine.But when i am trying to call soap method through the client object it is giving problemNoghan O.08 Jan 2017Can you share the source code ?