943,960 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 1245
  • Java RSS
Dec 3rd, 2008
0

SMS through somegateway to mobile

Expand Post »
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Srinivas14 is offline Offline
5 posts
since Dec 2008
Dec 3rd, 2008
0

Re: SMS through somegateway to mobile

Find an SMS Gateway (they provide internet service) and then read their documentation.
Moderator
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
masijade is offline Offline
4,043 posts
since Feb 2006
Dec 3rd, 2008
0

Re: SMS through somegateway to mobile

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.
Featured Poster
Reputation Points: 653
Solved Threads: 151
Nearly a Posting Virtuoso
stephen84s is offline Offline
1,316 posts
since Jul 2007
Dec 3rd, 2008
0

Re: SMS through somegateway to mobile

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





Click to Expand / Collapse  Quote originally posted by stephen84s ...
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Srinivas14 is offline Offline
5 posts
since Dec 2008
Dec 3rd, 2008
0

Re: SMS through somegateway to mobile

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

Click to Expand / Collapse  Quote originally posted by masijade ...
Find an SMS Gateway (they provide internet service) and then read their documentation.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Srinivas14 is offline Offline
5 posts
since Dec 2008
Dec 3rd, 2008
0

Re: SMS through somegateway to mobile

Quote 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.
Featured Poster
Reputation Points: 653
Solved Threads: 151
Nearly a Posting Virtuoso
stephen84s is offline Offline
1,316 posts
since Jul 2007
Dec 3rd, 2008
0

Re: SMS through somegateway to mobile

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



Click to Expand / Collapse  Quote originally posted by stephen84s ...
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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Srinivas14 is offline Offline
5 posts
since Dec 2008
Dec 3rd, 2008
1

Re: SMS through somegateway to mobile

Click to Expand / Collapse  Quote originally posted by Srinivas14 ...
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.
Moderator
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
masijade is offline Offline
4,043 posts
since Feb 2006
Dec 3rd, 2008
1

Re: SMS through somegateway to mobile

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.
Featured Poster
Reputation Points: 653
Solved Threads: 151
Nearly a Posting Virtuoso
stephen84s is offline Offline
1,316 posts
since Jul 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Application opened in IE explorer but not in Mozila firefox
Next Thread in Java Forum Timeline: more Hi/Lo code issues





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC