I've been trying to use node-soap library for nodejs to consume a soap service but when i send my request the response from the service is that flightNumber in my request is null.
I Also tried sending the same request that works for me in soap UI in xml format and i got the same error message.
This is my request:
var request = {
"body" : {
"DisplayFlightLegsRQ": {
"flightNumber": "222",
"airlineCode": "BB",
"departureIATACode": "MIA"
"flightDate": {
"departureDateCondition": "SCHEDULE",
"requestTimeStandard": "UTC",
"departureDate": "10-10-2015"
}
}
},
"headers": {"Content-Type": "text/xml;charset=UTF-8"}
}
Call to the soap service:
soap.createClient(url,function(err, client){
client.addHttpHeader('App-name', 'fs');
client.setSecurity(new soap.BasicAuthSecurity('***', '***'));
client.displayFls(request, function(err, result, body) {
console.log(result.body);
parseString(body, function(err, result){
var requestResult = result['SOAP-ENV:Envelope']['SOAP-ENV:Body'][0].DisplayFlightLegsRS[0].return[0];
console.log(requestResult);
})
});
});
is it possible that there is an issue in this soap-node library causing my request to send null parameters? I debugged the request just before being sent and the object is well formatted and it has all the values. Maybe this library is doing an inside transformation from the json request to xml and in that process is erasing the values? or maybe my request is missing something.
I appreciate any help.
Thanks :)