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