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.

Archived:Implementing Automatic Web Service Authentication using Symbian C++

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Article Metadata
Tested with
Devices(s): Tested on Nokia N95
Platform(s): S60 3rd Edition FP1, S60 3rd Edition FP2
S60 3rd Edition FP2
S60 3rd Edition FP1
Keywords: CSenServiceManager
Created: User:TechnicalWriter2 (12 Jun 2009)
Last edited: hamishwillee (06 Sep 2012)


A web service is a software system designed to support interoperable machine-to-machine interaction over a network. It has an interface described in a machine-processable format (specifically Web Services Description Language (WSDL)).

The S60 Web Services Framework (WSF) API abstracts the details of connecting to and communicating with a Web service. It also provides helper classes for sending requests and handling the responses of Web services.


A Web Services Consumer (WSC) application can directly connect to a basic Web Service if it does not involve any authentication. However, if authentication is enabled, an authentication dialog is popped whenever the consumer application tries to establish a connection. The authentication dialog can be avoided by using the following code snippet before starting the connection.


Header Files: Senservicemanager.h, Senidentityprovider.h

Library: SenServMgr.lib, SenServDesc.lib

Required Capabilities: ReadUserData, WriteUserData, NetworkServices


 // Creating an instance of CSenServiceManager
CSenServiceManager* pManager = CSenServiceManager::NewLC();<br>
// Creating an instance of IdP and registering it. Notice, that endpoint is the<br>// endpoint to the actual Web Service Provider.
CSenIdentityProvider* pIdp = CSenIdentityProvider::NewLC(KWSPEndPoint());<br>
// Set BASIC-AUTH credentials
pIdp->SetUserInfo(KUser, KUser, KPass);<br>
// Set FrameworkID (constant declared in SenServiceConnection.h)
TInt error = pManager->RegisterIdentityProviderL(*pIdp);
CleanupStack::PopAndDestroy(2); // pManager, pIdp
This page was last modified on 6 September 2012, at 05:37.
49 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.