Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-02-2008, 10:55 AM
Member
 
Join Date: Mar 2008
Posts: 2
Rep Power: 0
for108 is on a distinguished road
Default java code for send sms through http
java code for send sms through http
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 04-02-2008, 11:46 AM
DonCash's Avatar
Moderator
 
Join Date: Aug 2007
Location: London, UK
Posts: 241
Rep Power: 4
DonCash will become famous soon enoughDonCash will become famous soon enough
Default
A simple Google search will be able to provide you with some answers:

Simplewire : Java SMS SDK

How to Send SMS using Java Program (full code sample included)

In future, please post a more detailed explanation of your requirements.
__________________
Did this post help you? Please me!
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 04-02-2008, 01:00 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 7,513
Rep Power: 11
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Default
Yes it is, in Google is one of the best solution to find the such details. Can find lots of resources there.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
Someone helped you? their helpful post.
Help:Forums FAQ|How To Ask Questions The Smart WayResources:The Java Tutorials|Glossary for Java|NetBeans IDE|Sun DownloadsWeb:WritOnceTips:Is your IDE the best?|Which Application Server?
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 11-27-2008, 05:46 PM
Member
 
Join Date: Nov 2008
Posts: 1
Rep Power: 0
prasaddasari is on a distinguished road
Smile Prasad
Hi I am new to this forum.i need help sendins sms fax/email actions using java Application.Pls suggest me.

Thanks,Prasad
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 11-28-2008, 05:10 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 7,513
Rep Power: 11
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Default
Originally Posted by prasaddasari View Post
Hi I am new to this forum.i need help sendins sms fax/email actions using java Application.Pls suggest me.

Thanks,Prasad
You should try to workout first lol. In the first replay on this thread you can see few links, did you read them? Once you goo through all pf them, can have a clear idea about that.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
Someone helped you? their helpful post.
Help:Forums FAQ|How To Ask Questions The Smart WayResources:The Java Tutorials|Glossary for Java|NetBeans IDE|Sun DownloadsWeb:WritOnceTips:Is your IDE the best?|Which Application Server?
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 12-27-2008, 01:46 PM
Member
 
Join Date: Dec 2008
Posts: 1
Rep Power: 0
pranay is on a distinguished road
Default
tanx for giving d stuff
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 01-01-2009, 03:58 AM
Member
 
Join Date: Jan 2009
Posts: 2
Rep Power: 0
Helper is on a distinguished road
Default Send and Recevie SMS using Java
Hi,

Here is a sample code in Java for sending and receiving SMS:-

Code:
package javaSMS;

import com.jacob.activeX.*;
import com.jacob.com.*;

