© Copyright IBM Corporation 2009, 2014 ALL RIGHTS RESERVED.
This sample application demonstrates how to use the Content Engine .NET API to upload a DITA project (map, topics, images, etc.) to IBM® FileNet® P8. Once a DITA project is checked in, the sample application can download it from IBM FileNet P8 to a file system directory.
For detailed information, see DITA Publishing in the IBM Knowledge Center.
This sample code distribution contains the following files:
Note: The addon is not installed by default when an object store is created. To install from the FileNet Enterprise Manager, right-click on the object store where you want to install the add-on and choose All Tasks > Install AddOn. To install from the Administration Console for Content Platform Engine, right-click on the object store and choose Install Add-on Features. In the resultant dialog box, select DITA Publishing Extensions (dependent add-ons are automatically selected).
WCF requires a secure HTTPS connection. To run this sample application with WCF, you must import the SSL certificate from the Content Platform Engine server to the client workstation. Download the server certificate, and import it into a certificate store using the Certificate MMC snap-in. For example, you can import the certificate into the Trusted People certificate store.
Alternatively, to run the sample application with an unsecured HTTP connection, Microsoft Web Service Extensions (WSE) 3.0 must also be installed along with the .NET framework.
The DLL is located in this Content Engine directory: <CE_installation_directory>\FileNet\ContentEngine. If you will be building and running the sample application on a different machine, you must copy FileNet.Api.dll to that machine.
This sample application demonstrates the following:
To modify the sample application, you can edit one or more of the following source files.
Source file | Description |
---|---|
CEConnection.cs | Establishes a connection to the Content Engine server. |
DitaParser.cs | Parses a DITA file to map XML attributes to document properties. |
DitaToolForm.cs DITAToolForm.Designer.cs |
The UI class that controls upload and download. |
GetDITADoc.cs | Downloads a DITA project (map, topics, images, etc.) to a local directory. |
MainForm.cs MainForm.Designer.cs |
The UI class that configures the server. |
Program.cs | The main program. |
StoreDITADoc.cs | Parses a DITA map and uploads DITA files to an object store. |
Note: You need Microsoft.Web Service Extensions (WSE) 3.0 only if you run the sample application with an unsecured HTTP connection.
If references are missing, add them by selecting Project > Add Reference. If the Content Engine .NET API is missing, select FileNet.Api from the .NET tab of the Reference Manager dialog box and click OK. If FileNet.Api does not appear on the .NET tab, then switch to the Browse tab, navigate to the location of FileNet.Api.dll, select it, and click OK.
If you are building on the same machine where the Content Engine is installed, you’ll find FileNet.Api.dll in the <CE_installation_directory>\ContentEngine directory.
If you start the application from the command line, you can specify a configuration file using the -f option (for example,
SampDitaTool -f C:\sampditatool.net\SamDitaTool\conf\ditatoolwlwsi.dat
). Otherwise, the application will create a
configuration file named ditatool.dat in the directory containing the application.
Note: When you click Connect, the field values in the Connection Parameters dialog box are written to the configuration file. See Configuration file for details.
Note: When you click Upload, the field values will be written to the configuration file. See Configuration file for details.
Note: When you click Download, the field values will be written to the configuration file. See Configuration file for details.
The settings for the sample application are saved in a configuration file, which contains one property and value pair per line
(for example, user=Administrator
). The table below describes the properties:
XML key | Description |
---|---|
basedir | Specifies the directory that contains the DITA map for the project to be checked in (for example, \dita\myproject\). |
domain | Specifies the name of the IBM FileNet P8 domain where the object store resides (for example, mydomain). |
ditamap | Specifies the name of the DITA map to upload or download (for example, articles\DITA-articles.ditamap). |
DownloadDir | Specifies the destination directory for a DITA project download (for example, \sampditatool\download). |
os | Specifies the name of the object store where the DITA files reside, or will reside (for example, OS1). |
pass | Specifies the password for the Content Engine user. |
simulateDL | Specifies whether to simulate the download. If set to true, the sample application returns a list of files that would be downloaded from IBM FileNet P8, without actually retrieving the files. |
simulateUL | Specifies whether to simulate the upload. If set to true, the sample application returns a list of files that would be uploaded to IBM FileNet P8, without actually checking in the files. |
uploaddir | Specifies the IBM FileNet P8 directory where the DITA files will be checked in (for example, /DITAProjects). |
uri | Specifies the URI for the Content Engine server connection. |
user | Specifies a Content Engine user name that has permissions to check in and check out files from the P8 base directory as specified by the p8base value (for example, CEAdmin). |
This information was developed for products and services offered in the U.S.A.
IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate and verify the operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter described in this document. The furnishing of this document does not grant you any license to these patents. You can send license inquiries, in writing, to:
IBM Director of Licensing IBM Corporation North Castle Drive Armonk, NY 10504-1785 U.S.A.
For license inquiries regarding double-byte (DBCS) information, contact the IBM Intellectual Property Department in your country or send inquiries, in writing, to:
Intellectual Property Licensing Legal and Intellectual Property Law IBM Japan, Ltd. 3-2-12, Roppongi, Minato-ku, Tokyo 106-8711 Japan
The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you.
This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice.
Any references in this information to non-IBM Web sites are provided for convenience only and do not in any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the materials for this IBM product and use of those Web sites is at your own risk.
IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you.
Licensees of this program who wish to have information about it for the purpose of enabling: (i) the exchange of information between independently created programs and other programs (including this one) and (ii) the mutual use of the information which has been exchanged, should contact:
IBM Corporation J46A/G4 555 Bailey Avenue San Jose, CA 95141-1003 U.S.A.
Such information may be available, subject to appropriate terms and conditions, including in some cases, payment of a fee.
The licensed program described in this document and all licensed material available for it are provided by IBM under terms of the IBM Customer Agreement, IBM International Program License Agreement or any equivalent agreement between us.
Any performance data contained herein was determined in a controlled environment. Therefore, the results obtained in other operating environments may vary significantly. Some measurements may have been made on development-level systems and there is no guarantee that these measurements will be the same on generally available systems. Furthermore, some measurements may have been estimated through extrapolation. Actual results may vary. Users of this document should verify the applicable data for their specific environment.
Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products.
All statements regarding IBM's future direction or intent are subject to change or withdrawal without notice, and represent goals and objectives only.
COPYRIGHT LICENSE:
This information contains sample application programs in source language, which illustrate programming techniques on various operating platforms. You may copy, modify, and distribute these sample programs in any form without payment to IBM, for the purposes of developing, using, marketing or distributing application programs conforming to the application programming interface for the operating platform for which the sample programs are written. These examples have not been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these programs. The sample programs are provided "AS IS", without warranty of any kind. IBM shall not be liable for any damages arising out of your use of the sample programs.