• Post Reply Bookmark Topic Watch Topic
  • New Topic

Need a webservice for sending SMS

 
Avinash Haridasu
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I searched in google and found two web services that can send sms to mobile phones.

But when i tried working on them both of them failed to work.

http://www.aswinanand.com/sendsms.php?wsdl

http://www.webservicex.net/sendsmsworld.asmx?WSDL

I even searched for SMS API in google. I found many, but none worked.

Does any one know how to send SMS through a Java Application using Web Service ??

 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"failed to work" - Exactly how did they fail to work? Perhaps you missed a simple configuration setting?

Bill
 
Avinash Haridasu
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

It did not give me any error. But the message was not delivered to my mobile.

The below url the wsdl is present at that location b http://www.webservicex.net/sendsmsworld.asmx?WSDL


The below is the code for using the method available in that Web Service.
sun.rmi.SendSMSWorld service = new sun.rmi.SendSMSWorld();

QName portQName = new QName("http://www.webserviceX.NET" , "SendSMSWorldSoap");
String req = "<sendSMS xmlns=\"http://www.webserviceX.NET\"><fromEmailAddress>ENTER VALUE</fromEmailAddress><countryCode>ENTER VALUE</countryCode><mobileNumber>ENTER VALUE</mobileNumber><message>ENTER VALUE</message></sendSMS>";

try { // Call Web Service Operation

Dispatch<Source> sourceDispatch = null;
sourceDispatch

= service.createDispatch(portQName, Source.class

, Service.Mode.PAYLOAD);
Source result = sourceDispatch.invoke(new StreamSource(new StringReader(req)));
}
catch (Exception ex) {
// TODO handle custom exceptions here
}


The url below is not working. I got to know about this when i pasted the same in the browser address bar.

http://www.aswinanand.com/sendsms.php?wsdl

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

SMS API:
Way2SMS.jar
Zion-SMS-Mania.jar
SMS.jar

When i tried to use Way2Sms API i got the following error.

java.io.FileNotFoundException: http://wwwd.way2sms.com/auth.cl
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1610)
at SMS.login(NewClass1.java:131)
at SMS.send(NewClass1.java:74)
at NewClass1.main(NewClass1.java:531)

I have to send an SMS from a Java Application ( Web / Desktop ).

I don't want to use a Modem. I want to use a Web Service or any SMS API available.

Can any one help me in that ???
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!