COM Manual

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 170

DownloadCOM Manual
Open PDF In BrowserView PDF
IBM® Workplace Forms™ Server - API



Version 2.6

COM API User's Manual

S229-1528-00

Note
Before using this information and the product it supports, read the information in “Notices,” on page 157.

First Edition (September 2006)
This edition applies to version 2.6 of IBM Workplace Forms Server - API (product number L-DSED-6JLR37) and to
all subsequent releases and modifications until otherwise indicated in new editions.
© Copyright International Business Machines Corporation 2003, 2006. All rights reserved.
US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract
with IBM Corp.

Contents
Introduction . . . . . . . . . . . . . 1
About This Manual . . . . . .
Who Should Read This Manual .
Document Conventions . . . .

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

. 1
. 1
. 1

About the API . . . . . . . . . . . . 3
Where the API Fits in Your System .
Differences Between the C, Java, and
of the API . . . . . . . . .
The API Data Types . . . . . .
IFormNodeP Objects . . . . .
About the API Constants . . . .

. .
COM
. .
. .
. .
. .

. . .
Editions
. . .
. . .
. . .
. . .

. 3
.
.
.
.

3
4
4
4

Overview of the Form Structure . . . . 5
The Node Structure . . . . . . . . . . . . 5
The Node Hierarchy . . . . . . . . . . . . 5
References . . . . . . . . . . . . . . . 6
Dereferencing . . . . . . . . . . . . . 7
Namespace in References . . . . . . . . . 8
Advanced Information about the Node Structure . . 8
A Sample Hierarchy . . . . . . . . . . . 9
The Sample Tree Structure . . . . . . . . . 9
Node Properties . . . . . . . . . . . . 10

Introduction to the Form Library. . . . 13
Getting Started with the Form Library
Setting Up Your Application . . . .
Initializing the Form Library. . . .
Loading a Form . . . . . . . .
Retrieving A Value from a Form . .
Setting a Value in a Form . . . . .
Writing a Form to Disk . . . . .
Closing a Form . . . . . . . .
Compiling Your Application . . . .
Testing your Application . . . . .
Distributing Applications That Use the
Summary . . . . . . . . . .

. .
. .
. .
. .
. .
. .
. .
. .
. .
Form
. .

15

. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
. . .
Library
. . .

Form Library Quick Reference Guide
Form Library Functions . . . . . .
About the Function Descriptions . . .
Using Signatures with the Form Library .
About Errors . . . . . . . . . .
About Output Parameters . . . . .

.
.
.
.
.

.
.
.
.
.

15
16
17
17
18
19
20
20
20
21
21

23
.
.
.
.
.

.
.
.
.
.

23
26
26
26
27

The Certificate Functions . . . . . . . 29
GetBlob. . . .
GetDataByPath .
GetIssuer . . .

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

.
.
.

. 29
. 30
. 33

CheckValidFormats . . . . . .
createCell . . . . . . . . .
DeleteSignature . . . . . . .
DereferenceEx . . . . . . .
Destroy . . . . . . . . . .
Duplicate . . . . . . . . .
EncloseFile . . . . . . . .
EncloseInstance . . . . . . .
ExtractFile . . . . . . . . .
ExtractInstance . . . . . . .
ExtractXFormsInstance . . . .
GetAttribute . . . . . . . .
GetCertificateList . . . . . .
GetChildren . . . . . . . .
GetFormVersion . . . . . . .
GetIdentifier . . . . . . . .
GetLiteralByRefEx . . . . . .
GetLiteralEx . . . . . . . .
GetLocalName . . . . . . .
GetNamespaceURI . . . . . .
GetNamespaceURIFromPrefix . .
GetNext . . . . . . . . .
GetNodeType . . . . . . . .
GetParent . . . . . . . . .
GetPrefix . . . . . . . . .
GetPrefixFromNamespaceURI . .
GetPrevious . . . . . . . .
GetReferenceEx . . . . . . .
GetSecurityEngineName . . . .
GetSigLockCount . . . . . .
GetSignature . . . . . . . .
GetSignatureVerificationStatus . .
GetType . . . . . . . . .
IsSigned . . . . . . . . .
IsValidFormat . . . . . . .
IsXFDL . . . . . . . . . .
RemoveAttribute . . . . . .
RemoveEnclosure . . . . . .
ReplaceXFormsInstance . . . .
SetActiveForComputationalSystem
SetAttribute . . . . . . . .
SetFormula . . . . . . . .
SetLiteralByRefEx . . . . . .
SetLiteralEx . . . . . . . .
SignForm . . . . . . . . .
UpdateXFormsInstance . . . .
ValidateHMACWithSecret . . .
ValidateHMACWithHashedSecret
VerifyAllSignatures . . . . .
VerifySignature . . . . . . .
WriteForm . . . . . . . .
WriteFormToASPResponse . . .
XMLModelUpdate . . . . . .

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

