Automated Service Subscription with service parameters

Version 1
    This document was generated from CDN thread

    Created by: Stephan Steiner on 22-10-2008 03:56:29 PM
    Since this is not possible up to CCM 6.1.2 (didn't check the 7.0 schema) you have to resort to executeSQLUpdate. A query like

    String query = "UPDATE telecastersubscribedparameter SET value = '" + defaultGroup + "' WHERE fktelecasterserviceparameter = '" + parameterUuid + "' AND fktelecastersubscribedservice = " +
    "(SELECT ss.pkid FROM telecastersubscribedservice ss INNER JOIN telecasterservice s ON ss.fktelecasterservice = s.pkid AND s.pkid = '" + serviceUuid + "' "
    +"INNER JOIN device d ON ss.fkdevice = d.pkid AND d.name = '" + prof.getName() + "')";

    creates the appropriate entry so that my service parameter is set appropriately - and it works out quite nicely, it's visible in ccmadmin and everything.

    There's but one problem.. the phone sends an empty service parameter when it queries the service.

    When you do the same via ccmadmin, there are two differences: 1) you have to fill out the ascii service name (there's no such option in AXL so it remains empty), and 2) the parameter is then sent to the application.

    But even if I write the ascii service name to the database following the service subscription, the phone still doesn't send the service parameter.. so there's some additional difference between subscribing via ccmadmin, and subscribing via axl.

    Going through the motions will take time so I'm wondering if anybody has found a workaround for this issue (I'm on ccm 6.1.2).

    Subject: Re: Automated Service Subscription with service parameters
    Replied by: Madhukar Bhandaryr on 03-11-2008 02:33:19 PM
    hi,

    Service Parameter changes do not automatically get updated to the phone. The Admin page is also updating the Subscribed Service's ServiceURL field to empty string, which causes the URL to be rewritten by a rule in the database. That's the URL that is used by the phone, so it needs this update to get new parameters and values.

    The fix, since the application is using executeSQLUpdate to modify the db directly, would be to do the same thing as admin. In SQL terms it's

    UPDATE telecastersubscribedservice SET serviceurl = '' WHERE (filter clause);

    The filter clause above is the same as the one used to get the subscribed services for which the parameter is being updated.

    Thanks and Regards,
    Madhukar

    Subject: Re: Automated Service Subscription with service parameters
    Replied by: Stephan Steiner on 04-11-2008 09:41:47 AM
    Hi Madhukar

    I meant to report the findings from our case here but I forgot

    You still haven't responded though why the service url isn't constructed on the fly.. it goes against the design principle of relational databases to store duplicated data - constructing the url on the fly wouldn't be that hard.. it's just one more query getting the values for all service parameters for the particular service and then a simple string appending exercise.

    Subject: Re: Automated Service Subscription with service parameters
    Replied by: Madhukar Bhandaryr on 04-11-2008 10:48:23 AM
    Hi Stepan,

    The documentation for low-level database access is lacking in this and other respects. I have addressed this to the DE engineers

    Regarding service url isn't constructed on the fly:

    It seems this is not done for several technical reasons including the desire of some customers to write the subscribed URL themselves (which is allowed), use of ServiceURL in configuration files for some devices, and efficiency gains from writing it only once when all changes are complete.

    Subject: Re: Automated Service Subscription with service parameters
    Replied by: Madhukar Bhandaryr on 04-11-2008 11:24:45 AM
    Hi Stephan.

    Sorry for typo mistake in the name.

    Regards,
    Madhukar