×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Sep 2003
    Posts
    8

    SyncML Client Provisioning

    I'd like to use OMA client provisioning with SMS to set the SyncML settings for Nokia 6600 and sent to SMSC. However, I couldn't make it work. The phone received and said "1 new Message" , then "Data Synchronization Setting Received", then it said "System Error" (not the exact wordings, just my translation from chinese).

    What I did is sending 3 SMS's out for the whole prov document.

    I used the WDP header:

    0B0504C34CC002000304
    no. of segment + this segment
    0106
    2F //headerlength
    1F2D //value length
    B6
    9181
    92
    MAC //I used java's JCE to calculate, then bin2hex it
    00
    03
    0B //WAPFORUM/DTD PROV 1.0/EN
    6A
    00 //no string table
    C5 //start of my provision document
    XXXXXXXXXXXXXXXXXXXX
    ....


    My provisioning document is just follow the w5 of client provisioning registration. Below is the Java Code I used to create the XML. Does anyone know what I'm doing wrong ?? By the way, is it any special value for text/x-vcalendar,text/vcal and text/x-vcard,text/vcard. It seems now, I just encode them as inline string.



    DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();

    String str = "<characteristic type=\"APPLICATION\"></characteristic>";

    byte[] bys = str.getBytes();
    ByteArrayInputStream is = new ByteArrayInputStream(bys);
    Document doc = builder.parse(is);

    //get the root element
    Element root = doc.getDocumentElement();

    //declaration of element node
    Element el, elChild, elGrandChild;

    el = createParm(doc, "APPID", "w5");
    root.appendChild(el);
    el = createParm(doc, "NAME", "SyncServer");
    root.appendChild(el);
    el = createParm(doc, "ADDR", _sync_url);
    root.appendChild(el);
    el = createParm(doc, "TO-NAPID", "INTERNET");
    root.appendChild(el);

    el = createCharacteristic(doc, "APPAUTH");
    elChild = createParm(doc, "AAUTHTYPE", "HTTP-DIGEST");
    el.appendChild(elChild);
    elChild = createParm(doc, "AAUTHNAME", "james");
    el.appendChild(elChild);
    elChild = createParm(doc, "AAUTHSECRET", "secret");
    el.appendChild(elChild);
    root.appendChild(el);

    el = createCharacteristic(doc, "APPAUTH");
    elChild = createParm(doc, "AAUTHLEVEL", "APPSRV");
    el.appendChild(elChild);
    elChild = createParm(doc, "AAUTHTYPE", "DIGEST");
    el.appendChild(elChild);
    elChild = createParm(doc, "AAUTHNAME", _sync_user);
    el.appendChild(elChild);
    elChild = createParm(doc, "AAUTHSECRET", _sync_passwd);
    el.appendChild(elChild);
    root.appendChild(el);

    el = createCharacteristic(doc, "RESOURCE");
    elChild = createParm(doc, "URI", _vcard_database);
    el.appendChild(elChild);
    elChild = createParm(doc, "NAME", "Contact DB");
    el.appendChild(elChild);
    elChild = createParm(doc, "AACCEPT", "text/x-vcard,text/vcard");
    el.appendChild(elChild);
    elChild = createParm(doc, "AAUTHTYPE", "DIGEST");
    el.appendChild(elChild);
    elChild = createParm(doc, "AAUTHNAME", _vcard_user);
    el.appendChild(elChild);
    elChild = createParm(doc, "AAUTHSECRET", _vcard_passwd);
    el.appendChild(elChild);
    root.appendChild(el);

    el = createCharacteristic(doc, "RESOURCE");
    elChild = createParm(doc, "URI", _vcal_database);
    el.appendChild(elChild);
    elChild = createParm(doc, "NAME", "Calendar DB");
    el.appendChild(elChild);
    elChild = createParm(doc, "AACCEPT", "text/x-vcalendar, text/vcal");
    root.appendChild(el);

    _xml_document = doc;

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Tampere / Finland
    Posts
    1,839
    Hi!

    Could you post me the XML file you have been using, it would help me quite lot to see all the parameters.

    Teemu / Forum Nokia

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×