public class javaSMSTest {
	//extract "return value" as boolean, integer and assign to these variables:-
	private static boolean bSMS;
	private static int iSMS;
	
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		//construct an object -- "SMSAPIJava", a Java wrapper for SMS class in "MobitekSMSAPI5.dll"
		ActiveXComponent SMSAPIJava = new ActiveXComponent ("MobitekSMSAPI5.SMS");

//&&&&&&&&&& connect GSM modem to computer &&&&&&&&&&&&&&&&&&
		//call API to connect GSM modem to computer at COM port no. 2
		//the return value of the API call is assigned to "SMSAPIReturnValue"
		Variant SMSAPIReturnValue = SMSAPIJava.invoke("ModemInit", 2);
		//since the return value of function "ModemInit" is an integer, so extract the return value as an integer and assign to "iSMS"
		iSMS = SMSAPIReturnValue.getInt();
		switch (iSMS)
		{
			case 0 : System.out.println("GSM modem is NOT connected to computer!"); return;
			case 1 : System.out.println("GSM modem is connected to computer."); break;
			case 2 : System.out.println("GSM modem is NOT connected to computer because a PIN is required!"); return;
			case 3 : System.out.println("GSM modem is NOT connected to computer because wrong PIN is entered!"); return;
			case 4 : System.out.println("GSM modem is NOT connected to computer because SIM card is blocked by network operator!"); return;
			case 5 : System.out.println("GSM modem is NOT connected to computer because SIM card has problem!"); return;
		}
//&&&&&&&&&& end: connect GSM modem to computer &&&&&&&&&&&&&&&&&&
		
//!!!!!!!!!! check connection between GSM modem and GSM network !!!!!!!!!!!!!!!!!!!!!!!!	
		//call API to check connection with GSM network, the return value of the API call is assigned to "SMSAPIReturnValue"
		SMSAPIReturnValue = SMSAPIJava.invoke("ConnectToGSM");
		//since the return value of "ConnectToGSM" is a boolean, so extract the return value as a boolean and assign to "bSMS"
		bSMS = SMSAPIReturnValue.getBoolean();
		if (bSMS)
		{
			System.out.println("GSM modem is connected to GSM network.");
		}	
		else
		{
			System.out.println("GSM modem is NOT connected to GSM network!");
		}
//!!!!!!!!!! end: check connection between GSM modem and GSM network !!!!!!!!!!!!!!!!!!!!!!!!
		
//~~~~~~~~~~~~~~~~ check signal strength of GSM network ~~~~~~~~~~~~~~~~~~~~~~~
		//call API to check signal strength of GSM network, the return value of the API call is assigned to "SMSAPIReturnValue"
		SMSAPIReturnValue = SMSAPIJava.invoke("GetSignalStrength");
		//since the return value of "GetSignalStrength" is an integer, so extract the return value as an integer and assign to "iSMS"
		iSMS = SMSAPIReturnValue.getInt();
		switch (iSMS)
		{
			case -1 : System.out.println("Unable to get signal strength!"); break;
			case 0 : System.out.println("NO signal strength!"); break;
			case 1 : System.out.println("WEAK signal strength."); break;
			case 2 : System.out.println("NORMAL signal strength."); break;
			case 3 : System.out.println("STRONG signal strength."); break;		
		}
//~~~~~~~~~~~~~~~~ end: check signal strength of GSM networki ~~~~~~~~~~~~~~~~~~~~~~~

//########### turn delivery status report on #######################
		//call API to turn delivery status report on
		//the return value of the API call is assigned to "SMSAPIReturnValue"
		SMSAPIReturnValue = SMSAPIJava.invoke("DeliveryReportOn");
		//since the return value of "DeliveryReportOn" is a boolean, so extract the return value as a boolean and assign to "bSMS"
		bSMS = SMSAPIReturnValue.getBoolean();
		if (bSMS)
		{
			System.out.println("Delivery status report is turned on.");
		}
		else
		{
			System.out.println("Delivery status report is NOT turned on!");
		}
//########### end: turn delivery status report on #######################
		
//------------------ send SMS ----------------------------------------
		//set value of property; "ToNumber" is the recipient's number; "ToMessage" is the SMS to be send to the recipient
		SMSAPIJava.setProperty("ToNumber", "0163311600");
		SMSAPIJava.setProperty("ToMessage", "Hello from JAVA. Test DSR 6");
		//call API to send out SMS, the return value of the API call is assigned to "SMSAPIReturnValue"
		SMSAPIReturnValue = SMSAPIJava.invoke("SendSMS");
		//since the return value of "SendSMS" is a boolean, so extract the return value as a boolean and assign to "bSMS"
		bSMS = SMSAPIReturnValue.getBoolean();
		if (bSMS)
		{
			System.out.println("Messange sent!");
			
			//try 3 times
			for (int i=1; i<=3; i++)
			{
				//call API to get delivery status report, the return value of the API call is assigned to "SMSAPIReturnValue"			
				SMSAPIReturnValue = SMSAPIJava.invoke("GetDeliveryReport");
				//since the return value of "GetDeliveryStatusReport" is a boolean, so extract the return value as a boolean and assign to "bSMS"
				bSMS = SMSAPIReturnValue.getBoolean();
				
				if (bSMS)
				{
					//when "GetDeluveryStatusReport = True", then get value of properties
					int DRStatus = SMSAPIJava.getPropertyAsInt("DRStatus");										
					String DRMNRecipient = SMSAPIJava.getPropertyAsString("DRMNRecipient");
					String DRMsgRef = SMSAPIJava.getPropertyAsString("DRMsgRef");
					String DRFDate = SMSAPIJava.getPropertyAsString("DRFDate");
					String DRFTime = SMSAPIJava.getPropertyAsString("DRFTime");
					String DRRDate = SMSAPIJava.getPropertyAsString("DRRDate");
					String DRRTime = SMSAPIJava.getPropertyAsString("DRRTime");
					
					if (DRStatus == 1)
					{
						//System.out.println("The status of your outgoing SMS with reference number, " + DRMsgRef + ", is " + DRStatus + ".");
						System.out.println("The status of your outgoing SMS with reference number, " + DRMsgRef + ", is delivered.");
						System.out.println("Your outgoing SMS was received by the SMS Centre on " + DRRDate + ", at " + DRRTime + ", and was successfully delivered to " + DRMNRecipient + ", on " + DRFDate + ", at " + DRFTime + ".");
					}
					else
						if (DRStatus == 0)
						{
							//System.out.println("The status of your outgoing SMS with reference number, " + DRMsgRef + ", is " + DRStatus + ".");
							System.out.println("The status of your outgoing SMS with reference number, " + DRMsgRef + ", is not delivered.");
							System.out.println("Your outgoing SMS was received by the SMS Centre on " + DRRDate + ", at " + DRRTime + ", and was NOT successfully delivered to " + DRMNRecipient + ".");	
						}
					else
						if (DRStatus == 2)
						{
							//System.out.println("The status of your outgoing SMS with reference number, " + DRMsgRef + ", is " + DRStatus + ".");
							System.out.println("The status of your outgoing SMS with reference number, " + DRMsgRef + ", is unknown.");
							System.out.println("Your outgoing SMS was received by the SMS Centre on " + DRRDate + ", at " + DRRTime + ", and NO status is available.");
						}
						
					break;	
					
				}
				else
				{
					System.out.println("No delivery status report available!");
				}
				
			}
			
		}
		else
		{
			System.out.println("Messange NOT sent!");
		}
//------------------ end: send SMS ----------------------------------------
		
//+++++++++++++++++++++ read SMS ++++++++++++++++++++++++++
		//call API to read incoming SMS, the return value of the API call is assigned to "SMSAPIReturnValue"			
		SMSAPIReturnValue = SMSAPIJava.invoke("ReadSMS");
		//since the return value of "ReadSMS" is a boolean, so extract the return value as a boolean and assign to "bSMS"
		bSMS = SMSAPIReturnValue.getBoolean();
		//if there is new SMS, then get property
		if (bSMS)
		{
			//property "MN" is the sender's number			
			String InNumber = SMSAPIJava.getPropertyAsString("MN");
			//property "MSG" is the sender's message
			String InMessage = SMSAPIJava.getPropertyAsString("MSG");
			System.out.println("Number " + InNumber + ": " + InMessage );
		}
		else
		{
			System.out.println("No incoming SMS!");
		}
//+++++++++++++++++++++ end: read SMS ++++++++++++++++++++++++++		
		
		
//------- close connection between GSM modem and computer ---------------
		//call API to close connection between GSM modem and computer, the return value of the API call is assigned to "SMSAPIReturnValue"
		SMSAPIReturnValue = SMSAPIJava.invoke("ModemClose");
		//since the return value of "ModemClose" is a boolean, so extract the return value as a boolean and assign to "bSMS"
		bSMS = SMSAPIReturnValue.getBoolean();
		if (bSMS) System.out.println("Connection between GSM modem and computer is closed." );
		else System.out.println("Connection between GSM modem and computer CANNOT be closed!" );		
	}
