| | |
SMS through somegateway to mobile
![]() |
Find an SMS Gateway (they provide internet service) and then read their documentation.
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Have you even bothered searching through the forums, I bet not because I myself have answered the same question nearly two or three times and just in case you are in too much of a hurry to even type the search query here you go ;-
http://www.daniweb.com/search/search...d+sms+via+java
http://www.daniweb.com/search/search...d+sms+via+java
Last edited by stephen84s; Dec 3rd, 2008 at 3:46 am.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
"How to ask questions the smart way ?"
"How to ask questions the smart way ?"
•
•
Join Date: Dec 2008
Posts: 5
Reputation:
Solved Threads: 0
i searched but i didnt find any thing suitable..i need to write that code in myapplication.. i haven't find any smaple code which will help a bit..
•
•
•
•
Have you even bothered searching through the forums, I bet not because I myself have answered the same question nearly two or three times and just in case you are in too much of a hurry to even type the search query here you go ;-
http://www.daniweb.com/search/search...d+sms+via+java
•
•
Join Date: Dec 2008
Posts: 5
Reputation:
Solved Threads: 0
they haven't provide any code or documentation for that ...
i searched but i didnt find any thing suitable..i need to write that code in myapplication.. i haven't find any smaple code which will help a bit..
i searched but i didnt find any thing suitable..i need to write that code in myapplication.. i haven't find any smaple code which will help a bit..
•
•
•
•
Originally Posted by Srinivas14
i searched but i didnt find any thing suitable..i need to write that code in myapplication.. i haven't find any smaple code which will help a bit..
You just searched for 6 minutes and expect to discover everything. Why do you want people to spoon feed you their code, their effort ?? While you do not even care to take the time to search through the forums.
BTW what API does your SMS Provider support HTTP, SMPP, CMG ???? You haven't even cared to mention that.
Last edited by stephen84s; Dec 3rd, 2008 at 3:59 am.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
"How to ask questions the smart way ?"
"How to ask questions the smart way ?"
•
•
Join Date: Dec 2008
Posts: 5
Reputation:
Solved Threads: 0
Im sorry... i have serched a lot before posting the original message..our SMS Provider supports HTTP, SMPP .now i need how to send sms from webserver to mobile through gateway..?
•
•
•
•
Thats because you did not spend enough time looking.
You just searched for 6 minutes and expect to discover everything. Why do you want people to spoon feed you their code, their effort ?? While you do not even care to take the time to search through the forums.
BTW what API does your SMS Provider support HTTP, SMPP, CMG ???? You haven't even cared to mention that.
•
•
•
•
they haven't provide any code or documentation for that ...
i searched but i didnt find any thing suitable..i need to write that code in myapplication.. i haven't find any smaple code which will help a bit..
The documentation describes how you interact with it (usually through http). So now the question is not "how do I send/receive sms", but rather "how do I perform an http connection/interaction". The answer to that is Http(s)URLConnection and another bit of Googling.
Gods, not everything you get will give you 1-to-1 examples of what you need to do in language "X". They will simply tell you what you need to do (I.E. use http protocol in "this manner"). Then it is up to you to implement that in language "X". So then you can start to research how to implement that.
Learn how to do a bit of thinking and research on your own or you will never be anything but a "code monkey" and not a very good one at that.
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
If you want to use the HTTP API the it is pretty straight forward, you will need to use the java.net.URL and java.net.URLConnection classes in Java.
Here is a Java tutorial on how to work with URLs.
http://java.sun.com/docs/books/tutor...rls/index.html
Also following is an example illustrating how to perform HTTP POST in Java.
http://www.exampledepot.com/egs/java.net/Post.html
For SMPP however there is no in built support in Java, so you will need to find one of third party libraries. OpenSMPP is one such library. You will need to download the source code and build it using ant. Once you buid it using "ant", you will get the "smpp.jar" in the dist folder, the smpp.jar needs to be present in the classpath while you are compiling any projects which will be using OpenSMPP . Also the javadocs for it will be generated in the "doc" folder, the javadocs contain a few examples on how to connect to an SMPP service provider to send messages / receive messages.
Here is a Java tutorial on how to work with URLs.
http://java.sun.com/docs/books/tutor...rls/index.html
Also following is an example illustrating how to perform HTTP POST in Java.
http://www.exampledepot.com/egs/java.net/Post.html
For SMPP however there is no in built support in Java, so you will need to find one of third party libraries. OpenSMPP is one such library. You will need to download the source code and build it using ant. Once you buid it using "ant", you will get the "smpp.jar" in the dist folder, the smpp.jar needs to be present in the classpath while you are compiling any projects which will be using OpenSMPP . Also the javadocs for it will be generated in the "doc" folder, the javadocs contain a few examples on how to connect to an SMPP service provider to send messages / receive messages.
Last edited by stephen84s; Dec 3rd, 2008 at 5:02 am.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
"How to ask questions the smart way ?"
"How to ask questions the smart way ?"
![]() |
Other Threads in the Java Forum
- Previous Thread: Application opened in IE explorer but not in Mozila firefox
- Next Thread: more Hi/Lo code issues
| Thread Tools | Search this Thread |
911 actionlistener addressbook android api append applet application array arrays automation binary blackberry block bluetooth character chat class client code component consumer csv database desktop developmenthelp eclipse error fractal ftp game givemetehcodez graphics gui html ide image integer j2me j2seprojects japplet java javaarraylist javac javaee javaprojects jni jpanel julia lego linked linux list loops mac map method methods mobile netbeans newbie number objects online oriented panel printf problem program programming project projects properties recursion replaydirector reporting researchinmotion rotatetext rsa scanner se server set singleton sms sort sql string swing test textfields threads time title tree tutorial-sample ubuntu update windows working






