Home » Asp.netRSS

send SMS using web service

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...
 

14 Answers Found

 

Answer 1

Hi,

Most of SMS Services are paid Contact Your Service provider

 
 

Answer 3

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

 

Answer 4

sagnikmukh


the link that you have suggested not working!

 
 

Answer 6

none of three links working

 

Answer 7

diya0076:

none of three links working

Again Contact Your Service Provider..

 

Answer 8

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


 

Answer 9

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'.



 

Answer 10

diya0076:

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.


 

Answer 11

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  

 

Answer 12

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";

        }

    }

 
 

Answer 14

hi diya..

do u got solution of it ????

if yes please tell me..how ?

the code is not working of all three links

 
 
 

<< Previous      Next >>


Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter