Sending OTA Sync settings via JSP (AJAX) page

Sending OTA Sync settings via JSP (AJAX) page SearchSearch
Author Message
Tyrone
New member
Username: Tyronevdm

Post Number: 2
Registered: 06-2008
Posted on Tuesday, July 01, 2008 - 09:13 am:   

Hi there,

I want to build my own custom built webpage. I want to send OTA settings to my cellphone. Whats the best way to do this, I see I can put the cellphone number and the XML File in and pass it this way to the NOWSMS server, but I dont really wanna do this as then anyone can just hardcode their cellnumber in and get the settings sent to them. Also this way the user can just F5 and 2 more sms are sent with the settings, It can be abused a lot.

I think maybe I can send a HTTP POST request with the XML settings as a string(First converting the XML config file to a string object).

Are there any methods that are being exposed by NowSMS for this?

Please , any help will be appreciated!!
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 29
Registered: 08-2008
Posted on Tuesday, August 19, 2008 - 09:06 pm:   

Hi,

I know this is an old message, but I'm cleaning up the discussion board because Bryce has been too overworked this summer. So I'm mainly responding for others who search and find this message.

From your application, you need to open an HTTP connection to the port for the NowSMS web interface, and then you issue an HTTP POST:

POST /?PhoneNumber=xxxxxxxx&OTA=POST HTTP/1.0
Content-Length: yyyyyy
(*blank line*)
<xml settings document>

When submitting an OTA request in this manner, the HTTP POST request must include a “Content-Length:” header. This should match the length of your XML document.

NowSMS will scan the XML content to automatically determine what the content type is ... so that it can be encoded properly for sending over the air.

If you need to use a PIN on the settings, add "&OTAPIN=xxxx" to the URL, along with "&OTAPINTYPE=USERPIN" or "&OTAPINTYPE=NETWPIN".

--
Des
NowSMS Support