Send SMS from java using http get method

Send SMS from java using http get method SearchSearch

SMS & MMS Technical Forum » NowSMS Support - SMS Issues (Product Support Only) » Archive through February 02, 2006 » Send SMS from java using http get method « Previous || Next »
Author Message
Helmuth
New member
Username: Heli

Post Number: 1
Registered: 11-2005
Posted on Friday, November 04, 2005 - 04:01 pm:   

Hi!

I'm trying to use nowSMS from a java program to send SMS. The URL I'm trying to send open is
"http://127.0.0.1:8800/?PhoneNumber=%2B43664xxxxxxx&PID=00&DCS=04
&UDH=06050450005000&Data=b65742120596f757220636f646520697320313233
&Binary=1"

The java code looks like this:
URL url = new URL(sendString);
connection=(HttpURLConnection)url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Content-Type","multipart/form-data");
connection.connect();
connection.disconnect();

I can see in my smsdebuglog logfile that the connection was established correctly, (Processing connection from 127.0.0.1...), but the SMS isn't sent and the next log message is
ProcessRead: End of socket

Does anyone know what's wrong here and what I need to change?
thanks.

Login Login / Register Logout Logout Search Last 30 Days Topics Topics