Click here to Skip to main content
15,881,424 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have tried with the below code but its throwing an error saying that soap action was not correct , please give me the solution with testing for getsubscriberinfo service

C#
function soaprequest() {
try
  {
    debugger;
var AccountNo = '28880';
var UserId = "UserName";
var Password = "Password";
var MyRandomNum = "ac1234";
var strMethodResultXML = "";

var strReqxml = "ACCOUNTNO" + AccountNo + "";
    var strMethodPkg = "";
    strMethodPkg = strMethodPkg + '";
    strMethodPkg = strMethodPkg + "";

    var xmlhttp = new XMLHttpRequest();
    xmlhttp.open('POST', 'http://serverIP/mqsubscribe/mqsmodules/mqsintegrationservice/mqsintegrationservice.asmx', false);

    xmlhttp.setRequestHeader("SOAPAction", "http://mqsubscribe/mqsintegrationservice/MQSIntegrationService/getsubscriberinfo");

    xmlhttp.onreadystatechange = function () {
        if (xmlhttp.readyState == 4) {
            if (xmlhttp.status == 200) {

                alert('done use firebug to see response');
            }
        }
    }

    xmlhttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
    xmlhttp.send(strMethodPkg);
    strMethodResultXML = xmlhttp.responsetext;
}
catch (err) {
  var  txt =  err.message;
}

}
Posted
Updated 1-Jan-14 19:37pm
v3
Comments
dan!sh 2-Jan-14 1:21am    
You missed out on posting your source code.
Ram Gunti 2-Jan-14 1:41am    
if u give the answer for the below question i will have a look with different trails in my code.

what would be the soapaction for the below asmx for getsubscriberinfo service?
http://202.88.131.211/mqsubscribe/mqsmodules/mqsintegrationservice/

please send the answer for the above question as soon as possible

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900