locked
send SMS using web service RRS feed

  • Question

  • User205691945 posted

    hi.. i want to send sms using webservice of way2sms..


    for that i use this code

    C#.net:

    Step 1: Add Web Reference : 
            http://www.spiritssoft.com/webservice/sendway2sms.asmx
    Step 2: Add This "using com.spiritssoft.www;"
    Step 3: Create a Object "SendWay2Sms smsobj = new SendWay2Sms();"
    Step 4:
            string strResult = smsobj.sendSmsSpiritsSoft("UserName", "Password", "Number", "message");
        
        strResult  : Recieving the Result from Webservice 

    Note:
         - For Group SMS , Number seperated by commas(,).
         - Message should be Only 125 characters,
         - If No username , password form way2sms.com it will send message 
           through Spirits Soft Technology Default Number.


    it was working well before few days... but now its not working now..


    at http://www.spiritssoft.com/webservice/sendway2sms.asmx we dont find any web service..


    here it provide web reference but its not working...


    how does it possible.. i mean it was working fine before few days...
    Sunday, April 4, 2010 12:37 PM

All replies

  • User-1659704165 posted

    Hi,

    Most of SMS Services are paid Contact Your Service provider

    Monday, April 5, 2010 1:02 AM
  • Monday, April 5, 2010 2:25 AM
  • User205691945 posted

    its not so... before few days the way2sms was working well... but dont know y now not working !Frown

    Monday, April 5, 2010 8:20 AM
  • User205691945 posted

    sagnikmukh


    the link that you have suggested not working!

    Monday, April 5, 2010 8:22 AM
  • User1763172376 posted

    here sone links u can try, i am not sure .

    http://explore.oneindia.in/mobile/smsgateways/

    http://gateway4sms.com/packages.php [5 free sms only Wink

    http://www.abtxt.com/




    Monday, April 5, 2010 8:59 AM
  • User205691945 posted

    none of three links working

    Monday, April 5, 2010 9:50 AM
  • User-1659704165 posted

    none of three links working

    Again Contact Your Service Provider..

    Monday, April 5, 2010 10:45 AM
  • User205691945 posted

    how to contact service provider?? its free service i told you.. and it was working before few days


    Monday, April 5, 2010 1:32 PM
  • User205691945 posted

    i found another way..


    the web service is updated here:

    http://www.aswinanand.com/2009/12/free-sms-web-service-updated-2/comment-page-1/#comment-5107


    from that i found jar file and converted into .dll and added into my asp.net website..

    its added and method are found form that bt at runtime it give this error:


    Compilation Error

    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. 

    Compiler Error Message: CS0012: The type 'java.lang.Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'IKVM.OpenJDK.Core, Version=0.42.0.3, Culture=neutral, PublicKeyToken=13235d27fcbfff58'.



    Monday, April 5, 2010 4:38 PM
  • User-1659704165 posted

    how to contact service provider?? its free service i told you.. and it was working before few days


    Seems "spiritssoft.com" is down.... and go for any paid service.. it would Be better... It will cost and it is worth.


    Monday, April 5, 2010 11:37 PM
  • User1553540217 posted

    Hi

     

           Please send me free web service provide company its mini project for that i can't pay much amount please help and

     

    send along with which namespace could include and class name  

    Thursday, July 29, 2010 3:56 AM
  • User1553540217 posted

    Use This Code its work all Time

    other Severcie are change the API

     

     

    protected void Page_Load(object sender, EventArgs e)

        {

        

            connect();

     

          

        }

     

      protected void Btesend_Click()

    {

          mbno=txtmobileno.text;

          mseg=txtmsg.text;

         

         sendSms(mbno, mseg);

     

    }

    public void connect()

        {

            //ckuser = Session["id"].ToString();

            ckuser = "Your way2sms Regeistred Number";

            //ckpass = Session["pw"].ToString();

            ckpass = " Your way2sms Regeistred  Password";

            try

            {

                this.req = (HttpWebRequest)WebRequest.Create("http://wwwd.way2sms.com/auth.cl");

                this.req.CookieContainer = new CookieContainer();

                this.req.AllowAutoRedirect = false;

                this.req.Method = "POST";

                this.req.ContentType = "application/x-www-form-urlencoded";

                this.strNewValue = "username=" + ckuser + "&password=" + ckpass;

                this.req.ContentLength = this.strNewValue.Length;

                StreamWriter writer = new StreamWriter(this.req.GetRequestStream(), Encoding.ASCII);

                writer.Write(this.strNewValue);

                writer.Close();

                this.response = (HttpWebResponse)this.req.GetResponse();

                this.cookieCntr = this.req.CookieContainer;

                this.response.Close();

                this.req = (HttpWebRequest)WebRequest.Create("http://wwwd.way2sms.com//jsp/InstantSMS.jsp?val=0");

                this.req.CookieContainer = this.cookieCntr;

                this.req.Method = "GET";

                this.response = (HttpWebResponse)this.req.GetResponse();

                responseee = new StreamReader(this.response.GetResponseStream()).ReadToEnd();

                int index = Regex.Match(responseee, "custf").Index;

                responseee = responseee.Substring(index, 0x12);

                responseee = responseee.Replace("\"", "").Replace(">", "").Trim();

                this.response.Close();

     

                //pnlsend.Visible = true;

                lblErrormsg.Text = "connected";

                //lblError.Text = "connected";

            }

            catch (Exception)

            {

                //lblError.Text = "Error connecting to the server...";

                lblErrormsg.Text = "Error connecting to the server...";

                Session["error"] = "Error connecting to the server...";

                //Server.Transfer("login.aspx");

                Response.Redirect("Err.aspx");

     

     

            }

        }

        public void sendSms(string mbno, string mseg)

        {

            if ((mbno != "") && (mseg != ""))

            {

                try

                {

                    this.req = (HttpWebRequest)WebRequest.Create("http://wwwd.way2sms.com//FirstServletsms?custid=");

                    this.req.AllowAutoRedirect = false;

                    this.req.CookieContainer = this.cookieCntr;

                    this.req.Method = "POST";

                    this.req.ContentType = "application/x-www-form-urlencoded";

                    this.strNewValue = "custid=undefined&HiddenAction=instantsms&Action=" + responseee + "&login=&pass=&MobNo=" + this.mbno + "&textArea=" + this.mseg;

     

                    string msg = this.mseg;

                    string mbeno = this.mbno;

     

                    this.req.ContentLength = this.strNewValue.Length;

                    StreamWriter writer = new StreamWriter(this.req.GetRequestStream(), Encoding.ASCII);

                    writer.Write(this.strNewValue);

                    writer.Close();

                    this.response = (HttpWebResponse)this.req.GetResponse();

     

                    this.response.Close();

                    lblErrormsg.Text = "Message Sent..... " + mbeno + ": " + msg;

                    //lblError.Text = "Message Sent..... " + mbeno + ": " + msg;

                }

                catch (Exception)

                {

                    lblErrormsg.Text = "Error Sending msg....check your connection...";

                    //lblError.Text = "Error Sending msg....check your connection...";

                }

            }

            else

            {

                lblErrormsg.Text = "Mob no or msg missing";

                //lblError.Text = "Mob no or msg missing";

            }

        }

    Wednesday, August 18, 2010 9:27 AM
  • User1983487377 posted

    hi diya..

    do u got solution of it ????

    if yes please tell me..how ?

    the code is not working of all three links

     

    Sunday, August 29, 2010 6:36 PM
  • User1553540217 posted

    dynamic Rec_count = 0;

    int Row_count = System.Data.Tables(0).Rows.Count - 1;


    if (Rec_count != Row_count)

    The();


    Rec_count == Rec_count + 1

    TextBox1.Text == System.Data.Tables(0).Rows(Rec_count).item(0)




    int rowNum = 0;

    int dbMaxNumRows = dbDataSet.Tables("Dataset").Rows.Count - 1;



    //Moves forward a record

    private void btNext_Click(System.Object sender, System.EventArgs e)

    {

    //If the current row number doesn't not equal the max number of rows

    if (rowNum != dbMaxNumRows) {

    //add one onto the row number

    rowNum = rowNum + 1;

    //Fill in all the relevent fields

    Field1.Text = dbDataSet.Tables("Dataset").Rows(rowNum).Item("Var1");

    Field2.Text = dbDataSet.Tables("Dataset").Rows(rowNum).Item("Var2");

    Field3.Text = dbDataSet.Tables("Dataset").Rows(rowNum).Item("Var3");

    } else {

    //Else if the row number does equal the maximum number of fields

    //Go to the first record, a loop hey? :)

    rowNum = 0;

    //Fill in all the needed fields

    Field1.Text = dbDataSet.Tables("Dataset").Rows(rowNum).Item("Var1");

    Field2.Text = dbDataSet.Tables("Dataset").Rows(rowNum).Item("Var2");

    Field3.Text = dbDataSet.Tables("Dataset").Rows(rowNum).Item("Var3");

    }

    }

    Wednesday, January 5, 2011 10:23 PM
  • User-455811767 posted

    Hi Diya,

    I have used u r code but its not working,help me is there any other way.

    Thanks.

    Wednesday, April 20, 2011 7:45 AM
  • User621942214 posted

    use this web service

    make your own web service that use this web services

    http://ubaid.tk/sms/sms.aspx?uid=ur_mobile_no&pwd=ur_mobile_password&msg=ur_message&phone=to_whom_u_wannasend_to&provider=way2sms

    this is free because again it use way2sms

    Monday, May 16, 2011 3:35 AM