简体   繁体   English

通过Way2SMS Web服务发送SMS时出现FileNotFound异常

[英]FileNotFound Exception while sending SMS through way2sms webservice

I am using AswinAnand Free SMS Web service. 我正在使用AswinAnand Free SMS Web服务。 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)

Looking at the source code of SMS.java : 查看SMS.java的源代码:

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

is requesting the input stream of the www.way2sms.com URL. 正在请求www.way2sms.com URL的输入流。 So it seams that your authentication with www.way2sms.com fails. 因此,它表明您对www.way2sms.com的身份验证失败。 If you have an account at www.way2sms.com and this still happens it's obviously a bug. 如果您在www.way2sms.com上拥有一个帐户,并且这种情况仍然发生,那显然是一个错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM