If you are defining security information using the SetSecure method, you must add a line of code to your web service client application to configure the GSKit settings for the secure service. The GSKit security information must be initialized before the application calls any methods on the web service.
The following example shows a Windows version of a sample client application that configures GSKit security information before calling a web service. To configure the secure setting within your own application, add the code shown in bold in this example.
int main() { // Create URLs for normal and secure communication. The localhost may require // a port number, i.e. localhost:80 char * pszNormalURL = "http://localhost/Test/services/TestPort"; char * pszSecureURL = "https://localhost/Test/services/TestPort"; // Load instances of the service with normal and secure URL settings. ITestService * serviceNormal = new ITestService( pszNormalURL); ITestService * serviceSecure = new ITestService( pszSecureURL); // Initialise the secure settings for the secure service. serviceSecure->SetSecure( "<GSKit_InstDir><KeyRing.kbd>", "<password or stash>", "<label>", "NONE", "05", "NONE", false); // Remainder of application : // End of application delete serviceSecure; delete serviceNormal; return 0; }
For further information see GSKit.