NOTE! This technical note is for EPiServer Connect for SharePoint version 1.0 only (for EPiServer CMS 5.1 SP1). Technical notes can be found for version 2.0 of EPiServer Connect for SharePoint.
This technical note contains functional and technical information for the EPiServer Connect for Microsoft SharePoint 2007 functionality.
The EPiServer Connect for Microsoft SharePoint 2007 allows the export of list items and documents from WSS 3.0 or MOSS 2007 (hereby known collectively as SharePoint) to EPiServer CMS. Examples of list items are calendar items, tasks, announcements and custom items. Each item exported from SharePoint to EPiServer CMS becomes a page in EPiServer CMS, documents are imported untouched. Each SharePoint item has fields. These fields are mapped to EPiServer CMS page type properties using the mappings created. See the EPiServer CMS Content Channels section below for details of this.
The EPiServer Connect for Microsoft SharePoint 2007 consists of .NET assemblies, web services, web pages and resource files that get installed on the SharePoint and EPiServer CMS server machines.
The EPiServer CMS components consist of a web service and some administrative web pages. The web service is called the EPiServer Content Channel Service (ContentChannelService.asmx). While this is used by the EPiServer Connect for Microsoft SharePoint 2007, it is not restricted to this use.
The SharePoint components consists of a .NET assembly DLL, some .aspx pages, some .resx resource files and the relevant feature and element XML files to install them in SharePoint.
All of the SharePoint components for the connector are packaged in the SharePointConnector.wsp solution file for easy installation. To start using the feature the solution needs to be added and deployed on the SharePoint server. To do this the stsadm.exe tool shipped with SharePoint is used. This command line application can normally be found in the SharePoint BIN folder. SharePoint is normally installed under <drive>\Program Files\Common Files\Microsoft Shared\web server extensions\12. The 12 folder indicates that the installation is WSS 3.0 or MOSS 2007. To deploy the solution in SharePoint:
After the solution has been deployed, the features installed need to be activated for the desired SharePoint web sites. To activate the features do as follows:
After activation the EPiServer CMS 5 SharePoint Connector Configuration link should be visible on the Site Settings page under the Site Administration column.
The connector stores information about channels in an XML configuration file. The code automatically creates this file the first time it is needed if it doesn't exist, however the path to where this file should be stored needs to be entered into the web.config file for the SharePoint web application hosting the connector. The web.config for the SharePoint web application can normally be found at <drive>\inetpub\wwwroot\wss\VirtualDirectories\<port> where <drive> is the drive where IIS is installed and <port> is the port number for the web application to be used (e.g. 80). In the web.config file under the <configuration><appSettings> section, a new entry should be added with a key of 'epiServerConnectorConfigRelativePath' and a value of a file path which is relative to the folder that the web.config file is in. For example, to store the config in a file called 'EPiServerSharePointConnector.config' in the same folder as the web.config file the entry would be:
<?xml version="1.0" encoding="utf-8"?>
The stsadm command line tool can be used to do this. Use the following commands:
Before removing the connector solution from SharePoint, you need to de-activate it's features in all of the SharePoint sites where it has been activated. This is done on the Site Features page for each site.
The stsadm command line tool can be used to do the rest. Use the following commands:
Syntax for all the stsadm commands can be found on Microsoft's TechNet site.
The connector is reliant on EPiServer CMS 5 Service Pack 1 running in the target site which you install via the EPiServer CMS Manager.
Configure EPiServer CMS Web services according to the instructions in the Web Services technical note.
To make the connection between SharePoint and EPiServer CMS, a channel must be created on both sides. On the SharePoint side this is known as an EPiServer Channel and on the EPiServer side it is known as a Content Channel.
Content Channels in EPiServer CMS are administered via the Content Channels link on the Admin tab in Admin mode. To create a channel the following information is needed:
The fields to be exported for SharePoint items should have their names mapped for the desired page types for each EPiServer CMS Content Channel to be used. If no mappings are created then EPiServer will only import properties whose names match that of the properties of the page type being used. Note that you must create a mapping in the EPiServer Content Channel from a field on the SharePoint item to the EPiServer PageName property. Alternatively, this can be handled in the pre event handler available in the EPiServer CMS SharePoint Connector component in SharePoint or in the Content Channel Service on the EPiServer side.
Channels in SharePoint are created and administered via the SharePoint web user interface. Once the necessary components have been installed and activated for a site, then a new link called "EPiServer CMS 5 SharePoint Connector Configuration" should be visible on the Site Settings page for the site. This link leads to a page where channels can be created, edited and deleted. It should be noted that channels are site specific and therefore channels created on one site are not visible from another.
To create a channel the following information is needed:
Because the EPiServer Content Channel Service is a web service, you must give a user the permission to act as a web service user. This is done in EPiServer Admin mode on the Config tab using the Permission for Functions link. It is this user that you enter the details for when creating an EPiServer channel on the SharePoint server.
EPiServer Connect for Microsoft SharePoint 2007 is extensible in code on both the SharePoint and EPiServer side by subscribing to the events published. See below for details:
The class EPiServer.SharePointConnector.EventListener.ListItemSender which can be found in the EPiServer.SharePointConnector.dll exposes the following static events:
The class EPiServer.ContentChannels.ContentChannelHandlerBase which can be found in the EPiServer.ContentChannelService.dll exposes the following static events:
Each item exported from SharePoint will get the same identity (GUID) in EPiServer that it has in SharePoint. A consequence of this is that you can not have a one to many mapping from SharePoint to EPiServer. That is, you cannot map one item from SharePoint to end up as several items in EPiServer (e.g. by configuring a SharePoint item in several Content Channels with different roots on the same EPiServer site).
EPiServer Connect for Microsoft SharePoint 2007 currently has some limitations due to problems with determining the cause of the SharePoint Updating and Updated events. When Metadata is entered or edited for a file, the file contents (as well as the metadata) will be sent to EPiServer. This means that file data will be sent even when the actual file hasn't changed. As a result, the FileMetadataUpdating event will never be fired.
When items are created, edited or deleted in SharePoint, the connector is notified of these changes via a background event. Any errors that occur sending the changes to EPiServer CMS cannot be reported to the user directly as this component has no way of interacting with the SharePoint GUI. Because of this limitation, all errors are writen to the Windows Event Application Log. The source name to look for is "EPiServer SharePoint Connector".
The most likely errors relating to SharePoint items not appearing in EPiServer CMS are:
The user interface in EPiServer CMS for editing file metadata uses the EPiServer X-Forms technology. The root catalogue of the EPiServer CMS web site should contain a file called FileSummary.config. This file contains the mappings between file metadata names and the X-Forms GUI elements in the Metadata editing page. In order to edit metadata for files imported from SharePoint, the FileSummary.config file must be updated with the metadata names that SharePoint generates for files.
Last updated: 2008-05-05