SMS through somegateway to mobile

Reply

Join Date: Dec 2008
Posts: 5
Reputation: Srinivas14 is an unknown quantity at this point 
Solved Threads: 0
Srinivas14 Srinivas14 is offline Offline
Newbie Poster

SMS through somegateway to mobile

 
0
  #1
Dec 3rd, 2008
Hi can any one plz send me the java code for sending sms through some gateway plz reply this asap..or else plz assist me how to proceed..

Thanks,
Srinivas
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,357
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 252
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

Re: SMS through somegateway to mobile

 
0
  #2
Dec 3rd, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 1,175
Reputation: stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light 
Solved Threads: 125
Featured Poster
stephen84s's Avatar
stephen84s stephen84s is offline Offline
Veteran Poster

Re: SMS through somegateway to mobile

 
0
  #3
Dec 3rd, 2008
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
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 ?"
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 5
Reputation: Srinivas14 is an unknown quantity at this point 
Solved Threads: 0
Srinivas14 Srinivas14 is offline Offline
Newbie Poster

Re: SMS through somegateway to mobile

 
0
  #4
Dec 3rd, 2008
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 stephen84s View Post
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
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 5
Reputation: Srinivas14 is an unknown quantity at this point 
Solved Threads: 0
Srinivas14 Srinivas14 is offline Offline
Newbie Poster

Re: SMS through somegateway to mobile

 
0
  #5
Dec 3rd, 2008
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..

Originally Posted by masijade View Post
Find an SMS Gateway (they provide internet service) and then read their documentation.
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 1,175
Reputation: stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light 
Solved Threads: 125
Featured Poster
stephen84s's Avatar
stephen84s stephen84s is offline Offline
Veteran Poster

Re: SMS through somegateway to mobile

 
0
  #6
Dec 3rd, 2008
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..
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.
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 ?"
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 5
Reputation: Srinivas14 is an unknown quantity at this point 
Solved Threads: 0
Srinivas14 Srinivas14 is offline Offline
Newbie Poster

Re: SMS through somegateway to mobile

 
0
  #7
Dec 3rd, 2008
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..?



Originally Posted by stephen84s View Post
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.
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,357
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 252
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

Re: SMS through somegateway to mobile

 
1
  #8
Dec 3rd, 2008
Originally Posted by Srinivas14 View Post
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..
You mean you didn't find anything you could block copy and paste.

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
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 1,175
Reputation: stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light 
Solved Threads: 125
Featured Poster
stephen84s's Avatar
stephen84s stephen84s is offline Offline
Veteran Poster

Re: SMS through somegateway to mobile

 
1
  #9
Dec 3rd, 2008
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.
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 ?"
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC