Sending SyncML DM bootstrap messages | Search |
NowSMS Support Forums ⬆ NowSMS Support - SMS Issues ⬆ Archive through October 19, 2005 ⬆ |
◄ ► |
Author | Message | |||
Anonymous |
Hi, How can I send a SyncML DM bootstrap message (plain profile) with NowSMS to a mobile phone. The message would contain DM server settings (IP, name, password, username..) for the client. The bootstrap package should be in wbxml format. The message is specifed in following document, in chapter 5.4 (The Plain profile) http://www.openmobilealliance.org/release_program/docs/CopyrightClick.asp?pck=DM &file=V1_1_2-20031209-A/OMA-SyncML-DM-Bootstrap-V1_1_2-20031209-A.pdf For example, in the document is bootstrap example in chapter 5.4.3.2. How can I send that with NowSMS? The mime type should be "application/vnd.syncml.dm+wbxml" and wap content type for that 0x42. Thanks, JJ | |||
Bryce Norwood - NowSMS Support Board Administrator Username: Bryce Post Number: 4768 Registered: 10-2002 |
Hi JJ, Modifying the example here: http://support.nowsms.com/discus/messages/485/9072.html I'd come up with this ... POST /pap HTTP/1.0 Content-Type: multipart/related; boundary=mime-boundary; type="application/xml" Content-Length: xxxxx --mime-boundary Content-Type: application/xml <?xml version="1.0"?> <!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 2.0//EN" "http://www.wapforum.org/DTD/pap_2.0.dtd" [<?wap-pap-ver supported-versions="2.0,1.*"?>]> <pap> <push-message push-id="9fjeo39jf084@pi.com"> <address address-value="wappush=xxxxxxxxx/type=user@ppg.operator.com"></address> </push-message> </pap> --mime-boundary Content-Type: application/vnd.syncml.dm+wbxml X-WAP-Application-ID: x-wap-application:push.syncml Content-Transfer-Encoding: binary Content-Length: xxxxx (WBXML content here in 8-bit binary, followed by CRLF) --mime-boundary-- The "xxxxxxx" areas above are what you would need to replace with appropriate values. Primarily, these are "Content-Length:" headers, and a phone number to specify the recipient. -bn | |||
Anonymous |
Hi Bryce, Thanks, I will give it a try. But now after your answer I came up with couple of new questions. Is it possible to replace the Push application ID in your example to; x-wap-application:syncml.dm The number value for that is 0x07. Can I use base64 as content-transfer-encoding mode, so I could insert the wbxml content into the message? I don't know if it's possible to insert it as 8-bit binary. Is the content-length in the beginning of PAP message mandatory (in third line)? In your example is used "" DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 2.0//EN" "". Is it possible to use "PAP 1.0" also? Thanks, JJ | |||
Bryce Norwood - NowSMS Support Board Administrator Username: Bryce Post Number: 4854 Registered: 10-2002 |
JJ, Sorry for the delay in response.
Make sure you have v5.51b or later of NowSMS (see "What's New" for download link), as there were some issues with NowSMS not always including non-well-known "X-WAP-Application-ID" values. That said, to the best of my knowledge, we have always supported "x-wap-application:syncml.dm" as a valid value. If you do use a numeric value, older versions of NowSMS did not understand the "0x" prefix. So "7" would be find, but "0x07" would not be encoded correctly. This issue should be resolved in v5.51b and later.
No, we don't support this encoding for PAP messages.
The first instance in my example is ALWAYS required. This is really an HTTP requirement. As our push decoder doesn't see the HTTP request until the HTTP request is considered complete. (I suppose we could add some smarts to see if it is a multipart post, and automatically assume the request is complete when we see the final boundary part. That would stop people asking us about how to calculate the "Content-Length:" header. I'm going to consult our development team about this. It seems impure, but I can tell from questions that it would make things simpler for a lot of people.) The second instance can usually be figured out based upon the context.
Yes. We are not very picky about the PAP document format. We are primarily just looking for "<address address-value=...>" tags to denote recipients. -bn |