Please help on text message programatically

Please help on text message programatically Search Search

SMS & MMS Technical Forum » MMS & SMS Technical Discussions (unsupported) » Archive through November 12, 2008 » Please help on text message programatically « Previous || Next »
Author Message
Sajid Ahmed
New member
Username: Sajid

Post Number: 3
Registered: 10-2008
Posted on Thursday, October 09, 2008 - 10:22 am:   

Hi ,
Does nowsms support Post(doPost) request or it does only Get(doGet)..when
preparing url prgramatically i need to send parameters in header section
only cant it be send as payload..i.e if if send parameters in body wont
nowsms parse it?
what will the servlet will return if its successful?

what i will try is i will invoke url by payload as param=value seperated by
'&'

Thanks & Regards,
Sajid

On Wed, Oct 8, 2008 at 2:59 PM, <keith@nowsms.com> wrote:

Sajid,

We do not support text sending using an XML feed, NowSMS is capable of
formatting the message from an HTTP get action feed.

Regards

Keith.

--------------------------------------------------
From: "sajid ahmed" <sajidbigler@gmail.com>
Sent: Wednesday, October 08, 2008 10:15 AM

To: <keith@nowsms.com>
Subject: Re: Fw: please help

Hi Keith,


For contents i need to send url to download using wap push and for text
message normal text.Well xml formation is for wap push but for text based
is
there any xml formation? just open the url connection
http://localhost:8800/and add parameters and send as below code
does...

URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url
.openConnection();
connection.setDoOutput(postString != null
&& postString.length() != 0);
connection.setDoInput(true);
connection.setRequestProperty(headerName, headerValue);

// Write the XML string to the URLConnection
if (postString != null && postString.length() != 0) {
OutputStream out = connection.getOutputStream();
out.write(postString.getBytes());
out.flush();
out.close();
}
Regards,
Sajid


On Wed, Oct 8, 2008 at 2:31 PM, <keith@nowsms.com> wrote:

Sajid,


What type of message do you want to send to NowSMS using XML?

Regards

Keith.

--------------------------------------------------
From: "sajid ahmed" <sajidbigler@gmail.com>
Sent: Tuesday, October 07, 2008 4:25 PM
To: <keith@nowsms.com>
Subject: Re: Fw: please help


Hi Keith,


Thanks for your rely i have gone through this link.my requirement is to
send
text messages to n number of users pragmatically.i think there will be a
pattern/xml format(content-type/mime-type) which we need to do before we
send message to ppg host..Irrespective of message size.any clue and your
feedback will be appreciable.I am working on opencds project. i want to
integrate nowsms with opencds so i am sure there will be some standard
xml
format which can be push to ppgHost :http://localhost:8800/pap as shown
below

--asdflkjqrajeshsaoqwerpoiu
Content-Type: application/xml

<?xml version="1.0"?>
<!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 1.0//EN" "
http://www.wapforum.org/DTD/pap_1.0.dtd">
<pap>
<push-message push-id="CDS1223358783281"
source-reference="CDS"
ppg-notify-requested-to="http://localhost:9090"
progress-notes-requested="false">
<address address-value="WAPPUSH=+919949651055/TYPE="/>
<quality-of-service priority="high" delivery-method="unconfirmed"
network="GSM" network-required="true" bearer="SMS"
bearer-required="false"/>
</push-message>
</pap>
--asdflkjqrajeshsaoqwerpoiu
Content-Type: text/vnd.wap.si

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE si PUBLIC "-//WAPFORUM//DTD SI 1.0//EN" "
http://www.wapforum.org/DTD/si.dtd">
<si>
<indication href="" si-id="CDS1223358783281"
created="2008-10-07T11:23:03Z">
Hi Friends&#44;

Please help me to resolve this !

Regards&#44;

Sajid
</indication>

On Tue, Oct 7, 2008 at 5:33 PM, <keith@nowsms.com> wrote:

Sajid,


I do not have any Java examples but what you need to do is program the
Java
code to output an http get action, here is a link with more details on
that.




http://www.nowsms.com/documentation/ProductDocumentation/sending_messages/sendin g_text_messages.htm

Regards

Keith.


--------------------------------------------------

From: "sajid ahmed" <sajidbigler@gmail.com>

Sent: Tuesday, October 07, 2008 12:31 PM
To: <nowsms@nowmobile.com>
Subject: please help

Hi,


Do we have java api for nowsms ?

After installing nowsms i am able to send messages using GSM modem..

here is how i do it

http://localhost:8800/

i enter mobile number and text message and say send...

is there a way using java program to send sms ?

any sample code using URL http://localhost:8800/pap etc ?

Any java api for nowsms ?

Regards,

Sajid
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 135
Registered: 08-2008
Posted on Thursday, October 09, 2008 - 02:03 pm:   

Hi Sajid,

I'm not clear whether you are trying to send text messages or WAP push messages.

The PAP interface is for WAP push messages only.

If you want to send text messages, you would normally build an HTTP GET URL string like described in the following link:

http://www.nowsms.com/documentation/ProductDocumentation/sending_messages/sendin g_text_messages.htm

If you want to use HTTP POST, that is also ok. We do not use an XML format for the HTTP POST ... we use the standard web form POST encoding with the MIME type "application/x-www-form-urlencoded".

When you use HTTP POST, all of the HTTP GET variables are instead sent in the POST data, specifying "application/x-www-form-urlencoded" as the "Content-Type:" (standard web form POST format). Just put all of the variables (everything after the "?") in the post data instead of the URL, and remove the "?" off of the URL. This way you get around any length limitations that your scripting language might impose on HTTP GET URL length.

--
Des
NowSMS Support
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 137
Registered: 08-2008
Posted on Thursday, October 09, 2008 - 02:05 pm:   

I see you also posted this question at several other places.

Since this area of the forum is intended to be an "unsupported" area for questions that don't necessary pertain to NowSMS, please post any follow-up questions in the other discussion thread that is located in our product support area:

http://www.nowsms.com/discus/messages/485/24434.html

Login Login / Register Search Search   Home Home
Logout Logout Topics Topics Search Last 1|3|7|30 Days   Previous Page Previous Next Next Page