FileNotFound Exception while sending SMS through way2sms webservice

2.1k views Asked by At

I am using AswinAnand Free SMS Web service. While running below code, I am getting below exception. Please direct me to the right way.

try 
        {
            SMS.send("9884840204", "*****", "9884840204", "Hello Java World");
        }

Exception:

java.io.FileNotFoundException: http://wwwd.way2sms.com/auth.cl
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1234)
    at com.aswinanand.sms.SMS.send(SMS.java:75)
    at com.wipro.common.SendSMS.main(SendSMS.java:13)
1

There are 1 answers

5
Thomas Rawyler On

Looking at the source code of SMS.java:

BufferedReader br = new BufferedReader(new InputStreamReader(uc.getInputStream()));

is requesting the input stream of the www.way2sms.com URL. So it seams that your authentication with www.way2sms.com fails. If you have an account at www.way2sms.com and this still happens it's obviously a bug.