Sending XML Settings to get OTA file dynamically | Search |
NowSMS Support Forums ⬆ WAP Technical Discussions (unsupported) ⬆ Archive through February 16, 2009 ⬆ |
◄ ► |
Author | Message | |||
vijay New member Username: Vizaise Post Number: 1 Registered: 06-2007 |
Hi experts I need to send XML Document to get OTA format dynamically thru programm. can any one suggest me the way.. Thanks in advance viZAi | |||
Bryce Norwood - NowSMS Support Board Administrator Username: Bryce Post Number: 7277 Registered: 10-2002 |
If you're using NowSMS ... To send the settings in an automated fashion, you can use HTTP POST, using either PAP, or this simple HTTP POST interface that we have for any of the document types supported by "Send XML Settings" ... Open an HTTP connection to the port for the NowSMS web interface, and then issue an HTTP POST: POST /?PhoneNumber=xxxxxxxx&OTA=POST HTTP/1.0 Content-Length: yyyyyy (*insert blank line here to end HTTP Header*) <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 (not typically used with rights objects, but used with other XML documents), add "&OTAPIN=xxxx" to the URL, along with "&OTAPINTYPE=USERPIN" or "&OTAPINTYPE=NETWPIN". The only other bit that I should mention is user authentication. If you have NowSMS configured to require user accounts for message submission, then you need to specify which of the "SMS Users" accounts is used by the submission. To do this, include "&User=username&Password=password" in the URL request. (Or you can use an HTTP Basic Authentication "Authorization:" header.) | |||
vijay New member Username: Vizaise Post Number: 2 Registered: 06-2007 |
Bryce Thanks for the reply.. I got the answer from ur post. And I'ld like to know, how to send http post request from c#/Java. A bit confusing in this <xml settings document> where should i put this thanks in advacne | |||
vijay New member Username: Vizaise Post Number: 3 Registered: 06-2007 |
Hi Can anybody tell how to do HTTP Post request for the OTA.. POST /?PhoneNumber=xxxxxxxx&OTA=POST HTTP/1.0 Content-Length: yyyyyy (*insert blank line here to end HTTP Header*) <xml settings document> for this in C#/JAVa How should I handle this XML content... I've done as below(C#) string postData = "PhoneNumber=89998998&OTA=POST"; postData = postData + "\n\n"; postData = postData + "<xmlContent Goes here>" byte[] byteArray = Encoding.UTF8.GetBytes(postData); Is this correct... And i need to get The OTA File from this request... Can anybody help me in this pleasee | |||
vijay New member Username: Vizaise Post Number: 4 Registered: 06-2007 |
Cool , its working... |