Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Configuring the WSF to establish a network connection using a predefined IAP on Symbian

From Wiki
Jump to: navigation, search

Article Metadata
Platform(s): S60 3rd Edition
S60 3rd Edition (initial release)
Created: User:Technical writer 2 (30 Nov 2006)
Last edited: hamishwillee (14 Jun 2012)


Configuring the WSF to establish a network connection using a predefined IAP


How can I configure the Web Service Framework (WSF) to establish a network connection using a predefined Internet Access Point (IAP) instead of it prompting the user for a IAP selection?
There are two interfaces in the Web Services Framework that allow setting the IAP to be used by the consumer application:

  • MSenProviderPolicy (implemented by CSenXmlServiceDescription) defines a "provider policy" that is a WSF-wide setting, stored in WSF databases, and thus shared with all the actual Web Service Consumers (WSCs) accessing the same services. This policy defines the IAP and the Identity Providers that can be used when connecting to a [remote] provider.
  • MSenConsumerPolicy (implemented by CSenServicePattern) defines a "consumer policy" that is similar in content and intent with the "provider policy" described above but it only applies to the current connection, it is not stored or shared with other applications that might be using the same Web service at the same time.
    The SDK documentation does not mention that the provider policies are currently not fully implemented and as such they are not functional. In order to define the IAP to be used by the framework you must define a consumer policy through a CSenServicePattern object.
    To apply this to the S60Ex\AddressBook example published with the S60 3rd Edition SDK [FP1], the following changes are needed:
    TUint32 iMyIap; // predefined IAP selection
    void CAddressBookEngine::ConnectL()
          * Original code - unchanged
         _LIT (KConnectL, "CAddressBookEngine::ConnectL()");
         LOG( KConnectL);
          * Original code, for reference
          * CSenXmlServiceDescription* pattern = CSenXmlServiceDescription::NewLC();
          * pattern->SetContractL(KPpContract());
          * Provider policy - not working
          * CSenXmlServiceDescription* pattern = CSenXmlServiceDescription::NewLC();
          * pattern->SetContractL(KPpContract());
          * pattern->SetIapIdL(iMyIap);
          * Consumer policy - working solution
         CSenServicePattern* pattern =  CSenServicePattern::NewLC();

          * Original code - unchanged
         delete iConnection;
         iConnection = NULL;
         iConnection = CSenServiceConnection::NewL(*this, *pattern);
    Note: On the Series 80 2nd Edition SDK this example is located in Series80Ex\PhonebookEx.
This page was last modified on 14 June 2012, at 07:17.
56 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.