none
code for getting the transaction id in an sms application

    Question

  • this is  Code for send the message                  

    MSXML2.XMLHTTP objHttp = new MSXML2.XMLHTTP();                                  

      object Missing = new object();                                    

    string strrr = url + "uname=" + uname + "&pwd=" + pwd + "&senderid=WINSMS&msg=" + msg + "&to=" + filename[0] + "&route=T";                                    

    objHttp.open("POST", strrr, false, Missing, Missing);                      

                  objHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");                                     objHttp.send(null);    

        i want to code in this same pattern for getting transaction id ,( the getting tansaction id url : “easyhops.co.in/sendsms?uname=deepars&pwd=support4approval&senderid=SMSSMS&to=9544691010&msg=TESTINGSMS &route=T”)

    • Moved by Kristin Xie Thursday, January 15, 2015 7:11 AM
    Wednesday, January 14, 2015 7:49 AM

Answers

All replies

  • You have to check with the service provider first (easyhops) about the format they're returning the response and if it contains TansactionId. Then you have to read the response and obtain that specific value as set by the provider.

    You will have to write something similar to below js code:

    var objDoc = new ActiveXObject("Msxml2.DOMDocument.4.0"); var objHTTP = new ActiveXObject("Msxml2.XMLHTTP.4.0"); objHTTP.open("POST", strPost, false); objHTTP.send(); objDoc = objHTTP.responseXML;

    objDoc.setProperty("SelectionLanguage", "XPath");
       var viewNodes = objDoc.documentElement.selectNodes("//*/*/@ows_Price");
       strID = viewNodes.item(2).value;
       alert(strID);


    Fouad Roumieh

    Wednesday, January 14, 2015 9:26 AM
  • Hi ,

      sir actualy we are the provider, our side is working properly, my client need our help, code for to get transaction id  , and code for checking the dlr status, 


     they need full url integrating code for getting transaction id and DLR status, also  DLR status will be updating to the database.

    How can i write the full code sir, that all code are same pattern of above code




     

    Wednesday, January 14, 2015 11:18 AM
  • we have the url for getting the dlr status also.. 
    Wednesday, January 14, 2015 11:19 AM
  • since it is on your side what is the response when the user hits your url. Usually by the end of your code you have to set the response, like in case of C# you write: Response.Write("1001101");

    So again what is the response you setting after processing the request you've received?

    In other words check what is the value of objHTTP.responseText


    Fouad Roumieh


    Wednesday, January 14, 2015 12:12 PM
  • Sir actually.. we are giving only url to our client, they are integrating that url to thier program, we are provide the sms and transaction id and and all.. the above mentioned programme not ours that from  my client side...   now they are need url integrating full .net program for getting transaction id and DLR status, also  DLR status will be updating to the database.
    Thursday, January 15, 2015 4:04 AM
  • Code for send the message

     

                    MSXML2.XMLHTTP objHttp = new MSXML2.XMLHTTP();

                                        object Missing = new object();

                                        string strrr = url + "uname=" + uname + "&pwd=" + pwd +"&senderid=WINSMS&msg=" + msg + "&to=" + filename[0] + "&route=T";

                                        objHttp.open("POST", strrr, false, Missing, Missing);

                                        objHttp.setRequestHeader("Content-type""application/x-www-form-urlencoded");

                                        objHttp.send(null);       

    this is our clint side program ... they said.. this is working properly.. that means, our side also working correctly... now they need another program for getting transaction id and DLR status.. the same programing methord

    Thursday, January 15, 2015 4:13 AM
  • I don't have issues with the client side code it's just missing reading the response. From your side the server, you should set your response to the transactionid value so the client can read it on the other side. For example on the server and after processing the client request, you have to write Response.Write("110001"); Which is the transactionid value. And then the client will be getting this value via: objHTTP.responseText;. If the DLR status exists at the same time with the transactionid you can pass it also like semicolon seperated or other and if it is retreived later you must create another url where the client can sent tranasactionid along with the credentials to get the DLR status.

    Now if I browse this url:

    http://easyhops.co.in/sendsms?uname=deepars&pwd=support4approval&senderid=SMSSMS&to=9544691010&msg=TESTINGSMS%20&route=T

    I get the below response:

    SMS Content Template MissMatch.

    and in successful scenario this should be the transactionid, which the client is not reading it back. (Maybe it is already set)


    Fouad Roumieh

    Thursday, January 15, 2015 5:36 AM
  • http://easyhops.co.in/sendsms?uname=deepars&pwd=support4approval&senderid=SMSSMS&to=9544691010&msg=TESTINGSMS%20&route=A

    please check it...

    Thursday, January 15, 2015 6:05 AM
  • Hi kochuzkochu,

    Visual C# forum is discuss and ask questions about the C# programming language, IDE, libraries, samples, and tools.All are about Windows Application. So i am confuesd with "sms application". And from your code looks like web http protocol.  I’m afraid that it is not the correct forum about this issue, I am moving your question to the moderator forum ("Where is the forum for..?"). The owner of the forum will direct you to a right forum. Thanks for your understanding. 

    Best regards,

    Kristin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, January 15, 2015 7:10 AM
  • hi, sorry sir its my mistak, sms application itz web based. sorry for that.. anyway thanks alot for ur help.
    Thursday, January 15, 2015 8:34 AM
  • My pleasure. Happy coding.

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, January 15, 2015 8:51 AM
  • Might try them over here.

    http://forums.asp.net/

     

     

     


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

    Thursday, January 15, 2015 10:36 AM
    Moderator