//------- end: close connection between GSM modem and computer ---------------

}
Source: mobitek.com.my/SMS_Gateway/SMS_API_Java/Index.htm
Hope it helps!

Happy coding!

Last edited by Helper; 01-01-2009 at 04:07 AM.
Bookmark Post in Technorati
Reply With Quote
  #8 (permalink)  
Old 01-01-2009, 04:06 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 7,513
Rep Power: 11
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Default
I think it's better if you can provide download link of that package, since it's not a standard one for JDK. People can get wired with it.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
Someone helped you? their helpful post.
Help:Forums FAQ|How To Ask Questions The Smart WayResources:The Java Tutorials|Glossary for Java|NetBeans IDE|Sun DownloadsWeb:WritOnceTips:Is your IDE the best?|Which Application Server?
Bookmark Post in Technorati
Reply With Quote
  #9 (permalink)  
Old 04-12-2009, 08:28 PM
Member
 
Join Date: Apr 2009
Posts: 1
Rep Power: 0
sandeep_e3 is on a distinguished road
Smile
Hi hello this is sandeep.
Bookmark Post in Technorati
Reply With Quote
  #10 (permalink)  
Old 04-13-2009, 01:19 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 7,513
Rep Power: 11
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Default
Hello Sandeep, welcome to our community