. 37
. 37
. 38
. 40
. 44
. 45
. 46
. 47
. 48
. 49
. 51
. 52
. 54
. 55
. 56
. 57
. 58
. 61
. 62
. 63
. 64
. 66
. 67
. 68
. 69
. 71
. 72
. 73
. 77
. 78
. 78
. 80
. 81
. 82
. 83
. 84
. 85
. 86
. 87
. 88
. 89
. 91
. 92
. 95
. 96
. 97
. 99
. . . . . . 102
. . . . . . 106
. . . . . . 107
. . . . . . 109
. . . . . . 110
. . . . . . 111

The FormNodeP Functions . . . . . . 35
FormNodeP Constants .
addNamespace . . .

.
.

.
.

© Copyright IBM Corp. 2003, 2006

.
.

.
.

.
.

.
.

.
.

.
.

.
.

. 35
. 35

The Hash Functions . . . . . . . . 113
iii

Hash .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 113

GetDataByPath .
GetSigningCert .

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

. 139
. 144

The Initialization Functions . . . . . 117
IFSInitialize . . . . .
IFSInitializeWithLocale .

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

. 117
. 119

.
.
.
.

.
.
.
.

The LocalizationManager Functions
GetCurrentThreadLocale.
GetDefaultLocale . . .
SetCurrentThreadLocale .
SetDefaultLocale . . .

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

123
123
125
128
130

The XFDL Functions . . . . . . . . 147
Create . . . . . . . .
GetEngineCertificateList . .
IsDigitalSignaturesAvailable
ReadForm . . . . . .
ReadFormFromASPRequest

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

147
149
151
152
154

Appendix. Notices . . . . . . . . . 157
Trademarks .

.

.

.

.

.

.

.

.

.

.

.

.

. 158

The SecurityManager Functions . . . 135
LookupHashAlgorithm .

.

.

.

.

.

.

.

.

. 135

The Signature Functions . . . . . . 139

iv

Index . . . . . . . . . . . . . . . 159

Introduction
Welcome to the COM Edition of the user’s manual for the IBM® Workplace Forms™
Server — API. The API extends the capabilities of Workplace Forms by enabling
you to:
v Manipulate XFDL forms from new or existing applications.
v Create custom-built functions that may be integrated into XFDL forms.
This section discusses the organization and format of this manual. To learn more
about the API, refer to “About the API” on page 3.

About This Manual
This manual has been organized as both an instruction manual and a quick
reference. It describes the functions available in the API and provides examples of
their use.
This manual contains the following major sections:
Section

Page

Introduction — introduces you to the
features of the API.

“Introduction”

Overview of the Form Structure — explains “Overview of the Form Structure” on page 5
how XFDL forms are stored in memory.
Getting Started with the Form Library —
provides a detailed tutorial demonstrating
how to create a simple application that
interacts with an XFDL form.

“Introduction to the Form Library” on page
13

Form Library Quick Reference — a
reference to the functions contained in the
Form Library. Each method description
includes sample code.

“Form Library Quick Reference Guide” on
page 23

Who Should Read This Manual
The API is designed to be easy to use for any moderately experienced programmer.
However, the skill level required to develop particular functions may be quite
high. This document is intended for developers who have a working knowledge
of:
v COM compliant programming and syntax.
v Extensible Forms Description Language (XFDL) and syntax. Refer to the
Extensible Forms Description Language Specification for more information.

Document Conventions
The following conventions appear throughout this manual:
v Sample code is presented in a monospaced font, and is indented to make the
code stand out:

© Copyright IBM Corp. 2003, 2006

1

Sub SaveForm(Form, ThePath)
’ Write the form to a file on disk
Form.WriteForm ThePath, Nothing, 0
End Sub

v Text in bold italics represents information that you need to supply:

Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.3
Linearized                      : Yes
Page Count                      : 170
Page Mode                       : UseOutlines
XMP Toolkit                     : XMP toolkit 2.9.1-13, framework 1.6
About                           : uuid:2fba0bfe-4016-4217-b868-f5df1fb607c8
Identifier                      : S229-1528-00
Producer                        : Acrobat Distiller 6.0 (Windows)
Keywords                        : 
Creator Tool                    : XPP
Modify Date                     : 2006:09:18 18:38:59Z
Create Date                     : 2006:09:18 18:38:59Z
Document ID                     : uuid:d4c770d9-8bfd-4ac0-a1f0-feaa5bfe5a39
Format                          : application/pdf
Creator                         : IBM
Title                           : 
Description                     : 
Tagged PDF                      : Yes
Author                          : IBM
Subject                         : 
EXIF Metadata provided by EXIF.tools

Navigation menu