Configure the Profiles server to support feeds 

Configure the IBM Connections Profiles server to support dynamic feeds in Microsoft™ Outlook Social Connector.


Before starting

To edit configuration files, use the IBM WAS wsadmin client. See Starting the wsadmin client for information about how to start the wsadmin command-line tool.

By default the IBM Outlook Social Connector uses MD5 hashing. If you prefer to use SHA1 hashing instead, each client machine must have the following setting added to the Microsoft Windows™ registry:

HKLM\SOFTWARE\\Microsoft\\Office\\Outlook\\SocialConnector\\SocialProviders\\LCOSC.OSCProvider
Name =  HashFunction
Type = String
Value =  MD5  or  SHA1    (If value does not exist, MD5 is the default value)


Procedure

To configure support for dynamic feeds...

  1. From the dmgr host:

      cd $DMGR_PROFILE/bin
      ./wsadmin.sh -jython
      execfile("profilesAdmin.py")

      If prompted to specify a service to connect to, type 1 to pick the first node in the list. Most commands can run on any node. If the command writes or reads information to or from a file using a local file path, pick the node where the file is stored.

  2. Check out the Profiles configuration files:

      ProfilesConfigService.checkOutConfig("<working_directory>", "<cell_name>")where:

      • <working_directory> is the temporary working directory to which the configuration XML and XSD files are copied and are stored while you make changes to them. Use forward slashes (/) to separate directories in the file path, even if you are using the Microsoft Windows operating system.

          Note: AIX and Linux only: The directory must grant write permissions or the command does not complete successfully.

      • <cell_name> is the name of the WAS cell hosting the Profiles application. This argument is required. It is also case-sensitive, so type it with care. If you do not know the cell name, you can determine it by typing the following command in the wsadmin command processor: print AdminControl.getCell()

      For example:

      • AIX or Linux:

          ProfilesConfigService.checkOutConfig("/opt/prof/temp","foo01Cell01")

      • Microsoft Windows:

          ProfilesConfigService.checkOutConfig("c:/prof/temp","foo01Cell01")

  • Open profiles-config.xml in an editor and add a simpleAttribute to the profileExtensionAttributes element.

      To do so, search for

      <profileDataModels>     
         <profileExtensionAttributes>

      and add:

      <simpleAttribute extensionId="hashEmail" length="40"/> 

  • Indicate the extension is editable by extending the apiModel element.

      To do so, search for

      <apiConfiguration>    
         <apiModel profileType="default">

      and add:

      <editableApiExtensionAttribute extensionIdRef="hashEmail"/>

  • After you make changes, check the configuration files back in, and do so during the same wsadmin session in which you checked them out for the changes to take effect. See Apply property changes in Profiles for information about how to save and apply your changes.

  • To populate the new attribute, perform an HTTP PUT to the profileExtension.do URL for each user. To verify that the attribute is correctly populated you can test each entry using the following URL pattern:

      https://<servername>/profiles/atom/profileExtension.do?extensionId=hashEmail&email=<email address>

      The result should be a web page with only the hashed email returned.

      The following code sample shows how to create the attribute value using MD5 hashing.

      MD5 Hashing Sample
       
      // (C) Copyright IBM Corp. 2010 - All Rights Reserved.
      //
      // DISCLAIMER:
      // The following source code is sample code created by IBM Corporation.
      // This sample code is provided to you solely for the purpose of assisting you
      // in the use of Lotus Connections. The code is provided 'AS IS', without warranty or
      // condition of any kind. IBM shall not be liable for any damages arising out of your
      // use of the sample code, even if IBM has been advised of the possibility of
      // such damages.
      // 
      // Returns a MD5 hash of the first argument
       
      package com.ibm.sample;
      import java.io.UnsupportedEncodingException;
      import java.security.MessageDigest;
      import java.security.NoSuchAlgorithmException;
       
      public class Hash
      {
        public static String hashString(String paramString1, String paramString2)
         throws NoSuchAlgorithmException, UnsupportedEncodingException
        {
          MessageDigest localMessageDigest = MessageDigest.getInstance(paramString2);
          localMessageDigest.update(paramString1.getBytes("iso-8859-1"), 0, paramString1.length());
          byte [] arrayOfByte = localMessageDigest.digest();
       
          StringBuffer localStringBuffer = new StringBuffer();
          for (int i = 0; i < arrayOfByte.length; i++) 
          {
            int j = arrayOfByte [i];
            if (j < 0)
              j = 256 + j;
            if (j < 16)
              localStringBuffer.append("0");
            localStringBuffer.append(Integer.toHexString(j));
          }
          return localStringBuffer.toString();
        }
      }


    Parent topic

    Configure dynamic feeds for the Outlook Social Connector


       

     

    });

    +

    Search Tips   |   Advanced Search