Please don't do this again, if your question is not related to the original of the thread don't post it there. Choose the best sub-forum and start a new thread. And also please read our FAQ page before posting again.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
Someone helped you? their helpful post.
Help:Forums FAQ|How To Ask Questions The Smart WayResources:The Java Tutorials|Glossary for Java|NetBeans IDE|Sun DownloadsWeb:WritOnceTips:Is your IDE the best?|Which Application Server?
Bookmark Post in Technorati
Reply With Quote
  #11 (permalink)  
Old 09-17-2009, 07:10 AM
Member
 
Join Date: Aug 2009
Posts: 66
Rep Power: 0
sysout is on a distinguished road
Default
Originally Posted by DonCash View Post
A simple Google search will be able to provide you with some answers:

Simplewire : Java SMS SDK

How to Send SMS using Java Program (full code sample included)

In future, please post a more detailed explanation of your requirements.
this code doesn't have Main..it fails to run
Bookmark Post in Technorati
Reply With Quote
  #12 (permalink)  
Old 09-24-2009, 11:22 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 7,513
Rep Power: 11
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Default
So why don't you implement a main method and give a try. I hope you are clear with the code.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
Someone helped you? their helpful post.
Help:Forums FAQ|How To Ask Questions The Smart WayResources:The Java Tutorials|Glossary for Java|NetBeans IDE|Sun DownloadsWeb:WritOnceTips:Is your IDE the best?|Which Application Server?
Bookmark Post in Technorati
Reply With Quote
  #13 (permalink)  
Old 09-28-2009, 11:53 PM
Member
 
Join Date: Sep 2009
Posts: 1
Rep Power: 0
casinomaster is on a distinguished road
Default casinomaster
People have been inventing something new for many centuries to improve the casino gambling online games (roulette (link-online roulette), blackjack (link-online blackjack), poker (link-online poker)), various casino buildings were constructed by the most popular designers and artists in order to create special atmosphere, which is attracted lots of gamblers and involved them to tempt their fate. The owners of the casino were real masters of their own businesses. They didn’t save money on an excellent environment creature in order to make their casino the most elite one that will gather the fans of excitement and a a good game. It should be noted that they managed to do that. Game is one of the human needs, which he tends to realize.
But what about now? Science stepped far forward, but people have the same needs. Anyway people want bread and circuses to feel happy. Therefore, the history of the game continues and results in casino online that is offered at various casino online websites.
To win money at online casino one can bet with virtual money. , store them on a demo account and win the same virtual money. Indeed casino online games tend to be more exciting and interesting. In order to play at online casino the user must register on the website, make the money deposit to his account and start playing. Playing at online casino is convenient when a player sees his own balance account, the bet sum and the game taking part against the visual opponent. Naturally, some players are afraid for their money and therefore they are very cautious. In vain! Cheats online casino sites today number a small number and their life existence is too low. Goof serious casino do all their best for the gambler convenience: the 24-hour support is working for every gambler while the instant cash transactions such as money withdrawal, extra cash replenishment and various types of bonuses are available
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Server returned HTTP response code: 500.. i need help hardc0d3r Java Servlet 6 01-28-2010 02:47 PM
how to send SMS using Java API sanjeevtarar Advanced Java 4 09-13-2009 04:15 PM
java.io.Exception: Server returned HTTP response code: 403 navishkumarb Advanced Java 1 01-05-2008 02:33 PM
Send a pic through mail, in java lenny Advanced Java 1 07-25-2007 03:49 PM
Server returned HTTP response code: 500 Heather Java Servlet 1 07-09-2007 05:32 AM


All times are GMT +2. The time now is 06:35 PM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org