SyncML OTA Setting

SyncML OTA Setting SearchSearch
Author Message
CW
Unregistered guest
Posted on Saturday, June 26, 2004 - 06:44 am:   

hi,

i have write some programming code as below:
String s2 ="<SyncSettings><Version>1.0</Version>";
s2 = s2 + "<HostAddr>http://mysync.homelinux.com/sync</HostAddr>";
s2 = s2 + "<Port>8080</Port>";
s2 = s2 + "<RemoteDB><CTType>text/x-vcard</CCType>";
s2 = s2 + "<CTVer>2.1</CTVer>";
s2 = s2 + "<URI>contact</URI></RemoteDB>";
s2 = s2 + "<Name>SyncBurp</Name>";
s2 = s2 + "<Auth><AuthScheme>1</AuthScheme>";
s2 = s2 + "<Username>test</Username>";
s2 = s2 + "<Cred>Yn9uZa==</Cred></Auth></SyncSettings>";
URL url = new URL("http://127.0.0.1:8800?PhoneNumber=%2B" + mobile + "&OTASyncML=POST");
HttpMessage httpmessage = new HttpMessage(url);
Properties properties = new Properties();
properties.put("OTAXMLSETTINGS", "Content_Length:" + Integer.toString(s2.length()) + "%0D%0A%0D%0A" + s2);
InputStream inputstream = httpmessage.sendPostMessage(properties);
DataInputStream datainputstream = new DataInputStream(new BufferedInputStream(inputstream));
inputstream.close();

i have success send the OTA setting to Nokia 7250 and it work fine, but when i send the OTA setting to Nokia n-gage, it can't be open and give the message said unsuported format.

i also have try send the OTA setting via nowsms web interface, both 7250 and n-gage can work.

can you tell me what the wrong i make in my program code.

Thank,
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 2919
Registered: 10-2002
Posted on Monday, June 28, 2004 - 06:34 pm:   

Hi CW,

Are you sure that those same XML settings worked from the NowSMS web interface (Send XML Settings)?

Generally speaking, Nokia has been shifting their devices away from the older Nokia/Ericsson format, toward OMA Provisioining Content.

The N-Gage is a Series 60 device, so I'd recommend starting with the settings examples from Nokia's OMA Client Provisioning for the Series 60 document, which can be downloaded from the www.forum.nokia.com web site.

Basically, the format for SyncML settings looks something like this:

<wap-provisioningdoc>
<characteristic type="APPLICATION">
<parm name="APPID" value="w5"/>
<parm name="TO-NAPID" value="Browsing_GPRS" />
<parm name="NAME" value="Superman SyncML"/>
<parm name="ADDR" value="http://metropolis.com:8080/service/sync"/>
<characteristic type="RESOURCE">
<parm name="URI" value="./contacts"/>
<parm name="NAME" value="Contacts DB"/>
<parm name="AACCEPT" value="text/x-vcard"/>
</characteristic>
<characteristic type="RESOURCE">
<parm name="URI" value="./calendar"/>
<parm name="NAME" value="Calendar DB"/>
<parm name="AACCEPT" value="text/x-vcalendar"/>
</characteristic>
<characteristic type="APPAUTH">
<parm name="AAUTHNAME" value="name4"/>
<parm name="AAUTHSECRET" value="password4"/>
</characteristic>
</characteristic>
</wap-provisioningdoc>