| ID | TSS001387 | Creation date | June 12, 2009 |
| Platform | S60 3rd Edition FP1, S60 3rd Edition FP2 | Devices | Tested on Nokia N95 |
| Category | Symbian C++ | Subcategory | Web Services |
| Keywords (APIs, classes, methods, functions): CSenServiceManager |
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
Code:
// 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)
pIdp->SetFrameworkID(KDefaultBasicWebServicesFrameworkID);<br>
TInt error = pManager->RegisterIdentityProviderL(*pIdp);
CleanupStack::PopAndDestroy(2); // pManager, pIdp
No related wiki articles found