I have a web service, built by third party. I just want to consume it. I am doing this using JQuery as Below.
var dwhServiceUrl = 'http://10.62.210.138/DWHWebService/hubservice.asmx/GetHubDetailUser';
// call segmentation svc
CallAjaxAsync('POST', SegmentSuccess, '', dwhServiceUrl,
{
strWSUserName: 'XXX',
strWSPassword: 'XXX',
strApplicationId: '1',
strCompanyId: '1',
strRole: 'XXX',
strUserID: 'XXX',
strOptionList: 'HIGHLIGHT',
strFieldName: 'POLICY NO',
strFieldValue: '<%=Session["Source_Policy_No"]%>'
});
Where CallAjaxAsync
definition is
function CallAjaxAsync(type, FuncSuccess, FuncError, url, param) {
if (param != '') {
param = JSON.stringify(param)
}
$.ajax({
type: type,
url: url,
data: param,
async: true,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: FuncSuccess,
error: FuncError,
headers: {
"Authorization": "apikey:APIKEY,tokenid:4a5ba979-0c56-468d-87c7-30a22759f7ce",
"Accept-Language": "en-US"
}
});
But I am not receiving any response. It's status is Cancelled
and method in OPTIONS
on Network tab of console.