0
下面是我試過的代碼:如何格式化參數JSON以獲得SOAP響應?
fetchUserDetails: function() {
var url = 'http://ldniguiapp02.eur.ad.tullib.com/matchbox-forwarddeal/services/RefDataWebServices?wsdl';
var args = {'args0':
{
'mnemonic':'ttan',
'postingId':'75655',
'customerId':'180816',
'organisation':{
'customerId':'180816',
'firmName':'POLITICAL.GROUP'
},
'userType':'TRADER'
}};
var defered = q.defer();
soap.createClient(url, CreateClient);
function CreateClient(err, client) {
client.getUserDetails(args, function (err, result) {
if (err) {
defered.reject(err);
}else{
defered.resolve(result);
}
console.log(result);
});
}
return defered.promise;
}
,並從SOAP UI相當於SOAP請求看起來是這樣的:
如何設置格式ARGS JSON這樣才能得到預期的結果?